import path_setting from in_common.base_request import BaseRequest class hospital_request(BaseRequest): def __init__(self): self.data = self.api_load(path_setting.HOSPITAL_DIARY_CONFIG) #医院主页日记列表 def diary(self, hospital): self.params["hospital"] = hospital return self.api_send(self.data["diary"]) if __name__ == '__main__': #打印医院主页日记列表接口返回 print(hospital_request().diary("bjxyjcpfbyy"))