From b2d5c2cbac3563a479738052f2f88b0ffa0dab80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Nov 2023 19:32:42 +0000 Subject: [PATCH] ac536151ca46bbfcd1c74cfc4062b2d7e39bc4d0 --- README.md | 1 + docs/DefaultApi.md | 58 ++++++++++++++ neurostore_sdk/api/default_api.py | 123 ++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+) diff --git a/README.md b/README.md index 06333d2..e5117aa 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ 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* | [**annotations_options**](docs/DefaultApi.md#annotations_options) | **OPTIONS** /annotations/ | *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} | diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 227d8d1..0bf7bab 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -4,12 +4,70 @@ All URIs are relative to *https://neurostore.org/api* Method | HTTP request | Description ------------- | ------------- | ------------- +[**annotations_options**](DefaultApi.md#annotations_options) | **OPTIONS** /annotations/ | [**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/ | +# **annotations_options** +> annotations_options() + + + +### 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) + + try: + # + api_instance.annotations_options() + except Exception as e: + print("Exception when calling DefaultApi->annotations_options: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../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) diff --git a/neurostore_sdk/api/default_api.py b/neurostore_sdk/api/default_api.py index c16147c..9ab0428 100644 --- a/neurostore_sdk/api/default_api.py +++ b/neurostore_sdk/api/default_api.py @@ -50,6 +50,129 @@ def __init__(self, api_client=None): api_client = ApiClient.get_default() self.api_client = api_client + @validate_arguments + def annotations_options(self, **kwargs) -> None: # 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.annotations_options(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: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotations_options_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotations_options_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def annotations_options_with_http_info(self, **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.annotations_options_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: None + """ + + _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 annotations_options" % _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 + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/annotations/', 'OPTIONS', + _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