From 380bfe977735759ccb048a5b03efab46c6a98a96 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 04:53:03 +0000 Subject: [PATCH 1/4] bfec839996a4bcbefd3ac9f3a948e8cb7fa90349 --- .openapi-generator/FILES | 1 - 1 file changed, 1 deletion(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 299ead7..5f27b3a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -216,5 +216,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_study_request_all_of.py tox.ini From faf029cbd45cb91ba90845b308b8d9b8cb3ab3d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 05:06:56 +0000 Subject: [PATCH 2/4] 4b09130628c07d22e10548f3dcded58b2c422ee1 --- .openapi-generator/FILES | 3 + README.md | 3 + docs/DefaultApi.md | 119 ++++++++ docs/NoteCollectionList.md | 29 ++ docs/NoteCollectionReturn.md | 1 + docs/NoteCollectionReturnAllOf.md | 1 + neurostore_sdk/__init__.py | 1 + neurostore_sdk/api/default_api.py | 261 ++++++++++++++++++ neurostore_sdk/models/__init__.py | 1 + neurostore_sdk/models/note_collection_list.py | 85 ++++++ .../models/note_collection_return.py | 6 +- .../models/note_collection_return_all_of.py | 6 +- test/test_note_collection_list.py | 60 ++++ 13 files changed, 572 insertions(+), 4 deletions(-) create mode 100644 docs/NoteCollectionList.md create mode 100644 neurostore_sdk/models/note_collection_list.py create mode 100644 test/test_note_collection_list.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5f27b3a..e354410 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -57,6 +57,7 @@ docs/JsonLdContext.md docs/Metadata.md docs/NestedPutAttributes.md docs/NoteCollectionBase.md +docs/NoteCollectionList.md docs/NoteCollectionRequest.md docs/NoteCollectionReturn.md docs/NoteCollectionReturnAllOf.md @@ -169,6 +170,7 @@ neurostore_sdk/models/json_ld_context.py neurostore_sdk/models/metadata.py neurostore_sdk/models/nested_put_attributes.py neurostore_sdk/models/note_collection_base.py +neurostore_sdk/models/note_collection_list.py neurostore_sdk/models/note_collection_request.py neurostore_sdk/models/note_collection_return.py neurostore_sdk/models/note_collection_return_all_of.py @@ -216,4 +218,5 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_note_collection_list.py tox.ini diff --git a/README.md b/README.md index 870343e..5e287c9 100644 --- a/README.md +++ b/README.md @@ -108,10 +108,12 @@ Class | Method | HTTP request | Description *ConditionsApi* | [**conditions_id_get**](docs/ConditionsApi.md#conditions_id_get) | **GET** /conditions/{id} | GET a condition *ConditionsApi* | [**conditions_id_put**](docs/ConditionsApi.md#conditions_id_put) | **PUT** /conditions/{id} | PUT/update a condition *ConditionsApi* | [**conditions_post**](docs/ConditionsApi.md#conditions_post) | **POST** /conditions/ | POST/Create a condition +*DefaultApi* | [**annotation_analyses_get**](docs/DefaultApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Your GET endpoint *DefaultApi* | [**base_studies_get**](docs/DefaultApi.md#base_studies_get) | **GET** /base-studies/ | *DefaultApi* | [**base_studies_id_get**](docs/DefaultApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint *DefaultApi* | [**base_studies_id_put**](docs/DefaultApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | *DefaultApi* | [**base_studies_post**](docs/DefaultApi.md#base_studies_post) | **POST** /base-studies/ | +*DefaultApi* | [**get_annotation_analyses_id**](docs/DefaultApi.md#get_annotation_analyses_id) | **GET** /annotation-analyses/{id} | Your GET endpoint *ImagesApi* | [**images_get**](docs/ImagesApi.md#images_get) | **GET** /images/ | GET a list of images *ImagesApi* | [**images_id_delete**](docs/ImagesApi.md#images_id_delete) | **DELETE** /images/{id} | DELETE an image *ImagesApi* | [**images_id_get**](docs/ImagesApi.md#images_id_get) | **GET** /images/{id} | GET an image @@ -223,6 +225,7 @@ Class | Method | HTTP request | Description - [Metadata](docs/Metadata.md) - [NestedPutAttributes](docs/NestedPutAttributes.md) - [NoteCollectionBase](docs/NoteCollectionBase.md) + - [NoteCollectionList](docs/NoteCollectionList.md) - [NoteCollectionRequest](docs/NoteCollectionRequest.md) - [NoteCollectionReturn](docs/NoteCollectionReturn.md) - [NoteCollectionReturnAllOf](docs/NoteCollectionReturnAllOf.md) diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 227d8d1..b7d3b2a 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -4,12 +4,74 @@ All URIs are relative to *https://neurostore.org/api* Method | HTTP request | Description ------------- | ------------- | ------------- +[**annotation_analyses_get**](DefaultApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Your GET endpoint [**base_studies_get**](DefaultApi.md#base_studies_get) | **GET** /base-studies/ | [**base_studies_id_get**](DefaultApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint [**base_studies_id_put**](DefaultApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | [**base_studies_post**](DefaultApi.md#base_studies_post) | **POST** /base-studies/ | +[**get_annotation_analyses_id**](DefaultApi.md#get_annotation_analyses_id) | **GET** /annotation-analyses/{id} | Your GET endpoint +# **annotation_analyses_get** +> NoteCollectionList annotation_analyses_get() + +Your GET endpoint + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_list import NoteCollectionList +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.DefaultApi(api_client) + + try: + # Your GET endpoint + api_response = api_instance.annotation_analyses_get() + print("The response of DefaultApi->annotation_analyses_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->annotation_analyses_get: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NoteCollectionList**](NoteCollectionList.md) + +### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **base_studies_get** > BaseStudyList base_studies_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info) @@ -332,3 +394,60 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_annotation_analyses_id** +> get_annotation_analyses_id(id) + +Your GET endpoint + +### Example + +```python +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" +) + + +# 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.DefaultApi(api_client) + id = 'id_example' # str | + + try: + # Your GET endpoint + api_instance.get_annotation_analyses_id(id) + except Exception as e: + print("Exception when calling DefaultApi->get_annotation_analyses_id: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/NoteCollectionList.md b/docs/NoteCollectionList.md new file mode 100644 index 0000000..9d1d594 --- /dev/null +++ b/docs/NoteCollectionList.md @@ -0,0 +1,29 @@ +# NoteCollectionList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[NoteCollectionReturn]**](NoteCollectionReturn.md) | | [optional] +**metadata** | [**Metadata**](Metadata.md) | | [optional] + +## Example + +```python +from neurostore_sdk.models.note_collection_list import NoteCollectionList + +# TODO update the JSON string below +json = "{}" +# create an instance of NoteCollectionList from a JSON string +note_collection_list_instance = NoteCollectionList.from_json(json) +# print the JSON string representation of the object +print NoteCollectionList.to_json() + +# convert the object into a dict +note_collection_list_dict = note_collection_list_instance.to_dict() +# create an instance of NoteCollectionList from a dict +note_collection_list_form_dict = note_collection_list.from_dict(note_collection_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NoteCollectionReturn.md b/docs/NoteCollectionReturn.md index 4411a37..afa1716 100644 --- a/docs/NoteCollectionReturn.md +++ b/docs/NoteCollectionReturn.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **study_year** | **int** | | [optional] [readonly] **publication** | **str** | | [optional] [readonly] **authors** | **str** | | [optional] [readonly] +**id** | **str** | | [optional] ## Example diff --git a/docs/NoteCollectionReturnAllOf.md b/docs/NoteCollectionReturnAllOf.md index d6a8256..f532f61 100644 --- a/docs/NoteCollectionReturnAllOf.md +++ b/docs/NoteCollectionReturnAllOf.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **study_year** | **int** | | [optional] [readonly] **publication** | **str** | | [optional] [readonly] **authors** | **str** | | [optional] [readonly] +**id** | **str** | | [optional] ## Example diff --git a/neurostore_sdk/__init__.py b/neurostore_sdk/__init__.py index abb5b4f..705b7a9 100644 --- a/neurostore_sdk/__init__.py +++ b/neurostore_sdk/__init__.py @@ -90,6 +90,7 @@ from neurostore_sdk.models.metadata import Metadata from neurostore_sdk.models.nested_put_attributes import NestedPutAttributes from neurostore_sdk.models.note_collection_base import NoteCollectionBase +from neurostore_sdk.models.note_collection_list import NoteCollectionList from neurostore_sdk.models.note_collection_request import NoteCollectionRequest from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.models.note_collection_return_all_of import NoteCollectionReturnAllOf diff --git a/neurostore_sdk/api/default_api.py b/neurostore_sdk/api/default_api.py index c16147c..9da3657 100644 --- a/neurostore_sdk/api/default_api.py +++ b/neurostore_sdk/api/default_api.py @@ -29,6 +29,7 @@ from neurostore_sdk.models.base_study import BaseStudy from neurostore_sdk.models.base_study_list import BaseStudyList from neurostore_sdk.models.base_study_return import BaseStudyReturn +from neurostore_sdk.models.note_collection_list import NoteCollectionList from neurostore_sdk.api_client import ApiClient from neurostore_sdk.api_response import ApiResponse @@ -50,6 +51,135 @@ def __init__(self, api_client=None): api_client = ApiClient.get_default() self.api_client = api_client + @validate_arguments + def annotation_analyses_get(self, **kwargs) -> NoteCollectionList: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_get(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionList + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_get_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionList, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionList", + } + + return self.api_client.call_api( + '/annotation-analyses/', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def base_studies_get(self, search : Annotated[Optional[constr(strict=True, min_length=1)], Field(description="search for entries that contain the substring")] = None, sort : Annotated[Optional[StrictStr], Field(description="Parameter to sort results on")] = None, page : Annotated[Optional[conint(strict=True, ge=0)], Field(description="page of results")] = None, desc : Annotated[Optional[StrictBool], Field(description="sort results by descending order (as opposed to ascending order)")] = None, page_size : Annotated[Optional[conint(strict=True, lt=30000, ge=1)], Field(description="number of results to show on a page")] = None, name : Annotated[Optional[StrictStr], Field(description="search the name field for a term")] = None, description : Annotated[Optional[StrictStr], Field(description="search description field for a term")] = None, authors : Annotated[Optional[StrictStr], Field(description="search authors")] = None, level : Annotated[Optional[StrictStr], Field(description="select between studies with group results or meta results")] = None, data_type : Annotated[Optional[StrictStr], Field(description="whether searching for studies that contain coordinates, images, or both")] = None, publication : Annotated[Optional[StrictStr], Field(description="search for papers from a particular journal")] = None, pmid : Annotated[Optional[StrictStr], Field(description="search for particular pmid")] = None, doi : Annotated[Optional[StrictStr], Field(description="search for study with specific doi")] = None, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> BaseStudyList: # noqa: E501 """ # noqa: E501 @@ -747,3 +877,134 @@ def base_studies_post_with_http_info(self, base_studies_post_request : Optional[ _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_annotation_analyses_id(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_annotation_analyses_id(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_annotation_analyses_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_annotation_analyses_id_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def get_annotation_analyses_id_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_annotation_analyses_id_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_annotation_analyses_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/annotation-analyses/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/neurostore_sdk/models/__init__.py b/neurostore_sdk/models/__init__.py index 2c08ce3..0c8839a 100644 --- a/neurostore_sdk/models/__init__.py +++ b/neurostore_sdk/models/__init__.py @@ -64,6 +64,7 @@ from neurostore_sdk.models.metadata import Metadata from neurostore_sdk.models.nested_put_attributes import NestedPutAttributes from neurostore_sdk.models.note_collection_base import NoteCollectionBase +from neurostore_sdk.models.note_collection_list import NoteCollectionList from neurostore_sdk.models.note_collection_request import NoteCollectionRequest from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.models.note_collection_return_all_of import NoteCollectionReturnAllOf diff --git a/neurostore_sdk/models/note_collection_list.py b/neurostore_sdk/models/note_collection_list.py new file mode 100644 index 0000000..688cd2b --- /dev/null +++ b/neurostore_sdk/models/note_collection_list.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import List, Optional +from pydantic import BaseModel, conlist +from neurostore_sdk.models.metadata import Metadata +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn + +class NoteCollectionList(BaseModel): + """ + NoteCollectionList + """ + results: Optional[conlist(NoteCollectionReturn)] = None + metadata: Optional[Metadata] = None + __properties = ["results", "metadata"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> NoteCollectionList: + """Create an instance of NoteCollectionList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> NoteCollectionList: + """Create an instance of NoteCollectionList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NoteCollectionList.parse_obj(obj) + + _obj = NoteCollectionList.parse_obj({ + "results": [NoteCollectionReturn.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, + "metadata": Metadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None + }) + return _obj + diff --git a/neurostore_sdk/models/note_collection_return.py b/neurostore_sdk/models/note_collection_return.py index d8f43b9..f9b8c8f 100644 --- a/neurostore_sdk/models/note_collection_return.py +++ b/neurostore_sdk/models/note_collection_return.py @@ -35,7 +35,8 @@ class NoteCollectionReturn(BaseModel): study_year: Optional[StrictInt] = None publication: Optional[StrictStr] = None authors: Optional[StrictStr] = None - __properties = ["note", "analysis", "analysis_name", "study", "study_name", "annotation", "study_year", "publication", "authors"] + id: Optional[StrictStr] = None + __properties = ["note", "analysis", "analysis_name", "study", "study_name", "annotation", "study_year", "publication", "authors", "id"] class Config: """Pydantic configuration""" @@ -119,7 +120,8 @@ def from_dict(cls, obj: dict) -> NoteCollectionReturn: "annotation": obj.get("annotation"), "study_year": obj.get("study_year"), "publication": obj.get("publication"), - "authors": obj.get("authors") + "authors": obj.get("authors"), + "id": obj.get("id") }) return _obj diff --git a/neurostore_sdk/models/note_collection_return_all_of.py b/neurostore_sdk/models/note_collection_return_all_of.py index 33b405f..46f6cec 100644 --- a/neurostore_sdk/models/note_collection_return_all_of.py +++ b/neurostore_sdk/models/note_collection_return_all_of.py @@ -34,7 +34,8 @@ class NoteCollectionReturnAllOf(BaseModel): study_year: Optional[StrictInt] = None publication: Optional[StrictStr] = None authors: Optional[StrictStr] = None - __properties = ["analysis", "analysis_name", "study", "study_name", "annotation", "study_year", "publication", "authors"] + id: Optional[StrictStr] = None + __properties = ["analysis", "analysis_name", "study", "study_name", "annotation", "study_year", "publication", "authors", "id"] class Config: """Pydantic configuration""" @@ -112,7 +113,8 @@ def from_dict(cls, obj: dict) -> NoteCollectionReturnAllOf: "annotation": obj.get("annotation"), "study_year": obj.get("study_year"), "publication": obj.get("publication"), - "authors": obj.get("authors") + "authors": obj.get("authors"), + "id": obj.get("id") }) return _obj diff --git a/test/test_note_collection_list.py b/test/test_note_collection_list.py new file mode 100644 index 0000000..54192da --- /dev/null +++ b/test/test_note_collection_list.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +import unittest +import datetime + +import neurostore_sdk +from neurostore_sdk.models.note_collection_list import NoteCollectionList # noqa: E501 +from neurostore_sdk.rest import ApiException + +class TestNoteCollectionList(unittest.TestCase): + """NoteCollectionList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test NoteCollectionList + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NoteCollectionList` + """ + model = neurostore_sdk.models.note_collection_list.NoteCollectionList() # noqa: E501 + if include_optional : + return NoteCollectionList( + results = [ + null + ], + metadata = neurostore_sdk.models.metadata.metadata( + total_count = 56, + unique_count = 56, ) + ) + else : + return NoteCollectionList( + ) + """ + + def testNoteCollectionList(self): + """Test NoteCollectionList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() From d0009b5eb64f60004fa19e2baf638e571f10f414 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 06:23:44 +0000 Subject: [PATCH 3/4] 4a4cd5e6e3e92f64bcdef64fa9f74b5803fa3cec --- .openapi-generator/FILES | 3 - README.md | 23 +- docs/AnalysesApi.md | 208 ++++ docs/AnnotationsApi.md | 208 ++++ docs/StoreApi.md | 534 ++++++++++ docs/StudiesApi.md | 326 ++++++ neurostore_sdk/__init__.py | 1 - neurostore_sdk/api/__init__.py | 1 - neurostore_sdk/api/analyses_api.py | 416 ++++++++ neurostore_sdk/api/annotations_api.py | 416 ++++++++ neurostore_sdk/api/store_api.py | 1419 ++++++++++++++++++++++--- neurostore_sdk/api/studies_api.py | 703 ++++++++++++ 12 files changed, 4097 insertions(+), 161 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e354410..43015bb 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -43,7 +43,6 @@ docs/ConditionList.md docs/ConditionRequest.md docs/ConditionReturn.md docs/ConditionsApi.md -docs/DefaultApi.md docs/Entity.md docs/ImageBase.md docs/ImageCommon.md @@ -109,7 +108,6 @@ neurostore_sdk/api/__init__.py neurostore_sdk/api/analyses_api.py neurostore_sdk/api/annotations_api.py neurostore_sdk/api/conditions_api.py -neurostore_sdk/api/default_api.py neurostore_sdk/api/images_api.py neurostore_sdk/api/points_api.py neurostore_sdk/api/store_api.py @@ -218,5 +216,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_note_collection_list.py tox.ini diff --git a/README.md b/README.md index 5e287c9..edd0bb5 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,12 @@ Class | Method | HTTP request | Description *AnalysesApi* | [**analyses_id_get**](docs/AnalysesApi.md#analyses_id_get) | **GET** /analyses/{id} | GET an analysis *AnalysesApi* | [**analyses_id_put**](docs/AnalysesApi.md#analyses_id_put) | **PUT** /analyses/{id} | PUT/update an analysis *AnalysesApi* | [**analyses_post**](docs/AnalysesApi.md#analyses_post) | **POST** /analyses/ | POST/create an analysis +*AnalysesApi* | [**annotation_analyses_get**](docs/AnalysesApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses +*AnalysesApi* | [**annotation_analyses_id_get**](docs/AnalysesApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint +*AnalysesApi* | [**annotation_analyses_id_put**](docs/AnalysesApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +*AnnotationsApi* | [**annotation_analyses_get**](docs/AnnotationsApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses +*AnnotationsApi* | [**annotation_analyses_id_get**](docs/AnnotationsApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint +*AnnotationsApi* | [**annotation_analyses_id_put**](docs/AnnotationsApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint *AnnotationsApi* | [**annotations_get**](docs/AnnotationsApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint *AnnotationsApi* | [**annotations_id_delete**](docs/AnnotationsApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation *AnnotationsApi* | [**annotations_id_get**](docs/AnnotationsApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint @@ -108,12 +114,6 @@ Class | Method | HTTP request | Description *ConditionsApi* | [**conditions_id_get**](docs/ConditionsApi.md#conditions_id_get) | **GET** /conditions/{id} | GET a condition *ConditionsApi* | [**conditions_id_put**](docs/ConditionsApi.md#conditions_id_put) | **PUT** /conditions/{id} | PUT/update a condition *ConditionsApi* | [**conditions_post**](docs/ConditionsApi.md#conditions_post) | **POST** /conditions/ | POST/Create a condition -*DefaultApi* | [**annotation_analyses_get**](docs/DefaultApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Your GET endpoint -*DefaultApi* | [**base_studies_get**](docs/DefaultApi.md#base_studies_get) | **GET** /base-studies/ | -*DefaultApi* | [**base_studies_id_get**](docs/DefaultApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint -*DefaultApi* | [**base_studies_id_put**](docs/DefaultApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | -*DefaultApi* | [**base_studies_post**](docs/DefaultApi.md#base_studies_post) | **POST** /base-studies/ | -*DefaultApi* | [**get_annotation_analyses_id**](docs/DefaultApi.md#get_annotation_analyses_id) | **GET** /annotation-analyses/{id} | Your GET endpoint *ImagesApi* | [**images_get**](docs/ImagesApi.md#images_get) | **GET** /images/ | GET a list of images *ImagesApi* | [**images_id_delete**](docs/ImagesApi.md#images_id_delete) | **DELETE** /images/{id} | DELETE an image *ImagesApi* | [**images_id_get**](docs/ImagesApi.md#images_id_get) | **GET** /images/{id} | GET an image @@ -129,11 +129,18 @@ Class | Method | HTTP request | Description *StoreApi* | [**analyses_id_get**](docs/StoreApi.md#analyses_id_get) | **GET** /analyses/{id} | GET an analysis *StoreApi* | [**analyses_id_put**](docs/StoreApi.md#analyses_id_put) | **PUT** /analyses/{id} | PUT/update an analysis *StoreApi* | [**analyses_post**](docs/StoreApi.md#analyses_post) | **POST** /analyses/ | POST/create an analysis +*StoreApi* | [**annotation_analyses_get**](docs/StoreApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses +*StoreApi* | [**annotation_analyses_id_get**](docs/StoreApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint +*StoreApi* | [**annotation_analyses_id_put**](docs/StoreApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint *StoreApi* | [**annotations_get**](docs/StoreApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint *StoreApi* | [**annotations_id_delete**](docs/StoreApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation *StoreApi* | [**annotations_id_get**](docs/StoreApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint *StoreApi* | [**annotations_id_put**](docs/StoreApi.md#annotations_id_put) | **PUT** /annotations/{id} | Update an annotation *StoreApi* | [**annotations_post**](docs/StoreApi.md#annotations_post) | **POST** /annotations/ | Post Annotation +*StoreApi* | [**base_studies_get**](docs/StoreApi.md#base_studies_get) | **GET** /base-studies/ | +*StoreApi* | [**base_studies_id_get**](docs/StoreApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint +*StoreApi* | [**base_studies_id_put**](docs/StoreApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | +*StoreApi* | [**base_studies_post**](docs/StoreApi.md#base_studies_post) | **POST** /base-studies/ | *StoreApi* | [**conditions_get**](docs/StoreApi.md#conditions_get) | **GET** /conditions/ | GET Conditions *StoreApi* | [**conditions_id_delete**](docs/StoreApi.md#conditions_id_delete) | **DELETE** /conditions/{id} | DELETE a condition *StoreApi* | [**conditions_id_get**](docs/StoreApi.md#conditions_id_get) | **GET** /conditions/{id} | GET a condition @@ -158,6 +165,10 @@ Class | Method | HTTP request | Description *StoreApi* | [**studysets_id_get**](docs/StoreApi.md#studysets_id_get) | **GET** /studysets/{id} | GET a studyset *StoreApi* | [**studysets_id_put**](docs/StoreApi.md#studysets_id_put) | **PUT** /studysets/{id} | PUT/update a studyset *StoreApi* | [**studysets_post**](docs/StoreApi.md#studysets_post) | **POST** /studysets/ | POST/create a studyset +*StudiesApi* | [**base_studies_get**](docs/StudiesApi.md#base_studies_get) | **GET** /base-studies/ | +*StudiesApi* | [**base_studies_id_get**](docs/StudiesApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint +*StudiesApi* | [**base_studies_id_put**](docs/StudiesApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | +*StudiesApi* | [**base_studies_post**](docs/StudiesApi.md#base_studies_post) | **POST** /base-studies/ | *StudiesApi* | [**studies_get**](docs/StudiesApi.md#studies_get) | **GET** /studies/ | GET a list of studies *StudiesApi* | [**studies_id_delete**](docs/StudiesApi.md#studies_id_delete) | **DELETE** /studies/{id} | DELETE a study *StudiesApi* | [**studies_id_get**](docs/StudiesApi.md#studies_id_get) | **GET** /studies/{id} | GET a study diff --git a/docs/AnalysesApi.md b/docs/AnalysesApi.md index 3db3f0c..0039675 100644 --- a/docs/AnalysesApi.md +++ b/docs/AnalysesApi.md @@ -9,6 +9,9 @@ Method | HTTP request | Description [**analyses_id_get**](AnalysesApi.md#analyses_id_get) | **GET** /analyses/{id} | GET an analysis [**analyses_id_put**](AnalysesApi.md#analyses_id_put) | **PUT** /analyses/{id} | PUT/update an analysis [**analyses_post**](AnalysesApi.md#analyses_post) | **POST** /analyses/ | POST/create an analysis +[**annotation_analyses_get**](AnalysesApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses +[**annotation_analyses_id_get**](AnalysesApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint +[**annotation_analyses_id_put**](AnalysesApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint # **analyses_get** @@ -390,3 +393,208 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **annotation_analyses_get** +> NoteCollectionList annotation_analyses_get() + +Get annotation analyses + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_list import NoteCollectionList +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.AnalysesApi(api_client) + + try: + # Get annotation analyses + api_response = api_instance.annotation_analyses_get() + print("The response of AnalysesApi->annotation_analyses_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesApi->annotation_analyses_get: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NoteCollectionList**](NoteCollectionList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**2XX** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **annotation_analyses_id_get** +> annotation_analyses_id_get(id) + +Your GET endpoint + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +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.AnalysesApi(api_client) + id = 'id_example' # str | + + try: + # Your GET endpoint + api_instance.annotation_analyses_id_get(id) + except Exception as e: + print("Exception when calling AnalysesApi->annotation_analyses_id_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[JSON-Web-Token](../README.md#JSON-Web-Token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **annotation_analyses_id_put** +> NoteCollectionReturn annotation_analyses_id_put(id, note_collection_request=note_collection_request) + +Your PUT endpoint + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn +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.AnalysesApi(api_client) + id = 'id_example' # str | + note_collection_request = neurostore_sdk.NoteCollectionRequest() # NoteCollectionRequest | (optional) + + try: + # Your PUT endpoint + api_response = api_instance.annotation_analyses_id_put(id, note_collection_request=note_collection_request) + print("The response of AnalysesApi->annotation_analyses_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesApi->annotation_analyses_id_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **note_collection_request** | [**NoteCollectionRequest**](NoteCollectionRequest.md)| | [optional] + +### Return type + +[**NoteCollectionReturn**](NoteCollectionReturn.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AnnotationsApi.md b/docs/AnnotationsApi.md index a60d8d8..e4325b5 100644 --- a/docs/AnnotationsApi.md +++ b/docs/AnnotationsApi.md @@ -4,6 +4,9 @@ All URIs are relative to *https://neurostore.org/api* Method | HTTP request | Description ------------- | ------------- | ------------- +[**annotation_analyses_get**](AnnotationsApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses +[**annotation_analyses_id_get**](AnnotationsApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint +[**annotation_analyses_id_put**](AnnotationsApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint [**annotations_get**](AnnotationsApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint [**annotations_id_delete**](AnnotationsApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation [**annotations_id_get**](AnnotationsApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint @@ -11,6 +14,211 @@ Method | HTTP request | Description [**annotations_post**](AnnotationsApi.md#annotations_post) | **POST** /annotations/ | Post Annotation +# **annotation_analyses_get** +> NoteCollectionList annotation_analyses_get() + +Get annotation analyses + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_list import NoteCollectionList +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.AnnotationsApi(api_client) + + try: + # Get annotation analyses + api_response = api_instance.annotation_analyses_get() + print("The response of AnnotationsApi->annotation_analyses_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnnotationsApi->annotation_analyses_get: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NoteCollectionList**](NoteCollectionList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**2XX** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **annotation_analyses_id_get** +> annotation_analyses_id_get(id) + +Your GET endpoint + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +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.AnnotationsApi(api_client) + id = 'id_example' # str | + + try: + # Your GET endpoint + api_instance.annotation_analyses_id_get(id) + except Exception as e: + print("Exception when calling AnnotationsApi->annotation_analyses_id_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[JSON-Web-Token](../README.md#JSON-Web-Token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **annotation_analyses_id_put** +> NoteCollectionReturn annotation_analyses_id_put(id, note_collection_request=note_collection_request) + +Your PUT endpoint + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn +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.AnnotationsApi(api_client) + id = 'id_example' # str | + note_collection_request = neurostore_sdk.NoteCollectionRequest() # NoteCollectionRequest | (optional) + + try: + # Your PUT endpoint + api_response = api_instance.annotation_analyses_id_put(id, note_collection_request=note_collection_request) + print("The response of AnnotationsApi->annotation_analyses_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnnotationsApi->annotation_analyses_id_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **note_collection_request** | [**NoteCollectionRequest**](NoteCollectionRequest.md)| | [optional] + +### Return type + +[**NoteCollectionReturn**](NoteCollectionReturn.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **annotations_get** > AnnotationList annotations_get(studyset_id=studyset_id) diff --git a/docs/StoreApi.md b/docs/StoreApi.md index 11f790c..9ecfa9a 100644 --- a/docs/StoreApi.md +++ b/docs/StoreApi.md @@ -9,11 +9,18 @@ Method | HTTP request | Description [**analyses_id_get**](StoreApi.md#analyses_id_get) | **GET** /analyses/{id} | GET an analysis [**analyses_id_put**](StoreApi.md#analyses_id_put) | **PUT** /analyses/{id} | PUT/update an analysis [**analyses_post**](StoreApi.md#analyses_post) | **POST** /analyses/ | POST/create an analysis +[**annotation_analyses_get**](StoreApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses +[**annotation_analyses_id_get**](StoreApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint +[**annotation_analyses_id_put**](StoreApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint [**annotations_get**](StoreApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint [**annotations_id_delete**](StoreApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation [**annotations_id_get**](StoreApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint [**annotations_id_put**](StoreApi.md#annotations_id_put) | **PUT** /annotations/{id} | Update an annotation [**annotations_post**](StoreApi.md#annotations_post) | **POST** /annotations/ | Post Annotation +[**base_studies_get**](StoreApi.md#base_studies_get) | **GET** /base-studies/ | +[**base_studies_id_get**](StoreApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint +[**base_studies_id_put**](StoreApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | +[**base_studies_post**](StoreApi.md#base_studies_post) | **POST** /base-studies/ | [**conditions_get**](StoreApi.md#conditions_get) | **GET** /conditions/ | GET Conditions [**conditions_id_delete**](StoreApi.md#conditions_id_delete) | **DELETE** /conditions/{id} | DELETE a condition [**conditions_id_get**](StoreApi.md#conditions_id_get) | **GET** /conditions/{id} | GET a condition @@ -419,6 +426,211 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **annotation_analyses_get** +> NoteCollectionList annotation_analyses_get() + +Get annotation analyses + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_list import NoteCollectionList +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.StoreApi(api_client) + + try: + # Get annotation analyses + api_response = api_instance.annotation_analyses_get() + print("The response of StoreApi->annotation_analyses_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->annotation_analyses_get: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NoteCollectionList**](NoteCollectionList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**2XX** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **annotation_analyses_id_get** +> annotation_analyses_id_get(id) + +Your GET endpoint + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +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.StoreApi(api_client) + id = 'id_example' # str | + + try: + # Your GET endpoint + api_instance.annotation_analyses_id_get(id) + except Exception as e: + print("Exception when calling StoreApi->annotation_analyses_id_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[JSON-Web-Token](../README.md#JSON-Web-Token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **annotation_analyses_id_put** +> NoteCollectionReturn annotation_analyses_id_put(id, note_collection_request=note_collection_request) + +Your PUT endpoint + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn +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.StoreApi(api_client) + id = 'id_example' # str | + note_collection_request = neurostore_sdk.NoteCollectionRequest() # NoteCollectionRequest | (optional) + + try: + # Your PUT endpoint + api_response = api_instance.annotation_analyses_id_put(id, note_collection_request=note_collection_request) + print("The response of StoreApi->annotation_analyses_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->annotation_analyses_id_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **note_collection_request** | [**NoteCollectionRequest**](NoteCollectionRequest.md)| | [optional] + +### Return type + +[**NoteCollectionReturn**](NoteCollectionReturn.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **annotations_get** > AnnotationList annotations_get(studyset_id=studyset_id) @@ -786,6 +998,328 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **base_studies_get** +> BaseStudyList base_studies_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info) + + + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_study_list import BaseStudyList +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.StoreApi(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) + authors = 'authors_example' # str | search authors (optional) + level = 'group' # str | select between studies with group results or meta results (optional) (default to 'group') + data_type = 'data_type_example' # str | whether searching for studies that contain coordinates, images, or both (optional) + publication = 'publication_example' # str | search for papers from a particular journal (optional) + pmid = 'pmid_example' # str | search for particular pmid (optional) + doi = 'doi_example' # str | search for study with specific doi (optional) + flat = True # bool | do not return any embedded relationships. When set, it is incompatible with nested. (optional) + info = True # bool | show additional for endpoint-object relationships without being fully nested. Incompatible with nested (optional) + + try: + # + api_response = api_instance.base_studies_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info) + print("The response of StoreApi->base_studies_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->base_studies_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] + **authors** | **str**| search authors | [optional] + **level** | **str**| select between studies with group results or meta results | [optional] [default to 'group'] + **data_type** | **str**| whether searching for studies that contain coordinates, images, or both | [optional] + **publication** | **str**| search for papers from a particular journal | [optional] + **pmid** | **str**| search for particular pmid | [optional] + **doi** | **str**| search for study with specific doi | [optional] + **flat** | **bool**| do not return any embedded relationships. When set, it is incompatible with nested. | [optional] + **info** | **bool**| show additional for endpoint-object relationships without being fully nested. Incompatible with nested | [optional] + +### Return type + +[**BaseStudyList**](BaseStudyList.md) + +### Authorization + +[JSON-Web-Token](../README.md#JSON-Web-Token) + +### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **base_studies_id_get** +> BaseStudyReturn base_studies_id_get(id, flat=flat, info=info) + +Your GET endpoint + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_study_return import BaseStudyReturn +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.StoreApi(api_client) + id = 'id_example' # str | + flat = True # bool | do not return any embedded relationships. When set, it is incompatible with nested. (optional) + info = True # bool | show additional for endpoint-object relationships without being fully nested. Incompatible with nested (optional) + + try: + # Your GET endpoint + api_response = api_instance.base_studies_id_get(id, flat=flat, info=info) + print("The response of StoreApi->base_studies_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->base_studies_id_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **flat** | **bool**| do not return any embedded relationships. When set, it is incompatible with nested. | [optional] + **info** | **bool**| show additional for endpoint-object relationships without being fully nested. Incompatible with nested | [optional] + +### Return type + +[**BaseStudyReturn**](BaseStudyReturn.md) + +### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **base_studies_id_put** +> BaseStudyReturn base_studies_id_put(id, base_study=base_study) + + + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_study import BaseStudy +from neurostore_sdk.models.base_study_return import BaseStudyReturn +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.StoreApi(api_client) + id = 'id_example' # str | + base_study = neurostore_sdk.BaseStudy() # BaseStudy | (optional) + + try: + # + api_response = api_instance.base_studies_id_put(id, base_study=base_study) + print("The response of StoreApi->base_studies_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->base_studies_id_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **base_study** | [**BaseStudy**](BaseStudy.md)| | [optional] + +### Return type + +[**BaseStudyReturn**](BaseStudyReturn.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **base_studies_post** +> BaseStudiesPost200Response base_studies_post(base_studies_post_request=base_studies_post_request) + + + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest +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.StoreApi(api_client) + base_studies_post_request = neurostore_sdk.BaseStudiesPostRequest() # BaseStudiesPostRequest | (optional) + + try: + # + api_response = api_instance.base_studies_post(base_studies_post_request=base_studies_post_request) + print("The response of StoreApi->base_studies_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->base_studies_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **base_studies_post_request** | [**BaseStudiesPostRequest**](BaseStudiesPostRequest.md)| | [optional] + +### Return type + +[**BaseStudiesPost200Response**](BaseStudiesPost200Response.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **conditions_get** > ConditionList conditions_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description) diff --git a/docs/StudiesApi.md b/docs/StudiesApi.md index f9f0c27..5d910ce 100644 --- a/docs/StudiesApi.md +++ b/docs/StudiesApi.md @@ -4,6 +4,10 @@ All URIs are relative to *https://neurostore.org/api* Method | HTTP request | Description ------------- | ------------- | ------------- +[**base_studies_get**](StudiesApi.md#base_studies_get) | **GET** /base-studies/ | +[**base_studies_id_get**](StudiesApi.md#base_studies_id_get) | **GET** /base-studies/{id} | Your GET endpoint +[**base_studies_id_put**](StudiesApi.md#base_studies_id_put) | **PUT** /base-studies/{id} | +[**base_studies_post**](StudiesApi.md#base_studies_post) | **POST** /base-studies/ | [**studies_get**](StudiesApi.md#studies_get) | **GET** /studies/ | GET a list of studies [**studies_id_delete**](StudiesApi.md#studies_id_delete) | **DELETE** /studies/{id} | DELETE a study [**studies_id_get**](StudiesApi.md#studies_id_get) | **GET** /studies/{id} | GET a study @@ -11,6 +15,328 @@ Method | HTTP request | Description [**studies_post**](StudiesApi.md#studies_post) | **POST** /studies/ | POST/create a study +# **base_studies_get** +> BaseStudyList base_studies_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info) + + + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_study_list import BaseStudyList +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.StudiesApi(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) + authors = 'authors_example' # str | search authors (optional) + level = 'group' # str | select between studies with group results or meta results (optional) (default to 'group') + data_type = 'data_type_example' # str | whether searching for studies that contain coordinates, images, or both (optional) + publication = 'publication_example' # str | search for papers from a particular journal (optional) + pmid = 'pmid_example' # str | search for particular pmid (optional) + doi = 'doi_example' # str | search for study with specific doi (optional) + flat = True # bool | do not return any embedded relationships. When set, it is incompatible with nested. (optional) + info = True # bool | show additional for endpoint-object relationships without being fully nested. Incompatible with nested (optional) + + try: + # + api_response = api_instance.base_studies_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, name=name, description=description, authors=authors, level=level, data_type=data_type, publication=publication, pmid=pmid, doi=doi, flat=flat, info=info) + print("The response of StudiesApi->base_studies_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StudiesApi->base_studies_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] + **authors** | **str**| search authors | [optional] + **level** | **str**| select between studies with group results or meta results | [optional] [default to 'group'] + **data_type** | **str**| whether searching for studies that contain coordinates, images, or both | [optional] + **publication** | **str**| search for papers from a particular journal | [optional] + **pmid** | **str**| search for particular pmid | [optional] + **doi** | **str**| search for study with specific doi | [optional] + **flat** | **bool**| do not return any embedded relationships. When set, it is incompatible with nested. | [optional] + **info** | **bool**| show additional for endpoint-object relationships without being fully nested. Incompatible with nested | [optional] + +### Return type + +[**BaseStudyList**](BaseStudyList.md) + +### Authorization + +[JSON-Web-Token](../README.md#JSON-Web-Token) + +### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **base_studies_id_get** +> BaseStudyReturn base_studies_id_get(id, flat=flat, info=info) + +Your GET endpoint + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_study_return import BaseStudyReturn +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.StudiesApi(api_client) + id = 'id_example' # str | + flat = True # bool | do not return any embedded relationships. When set, it is incompatible with nested. (optional) + info = True # bool | show additional for endpoint-object relationships without being fully nested. Incompatible with nested (optional) + + try: + # Your GET endpoint + api_response = api_instance.base_studies_id_get(id, flat=flat, info=info) + print("The response of StudiesApi->base_studies_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StudiesApi->base_studies_id_get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **flat** | **bool**| do not return any embedded relationships. When set, it is incompatible with nested. | [optional] + **info** | **bool**| show additional for endpoint-object relationships without being fully nested. Incompatible with nested | [optional] + +### Return type + +[**BaseStudyReturn**](BaseStudyReturn.md) + +### 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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **base_studies_id_put** +> BaseStudyReturn base_studies_id_put(id, base_study=base_study) + + + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_study import BaseStudy +from neurostore_sdk.models.base_study_return import BaseStudyReturn +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.StudiesApi(api_client) + id = 'id_example' # str | + base_study = neurostore_sdk.BaseStudy() # BaseStudy | (optional) + + try: + # + api_response = api_instance.base_studies_id_put(id, base_study=base_study) + print("The response of StudiesApi->base_studies_id_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StudiesApi->base_studies_id_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **base_study** | [**BaseStudy**](BaseStudy.md)| | [optional] + +### Return type + +[**BaseStudyReturn**](BaseStudyReturn.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **base_studies_post** +> BaseStudiesPost200Response base_studies_post(base_studies_post_request=base_studies_post_request) + + + +### Example + +* Bearer Authentication (JSON-Web-Token): +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest +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.StudiesApi(api_client) + base_studies_post_request = neurostore_sdk.BaseStudiesPostRequest() # BaseStudiesPostRequest | (optional) + + try: + # + api_response = api_instance.base_studies_post(base_studies_post_request=base_studies_post_request) + print("The response of StudiesApi->base_studies_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StudiesApi->base_studies_post: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **base_studies_post_request** | [**BaseStudiesPostRequest**](BaseStudiesPostRequest.md)| | [optional] + +### Return type + +[**BaseStudiesPost200Response**](BaseStudiesPost200Response.md) + +### Authorization + +[JSON-Web-Token](../README.md#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]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **studies_get** > StudyList studies_get(search=search, sort=sort, page=page, desc=desc, page_size=page_size, nested=nested, name=name, description=description, source_id=source_id, unique=unique, source=source, authors=authors, user_id=user_id, data_type=data_type, studyset_owner=studyset_owner, level=level, pmid=pmid, doi=doi, flat=flat) diff --git a/neurostore_sdk/__init__.py b/neurostore_sdk/__init__.py index 705b7a9..e0bdf6f 100644 --- a/neurostore_sdk/__init__.py +++ b/neurostore_sdk/__init__.py @@ -21,7 +21,6 @@ from neurostore_sdk.api.analyses_api import AnalysesApi from neurostore_sdk.api.annotations_api import AnnotationsApi from neurostore_sdk.api.conditions_api import ConditionsApi -from neurostore_sdk.api.default_api import DefaultApi from neurostore_sdk.api.images_api import ImagesApi from neurostore_sdk.api.points_api import PointsApi from neurostore_sdk.api.store_api import StoreApi diff --git a/neurostore_sdk/api/__init__.py b/neurostore_sdk/api/__init__.py index fbdb179..2974a82 100644 --- a/neurostore_sdk/api/__init__.py +++ b/neurostore_sdk/api/__init__.py @@ -4,7 +4,6 @@ from neurostore_sdk.api.analyses_api import AnalysesApi from neurostore_sdk.api.annotations_api import AnnotationsApi from neurostore_sdk.api.conditions_api import ConditionsApi -from neurostore_sdk.api.default_api import DefaultApi from neurostore_sdk.api.images_api import ImagesApi from neurostore_sdk.api.points_api import PointsApi from neurostore_sdk.api.store_api import StoreApi diff --git a/neurostore_sdk/api/analyses_api.py b/neurostore_sdk/api/analyses_api.py index d525f06..6caca0f 100644 --- a/neurostore_sdk/api/analyses_api.py +++ b/neurostore_sdk/api/analyses_api.py @@ -27,6 +27,9 @@ from neurostore_sdk.models.analysis_list import AnalysisList from neurostore_sdk.models.analysis_request import AnalysisRequest from neurostore_sdk.models.analysis_return import AnalysisReturn +from neurostore_sdk.models.note_collection_list import NoteCollectionList +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.api_client import ApiClient from neurostore_sdk.api_response import ApiResponse @@ -824,3 +827,416 @@ def analyses_post_with_http_info(self, analysis_request : Optional[AnalysisReque _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotation_analyses_get(self, **kwargs) -> NoteCollectionList: # noqa: E501 + """Get annotation analyses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_get(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionList + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_get_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get annotation analyses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionList, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionList", + '2XX': "NoteCollectionList", + } + + return self.api_client.call_api( + '/annotation-analyses/', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_get(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_id_get_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_id_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/annotation-analyses/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotation_analyses_id_put(self, id : StrictStr, note_collection_request : Optional[NoteCollectionRequest] = None, **kwargs) -> NoteCollectionReturn: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_put(id, note_collection_request, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param note_collection_request: + :type note_collection_request: NoteCollectionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_id_put_with_http_info(id, note_collection_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_id_put_with_http_info(self, id : StrictStr, note_collection_request : Optional[NoteCollectionRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_put_with_http_info(id, note_collection_request, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param note_collection_request: + :type note_collection_request: NoteCollectionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'note_collection_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_id_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['note_collection_request'] is not None: + _body_params = _params['note_collection_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionReturn", + } + + return self.api_client.call_api( + '/annotation-analyses/{id}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/neurostore_sdk/api/annotations_api.py b/neurostore_sdk/api/annotations_api.py index dd40be7..f5fd081 100644 --- a/neurostore_sdk/api/annotations_api.py +++ b/neurostore_sdk/api/annotations_api.py @@ -27,6 +27,9 @@ from neurostore_sdk.models.annotation_list import AnnotationList from neurostore_sdk.models.annotation_request import AnnotationRequest from neurostore_sdk.models.annotation_return import AnnotationReturn +from neurostore_sdk.models.note_collection_list import NoteCollectionList +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.api_client import ApiClient from neurostore_sdk.api_response import ApiResponse @@ -48,6 +51,419 @@ def __init__(self, api_client=None): api_client = ApiClient.get_default() self.api_client = api_client + @validate_arguments + def annotation_analyses_get(self, **kwargs) -> NoteCollectionList: # noqa: E501 + """Get annotation analyses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_get(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionList + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_get_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get annotation analyses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionList, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionList", + '2XX': "NoteCollectionList", + } + + return self.api_client.call_api( + '/annotation-analyses/', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_get(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_id_get_with_http_info(id, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_id_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/annotation-analyses/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotation_analyses_id_put(self, id : StrictStr, note_collection_request : Optional[NoteCollectionRequest] = None, **kwargs) -> NoteCollectionReturn: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_put(id, note_collection_request, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param note_collection_request: + :type note_collection_request: NoteCollectionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_id_put_with_http_info(id, note_collection_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_id_put_with_http_info(self, id : StrictStr, note_collection_request : Optional[NoteCollectionRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_id_put_with_http_info(id, note_collection_request, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param note_collection_request: + :type note_collection_request: NoteCollectionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'note_collection_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_id_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['note_collection_request'] is not None: + _body_params = _params['note_collection_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionReturn", + } + + return self.api_client.call_api( + '/annotation-analyses/{id}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def annotations_get(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> AnnotationList: # noqa: E501 """Your GET endpoint # noqa: E501 diff --git a/neurostore_sdk/api/store_api.py b/neurostore_sdk/api/store_api.py index d67c98f..c9ac75c 100644 --- a/neurostore_sdk/api/store_api.py +++ b/neurostore_sdk/api/store_api.py @@ -30,12 +30,20 @@ from neurostore_sdk.models.annotation_list import AnnotationList from neurostore_sdk.models.annotation_request import AnnotationRequest from neurostore_sdk.models.annotation_return import AnnotationReturn +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest +from neurostore_sdk.models.base_study import BaseStudy +from neurostore_sdk.models.base_study_list import BaseStudyList +from neurostore_sdk.models.base_study_return import BaseStudyReturn from neurostore_sdk.models.condition_list import ConditionList from neurostore_sdk.models.condition_request import ConditionRequest from neurostore_sdk.models.condition_return import ConditionReturn from neurostore_sdk.models.image_list import ImageList from neurostore_sdk.models.image_request import ImageRequest from neurostore_sdk.models.image_return import ImageReturn +from neurostore_sdk.models.note_collection_list import NoteCollectionList +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.models.point_list import PointList from neurostore_sdk.models.point_request import PointRequest from neurostore_sdk.models.point_return import PointReturn @@ -843,18 +851,15 @@ def analyses_post_with_http_info(self, analysis_request : Optional[AnalysisReque _request_auth=_params.get('_request_auth')) @validate_arguments - def annotations_get(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> AnnotationList: # noqa: E501 - """Your GET endpoint # noqa: E501 + def annotation_analyses_get(self, **kwargs) -> NoteCollectionList: # noqa: E501 + """Get annotation analyses # noqa: E501 - get annotations for an available studyset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_get(studyset_id, async_req=True) + >>> thread = api.annotation_analyses_get(async_req=True) >>> result = thread.get() - :param studyset_id: see all annotations connected to this studyset - :type studyset_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one @@ -864,26 +869,23 @@ def annotations_get(self, studyset_id : Annotated[Optional[StrictStr], Field(des :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: AnnotationList + :rtype: NoteCollectionList """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the annotations_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.annotations_get_with_http_info(studyset_id, **kwargs) # noqa: E501 + raise ValueError("Error! Please call the annotation_analyses_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_get_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Your GET endpoint # noqa: E501 + def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get annotation analyses # noqa: E501 - get annotations for an available studyset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_get_with_http_info(studyset_id, async_req=True) + >>> thread = api.annotation_analyses_get_with_http_info(async_req=True) >>> result = thread.get() - :param studyset_id: see all annotations connected to this studyset - :type studyset_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will @@ -906,13 +908,12 @@ def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[Strict :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(AnnotationList, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(NoteCollectionList, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() _all_params = [ - 'studyset_id' ] _all_params.extend( [ @@ -931,7 +932,7 @@ def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[Strict if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method annotations_get" % _key + " to method annotation_analyses_get" % _key ) _params[_key] = _val del _params['kwargs'] @@ -943,9 +944,6 @@ def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[Strict # process the query parameters _query_params = [] - if _params.get('studyset_id') is not None: # noqa: E501 - _query_params.append(('studyset_id', _params['studyset_id'])) - # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -961,11 +959,12 @@ def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[Strict _auth_settings = [] # noqa: E501 _response_types_map = { - '200': "AnnotationList", + '200': "NoteCollectionList", + '2XX': "NoteCollectionList", } return self.api_client.call_api( - '/annotations/', 'GET', + '/annotation-analyses/', 'GET', _path_params, _query_params, _header_params, @@ -982,14 +981,13 @@ def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[Strict _request_auth=_params.get('_request_auth')) @validate_arguments - def annotations_id_delete(self, id : StrictStr, **kwargs) -> None: # noqa: E501 - """DELETE an annotation # noqa: E501 + def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + """Your GET endpoint # noqa: E501 - delete annotation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_id_delete(id, async_req=True) + >>> thread = api.annotation_analyses_id_get(id, async_req=True) >>> result = thread.get() :param id: (required) @@ -1007,18 +1005,17 @@ def annotations_id_delete(self, id : StrictStr, **kwargs) -> None: # noqa: E501 """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the annotations_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.annotations_id_delete_with_http_info(id, **kwargs) # noqa: E501 + raise ValueError("Error! Please call the annotation_analyses_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_id_get_with_http_info(id, **kwargs) # noqa: E501 @validate_arguments - def annotations_id_delete_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 - """DELETE an annotation # noqa: E501 + def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 - delete annotation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_id_delete_with_http_info(id, async_req=True) + >>> thread = api.annotation_analyses_id_get_with_http_info(id, async_req=True) >>> result = thread.get() :param id: (required) @@ -1070,7 +1067,7 @@ def annotations_id_delete_with_http_info(self, id : StrictStr, **kwargs) -> ApiR if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method annotations_id_delete" % _key + " to method annotation_analyses_id_get" % _key ) _params[_key] = _val del _params['kwargs'] @@ -1098,7 +1095,7 @@ def annotations_id_delete_with_http_info(self, id : StrictStr, **kwargs) -> ApiR _response_types_map = {} return self.api_client.call_api( - '/annotations/{id}', 'DELETE', + '/annotation-analyses/{id}', 'GET', _path_params, _query_params, _header_params, @@ -1115,20 +1112,19 @@ def annotations_id_delete_with_http_info(self, id : StrictStr, **kwargs) -> ApiR _request_auth=_params.get('_request_auth')) @validate_arguments - def annotations_id_get(self, id : StrictStr, export : Annotated[Optional[StrictBool], Field(description="return endpoint data in consumable/readable format")] = None, **kwargs) -> AnnotationReturn: # noqa: E501 - """Your GET endpoint # noqa: E501 + def annotation_analyses_id_put(self, id : StrictStr, note_collection_request : Optional[NoteCollectionRequest] = None, **kwargs) -> NoteCollectionReturn: # noqa: E501 + """Your PUT endpoint # noqa: E501 - get an individual annotation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_id_get(id, export, async_req=True) + >>> thread = api.annotation_analyses_id_put(id, note_collection_request, async_req=True) >>> result = thread.get() :param id: (required) :type id: str - :param export: return endpoint data in consumable/readable format - :type export: bool + :param note_collection_request: + :type note_collection_request: NoteCollectionRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one @@ -1138,28 +1134,27 @@ def annotations_id_get(self, id : StrictStr, export : Annotated[Optional[StrictB :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: AnnotationReturn + :rtype: NoteCollectionReturn """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the annotations_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.annotations_id_get_with_http_info(id, export, **kwargs) # noqa: E501 + raise ValueError("Error! Please call the annotation_analyses_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_id_put_with_http_info(id, note_collection_request, **kwargs) # noqa: E501 @validate_arguments - def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[Optional[StrictBool], Field(description="return endpoint data in consumable/readable format")] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Your GET endpoint # noqa: E501 + def annotation_analyses_id_put_with_http_info(self, id : StrictStr, note_collection_request : Optional[NoteCollectionRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your PUT endpoint # noqa: E501 - get an individual annotation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_id_get_with_http_info(id, export, async_req=True) + >>> thread = api.annotation_analyses_id_put_with_http_info(id, note_collection_request, async_req=True) >>> result = thread.get() :param id: (required) :type id: str - :param export: return endpoint data in consumable/readable format - :type export: bool + :param note_collection_request: + :type note_collection_request: NoteCollectionRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will @@ -1182,14 +1177,14 @@ def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[O :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(AnnotationReturn, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() _all_params = [ 'id', - 'export' + 'note_collection_request' ] _all_params.extend( [ @@ -1208,7 +1203,7 @@ def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[O if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method annotations_id_get" % _key + " to method annotation_analyses_id_put" % _key ) _params[_key] = _val del _params['kwargs'] @@ -1223,9 +1218,6 @@ def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[O # process the query parameters _query_params = [] - if _params.get('export') is not None: # noqa: E501 - _query_params.append(('export', _params['export'])) - # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -1233,19 +1225,29 @@ def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[O _files = {} # process the body parameter _body_params = None + if _params['note_collection_request'] is not None: + _body_params = _params['note_collection_request'] + # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + # authentication setting - _auth_settings = [] # noqa: E501 + _auth_settings = ['JSON-Web-Token'] # noqa: E501 _response_types_map = { - '200': "AnnotationReturn", + '200': "NoteCollectionReturn", } return self.api_client.call_api( - '/annotations/{id}', 'GET', + '/annotation-analyses/{id}', 'PUT', _path_params, _query_params, _header_params, @@ -1262,20 +1264,18 @@ def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[O _request_auth=_params.get('_request_auth')) @validate_arguments - def annotations_id_put(self, id : StrictStr, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> AnnotationReturn: # noqa: E501 - """Update an annotation # noqa: E501 + def annotations_get(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> AnnotationList: # noqa: E501 + """Your GET endpoint # noqa: E501 - edit an existing annotation # noqa: E501 + get annotations for an available studyset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_id_put(id, annotation_request, async_req=True) + >>> thread = api.annotations_get(studyset_id, async_req=True) >>> result = thread.get() - :param id: (required) - :type id: str - :param annotation_request: - :type annotation_request: AnnotationRequest + :param studyset_id: see all annotations connected to this studyset + :type studyset_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one @@ -1285,28 +1285,26 @@ def annotations_id_put(self, id : StrictStr, annotation_request : Optional[Annot :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: AnnotationReturn + :rtype: AnnotationList """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the annotations_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.annotations_id_put_with_http_info(id, annotation_request, **kwargs) # noqa: E501 + raise ValueError("Error! Please call the annotations_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotations_get_with_http_info(studyset_id, **kwargs) # noqa: E501 @validate_arguments - def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Update an annotation # noqa: E501 + def annotations_get_with_http_info(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 - edit an existing annotation # noqa: E501 + get annotations for an available studyset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_id_put_with_http_info(id, annotation_request, async_req=True) + >>> thread = api.annotations_get_with_http_info(studyset_id, async_req=True) >>> result = thread.get() - :param id: (required) - :type id: str - :param annotation_request: - :type annotation_request: AnnotationRequest + :param studyset_id: see all annotations connected to this studyset + :type studyset_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will @@ -1329,14 +1327,13 @@ def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(AnnotationReturn, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(AnnotationList, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() _all_params = [ - 'id', - 'annotation_request' + 'studyset_id' ] _all_params.extend( [ @@ -1355,7 +1352,7 @@ def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method annotations_id_put" % _key + " to method annotations_get" % _key ) _params[_key] = _val del _params['kwargs'] @@ -1364,12 +1361,12 @@ def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : # process the path parameters _path_params = {} - if _params['id']: - _path_params['id'] = _params['id'] - # process the query parameters _query_params = [] + if _params.get('studyset_id') is not None: # noqa: E501 + _query_params.append(('studyset_id', _params['studyset_id'])) + # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -1377,29 +1374,19 @@ def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : _files = {} # process the body parameter _body_params = None - if _params['annotation_request'] is not None: - _body_params = _params['annotation_request'] - # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - # authentication setting - _auth_settings = ['JSON-Web-Token'] # noqa: E501 + _auth_settings = [] # noqa: E501 _response_types_map = { - '200': "AnnotationReturn", + '200': "AnnotationList", } return self.api_client.call_api( - '/annotations/{id}', 'PUT', + '/annotations/', 'GET', _path_params, _query_params, _header_params, @@ -1416,22 +1403,18 @@ def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : _request_auth=_params.get('_request_auth')) @validate_arguments - def annotations_post(self, source : Annotated[Optional[StrictStr], Field(description="the source of the resource you would like to filter/copy from")] = None, source_id : Annotated[Optional[StrictStr], Field(description="id of the resource you are either filtering/copying on")] = None, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> AnnotationReturn: # noqa: E501 - """Post Annotation # noqa: E501 + def annotations_id_delete(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + """DELETE an annotation # noqa: E501 - Create an annotation # noqa: E501 + delete annotation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_post(source, source_id, annotation_request, async_req=True) + >>> thread = api.annotations_id_delete(id, async_req=True) >>> result = thread.get() - :param source: the source of the resource you would like to filter/copy from - :type source: str - :param source_id: id of the resource you are either filtering/copying on - :type source_id: str - :param annotation_request: - :type annotation_request: AnnotationRequest + :param id: (required) + :type id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one @@ -1441,30 +1424,26 @@ def annotations_post(self, source : Annotated[Optional[StrictStr], Field(descrip :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: AnnotationReturn + :rtype: None """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the annotations_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.annotations_post_with_http_info(source, source_id, annotation_request, **kwargs) # noqa: E501 + raise ValueError("Error! Please call the annotations_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotations_id_delete_with_http_info(id, **kwargs) # noqa: E501 @validate_arguments - def annotations_post_with_http_info(self, source : Annotated[Optional[StrictStr], Field(description="the source of the resource you would like to filter/copy from")] = None, source_id : Annotated[Optional[StrictStr], Field(description="id of the resource you are either filtering/copying on")] = None, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Post Annotation # noqa: E501 + def annotations_id_delete_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """DELETE an annotation # noqa: E501 - Create an annotation # noqa: E501 + delete annotation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.annotations_post_with_http_info(source, source_id, annotation_request, async_req=True) + >>> thread = api.annotations_id_delete_with_http_info(id, async_req=True) >>> result = thread.get() - :param source: the source of the resource you would like to filter/copy from - :type source: str - :param source_id: id of the resource you are either filtering/copying on - :type source_id: str - :param annotation_request: - :type annotation_request: AnnotationRequest + :param id: (required) + :type id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will @@ -1487,15 +1466,13 @@ def annotations_post_with_http_info(self, source : Annotated[Optional[StrictStr] :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(AnnotationReturn, status_code(int), headers(HTTPHeaderDict)) + :rtype: None """ _params = locals() _all_params = [ - 'source', - 'source_id', - 'annotation_request' + 'id' ] _all_params.extend( [ @@ -1514,7 +1491,7 @@ def annotations_post_with_http_info(self, source : Annotated[Optional[StrictStr] if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method annotations_post" % _key + " to method annotations_id_delete" % _key ) _params[_key] = _val del _params['kwargs'] @@ -1523,15 +1500,12 @@ def annotations_post_with_http_info(self, source : Annotated[Optional[StrictStr] # process the path parameters _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + # process the query parameters _query_params = [] - if _params.get('source') is not None: # noqa: E501 - _query_params.append(('source', _params['source'].value)) - - if _params.get('source_id') is not None: # noqa: E501 - _query_params.append(('source_id', _params['source_id'])) - # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -1539,29 +1513,1174 @@ def annotations_post_with_http_info(self, source : Annotated[Optional[StrictStr] _files = {} # process the body parameter _body_params = None - if _params['annotation_request'] is not None: - _body_params = _params['annotation_request'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - # authentication setting _auth_settings = ['JSON-Web-Token'] # noqa: E501 - _response_types_map = { - '200': "AnnotationReturn", - } + _response_types_map = {} return self.api_client.call_api( - '/annotations/', 'POST', + '/annotations/{id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotations_id_get(self, id : StrictStr, export : Annotated[Optional[StrictBool], Field(description="return endpoint data in consumable/readable format")] = None, **kwargs) -> AnnotationReturn: # noqa: E501 + """Your GET endpoint # noqa: E501 + + get an individual annotation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotations_id_get(id, export, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param export: return endpoint data in consumable/readable format + :type export: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AnnotationReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotations_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotations_id_get_with_http_info(id, export, **kwargs) # noqa: E501 + + @validate_arguments + def annotations_id_get_with_http_info(self, id : StrictStr, export : Annotated[Optional[StrictBool], Field(description="return endpoint data in consumable/readable format")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + get an individual annotation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotations_id_get_with_http_info(id, export, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param export: return endpoint data in consumable/readable format + :type export: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AnnotationReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'export' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotations_id_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + if _params.get('export') is not None: # noqa: E501 + _query_params.append(('export', _params['export'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "AnnotationReturn", + } + + return self.api_client.call_api( + '/annotations/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotations_id_put(self, id : StrictStr, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> AnnotationReturn: # noqa: E501 + """Update an annotation # noqa: E501 + + edit an existing annotation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotations_id_put(id, annotation_request, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param annotation_request: + :type annotation_request: AnnotationRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AnnotationReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotations_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotations_id_put_with_http_info(id, annotation_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotations_id_put_with_http_info(self, id : StrictStr, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update an annotation # noqa: E501 + + edit an existing annotation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotations_id_put_with_http_info(id, annotation_request, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param annotation_request: + :type annotation_request: AnnotationRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AnnotationReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'annotation_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotations_id_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['annotation_request'] is not None: + _body_params = _params['annotation_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "AnnotationReturn", + } + + return self.api_client.call_api( + '/annotations/{id}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotations_post(self, source : Annotated[Optional[StrictStr], Field(description="the source of the resource you would like to filter/copy from")] = None, source_id : Annotated[Optional[StrictStr], Field(description="id of the resource you are either filtering/copying on")] = None, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> AnnotationReturn: # noqa: E501 + """Post Annotation # noqa: E501 + + Create an annotation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotations_post(source, source_id, annotation_request, async_req=True) + >>> result = thread.get() + + :param source: the source of the resource you would like to filter/copy from + :type source: str + :param source_id: id of the resource you are either filtering/copying on + :type source_id: str + :param annotation_request: + :type annotation_request: AnnotationRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AnnotationReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotations_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotations_post_with_http_info(source, source_id, annotation_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotations_post_with_http_info(self, source : Annotated[Optional[StrictStr], Field(description="the source of the resource you would like to filter/copy from")] = None, source_id : Annotated[Optional[StrictStr], Field(description="id of the resource you are either filtering/copying on")] = None, annotation_request : Optional[AnnotationRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Post Annotation # noqa: E501 + + Create an annotation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotations_post_with_http_info(source, source_id, annotation_request, async_req=True) + >>> result = thread.get() + + :param source: the source of the resource you would like to filter/copy from + :type source: str + :param source_id: id of the resource you are either filtering/copying on + :type source_id: str + :param annotation_request: + :type annotation_request: AnnotationRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AnnotationReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'source', + 'source_id', + 'annotation_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotations_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('source') is not None: # noqa: E501 + _query_params.append(('source', _params['source'].value)) + + if _params.get('source_id') is not None: # noqa: E501 + _query_params.append(('source_id', _params['source_id'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['annotation_request'] is not None: + _body_params = _params['annotation_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "AnnotationReturn", + } + + return self.api_client.call_api( + '/annotations/', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_get(self, search : Annotated[Optional[constr(strict=True, min_length=1)], Field(description="search for entries that contain the substring")] = None, sort : Annotated[Optional[StrictStr], Field(description="Parameter to sort results on")] = None, page : Annotated[Optional[conint(strict=True, ge=0)], Field(description="page of results")] = None, desc : Annotated[Optional[StrictBool], Field(description="sort results by descending order (as opposed to ascending order)")] = None, page_size : Annotated[Optional[conint(strict=True, lt=30000, ge=1)], Field(description="number of results to show on a page")] = None, name : Annotated[Optional[StrictStr], Field(description="search the name field for a term")] = None, description : Annotated[Optional[StrictStr], Field(description="search description field for a term")] = None, authors : Annotated[Optional[StrictStr], Field(description="search authors")] = None, level : Annotated[Optional[StrictStr], Field(description="select between studies with group results or meta results")] = None, data_type : Annotated[Optional[StrictStr], Field(description="whether searching for studies that contain coordinates, images, or both")] = None, publication : Annotated[Optional[StrictStr], Field(description="search for papers from a particular journal")] = None, pmid : Annotated[Optional[StrictStr], Field(description="search for particular pmid")] = None, doi : Annotated[Optional[StrictStr], Field(description="search for study with specific doi")] = None, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> BaseStudyList: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_get(search, sort, page, desc, page_size, name, description, authors, level, data_type, publication, pmid, doi, flat, info, async_req=True) + >>> result = thread.get() + + :param search: search for entries that contain the substring + :type search: str + :param sort: Parameter to sort results on + :type sort: str + :param page: page of results + :type page: int + :param desc: sort results by descending order (as opposed to ascending order) + :type desc: bool + :param page_size: number of results to show on a page + :type page_size: int + :param name: search the name field for a term + :type name: str + :param description: search description field for a term + :type description: str + :param authors: search authors + :type authors: str + :param level: select between studies with group results or meta results + :type level: str + :param data_type: whether searching for studies that contain coordinates, images, or both + :type data_type: str + :param publication: search for papers from a particular journal + :type publication: str + :param pmid: search for particular pmid + :type pmid: str + :param doi: search for study with specific doi + :type doi: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudyList + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_get_with_http_info(search, sort, page, desc, page_size, name, description, authors, level, data_type, publication, pmid, doi, flat, info, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_get_with_http_info(self, search : Annotated[Optional[constr(strict=True, min_length=1)], Field(description="search for entries that contain the substring")] = None, sort : Annotated[Optional[StrictStr], Field(description="Parameter to sort results on")] = None, page : Annotated[Optional[conint(strict=True, ge=0)], Field(description="page of results")] = None, desc : Annotated[Optional[StrictBool], Field(description="sort results by descending order (as opposed to ascending order)")] = None, page_size : Annotated[Optional[conint(strict=True, lt=30000, ge=1)], Field(description="number of results to show on a page")] = None, name : Annotated[Optional[StrictStr], Field(description="search the name field for a term")] = None, description : Annotated[Optional[StrictStr], Field(description="search description field for a term")] = None, authors : Annotated[Optional[StrictStr], Field(description="search authors")] = None, level : Annotated[Optional[StrictStr], Field(description="select between studies with group results or meta results")] = None, data_type : Annotated[Optional[StrictStr], Field(description="whether searching for studies that contain coordinates, images, or both")] = None, publication : Annotated[Optional[StrictStr], Field(description="search for papers from a particular journal")] = None, pmid : Annotated[Optional[StrictStr], Field(description="search for particular pmid")] = None, doi : Annotated[Optional[StrictStr], Field(description="search for study with specific doi")] = None, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_get_with_http_info(search, sort, page, desc, page_size, name, description, authors, level, data_type, publication, pmid, doi, flat, info, async_req=True) + >>> result = thread.get() + + :param search: search for entries that contain the substring + :type search: str + :param sort: Parameter to sort results on + :type sort: str + :param page: page of results + :type page: int + :param desc: sort results by descending order (as opposed to ascending order) + :type desc: bool + :param page_size: number of results to show on a page + :type page_size: int + :param name: search the name field for a term + :type name: str + :param description: search description field for a term + :type description: str + :param authors: search authors + :type authors: str + :param level: select between studies with group results or meta results + :type level: str + :param data_type: whether searching for studies that contain coordinates, images, or both + :type data_type: str + :param publication: search for papers from a particular journal + :type publication: str + :param pmid: search for particular pmid + :type pmid: str + :param doi: search for study with specific doi + :type doi: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudyList, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'search', + 'sort', + 'page', + 'desc', + 'page_size', + 'name', + 'description', + 'authors', + 'level', + 'data_type', + 'publication', + 'pmid', + 'doi', + 'flat', + 'info' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('search') is not None: # noqa: E501 + _query_params.append(('search', _params['search'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + + if _params.get('page') is not None: # noqa: E501 + _query_params.append(('page', _params['page'])) + + if _params.get('desc') is not None: # noqa: E501 + _query_params.append(('desc', _params['desc'])) + + if _params.get('page_size') is not None: # noqa: E501 + _query_params.append(('page_size', _params['page_size'])) + + if _params.get('name') is not None: # noqa: E501 + _query_params.append(('name', _params['name'])) + + if _params.get('description') is not None: # noqa: E501 + _query_params.append(('description', _params['description'])) + + if _params.get('authors') is not None: # noqa: E501 + _query_params.append(('authors', _params['authors'])) + + if _params.get('level') is not None: # noqa: E501 + _query_params.append(('level', _params['level'].value)) + + if _params.get('data_type') is not None: # noqa: E501 + _query_params.append(('data_type', _params['data_type'].value)) + + if _params.get('publication') is not None: # noqa: E501 + _query_params.append(('publication', _params['publication'])) + + if _params.get('pmid') is not None: # noqa: E501 + _query_params.append(('pmid', _params['pmid'])) + + if _params.get('doi') is not None: # noqa: E501 + _query_params.append(('doi', _params['doi'])) + + if _params.get('flat') is not None: # noqa: E501 + _query_params.append(('flat', _params['flat'])) + + if _params.get('info') is not None: # noqa: E501 + _query_params.append(('info', _params['info'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "BaseStudyList", + } + + return self.api_client.call_api( + '/base-studies/', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_id_get(self, id : StrictStr, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> BaseStudyReturn: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_get(id, flat, info, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudyReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_id_get_with_http_info(id, flat, info, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_id_get_with_http_info(self, id : StrictStr, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_get_with_http_info(id, flat, info, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudyReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'flat', + 'info' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_id_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + if _params.get('flat') is not None: # noqa: E501 + _query_params.append(('flat', _params['flat'])) + + if _params.get('info') is not None: # noqa: E501 + _query_params.append(('info', _params['info'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "BaseStudyReturn", + } + + return self.api_client.call_api( + '/base-studies/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_id_put(self, id : StrictStr, base_study : Optional[BaseStudy] = None, **kwargs) -> BaseStudyReturn: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_put(id, base_study, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param base_study: + :type base_study: BaseStudy + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudyReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_id_put_with_http_info(id, base_study, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_id_put_with_http_info(self, id : StrictStr, base_study : Optional[BaseStudy] = None, **kwargs) -> ApiResponse: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_put_with_http_info(id, base_study, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param base_study: + :type base_study: BaseStudy + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudyReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'base_study' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_id_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['base_study'] is not None: + _body_params = _params['base_study'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "BaseStudyReturn", + } + + return self.api_client.call_api( + '/base-studies/{id}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_post(self, base_studies_post_request : Optional[BaseStudiesPostRequest] = None, **kwargs) -> BaseStudiesPost200Response: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_post(base_studies_post_request, async_req=True) + >>> result = thread.get() + + :param base_studies_post_request: + :type base_studies_post_request: BaseStudiesPostRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudiesPost200Response + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_post_with_http_info(base_studies_post_request, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_post_with_http_info(self, base_studies_post_request : Optional[BaseStudiesPostRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_post_with_http_info(base_studies_post_request, async_req=True) + >>> result = thread.get() + + :param base_studies_post_request: + :type base_studies_post_request: BaseStudiesPostRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudiesPost200Response, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'base_studies_post_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['base_studies_post_request'] is not None: + _body_params = _params['base_studies_post_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "BaseStudiesPost200Response", + } + + return self.api_client.call_api( + '/base-studies/', 'POST', _path_params, _query_params, _header_params, diff --git a/neurostore_sdk/api/studies_api.py b/neurostore_sdk/api/studies_api.py index d928720..ea6a1cb 100644 --- a/neurostore_sdk/api/studies_api.py +++ b/neurostore_sdk/api/studies_api.py @@ -24,6 +24,11 @@ from typing import Any, Optional +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest +from neurostore_sdk.models.base_study import BaseStudy +from neurostore_sdk.models.base_study_list import BaseStudyList +from neurostore_sdk.models.base_study_return import BaseStudyReturn from neurostore_sdk.models.study_list import StudyList from neurostore_sdk.models.study_request import StudyRequest from neurostore_sdk.models.study_return import StudyReturn @@ -48,6 +53,704 @@ def __init__(self, api_client=None): api_client = ApiClient.get_default() self.api_client = api_client + @validate_arguments + def base_studies_get(self, search : Annotated[Optional[constr(strict=True, min_length=1)], Field(description="search for entries that contain the substring")] = None, sort : Annotated[Optional[StrictStr], Field(description="Parameter to sort results on")] = None, page : Annotated[Optional[conint(strict=True, ge=0)], Field(description="page of results")] = None, desc : Annotated[Optional[StrictBool], Field(description="sort results by descending order (as opposed to ascending order)")] = None, page_size : Annotated[Optional[conint(strict=True, lt=30000, ge=1)], Field(description="number of results to show on a page")] = None, name : Annotated[Optional[StrictStr], Field(description="search the name field for a term")] = None, description : Annotated[Optional[StrictStr], Field(description="search description field for a term")] = None, authors : Annotated[Optional[StrictStr], Field(description="search authors")] = None, level : Annotated[Optional[StrictStr], Field(description="select between studies with group results or meta results")] = None, data_type : Annotated[Optional[StrictStr], Field(description="whether searching for studies that contain coordinates, images, or both")] = None, publication : Annotated[Optional[StrictStr], Field(description="search for papers from a particular journal")] = None, pmid : Annotated[Optional[StrictStr], Field(description="search for particular pmid")] = None, doi : Annotated[Optional[StrictStr], Field(description="search for study with specific doi")] = None, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> BaseStudyList: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_get(search, sort, page, desc, page_size, name, description, authors, level, data_type, publication, pmid, doi, flat, info, async_req=True) + >>> result = thread.get() + + :param search: search for entries that contain the substring + :type search: str + :param sort: Parameter to sort results on + :type sort: str + :param page: page of results + :type page: int + :param desc: sort results by descending order (as opposed to ascending order) + :type desc: bool + :param page_size: number of results to show on a page + :type page_size: int + :param name: search the name field for a term + :type name: str + :param description: search description field for a term + :type description: str + :param authors: search authors + :type authors: str + :param level: select between studies with group results or meta results + :type level: str + :param data_type: whether searching for studies that contain coordinates, images, or both + :type data_type: str + :param publication: search for papers from a particular journal + :type publication: str + :param pmid: search for particular pmid + :type pmid: str + :param doi: search for study with specific doi + :type doi: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudyList + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_get_with_http_info(search, sort, page, desc, page_size, name, description, authors, level, data_type, publication, pmid, doi, flat, info, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_get_with_http_info(self, search : Annotated[Optional[constr(strict=True, min_length=1)], Field(description="search for entries that contain the substring")] = None, sort : Annotated[Optional[StrictStr], Field(description="Parameter to sort results on")] = None, page : Annotated[Optional[conint(strict=True, ge=0)], Field(description="page of results")] = None, desc : Annotated[Optional[StrictBool], Field(description="sort results by descending order (as opposed to ascending order)")] = None, page_size : Annotated[Optional[conint(strict=True, lt=30000, ge=1)], Field(description="number of results to show on a page")] = None, name : Annotated[Optional[StrictStr], Field(description="search the name field for a term")] = None, description : Annotated[Optional[StrictStr], Field(description="search description field for a term")] = None, authors : Annotated[Optional[StrictStr], Field(description="search authors")] = None, level : Annotated[Optional[StrictStr], Field(description="select between studies with group results or meta results")] = None, data_type : Annotated[Optional[StrictStr], Field(description="whether searching for studies that contain coordinates, images, or both")] = None, publication : Annotated[Optional[StrictStr], Field(description="search for papers from a particular journal")] = None, pmid : Annotated[Optional[StrictStr], Field(description="search for particular pmid")] = None, doi : Annotated[Optional[StrictStr], Field(description="search for study with specific doi")] = None, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_get_with_http_info(search, sort, page, desc, page_size, name, description, authors, level, data_type, publication, pmid, doi, flat, info, async_req=True) + >>> result = thread.get() + + :param search: search for entries that contain the substring + :type search: str + :param sort: Parameter to sort results on + :type sort: str + :param page: page of results + :type page: int + :param desc: sort results by descending order (as opposed to ascending order) + :type desc: bool + :param page_size: number of results to show on a page + :type page_size: int + :param name: search the name field for a term + :type name: str + :param description: search description field for a term + :type description: str + :param authors: search authors + :type authors: str + :param level: select between studies with group results or meta results + :type level: str + :param data_type: whether searching for studies that contain coordinates, images, or both + :type data_type: str + :param publication: search for papers from a particular journal + :type publication: str + :param pmid: search for particular pmid + :type pmid: str + :param doi: search for study with specific doi + :type doi: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudyList, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'search', + 'sort', + 'page', + 'desc', + 'page_size', + 'name', + 'description', + 'authors', + 'level', + 'data_type', + 'publication', + 'pmid', + 'doi', + 'flat', + 'info' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('search') is not None: # noqa: E501 + _query_params.append(('search', _params['search'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + + if _params.get('page') is not None: # noqa: E501 + _query_params.append(('page', _params['page'])) + + if _params.get('desc') is not None: # noqa: E501 + _query_params.append(('desc', _params['desc'])) + + if _params.get('page_size') is not None: # noqa: E501 + _query_params.append(('page_size', _params['page_size'])) + + if _params.get('name') is not None: # noqa: E501 + _query_params.append(('name', _params['name'])) + + if _params.get('description') is not None: # noqa: E501 + _query_params.append(('description', _params['description'])) + + if _params.get('authors') is not None: # noqa: E501 + _query_params.append(('authors', _params['authors'])) + + if _params.get('level') is not None: # noqa: E501 + _query_params.append(('level', _params['level'].value)) + + if _params.get('data_type') is not None: # noqa: E501 + _query_params.append(('data_type', _params['data_type'].value)) + + if _params.get('publication') is not None: # noqa: E501 + _query_params.append(('publication', _params['publication'])) + + if _params.get('pmid') is not None: # noqa: E501 + _query_params.append(('pmid', _params['pmid'])) + + if _params.get('doi') is not None: # noqa: E501 + _query_params.append(('doi', _params['doi'])) + + if _params.get('flat') is not None: # noqa: E501 + _query_params.append(('flat', _params['flat'])) + + if _params.get('info') is not None: # noqa: E501 + _query_params.append(('info', _params['info'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "BaseStudyList", + } + + return self.api_client.call_api( + '/base-studies/', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_id_get(self, id : StrictStr, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> BaseStudyReturn: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_get(id, flat, info, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudyReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_id_get_with_http_info(id, flat, info, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_id_get_with_http_info(self, id : StrictStr, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, info : Annotated[Optional[StrictBool], Field(description="show additional for endpoint-object relationships without being fully nested. Incompatible with nested")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your GET endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_get_with_http_info(id, flat, info, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param flat: do not return any embedded relationships. When set, it is incompatible with nested. + :type flat: bool + :param info: show additional for endpoint-object relationships without being fully nested. Incompatible with nested + :type info: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudyReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'flat', + 'info' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_id_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + if _params.get('flat') is not None: # noqa: E501 + _query_params.append(('flat', _params['flat'])) + + if _params.get('info') is not None: # noqa: E501 + _query_params.append(('info', _params['info'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "BaseStudyReturn", + } + + return self.api_client.call_api( + '/base-studies/{id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_id_put(self, id : StrictStr, base_study : Optional[BaseStudy] = None, **kwargs) -> BaseStudyReturn: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_put(id, base_study, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param base_study: + :type base_study: BaseStudy + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudyReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_id_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_id_put_with_http_info(id, base_study, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_id_put_with_http_info(self, id : StrictStr, base_study : Optional[BaseStudy] = None, **kwargs) -> ApiResponse: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_id_put_with_http_info(id, base_study, async_req=True) + >>> result = thread.get() + + :param id: (required) + :type id: str + :param base_study: + :type base_study: BaseStudy + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudyReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'id', + 'base_study' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_id_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['id']: + _path_params['id'] = _params['id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['base_study'] is not None: + _body_params = _params['base_study'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "BaseStudyReturn", + } + + return self.api_client.call_api( + '/base-studies/{id}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def base_studies_post(self, base_studies_post_request : Optional[BaseStudiesPostRequest] = None, **kwargs) -> BaseStudiesPost200Response: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_post(base_studies_post_request, async_req=True) + >>> result = thread.get() + + :param base_studies_post_request: + :type base_studies_post_request: BaseStudiesPostRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BaseStudiesPost200Response + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the base_studies_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.base_studies_post_with_http_info(base_studies_post_request, **kwargs) # noqa: E501 + + @validate_arguments + def base_studies_post_with_http_info(self, base_studies_post_request : Optional[BaseStudiesPostRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 + """ # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.base_studies_post_with_http_info(base_studies_post_request, async_req=True) + >>> result = thread.get() + + :param base_studies_post_request: + :type base_studies_post_request: BaseStudiesPostRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BaseStudiesPost200Response, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'base_studies_post_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method base_studies_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['base_studies_post_request'] is not None: + _body_params = _params['base_studies_post_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['JSON-Web-Token'] # noqa: E501 + + _response_types_map = { + '200': "BaseStudiesPost200Response", + } + + return self.api_client.call_api( + '/base-studies/', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def studies_get(self, search : Annotated[Optional[constr(strict=True, min_length=1)], Field(description="search for entries that contain the substring")] = None, sort : Annotated[Optional[StrictStr], Field(description="Parameter to sort results on")] = None, page : Annotated[Optional[conint(strict=True, ge=0)], Field(description="page of results")] = None, desc : Annotated[Optional[StrictBool], Field(description="sort results by descending order (as opposed to ascending order)")] = None, page_size : Annotated[Optional[conint(strict=True, lt=30000, ge=1)], Field(description="number of results to show on a page")] = None, nested : Annotated[Optional[StrictBool], Field(description="whether to show the URI to a resource (false) or to embed the object in the response (true)")] = None, name : Annotated[Optional[StrictStr], Field(description="search the name field for a term")] = None, description : Annotated[Optional[StrictStr], Field(description="search description field for a term")] = None, source_id : Annotated[Optional[StrictStr], Field(description="id of the resource you are either filtering/copying on")] = None, unique : Annotated[Optional[Any], Field(description="whether to list clones with originals")] = None, source : Annotated[Optional[StrictStr], Field(description="the source of the resource you would like to filter/copy from")] = None, authors : Annotated[Optional[StrictStr], Field(description="search authors")] = None, user_id : Annotated[Optional[StrictStr], Field(description="user id you want to filter by")] = None, data_type : Annotated[Optional[StrictStr], Field(description="whether searching for studies that contain coordinates, images, or both")] = None, studyset_owner : Annotated[Optional[StrictStr], Field(description="for all studies filter which studysets are listed based on who owns the studyset")] = None, level : Annotated[Optional[StrictStr], Field(description="select between studies with group results or meta results")] = None, pmid : Annotated[Optional[StrictStr], Field(description="search for particular pmid")] = None, doi : Annotated[Optional[StrictStr], Field(description="search for study with specific doi")] = None, flat : Annotated[Optional[StrictBool], Field(description="do not return any embedded relationships. When set, it is incompatible with nested. ")] = None, **kwargs) -> StudyList: # noqa: E501 """GET a list of studies # noqa: E501 From b28ebfd0fcbceaa1c5a461860fcf3f573b007217 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 06:26:20 +0000 Subject: [PATCH 4/4] 6801f640be07b6c95a5a689a5c1f1e4ee74f19a9 --- docs/AnalysesApi.md | 15 +++++++++++---- docs/AnnotationsApi.md | 15 +++++++++++---- docs/StoreApi.md | 15 +++++++++++---- neurostore_sdk/api/analyses_api.py | 14 ++++++++++---- neurostore_sdk/api/annotations_api.py | 14 ++++++++++---- neurostore_sdk/api/store_api.py | 14 ++++++++++---- 6 files changed, 63 insertions(+), 24 deletions(-) diff --git a/docs/AnalysesApi.md b/docs/AnalysesApi.md index 0039675..4f773ac 100644 --- a/docs/AnalysesApi.md +++ b/docs/AnalysesApi.md @@ -455,7 +455,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **annotation_analyses_id_get** -> annotation_analyses_id_get(id) +> NoteCollectionReturn annotation_analyses_id_get(id) Your GET endpoint @@ -466,6 +466,7 @@ Your GET endpoint import time import os import neurostore_sdk +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.rest import ApiException from pprint import pprint @@ -493,7 +494,9 @@ with neurostore_sdk.ApiClient(configuration) as api_client: try: # Your GET endpoint - api_instance.annotation_analyses_id_get(id) + api_response = api_instance.annotation_analyses_id_get(id) + print("The response of AnalysesApi->annotation_analyses_id_get:\n") + pprint(api_response) except Exception as e: print("Exception when calling AnalysesApi->annotation_analyses_id_get: %s\n" % e) ``` @@ -507,7 +510,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**NoteCollectionReturn**](NoteCollectionReturn.md) ### Authorization @@ -516,8 +519,12 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/AnnotationsApi.md b/docs/AnnotationsApi.md index e4325b5..5240ad8 100644 --- a/docs/AnnotationsApi.md +++ b/docs/AnnotationsApi.md @@ -76,7 +76,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **annotation_analyses_id_get** -> annotation_analyses_id_get(id) +> NoteCollectionReturn annotation_analyses_id_get(id) Your GET endpoint @@ -87,6 +87,7 @@ Your GET endpoint import time import os import neurostore_sdk +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.rest import ApiException from pprint import pprint @@ -114,7 +115,9 @@ with neurostore_sdk.ApiClient(configuration) as api_client: try: # Your GET endpoint - api_instance.annotation_analyses_id_get(id) + api_response = api_instance.annotation_analyses_id_get(id) + print("The response of AnnotationsApi->annotation_analyses_id_get:\n") + pprint(api_response) except Exception as e: print("Exception when calling AnnotationsApi->annotation_analyses_id_get: %s\n" % e) ``` @@ -128,7 +131,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**NoteCollectionReturn**](NoteCollectionReturn.md) ### Authorization @@ -137,8 +140,12 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/StoreApi.md b/docs/StoreApi.md index 9ecfa9a..d8ec853 100644 --- a/docs/StoreApi.md +++ b/docs/StoreApi.md @@ -488,7 +488,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **annotation_analyses_id_get** -> annotation_analyses_id_get(id) +> NoteCollectionReturn annotation_analyses_id_get(id) Your GET endpoint @@ -499,6 +499,7 @@ Your GET endpoint import time import os import neurostore_sdk +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn from neurostore_sdk.rest import ApiException from pprint import pprint @@ -526,7 +527,9 @@ with neurostore_sdk.ApiClient(configuration) as api_client: try: # Your GET endpoint - api_instance.annotation_analyses_id_get(id) + api_response = api_instance.annotation_analyses_id_get(id) + print("The response of StoreApi->annotation_analyses_id_get:\n") + pprint(api_response) except Exception as e: print("Exception when calling StoreApi->annotation_analyses_id_get: %s\n" % e) ``` @@ -540,7 +543,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**NoteCollectionReturn**](NoteCollectionReturn.md) ### Authorization @@ -549,8 +552,12 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/neurostore_sdk/api/analyses_api.py b/neurostore_sdk/api/analyses_api.py index 6caca0f..c2d4e0a 100644 --- a/neurostore_sdk/api/analyses_api.py +++ b/neurostore_sdk/api/analyses_api.py @@ -959,7 +959,7 @@ def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # no _request_auth=_params.get('_request_auth')) @validate_arguments - def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> NoteCollectionReturn: # noqa: E501 """Your GET endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -979,7 +979,7 @@ def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: NoteCollectionReturn """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: @@ -1020,7 +1020,7 @@ def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() @@ -1067,10 +1067,16 @@ def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> _files = {} # process the body parameter _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + # authentication setting _auth_settings = ['JSON-Web-Token'] # noqa: E501 - _response_types_map = {} + _response_types_map = { + '200': "NoteCollectionReturn", + } return self.api_client.call_api( '/annotation-analyses/{id}', 'GET', diff --git a/neurostore_sdk/api/annotations_api.py b/neurostore_sdk/api/annotations_api.py index f5fd081..75442c1 100644 --- a/neurostore_sdk/api/annotations_api.py +++ b/neurostore_sdk/api/annotations_api.py @@ -182,7 +182,7 @@ def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # no _request_auth=_params.get('_request_auth')) @validate_arguments - def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> NoteCollectionReturn: # noqa: E501 """Your GET endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -202,7 +202,7 @@ def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: NoteCollectionReturn """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: @@ -243,7 +243,7 @@ def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() @@ -290,10 +290,16 @@ def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> _files = {} # process the body parameter _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + # authentication setting _auth_settings = ['JSON-Web-Token'] # noqa: E501 - _response_types_map = {} + _response_types_map = { + '200': "NoteCollectionReturn", + } return self.api_client.call_api( '/annotation-analyses/{id}', 'GET', diff --git a/neurostore_sdk/api/store_api.py b/neurostore_sdk/api/store_api.py index c9ac75c..06558f4 100644 --- a/neurostore_sdk/api/store_api.py +++ b/neurostore_sdk/api/store_api.py @@ -981,7 +981,7 @@ def annotation_analyses_get_with_http_info(self, **kwargs) -> ApiResponse: # no _request_auth=_params.get('_request_auth')) @validate_arguments - def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: E501 + def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> NoteCollectionReturn: # noqa: E501 """Your GET endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -1001,7 +1001,7 @@ def annotation_analyses_id_get(self, id : StrictStr, **kwargs) -> None: # noqa: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: NoteCollectionReturn """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: @@ -1042,7 +1042,7 @@ def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: None + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() @@ -1089,10 +1089,16 @@ def annotation_analyses_id_get_with_http_info(self, id : StrictStr, **kwargs) -> _files = {} # process the body parameter _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + # authentication setting _auth_settings = ['JSON-Web-Token'] # noqa: E501 - _response_types_map = {} + _response_types_map = { + '200': "NoteCollectionReturn", + } return self.api_client.call_api( '/annotation-analyses/{id}', 'GET',