Skip to content

Commit

Permalink
DEV : update to match new api specification
Browse files Browse the repository at this point in the history
  • Loading branch information
juliecoust committed Jul 8, 2024
1 parent 6f172b9 commit f822b15
Show file tree
Hide file tree
Showing 104 changed files with 166 additions and 113 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ No description provided (generated by Openapi Generator https://github.com/opena

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.0.36
- Package version: 2.0.1
- API version: 0.0.37
- Package version: 2.0.2
- Generator version: 7.4.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down Expand Up @@ -62,6 +62,7 @@ import os
configuration = ecotaxa_py_client.Configuration(
host = "https://ecotaxa.obs-vlfr.fr/api"
)

# In case of ssl error
configuration.verify_ssl=False

Expand Down Expand Up @@ -89,6 +90,20 @@ from ecotaxa_py_client.models.user_model_with_rights import UserModelWithRights

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.FilesApi(api_client)
path = '/ftp_plankton/Ecotaxa_Exported_data' # str |

try:
# List Common Files
api_response = api_instance.list_common_files(path)
print("The response of FilesApi->list_common_files:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling FilesApi->list_common_files: %s\n" % e)

# Enter a context with an instance of the API client
with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
Expand Down
6 changes: 4 additions & 2 deletions docs/ProjectsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ 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)

# **search_projects**
> List[ProjectModel] search_projects(also_others=also_others, not_granted=not_granted, for_managing=for_managing, title_filter=title_filter, instrument_filter=instrument_filter, filter_subset=filter_subset, order_field=order_field, window_start=window_start, window_size=window_size)
> List[ProjectModel] search_projects(also_others=also_others, not_granted=not_granted, for_managing=for_managing, title_filter=title_filter, instrument_filter=instrument_filter, filter_subset=filter_subset, order_field=order_field, summary=summary, window_start=window_start, window_size=window_size)
Search Projects

Expand Down Expand Up @@ -1069,12 +1069,13 @@ with ecotaxa_py_client.ApiClient(configuration) as api_client:
instrument_filter = '' # str | Only return projects where this instrument was used. (optional) (default to '')
filter_subset = False # bool | Only return projects having 'subset' in their names. (optional) (default to False)
order_field = 'instrument' # str | One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id'] (optional)
summary = true # bool | Return projects except somme fields like bodc_variables if set to True. For projects list display purpose. (optional)
window_start = 0 # int | Skip `window_start` before returning data. (optional)
window_size = 100 # int | Return only `window_size` lines. (optional)

