stanfordnmbl / opencap-api

Apache License 2.0
5 stars 6 forks source link

get sessions call returns public sessions not belonging to user #138

Open antoinefalisse opened 9 months ago

antoinefalisse commented 9 months ago

This call will return public sessions not belonging to the user.

def get_user_sessions(user_token=API_TOKEN):
    sessions = requests.get(
        API_URL + "sessions/valid/", 
        headers = {"Authorization": "Token {}".format(user_token)}).json()

    return sessions