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 to_hospital_list(self):
        return self.api_send(self.data["to_hospital_list"])

    # # 进入发帖子页面-选择美购--医生账号没发走暂时注释
    # def to_service_list(self):
    #     return self.api_send(self.data["to_service_list"])



    # def diary_test(self):
    #     return self.api_send(self.data["detail"])



# if __name__ == '__main__':
#     r = diary_vote_request.diary_detail(21249959)
#     print(r)






