Commit 6a3ad08b authored by 林颖's avatar 林颖

评论相关--后续

parent d06bf18d
#日记本列表--日记贴点赞
vote:
method: get
url: /api/common/reply
params:
id: ${id}
type: ${type}
data: {}
json: {}
isLogin: 0 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
import path_setting
from in_common.base_request import BaseRequest
class diary_common_reply_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.DIARY_COMMON_REPLY_CONFIG)
def diary_common_reply(self, id, type):
self.params["id"] = id
self.params["type"] = type
return self.api_send(self.data["vote"])
#日记本列表--日记贴点赞
vote:
method: post
url: /hybrid/api/topic/vote/_data
params:
data:
id: ${id}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
canclevote:
method: post
url: /hybrid/api/topic/cancel_vote/_data
params:
data:
id: ${id}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
detail:
method: get
url: /api/topic/v1
params:
topic_id: ${topic_id}
data: {}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
import path_setting
from in_common.base_request import BaseRequest
class diary_vote_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.DIARY_VOTE_CONFIG)
def diary_vote(self, id):
self.params["id"] = id
return self.api_send(self.data["vote"])
def diary_canclevote(self, id):
self.params["id"] = id
return self.api_send(self.data["canclevote"])
# 进入日记贴详情页-用来判断这篇日记贴点赞过没
def diary_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)
#推荐内容
personal_recommends:
method: get
url: /api/personal/recommends/v1
params:
current_city_id: ${current_city_id}
id: ${id}
from_type: ${from_type}
data: {}
json: {}
isLogin: 0 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#查看日记本相册页面
#album:
# method: get
# url: /hybrid/diary/album/17586198/_data
# params:
# data: {}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
import path_setting
from in_common.base_request import BaseRequest
class personal_recommends_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.PERSONAL_RECOMMENDS_CONFIG)
def personal_recommends(self, current_city_id, id, from_type):
self.params["current_city_id"] = current_city_id
self.params["id"] = id
self.params["from_type"] = from_type
return self.api_send(self.data["personal_recommends"])
#查看用户帖子详情页
tractate_detail:
method: get
url: /api/tractate/new_detail
params:
current_city_id: ${current_city_id}
tractate_id: ${tractate_id}
data_type: ${data_type}
data: {}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#查看日记本相册页面
#album:
# method: get
# url: /hybrid/diary/album/17586198/_data
# params:
# data: {}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
import path_setting
from in_common.base_request import BaseRequest
class tractate_detail_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.TRACTATE_DETAIL_CONFIG)
def tractate_detail(self, current_city_id, tractate_id, data_type):
self.params["current_city_id"] = current_city_id
self.params["tractate_id"] = tractate_id
self.params["data_type"] = data_type
return self.api_send(self.data["tractate_detail"])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment