Skip to content

Latest commit

 

History

History
388 lines (281 loc) · 12.4 KB

ConditionsApi.md

File metadata and controls

388 lines (281 loc) · 12.4 KB

neurostore_sdk.ConditionsApi

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

conditions_get

ConditionList conditions_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description)

GET Conditions

Get all conditions

Example

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)

Parameters

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]

Return type

ConditionList

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

conditions_id_delete

conditions_id_delete(id)

DELETE a condition

delete a condition

Example

  • 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)

Parameters

Name Type Description Notes
id str

Return type

void (empty response body)

Authorization

JSON-Web-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 OK -

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

conditions_id_get

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)

Example

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)

Parameters

Name Type Description Notes
id str

Return type

ConditionReturn

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 Example response -

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

conditions_id_put

ConditionReturn conditions_id_put(id, condition_request=condition_request)

PUT/update a condition

update a condition

Example

  • 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)

Parameters

Name Type Description Notes
id str
condition_request ConditionRequest [optional]

Return type

ConditionReturn

Authorization

JSON-Web-Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
422 Example response -

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

conditions_post

ConditionReturn conditions_post(condition_request=condition_request)

POST/Create a condition

Create a condition

Example

  • 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)

Parameters

Name Type Description Notes
condition_request ConditionRequest [optional]

Return type

ConditionReturn

Authorization

JSON-Web-Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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