Exemple #1
0
def get_indivo_client(request, with_session_token=True):
    client = IndivoClient(settings.INDIVO_SERVER_OAUTH['consumer_key'],
                          settings.INDIVO_SERVER_OAUTH['consumer_secret'],
                          settings.INDIVO_SERVER_LOCATION)
    if with_session_token:
        client.update_token(request.session['access_token'])
    return client
Exemple #2
0
def get_api(request=None):
    api = IndivoClient(settings.CONSUMER_KEY, settings.CONSUMER_SECRET,
                       SMART_SERVER_LOCATION)
    if request:
        api.update_token(request.session['oauth_token_set'])

    return api
Exemple #3
0
def get_indivo_client(token=None):
    client = IndivoClient(settings.INDIVO_SERVER_OAUTH['consumer_key'],
                          settings.INDIVO_SERVER_OAUTH['consumer_secret'],
                          settings.INDIVO_SERVER_LOCATION)
    if token:
        client.update_token(token)
    return client
Exemple #4
0
def get_indivo_client(request, with_session_token=True):
    client = IndivoClient(settings.INDIVO_SERVER_OAUTH['consumer_key'],
                          settings.INDIVO_SERVER_OAUTH['consumer_secret'],
                          settings.INDIVO_SERVER_LOCATION)
    if with_session_token:
        client.update_token(request.session['access_token'])
    return client
Exemple #5
0
def get_api(request=None):
    api = IndivoClient(settings.CONSUMER_KEY, settings.CONSUMER_SECRET,
                       SMART_SERVER_LOCATION)
    if request:
        api.update_token(request.session['oauth_token_set'])

    return api
Exemple #6
0
def get_indivo_client(token=None):
    client = IndivoClient(settings.INDIVO_SERVER_OAUTH['consumer_key'],
                          settings.INDIVO_SERVER_OAUTH['consumer_secret'],
                          settings.INDIVO_SERVER_LOCATION)
    if token:
        client.update_token(token)
    return client