How to use the mediacloud.api function in mediacloud

To help you get started, we’ve selected a few mediacloud examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mitmedialab / MediaCloud-Web-Tools / server / auth.py View on Github external
def user_mediacloud_client():
    '''
    Return a mediacloud client for the logged in user
    '''
    user_mc_key = user_mediacloud_key()
    user_mc = mediacloud.api.MediaCloud(user_mc_key)
    return user_mc
github mitmedialab / MediaCloud-Web-Tools / server / auth.py View on Github external
def user_mediacloud_client(user_mc_key=None):
    # Return a mediacloud client for the logged in user.  Passing in a key lets you ovveride reading it out
    # of the request object (which you might not have access to)
    mc_key_to_use = user_mc_key
    if mc_key_to_use is None:
        mc_key_to_use = user_mediacloud_key()
    user_mc = mediacloud.api.MediaCloud(mc_key_to_use)
    return user_mc
github mitmedialab / MediaCloud-Web-Tools / server / auth.py View on Github external
def _get_user_profile(key):
    user_mc = mediacloud.api.MediaCloud(key)
    profile = user_mc.userProfile()
    return profile