def setUp(self):
        '''初始化请求数据url'''
        url = LiveAPIData.urlData(self)
        url = url + "/api/room/create?"
        data = LiveAPIData.createData(self)
        self.sql_data = LiveAPIData.insert_roomid
        self.create_data, self.create_all_data, self.create_white_data, self.bat_create_data = data[
            0], data[1], data[2], data[3]

        # 加密传输数据
        t = THQS.thqs()
        create_data = t.get_thqs(self.create_data)
        create_all_data = t.get_thqs(self.create_all_data)
        create_white_data = t.get_thqs(self.create_white_data)
        bat_create_data = t.get_thqs(self.bat_create_data)

        # 拼接请求url
        self.create_url = url + create_data
        self.createa_all_url = url + create_all_data
        self.create_white_url = url + create_white_data
        self.bat_create_url = url + bat_create_data
        self.live = LiveAPIRequests.LiveAPIRequests

        # 实例化写入TXT的模块
        self.with_roomid = withOpenDef.WithOpenDef()
Ejemplo n.º 2
0
 def setUp(self):
     '''初始化请求数据url'''
     url = "http://api.csslcloud.net/api/room/create?"
     # 加密
     create_data = LiveAPIData.createData(self)
     t = THQS.thqs()
     self.create_data = t.get_thqs(create_data)
     # 拼接url
     self.create_url = url + self.create_data
     # 实例化请求处理模块
     self.live = LiveAPIRequests.LiveAPIRequests
     # 实例化操作数据库的模块
     self.sql_data = SQLData.SQLData()