All URIs are relative to https://neurostore.org/api
Method | HTTP request | Description |
---|---|---|
conditions_get | GET /conditions/ | GET Conditions |
conditions_id_delete | DELETE /conditions/{id} | DELETE a condition |
conditions_id_get | GET /conditions/{id} | GET a condition |
conditions_id_put | PUT /conditions/{id} | PUT/update a condition |
conditions_post | POST /conditions/ | POST/Create a condition |
ConditionList conditions_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description)
GET Conditions
Get all conditions
import time
import os
import neurostore_sdk
from neurostore_sdk.models.condition_list import ConditionList
from neurostore_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
host = "https://neurostore.org/api"
)
# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = neurostore_sdk.ConditionsApi(api_client)
search = 'imagin' # str | search for entries that contain the substring (optional)
sort = 'created_at' # str | Parameter to sort results on (optional) (default to 'created_at')
page = 56 # int | page of results (optional)
desc = True # bool | sort results by descending order (as opposed to ascending order) (optional)
page_size = 56 # int | number of results to show on a page (optional)
name = 'name_example' # str | search the name field for a term (optional)
description = 'description_example' # str | search description field for a term (optional)
try:
# GET Conditions
api_response = api_instance.conditions_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description)
print("The response of ConditionsApi->conditions_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConditionsApi->conditions_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
search | str | search for entries that contain the substring | [optional] |
sort | str | Parameter to sort results on | [optional] [default to 'created_at'] |
page | int | page of results | [optional] |
desc | bool | sort results by descending order (as opposed to ascending order) | [optional] |
page_size | int | number of results to show on a page | [optional] |
name | str | search the name field for a term | [optional] |
description | str | search description field for a term | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
conditions_id_delete(id)
DELETE a condition
delete a condition
- Bearer Authentication (JSON-Web-Token):
import time
import os
import neurostore_sdk
from neurostore_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
host = "https://neurostore.org/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: JSON-Web-Token
configuration = neurostore_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = neurostore_sdk.ConditionsApi(api_client)
id = 'id_example' # str |
try:
# DELETE a condition
api_instance.conditions_id_delete(id)
except Exception as e:
print("Exception when calling ConditionsApi->conditions_id_delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConditionReturn conditions_id_get(id)
GET a condition
Retrieve a condition (e.g., 2-back) that can be used in contrasts (e.g., 2-back - 1-back)
import time
import os
import neurostore_sdk
from neurostore_sdk.models.condition_return import ConditionReturn
from neurostore_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
host = "https://neurostore.org/api"
)
# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = neurostore_sdk.ConditionsApi(api_client)
id = 'id_example' # str |
try:
# GET a condition
api_response = api_instance.conditions_id_get(id)
print("The response of ConditionsApi->conditions_id_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConditionsApi->conditions_id_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Example response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConditionReturn conditions_id_put(id, condition_request=condition_request)
PUT/update a condition
update a condition
- Bearer Authentication (JSON-Web-Token):
import time
import os
import neurostore_sdk
from neurostore_sdk.models.condition_request import ConditionRequest
from neurostore_sdk.models.condition_return import ConditionReturn
from neurostore_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
host = "https://neurostore.org/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: JSON-Web-Token
configuration = neurostore_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = neurostore_sdk.ConditionsApi(api_client)
id = 'id_example' # str |
condition_request = neurostore_sdk.ConditionRequest() # ConditionRequest | (optional)
try:
# PUT/update a condition
api_response = api_instance.conditions_id_put(id, condition_request=condition_request)
print("The response of ConditionsApi->conditions_id_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConditionsApi->conditions_id_put: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
condition_request | ConditionRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
422 | Example response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConditionReturn conditions_post(condition_request=condition_request)
POST/Create a condition
Create a condition
- Bearer Authentication (JSON-Web-Token):
import time
import os
import neurostore_sdk
from neurostore_sdk.models.condition_request import ConditionRequest
from neurostore_sdk.models.condition_return import ConditionReturn
from neurostore_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://neurostore.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = neurostore_sdk.Configuration(
host = "https://neurostore.org/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: JSON-Web-Token
configuration = neurostore_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with neurostore_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = neurostore_sdk.ConditionsApi(api_client)
condition_request = neurostore_sdk.ConditionRequest() # ConditionRequest | (optional)
try:
# POST/Create a condition
api_response = api_instance.conditions_post(condition_request=condition_request)
print("The response of ConditionsApi->conditions_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConditionsApi->conditions_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
condition_request | ConditionRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]