util/requests.py
def create_observation(video_reference_uuid, concept, observer,
                       timecode=None, elapsed_time_millis=None, recorded_timestamp=None):
    """
    Create an observation. One of timecode, elapsed_time, or recorded_timestamp is required as an index
    :param video_reference_uuid: Video reference UUID
    :param concept: Concept observed
    :param observer: Observer tag
    :param timecode: Optional timecode of observation
    :param elapsed_time_millis: Optional elapsed time of observation
    :param recorded_timestamp: Optional recorded timestamp of observation
    :return: HTTP response JSON if success, else None
    """
    request_data = {
        'video_reference_uuid': video_reference_uuid,
        'concept': concept,
        'observer': observer,
        'activity': 'localize'
    }

    if not (timecode or elapsed_time_millis or recorded_timestamp):
        util.utils.log('No observation index provided. Observation creation failed.', level=2)
        return

    if timecode:
        request_data['timecode'] = timecode
    if elapsed_time_millis:
        request_data['elapsed_time_millis'] = int(elapsed_time_millis)
    if recorded_timestamp:
        request_data['recorded_timestamp'] = recorded_timestamp

    token = check_auth()

    response = requests.post(
        util.utils.get_property('endpoints', 'observation'),
        data=request_data,
        headers={
            'Authorization': 'BEARER {}'.format(token)
        }
    )
    return response.json()

    Create an observation. One of timecode, elapsed_time, or recorded_timestamp is required as an index
    :param video_reference_uuid: Video reference UUID
    :param concept: Concept observed
    :param observer: Observer tag
    :param timecode: Optional timecode of observation
    :param elapsed_time_millis: Optional elapsed time of observation
    :param recorded_timestamp: Optional recorded timestamp of observation
    :return: HTTP response JSON if success, else None
    
Create an observation. One of timecode, elapsed_time, or recorded_timestamp is required as an index
Create an observation . One of timecode elapsed_time or recorded_timestamp is required as an index
def create_observation(video_reference_uuid, concept, observer,
                       timecode=None, elapsed_time_millis=None, recorded_timestamp=None):
    request_data = {
        'video_reference_uuid': video_reference_uuid,
        'concept': concept,
        'observer': observer,
        'activity': 'localize'
    }
    if not (timecode or elapsed_time_millis or recorded_timestamp):
        util.utils.log('No observation index provided. Observation creation failed.', level=2)
        return
    if timecode:
        request_data['timecode'] = timecode
    if elapsed_time_millis:
        request_data['elapsed_time_millis'] = int(elapsed_time_millis)
    if recorded_timestamp:
        request_data['recorded_timestamp'] = recorded_timestamp
    token = check_auth()
    response = requests.post(
        util.utils.get_property('endpoints', 'observation'),
        data=request_data,
        headers={
            'Authorization': 'BEARER {}'.format(token)
        }
    )
    return response.json()
def create_observation ( video_reference_uuid , concept , observer , timecode = None , elapsed_time_millis = None , recorded_timestamp = None ) : request_data = { 'video_reference_uuid' : video_reference_uuid , 'concept' : concept , 'observer' : observer , 'activity' : 'localize' } if not ( timecode or elapsed_time_millis or recorded_timestamp ) : util . utils . log ( 'No observation index provided. Observation creation failed.' , level = 2 ) return if timecode : request_data [ 'timecode' ] = timecode if elapsed_time_millis : request_data [ 'elapsed_time_millis' ] = int ( elapsed_time_millis ) if recorded_timestamp : request_data [ 'recorded_timestamp' ] = recorded_timestamp token = check_auth ( ) response = requests . post ( util . utils . get_property ( 'endpoints' , 'observation' ) , data = request_data , headers = { 'Authorization' : 'BEARER {}' . format ( token ) } ) return response . json ( )
Create an observation.
Create an observation .
"""
    Create an observation. One of timecode, elapsed_time, or recorded_timestamp is required as an index
    :param video_reference_uuid: Video reference UUID
    :param concept: Concept observed
    :param observer: Observer tag
    :param timecode: Optional timecode of observation
    :param elapsed_time_millis: Optional elapsed time of observation
    :param recorded_timestamp: Optional recorded timestamp of observation
    :return: HTTP response JSON if success, else None
    """
HTTP response JSON if success, else None
HTTP response JSON if success else None
video_reference_uuid
Video reference UUID
Video reference UUID
concept
None
observer
None
timecode
Optional timecode of observation
Optional timecode of observation
elapsed_time_millis
Optional elapsed time of observation
Optional elapsed time of observation
recorded_timestamp
Optional recorded timestamp of observation
Optional recorded timestamp of observation