1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import path_setting
from in_common.base_request import BaseRequest
class topic_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.TOPIC_CONFIG)
# 详情页内部--点赞
def topic_vote(self, topic_id):
self.params["topic_id"] = topic_id
return self.api_send(self.data["vote"])
# 详情页内部-取消点赞
def topic_cancelvote(self, topic_id):
self.params["topic_id"] = topic_id
return self.api_send(self.data["cancelvote"])
# 进入日记贴详情页-用来判断这篇日记贴点赞过没
def topic_detail(self, topic_id):
self.params["topic_id"] = topic_id
return self.api_send(self.data["detail"])
# def diary_test(self):
# return self.api_send(self.data["detail"])
# if __name__ == '__main__':
# r = diary_vote_request.diary_detail(21249959)
# print(r)