import path_setting
from in_common.base_request import BaseRequest


class glmer_request(BaseRequest):
    def __init__(self):
        self.REGISTER_URL = self.api_load(path_setting.REGISTER_URL)

    def service_register(self,name,project_type,upgrade,short_description,doctor_id,start_time,end_time,photo_details,image_header,video_token,service_type,is_specialreview,reservation,have_extra_pay,is_draft,items,csrfmiddlewaretoken):
        self.params["name"] = name
        self.params["project_type"] = project_type
        self.params["upgrade"] = upgrade
        self.params["short_description"] = short_description
        self.params["doctor_id"] = doctor_id
        self.params["start_time"] = start_time
        self.params["end_time"] = end_time
        self.params["photo_details"] = photo_details
        self.params["image_header"] = image_header
        self.params["video_token"] = video_token
        self.params["service_type"] = service_type
        self.params["is_specialreview"] = is_specialreview
        self.params["reservation"] = reservation
        self.params["have_extra_pay"] = have_extra_pay
        self.params["is_draft"] = is_draft
        self.params["items"] = items
        self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
        return self.api_send(self.REGISTER_URL["service_register"])



    def service_detail(self) :
        return self.api_send(self.REGISTER_URL["service_detail"])





if __name__ == '__main__':
    print(glmer_request().service_register("激光溶脂瘦脸", "[236]", "true", "测试", "wangyang", "1624377600", "1627660800", "<p>12</p>", "https://heras.igengmei.com/service/2021/06/01/0b9b110e60", "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL:nBdvXYz_CR7wNcuroo3TLyvuQiY=:eyJzY29wZSI6InZpZGVvIiwiZGVhZGxpbmUiOjE2MjI1MTg2NTd9", "0", "false", "1", "false", "0", '[{"gengmei_price":100,"original_price":200,"is_online":true}]',"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
    print(glmer_request().service_detail())