try:
# Search Projects
api_response = api_instance.search_projects(also_others=also_others, not_granted=not_granted, for_managing=for_managing, title_filter=title_filter, instrument_filter=instrument_filter, filter_subset=filter_subset, order_field=order_field, window_start=window_start, window_size=window_size)
api_response = api_instance.search_projects(also_others=also_others, not_granted=not_granted, for_managing=for_managing, title_filter=title_filter, instrument_filter=instrument_filter, filter_subset=filter_subset, order_field=order_field, summary=summary, window_start=window_start, window_size=window_size)
print("The response of ProjectsApi->search_projects:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -1095,6 +1096,7 @@ Name | Type | Description | Notes
**instrument_filter** | **str**| Only return projects where this instrument was used. | [optional] [default to '']
**filter_subset** | **bool**| Only return projects having 'subset' in their names. | [optional] [default to False]
**order_field** | **str**| One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id'] | [optional]
**summary** | **bool**| Return projects except somme fields like bodc_variables if set to True. For projects list display purpose. | [optional]
**window_start** | **int**| Skip `window_start` before returning data. | [optional]
**window_size** | **int**| Return only `window_size` lines. | [optional]

Expand Down
6 changes: 4 additions & 2 deletions docs/UsersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ 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_users**
> List[UserModelWithRights] get_users(ids=ids)
> List[UserModelWithRights] get_users(ids=ids, summary=summary)
Get Users

Expand Down Expand Up @@ -440,10 +440,11 @@ with ecotaxa_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ecotaxa_py_client.UsersApi(api_client)
ids = '' # str | String containing the list of one or more id separated by non-num char. **If several ids are provided**, one full info is returned per user. (optional) (default to '')
summary = true # bool | Return users except rights and last_used_projects if set to True. For users list display purpose. (optional)

try:
# Get Users
api_response = api_instance.get_users(ids=ids)
api_response = api_instance.get_users(ids=ids, summary=summary)
print("The response of UsersApi->get_users:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -458,6 +459,7 @@ with ecotaxa_py_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ids** | **str**| String containing the list of one or more id separated by non-num char. **If several ids are provided**, one full info is returned per user. | [optional] [default to '']
**summary** | **bool**| Return users except rights and last_used_projects if set to True. For users list display purpose. | [optional]

### Return type

Expand Down
4 changes: 2 additions & 2 deletions ecotaxa_py_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501


__version__ = "2.0.1"
__version__ = "2.0.2"

# import apis into sdk package
from ecotaxa_py_client.api.files_api import FilesApi
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/acquisitions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/admin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/authentification_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/collections_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/files_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/instruments_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/jobs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/misc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/object_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/objects_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/processes_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
19 changes: 18 additions & 1 deletion ecotaxa_py_client/api/projects_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down Expand Up @@ -3664,6 +3664,7 @@ def search_projects(
instrument_filter: Annotated[Optional[StrictStr], Field(description="Only return projects where this instrument was used.")] = None,
filter_subset: Annotated[Optional[StrictBool], Field(description="Only return projects having 'subset' in their names.")] = None,
order_field: Annotated[Optional[StrictStr], Field(description="One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id']")] = None,
summary: Annotated[Optional[StrictBool], Field(description="Return projects except somme fields like bodc_variables if set to True. For projects list display purpose.")] = None,
window_start: Annotated[Optional[StrictInt], Field(description="Skip `window_start` before returning data.")] = None,
window_size: Annotated[Optional[StrictInt], Field(description="Return only `window_size` lines.")] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -3697,6 +3698,8 @@ def search_projects(
:type filter_subset: bool
:param order_field: One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id']
:type order_field: str
:param summary: Return projects except somme fields like bodc_variables if set to True. For projects list display purpose.
:type summary: bool
:param window_start: Skip `window_start` before returning data.
:type window_start: int
:param window_size: Return only `window_size` lines.
Expand Down Expand Up @@ -3731,6 +3734,7 @@ def search_projects(
instrument_filter=instrument_filter,
filter_subset=filter_subset,
order_field=order_field,
summary=summary,
window_start=window_start,
window_size=window_size,
_request_auth=_request_auth,
Expand Down Expand Up @@ -3764,6 +3768,7 @@ def search_projects_with_http_info(
instrument_filter: Annotated[Optional[StrictStr], Field(description="Only return projects where this instrument was used.")] = None,
filter_subset: Annotated[Optional[StrictBool], Field(description="Only return projects having 'subset' in their names.")] = None,
order_field: Annotated[Optional[StrictStr], Field(description="One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id']")] = None,
summary: Annotated[Optional[StrictBool], Field(description="Return projects except somme fields like bodc_variables if set to True. For projects list display purpose.")] = None,
window_start: Annotated[Optional[StrictInt], Field(description="Skip `window_start` before returning data.")] = None,
window_size: Annotated[Optional[StrictInt], Field(description="Return only `window_size` lines.")] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -3797,6 +3802,8 @@ def search_projects_with_http_info(
:type filter_subset: bool
:param order_field: One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id']
:type order_field: str
:param summary: Return projects except somme fields like bodc_variables if set to True. For projects list display purpose.
:type summary: bool
:param window_start: Skip `window_start` before returning data.
:type window_start: int
:param window_size: Return only `window_size` lines.
Expand Down Expand Up @@ -3831,6 +3838,7 @@ def search_projects_with_http_info(
instrument_filter=instrument_filter,
filter_subset=filter_subset,
order_field=order_field,
summary=summary,
window_start=window_start,
window_size=window_size,
_request_auth=_request_auth,
Expand Down Expand Up @@ -3864,6 +3872,7 @@ def search_projects_without_preload_content(
instrument_filter: Annotated[Optional[StrictStr], Field(description="Only return projects where this instrument was used.")] = None,
filter_subset: Annotated[Optional[StrictBool], Field(description="Only return projects having 'subset' in their names.")] = None,
order_field: Annotated[Optional[StrictStr], Field(description="One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id']")] = None,
summary: Annotated[Optional[StrictBool], Field(description="Return projects except somme fields like bodc_variables if set to True. For projects list display purpose.")] = None,
window_start: Annotated[Optional[StrictInt], Field(description="Skip `window_start` before returning data.")] = None,
window_size: Annotated[Optional[StrictInt], Field(description="Return only `window_size` lines.")] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -3897,6 +3906,8 @@ def search_projects_without_preload_content(
:type filter_subset: bool
:param order_field: One of ['instrument', 'instrument_url', 'highest_right', 'projid', 'title', 'visible', 'status', 'objcount', 'pctvalidated', 'pctclassified', 'classifsettings', 'classiffieldlist', 'popoverfieldlist', 'comments', 'description', 'rf_models_used', 'cnn_network_id']
:type order_field: str
:param summary: Return projects except somme fields like bodc_variables if set to True. For projects list display purpose.
:type summary: bool
:param window_start: Skip `window_start` before returning data.
:type window_start: int
:param window_size: Return only `window_size` lines.
Expand Down Expand Up @@ -3931,6 +3942,7 @@ def search_projects_without_preload_content(
instrument_filter=instrument_filter,
filter_subset=filter_subset,
order_field=order_field,
summary=summary,
window_start=window_start,
window_size=window_size,
_request_auth=_request_auth,
Expand Down Expand Up @@ -3959,6 +3971,7 @@ def _search_projects_serialize(
instrument_filter,
filter_subset,
order_field,
summary,
window_start,
window_size,
_request_auth,
Expand Down Expand Up @@ -4009,6 +4022,10 @@ def _search_projects_serialize(

_query_params.append(('order_field', order_field))

if summary is not None:

_query_params.append(('summary', summary))

if window_start is not None:

_query_params.append(('window_start', window_start))
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/samples_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api/taxonomy_tree_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 0.0.36
The version of the OpenAPI document: 0.0.37
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Loading

0 comments on commit f822b15

Please sign in to comment.