import path_setting
from in_common.base_request import BaseRequest


class living_request(BaseRequest):
    def __init__(self):
        self.data = self.api_load(path_setting.LIVEYAML_CONFIG)
#获取弹幕
    def danmu_v2(self,channel_id,msg_id,user_id=""):
        self.params["channel_id"] = channel_id
        self.params["msg_id"] = msg_id
        self.params["user_id"] = user_id
        return self.api_send(self.data["danmu_v2"])
#主播开播
    def pushlive_info(self,title,cover_url,notice,tag_id,clarity,device_type):
        self.params["title"] = title
        self.params["cover_url"] = cover_url
        self.params["notice"] = notice
        self.params["tag_id"] = tag_id
        self.params["clarity"] = clarity
        self.params["device_type"] = device_type
        return self.api_send(self.data["pushlive_info"])


if __name__ == '__main__':
    (living_request().danmu_v2("739", "1"))
    (living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))