Skip to content

Latest commit

 

History

History
522 lines (365 loc) · 15.4 KB

UsersApi.md

File metadata and controls

522 lines (365 loc) · 15.4 KB

clever_client.UsersApi

All URIs are relative to https://api.clever.com

Method HTTP request Description
get_contacts_for_user GET /users/{id}/mycontacts
get_district_for_user GET /users/{id}/district
get_resources_for_user GET /users/{id}/resources
get_schools_for_user GET /users/{id}/schools
get_sections_for_user GET /users/{id}/sections
get_students_for_user GET /users/{id}/mystudents
get_teachers_for_user GET /users/{id}/myteachers
get_user GET /users/{id}
get_users GET /users

get_contacts_for_user

UsersResponse get_contacts_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)

Returns the contact users for a student user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 
limit = 56 # int |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)

try:
    api_response = api_instance.get_contacts_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_contacts_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str
limit int [optional]
starting_after str [optional]
ending_before str [optional]

Return type

UsersResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_district_for_user

DistrictResponse get_district_for_user(id)

Returns the district for a user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 

try:
    api_response = api_instance.get_district_for_user(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_district_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

DistrictResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_resources_for_user

ResourcesResponse get_resources_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)

Returns the resources for a user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 
limit = 56 # int |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)

try:
    api_response = api_instance.get_resources_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_resources_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str
limit int [optional]
starting_after str [optional]
ending_before str [optional]

Return type

ResourcesResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_schools_for_user

SchoolsResponse get_schools_for_user(id, primary=primary, limit=limit, starting_after=starting_after, ending_before=ending_before)

Returns the schools for a user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 
primary = 'primary_example' # str |  (optional)
limit = 56 # int |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)

try:
    api_response = api_instance.get_schools_for_user(id, primary=primary, limit=limit, starting_after=starting_after, ending_before=ending_before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_schools_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str
primary str [optional]
limit int [optional]
starting_after str [optional]
ending_before str [optional]

Return type

SchoolsResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_sections_for_user

SectionsResponse get_sections_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)

Returns the sections for a user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 
limit = 56 # int |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)

try:
    api_response = api_instance.get_sections_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_sections_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str
limit int [optional]
starting_after str [optional]
ending_before str [optional]

Return type

SectionsResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_students_for_user

UsersResponse get_students_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)

Returns the student users for a teacher or contact user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 
limit = 56 # int |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)

try:
    api_response = api_instance.get_students_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_students_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str
limit int [optional]
starting_after str [optional]
ending_before str [optional]

Return type

UsersResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_teachers_for_user

UsersResponse get_teachers_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)

Returns the teacher users for a student user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 
limit = 56 # int |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)

try:
    api_response = api_instance.get_teachers_for_user(id, limit=limit, starting_after=starting_after, ending_before=ending_before)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_teachers_for_user: %s\n" % e)

Parameters

Name Type Description Notes
id str
limit int [optional]
starting_after str [optional]
ending_before str [optional]

Return type

UsersResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_user

UserResponse get_user(id)

Returns a specific user

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
id = 'id_example' # str | 

try:
    api_response = api_instance.get_user(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

UserResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_users

UsersResponse get_users(limit=limit, role=role, starting_after=starting_after, ending_before=ending_before, count=count)

Returns a list of contact, district admin, staff, student, and/or teacher users

Example

from __future__ import print_function
import time
import clever_client
from clever_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
configuration = clever_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = clever_client.UsersApi(clever_client.ApiClient(configuration))
limit = 56 # int |  (optional)
role = 'role_example' # str |  (optional)
starting_after = 'starting_after_example' # str |  (optional)
ending_before = 'ending_before_example' # str |  (optional)
count = 'count_example' # str |  (optional)

try:
    api_response = api_instance.get_users(limit=limit, role=role, starting_after=starting_after, ending_before=ending_before, count=count)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_users: %s\n" % e)

Parameters

Name Type Description Notes
limit int [optional]
role str [optional]
starting_after str [optional]
ending_before str [optional]
count str [optional]

Return type

UsersResponse

Authorization

oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]