Exemplo n.º 1
0
 def list_streams(self, **args):
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, **args)
     items = []
     for data in res["items"] if res["items"] is not None else []:
         items.append(Stream(self.__auth__, stream_id=data["id"]))
     res["items"] = items
     return res
Exemplo n.º 2
0
 def list_streams(self, marker=None, limit=None):
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, marker=marker, limit=limit)
     items = []
     for data in res["items"]:
         items.append(Stream(self.__auth__, stream_id=data["id"]))
     res["items"] = items
     return res
Exemplo n.º 3
0
 def list_streams(self, **args):
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, **args)
     items = []
     for data in res["items"] if res["items"] is not None else []:
         items.append(Stream(self.__auth__, stream_id=data["id"]))
     res["items"] = items
     return res
Exemplo n.º 4
0
 def list_streams(self, marker=None, limit=None):
     res = api.get_stream_list(self.__auth__,
                               hub=self.__hub__,
                               marker=marker,
                               limit=limit)
     items = []
     for data in res["items"]:
         items.append(Stream(self.__auth__, stream_id=data["id"]))
     res["items"] = items
     return res
Exemplo n.º 5
0
 def list(self, **kwargs):
     """
       list 遍历hub的流列表
       输入参数:
           prefix: 字符串,匹配的流名前缀
           liveonly: 布尔值,可选,如果为True则只列出正在直播的流
           limit: 正整数,限定了一次最多可以返回的流个数,实际返回的流个数可能会小于这个值
           marker: 字符串,上一次遍历得到的游标
       返回值:
           items: 字符串数组,查询返回的流名
           marker: 这次遍历得到的游标,下次请求应该带上,如果为"",则表示已遍历完所有流
       """
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, **kwargs)
     return res
Exemplo n.º 6
0
 def list(self, **kwargs):
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, **kwargs)
     return res
Exemplo n.º 7
0
 def list(self, **kwargs):
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, **kwargs)
     return res
Exemplo n.º 8
0
 def list_streams(self, marker=None, limit=None):
     res = api.get_stream_list(self.__auth__, hub=self.__hub__, marker=marker, limit=limit)
     res["items"] = [Stream(self.__auth__, stream_id=data["id"]) for data in res["items"]] if res["items"] else []
     return res