import path_setting
from in_common.base_request import BaseRequest



class service_request(BaseRequest):
    def __init__(self):
        self.data = self.api_load(path_setting.HOME_V5_CONFIG) #/all_backend_api/service_request.yaml

    def home_v5(self):

        return self.api_send(self.data["home_v5"])

    #商祥页-收藏
    def service_favor(self):
        return self.api_send(self.data["service_favor"])

 # 首页（灰度）feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
    def feed_home(self, tab_value, input_type, version = '7.42.2' , device_id = 'androidid_49973caa1b578d85', current_city_id = 'beijing'):
        self.params['version'] = version
        self.params['device_id'] = device_id
        self.params['tab_value'] = tab_value
        self.params['current_city_id'] = current_city_id
        self.params['input_type'] = input_type
        return self.api_send(self.data["feed_home"])

if __name__ == '__main__':
    print(service_request().home_v5())

    #打印商祥页-收藏接口返回
    print(service_request().service_favor())