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_canclevote(self, topic_id):
        self.params["topic_id"] = topic_id
        return self.api_send(self.data["canclevote"])

    # 进入日记贴详情页-用来判断这篇日记贴点赞过没
    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)






