import path_setting
from in_common.base_request import BaseRequest


class face_request(BaseRequest):
    def __init__(self):
        self.data = self.api_load(path_setting.FACE_DIARY_CARDS_CONFIG)


    # 根据多个标签推荐日记
    def diarys_cards(self,facial_type2tag_names):
        self.params["facial_type2tag_names"] = facial_type2tag_names
        return self.api_send(self.data["face_diarys"])

    # 3D 底部feed流
    def plastic_feeds(self, tag_id, face_id, tag_id_list, page_size, version):
        self.params["tag_id"] = tag_id
        self.params["face_id"] = face_id
        self.params["tag_id_list"] = tag_id_list
        self.params["page_size"] = page_size
        self.params["version"] = version
        return self.api_send(self.data["plastic_feeds"])




if __name__ == '__main__':
    # facial_type2tag_names = '{"2":["玻尿酸垫下巴","自体脂肪垫下巴"],"3":["半永久纹眉","植眉"]}'
    # print(face_request().diarys_cards(facial_type2tag_names))
    print(face_request().plastic_feeds('2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389', 9,
                                       '[[845, 498, 497, 494], [880, 484, 3254], [276], [1070, 373, 372, 350], [494, 315], [1293, 1050], [284, 282], [254, 251], [1000, 494, 312], [295, 272, 253], [1376, 1365, 1088, 892, 395, 385], [427, 327], [3214, 1377, 1306, 1051, 327, 229]]', 10, "7.44.0"))