import path_setting
from in_common.base_request import BaseRequest


class qa_request(BaseRequest):
    def __init__(self):
        self.data = self.api_load(path_setting.QA_CONFIG)
        # print(self.replyanswer)

    # 帖子收藏
    def favor(self, answer_id):
        self.params["answer_id"] = answer_id
        return self.api_send(self.data["favor"])

    # 帖子取消收藏
    def cancelfavor(self, answer_id):
        self.params["answer_id"] = answer_id
        return self.api_send(self.data["cancelfavor"])


