import path_setting
from in_common.base_request import BaseRequest


class hybrid_api_topic_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_cancelvote(self, id):
        self.params["id"] = id
        return self.api_send(self.data["cancelvote"])

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






