Beispiel #1
0
def getControlHostPort():

    url = 'http://%s/get_control_host_port/%s' % (apiHost,
                                                  commandArgs.robot_id)
    response = robot_util.getWithRetry(url, secure=commandArgs.secure_cert)
    print("response:", response)
    return json.loads(response)
def getControlHost():

        url = apiHost+'/get_control_host_port/'+commandArgs.robot_id 

        response = robot_util.getWithRetry(url, secure=commandArgs.secure_cert)
        print("response:", response)
        return json.loads(response)
Beispiel #3
0
def getChatHost():

    #url = apiHost+'/v1/get_endpoint/rschat/'+commandArgs.robot_id #only for individual
    url = apiHost + '/v1/get_endpoint/rschat/100'

    response = robot_util.getWithRetry(url, secure=commandArgs.secure_cert)
    print("response:", response)
    return json.loads(response)
def getRobotID():

    #todo: need to get from api
    return 100

    url = '%s://%s/get_robot_id/%s' % (infoServerProtocol, infoServer, commandArgs.camera_id)
    response = robot_util.getWithRetry(url)
    return json.loads(response)['robot_id']
Beispiel #5
0
def getChatChannels(host):
    url = 'https://%s/api/%s/channels/list/%s' % (server, version, host)
    response = robot_util.getWithRetry(url)
    log.debug("getChatChannels : %s", response)
    return json.loads(response)
Beispiel #6
0
def getOnlineRobotSettings(robotID):
    url = '%s/api/v1/robots/%s' % (apiServer, robotID)
    response = robot_util.getWithRetry(url)
    return json.loads(response)
Beispiel #7
0
def getWebsocketRelayHost():
    url = '%s://%s/get_websocket_relay_host/%s' % (
        infoServerProtocol, infoServer, commandArgs.camera_id)
    response = robot_util.getWithRetry(url).decode('utf-8')
    return json.loads(response)
Beispiel #8
0
def getAudioPort():

    url = '%s://%s/get_audio_port/%s' % (infoServerProtocol, infoServer,
                                         commandArgs.camera_id)
    response = robot_util.getWithRetry(url)
    return json.loads(response)['audio_stream_port']
Beispiel #9
0
def getFrontPage():
    url = 'https://%s/api/v1/robocasters/internal/frontpage' % apiServer
    response = robot_util.getWithRetry(url, secure=secure_cert)
    log.debug("getFrontPage : %s", response)
    return json.loads(response)
Beispiel #10
0
def getChatHostPort():
    url = 'https://%s/get_chat_host_port/%s' % (infoServer, robot_id)
    response = robot_util.getWithRetry(url, secure=secure_cert)
    log.debug("getChatHostPort : %s", response)
    return json.loads(response)
Beispiel #11
0
def getOnlineRobotSettings(robotID):
    url = 'https://%s/api/v1/robots/%s' % (apiServer, robotID)
    response = robot_util.getWithRetry(url, secure=secure_cert)
    log.debug("getOnlineRobotSettings : %s", response)
    return json.loads(response)
def getVideoSFU():
    url = '%s/v1/get_endpoint/webrtc_sfu/100' % (apiServer)
    response = robot_util.getWithRetry(url)
    return json.loads(response)
Beispiel #13
0
def getVideoPort():

    url = 'https://%s/get_video_port/%s' % (server, commandArgs.camera_id)
    response = robot_util.getWithRetry(url)
    return json.loads(response)['mpeg_stream_port']
Beispiel #14
0
def getRobotID():

    url = 'https://%s/get_robot_id/%s' % (server, commandArgs.camera_id)
    response = robot_util.getWithRetry(url)
    return json.loads(response)['robot_id']
Beispiel #15
0
def getControlHostPort():

    url = 'https://%s/get_control_host_port/%s?version=2' % (
        infoServer, commandArgs.robot_id)
    response = robot_util.getWithRetry(url, secure=commandArgs.secure_cert)
    return json.loads(response)
Beispiel #16
0
def getVideoPort():
    import robot_util
    import json
    url = 'https://%s/get_video_port/%s' % (infoServer, camera_id)
    response = robot_util.getWithRetry(url)
    return (json.loads(response)['mpeg_stream_port'])
Beispiel #17
0
def getOwnerDetails(username):
    url = 'https://%s/api/v1/accounts/%s' % (apiServer, username)
    #    url = 'https://api.letsrobot.tv/api/v1/robocasters/%s' % (username)
    response = robot_util.getWithRetry(url, secure=secure_cert)
    log.debug("getOwnerDetails : %s", response)
    return json.loads(response)
Beispiel #18
0
def getChatHostPort():
    url = 'https://%s/get_chat_host_port/%s' % (infoServer,
                                                commandArgs.robot_id)
    response = robot_util.getWithRetry(url)
    return json.loads(response)
Beispiel #19
0
def getAudioPort():
    url = 'https://%s/get_audio_port/%s' % (infoServer, camera_id)
    response = robot_util.getWithRetry(url, secure=secure_cert)
    log.debug("getAudioPort : %s", response)
    return json.loads(response)['audio_stream_port']
Beispiel #20
0
def getRobotID():

    url = '%s://%s/get_robot_id/%s' % (infoServerProtocol, infoServer,
                                       commandArgs.camera_id)
    response = robot_util.getWithRetry(url).decode('utf-8')
    return json.loads(response)['robot_id']
Beispiel #21
0
def getWebsocketRelayHost():
    url = 'https://%s/get_websocket_relay_host/%s' % (infoServer, camera_id)
    response = robot_util.getWithRetry(url, secure=secure_cert)
    log.debug("getWebsocketRelayHost : %s", response)
    return json.loads(response)
Beispiel #22
0
def getOnlineRobotSettings(robotID):
    url = 'https://%s/api/v1/robots/%s' % (apiServer, robotID)
    response = robot_util.getWithRetry(url).decode('utf-8')
    return json.loads(response)
Beispiel #23
0
def getChatHostPort():
    url = 'https://%s/get_chat_host_port/%s' % (infoServer, robot_id)
    response = robot_util.getWithRetry(url, secure=secure_cert).decode('utf-8')
    return json.loads(response)
Beispiel #24
0
def getVideoEndpoint():
    url = '%s/v1/get_endpoint/jsmpeg_video_capture/%s' % (
        apiServer, commandArgs.camera_id)
    response = robot_util.getWithRetry(url)
    return json.loads(response)
Beispiel #25
0
def getOwnerDetails(username):
    url = 'https://api.letsrobot.tv/api/v1/accounts/%s' % (username)
    #    url = 'https://api.letsrobot.tv/api/v1/robocasters/%s' % (username)
    response = robot_util.getWithRetry(url, secure=secure_cert).decode('utf-8')
    return json.loads(response)