import path_setting
from in_common.base_request import BaseRequest


class web_request(BaseRequest):
    def __init__(self):
        self.ACCOUNT_URL = self.api_load(path_setting.ACCOUNT_URL)

    def account_unreadbadgecount(self) :
        return self.api_send(self.ACCOUNT_URL["account_unreadbadgecount"])

    def article_videotoken(self) :
        return self.api_send(self.ACCOUNT_URL["article_videotoken"])

    def doctor_submechanisms(self) :
        return self.api_send(self.ACCOUNT_URL["doctor_submechanisms"])


    def conversation(self, is_star, page):
        self.params["is_star"] = is_star
        self.params["page"] = page
        return self.api_send(self.ACCOUNT_URL["conversation"])


    def service_offline(self,id,csrfmiddlewaretoken):
        self.params["id"] = id
        self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
        return self.api_send(self.ACCOUNT_URL["service_offline"])

    def conversation_unread_list(self, page):
        self.params["page"] = page
        return self.api_send(self.ACCOUNT_URL["conversation_unread_list"])

    def service(self):
        return self.api_send(self.ACCOUNT_URL["service"])

    def conversation_diary(self, doctor_user_id):
        self.params["doctor_user_id"] = doctor_user_id
        return self.api_send(self.ACCOUNT_URL["conversation_diary"])
    def conversation_coupon(self, doctor_user_id):
        self.params["doctor_user_id"] = doctor_user_id
        return self.api_send(self.ACCOUNT_URL["conversation_coupon"])






if __name__ == '__main__':
    print(web_request().account_unreadbadgecount())
    print(web_request().article_videotoken())
    print(web_request().doctor_submechanisms())
    print(web_request().conversation(0, 1))
    print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
    print(web_request().conversation_unread_list(1))
    print(web_request().service())
    print("发送")
    print(web_request().conversation_diary(602329))
    print(web_request().conversation_coupon(602329))

