Skip to content

Latest commit

 

History

History
277 lines (193 loc) · 8.37 KB

UserApi.md

File metadata and controls

277 lines (193 loc) · 8.37 KB

crowdemotion_api_client_python.UserApi

All URIs are relative to https://api.crowdemotion.co.uk/v1

Method HTTP request Description
user_id_get GET /user/{id} Get User information
user_id_put PUT /user/{id} Edit User information
user_login_post POST /user/login User Login
user_user_id_metadata_get GET /user/{user_id}/metadata Find User metadata
user_user_id_metadata_post POST /user/{user_id}/metadata Add user metadata

user_id_get

User user_id_get(id)

Get User information

Permissions: ✓ Respondent ✗ Customer ✓ Manager

Example

import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = crowdemotion_api_client_python.UserApi()
id = 56 # int | User unique ID

try: 
    # Get User information
    api_response = api_instance.user_id_get(id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling UserApi->user_id_get: %s\n" % e

Parameters

Name Type Description Notes
id int User unique ID

Return type

User

Authorization

api_key

HTTP request headers

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

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

user_id_put

User user_id_put(id, body)

Edit User information

Permissions: ✗ Respondent ✗ Customer ✓ Manager

Example

import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = crowdemotion_api_client_python.UserApi()
id = 'id_example' # str | ID of User to update.
body = crowdemotion_api_client_python.UserUpdateBody() # UserUpdateBody | Request body

try: 
    # Edit User information
    api_response = api_instance.user_id_put(id, body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling UserApi->user_id_put: %s\n" % e

Parameters

Name Type Description Notes
id str ID of User to update.
body UserUpdateBody Request body

Return type

User

Authorization

api_key

HTTP request headers

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

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

user_login_post

LoginResponse user_login_post(body)

User Login

Permissions: No authorization is required

Example

import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = crowdemotion_api_client_python.UserApi()
body = crowdemotion_api_client_python.Login() # Login | Request body

try: 
    # User Login
    api_response = api_instance.user_login_post(body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling UserApi->user_login_post: %s\n" % e

Parameters

Name Type Description Notes
body Login Request body

Return type

LoginResponse

Authorization

api_key

HTTP request headers

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

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

user_user_id_metadata_get

UserMetadataResponse user_user_id_metadata_get(user_id)

Find User metadata

Permissions: ✓ Respondent ✗ Customer ✓ Manager

Example

import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = crowdemotion_api_client_python.UserApi()
user_id = 56 # int | ID of User.

try: 
    # Find User metadata
    api_response = api_instance.user_user_id_metadata_get(user_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling UserApi->user_user_id_metadata_get: %s\n" % e

Parameters

Name Type Description Notes
user_id int ID of User.

Return type

UserMetadataResponse

Authorization

api_key

HTTP request headers

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

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

user_user_id_metadata_post

UserMetadataResponse user_user_id_metadata_post(user_id, body)

Add user metadata

Permissions: ✓ Respondent ✗ Customer ✓ Manager

Example

import time
import crowdemotion_api_client_python
from crowdemotion_api_client_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
crowdemotion_api_client_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# crowdemotion_api_client_python.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = crowdemotion_api_client_python.UserApi()
user_id = 56 # int | ID of User.
body = crowdemotion_api_client_python.UserMetadata() # UserMetadata | Request body

try: 
    # Add user metadata
    api_response = api_instance.user_user_id_metadata_post(user_id, body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling UserApi->user_user_id_metadata_post: %s\n" % e

Parameters

Name Type Description Notes
user_id int ID of User.
body UserMetadata Request body

Return type

UserMetadataResponse

Authorization

api_key

HTTP request headers

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

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