def __init__(self): self.connection = Connection( workspace_api_domain=uiza.workspace_api_domain, api_key=uiza.authorization) self.connection.url = set_url( workspace_api_domain=self.connection.workspace_api_domain, api_type=settings.uiza_api.livestreaming.type, api_version=settings.uiza_api.livestreaming.version, api_sub_url=settings.uiza_api.livestreaming.sub_url)
def get_regions(self): self.connection.url = set_url( workspace_api_domain=self.connection.workspace_api_domain, api_type=settings.uiza_api.livestreaming.type, api_version=settings.uiza_api.livestreaming.version, api_sub_url=settings.uiza_api.livestreaming.live_url) + "/region" result = self.connection.get() return result
def __init__(self): self.connection = Connection(workspace_api_domain=uiza.workspace_api_domain, api_key=uiza.authorization) self.connection.url = set_url( workspace_api_domain=self.connection.workspace_api_domain, api_type=settings.uiza_api.category.type, api_version=settings.uiza_api.category.version, api_sub_url=settings.uiza_api.category.sub_url ) self.category_relation_entity_url = set_url( workspace_api_domain=self.connection.workspace_api_domain, api_type=settings.uiza_api.category.type, api_version=settings.uiza_api.category.version, api_sub_url='media/metadata/related/entity' ) self.category_relation_metadata_url = set_url( workspace_api_domain=self.connection.workspace_api_domain, api_type=settings.uiza_api.category.type, api_version=settings.uiza_api.category.version, api_sub_url='media/entity/related/metadata' )
def get_aws_upload_key(self): """ Return the bucket temporary upload storage & key for upload :param appId: appId """ aws_sub_url = 'admin/app/config/aws' self.connection.url = set_url( workspace_api_domain=self.connection.workspace_api_domain, api_type=settings.uiza_api.entity.type, api_version=settings.uiza_api.entity.version, api_sub_url=aws_sub_url) query = self.url_encode(params={'appId': uiza.app_id}) data = self.connection.get(query=query) return data