Initial version
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: elabapi-python
|
||||
Version: 5.6.1
|
||||
Summary: eLabFTW REST API v2 Documentation
|
||||
Home-page: https://github.com/elabftw/elabapi-python
|
||||
Author-email:
|
||||
Keywords: Swagger,eLabFTW REST API v2 Documentation
|
||||
Requires-Dist: urllib3>=1.15
|
||||
Requires-Dist: six>=1.10
|
||||
Requires-Dist: certifi
|
||||
Requires-Dist: python-dateutil
|
||||
Dynamic: description
|
||||
Dynamic: home-page
|
||||
Dynamic: keywords
|
||||
Dynamic: requires-dist
|
||||
Dynamic: summary
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
Vendored
+417
@@ -0,0 +1,417 @@
|
||||
# elabapi-python
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2.
|
||||
|
||||
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 2.0.0
|
||||
- Package version: 5.6.1
|
||||
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
|
||||
|
||||
## Requirements.
|
||||
|
||||
Python 2.7 and 3.4+
|
||||
|
||||
## Installation & Usage
|
||||
### pip install
|
||||
|
||||
If the python package is hosted on Github, you can install directly from Github
|
||||
|
||||
```sh
|
||||
pip install git+https://github.com/elabftw/elabapi-python.git
|
||||
```
|
||||
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/elabftw/elabapi-python.git`)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
import elabapi_python
|
||||
```
|
||||
|
||||
### Setuptools
|
||||
|
||||
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
||||
|
||||
```sh
|
||||
python setup.py install --user
|
||||
```
|
||||
(or `sudo python setup.py install` to install the package for all users)
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
import elabapi_python
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```python
|
||||
from __future__ import print_function
|
||||
import time
|
||||
import elabapi_python
|
||||
from elabapi_python.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: token
|
||||
configuration = elabapi_python.Configuration()
|
||||
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['Authorization'] = 'Bearer'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = elabapi_python.ApiKeysApi(elabapi_python.ApiClient(configuration))
|
||||
id = 56 # int | ID of the API key
|
||||
|
||||
try:
|
||||
# Delete an API key.
|
||||
api_instance.delete_apikey(id)
|
||||
except ApiException as e:
|
||||
print("Exception when calling ApiKeysApi->delete_apikey: %s\n" % e)
|
||||
|
||||
# Configure API key authorization: token
|
||||
configuration = elabapi_python.Configuration()
|
||||
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['Authorization'] = 'Bearer'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = elabapi_python.ApiKeysApi(elabapi_python.ApiClient(configuration))
|
||||
|
||||
try:
|
||||
# Read API keys
|
||||
api_response = api_instance.get_apikeys()
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print("Exception when calling ApiKeysApi->get_apikeys: %s\n" % e)
|
||||
|
||||
# Configure API key authorization: token
|
||||
configuration = elabapi_python.Configuration()
|
||||
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['Authorization'] = 'Bearer'
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = elabapi_python.ApiKeysApi(elabapi_python.ApiClient(configuration))
|
||||
body = elabapi_python.ApikeysBody() # ApikeysBody | (optional)
|
||||
|
||||
try:
|
||||
# Create an API key
|
||||
api_instance.post_apikeys(body=body)
|
||||
except ApiException as e:
|
||||
print("Exception when calling ApiKeysApi->post_apikeys: %s\n" % e)
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *https://elab.local:3148/api/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*ApiKeysApi* | [**delete_apikey**](docs/ApiKeysApi.md#delete_apikey) | **DELETE** /apikeys/{id} | Delete an API key.
|
||||
*ApiKeysApi* | [**get_apikeys**](docs/ApiKeysApi.md#get_apikeys) | **GET** /apikeys | Read API keys
|
||||
*ApiKeysApi* | [**post_apikeys**](docs/ApiKeysApi.md#post_apikeys) | **POST** /apikeys | Create an API key
|
||||
*BrandingApi* | [**get_instance_branding**](docs/BrandingApi.md#get_instance_branding) | **GET** /instance/branding/{id} | Read a branding asset as a binary file.
|
||||
*BrandingApi* | [**post_instance_branding**](docs/BrandingApi.md#post_instance_branding) | **POST** /instance/branding/{id} | Update a branding asset.
|
||||
*CommentsApi* | [**delete_entity_comment**](docs/CommentsApi.md#delete_entity_comment) | **DELETE** /{entity_type}/{id}/comments/{subid} | Delete an entity comment.
|
||||
*CommentsApi* | [**patch_entity_comment**](docs/CommentsApi.md#patch_entity_comment) | **PATCH** /{entity_type}/{id}/comments/{subid} | Modify an entity comment.
|
||||
*CommentsApi* | [**post_entity_comments**](docs/CommentsApi.md#post_entity_comments) | **POST** /{entity_type}/{id}/comments | Create a comment.
|
||||
*CommentsApi* | [**read_entity_comment**](docs/CommentsApi.md#read_entity_comment) | **GET** /{entity_type}/{id}/comments/{subid} | Read a comment of that entity.
|
||||
*CommentsApi* | [**read_entity_comments**](docs/CommentsApi.md#read_entity_comments) | **GET** /{entity_type}/{id}/comments | Read all comments of that entity.
|
||||
*CompoundsApi* | [**delete_compound**](docs/CompoundsApi.md#delete_compound) | **DELETE** /compounds/{id} | Soft-delete a compound
|
||||
*CompoundsApi* | [**get_compound**](docs/CompoundsApi.md#get_compound) | **GET** /compounds/{id} | Get a single compound
|
||||
*CompoundsApi* | [**get_compounds**](docs/CompoundsApi.md#get_compounds) | **GET** /compounds | Read compounds
|
||||
*CompoundsApi* | [**post_compounds**](docs/CompoundsApi.md#post_compounds) | **POST** /compounds | Create or import a compound
|
||||
*ConfigApi* | [**delete_config**](docs/ConfigApi.md#delete_config) | **DELETE** /config | Reset the config to default values
|
||||
*ConfigApi* | [**get_config**](docs/ConfigApi.md#get_config) | **GET** /config | Read the config
|
||||
*ConfigApi* | [**patch_config**](docs/ConfigApi.md#patch_config) | **PATCH** /config | Modify the config
|
||||
*ContainersApi* | [**delete_container**](docs/ContainersApi.md#delete_container) | **DELETE** /{entity_type}/{id}/containers/{subid} | Delete a container.
|
||||
*ContainersApi* | [**patch_container**](docs/ContainersApi.md#patch_container) | **PATCH** /{entity_type}/{id}/containers/{subid} | Modify a container.
|
||||
*ContainersApi* | [**post_container**](docs/ContainersApi.md#post_container) | **POST** /{entity_type}/{id}/containers/{subid} | Create a container for this entity.
|
||||
*ContainersApi* | [**read_container**](docs/ContainersApi.md#read_container) | **GET** /{entity_type}/{id}/containers/{subid} | Read a container.
|
||||
*ContainersApi* | [**read_containers**](docs/ContainersApi.md#read_containers) | **GET** /{entity_type}/{id}/containers | Read all containers for this entity.
|
||||
*CustomFieldsKeysApi* | [**custom_fields_keys**](docs/CustomFieldsKeysApi.md#custom_fields_keys) | **GET** /extra_fields_keys | Read custom fields keys.
|
||||
*DSpaceApi* | [**dspace_create**](docs/DSpaceApi.md#dspace_create) | **POST** /dspace | Create a new DSpace workspace item.
|
||||
*DSpaceApi* | [**dspace_read**](docs/DSpaceApi.md#dspace_read) | **GET** /dspace | Read DSpace information.
|
||||
*DSpaceApi* | [**dspace_submit**](docs/DSpaceApi.md#dspace_submit) | **PATCH** /dspace | Submit an eLabFTW entry to DSpace.
|
||||
*EventsApi* | [**delete_event**](docs/EventsApi.md#delete_event) | **DELETE** /event/{id} | Delete a booking slot.
|
||||
*EventsApi* | [**patch_event**](docs/EventsApi.md#patch_event) | **PATCH** /event/{id} | Modify a booking slot.
|
||||
*EventsApi* | [**post_events**](docs/EventsApi.md#post_events) | **POST** /events/{id} | Create an event for the item specified as id.
|
||||
*EventsApi* | [**read_event**](docs/EventsApi.md#read_event) | **GET** /event/{id} | Read a booking slot.
|
||||
*EventsApi* | [**read_events**](docs/EventsApi.md#read_events) | **GET** /events | Read all events in the team.
|
||||
*ExperimentsApi* | [**delete_experiment**](docs/ExperimentsApi.md#delete_experiment) | **DELETE** /experiments/{id} | Delete an experiment.
|
||||
*ExperimentsApi* | [**get_experiment**](docs/ExperimentsApi.md#get_experiment) | **GET** /experiments/{id} | Read an experiment
|
||||
*ExperimentsApi* | [**patch_experiment**](docs/ExperimentsApi.md#patch_experiment) | **PATCH** /experiments/{id} | Modify an experiment
|
||||
*ExperimentsApi* | [**post_experiment**](docs/ExperimentsApi.md#post_experiment) | **POST** /experiments | Create an experiment
|
||||
*ExperimentsApi* | [**post_experiment_by_id**](docs/ExperimentsApi.md#post_experiment_by_id) | **POST** /experiments/{id} | Duplicate an experiment with its ID
|
||||
*ExperimentsApi* | [**read_experiments**](docs/ExperimentsApi.md#read_experiments) | **GET** /experiments | Read all experiments that are accessible
|
||||
*ExperimentsCategoriesApi* | [**delete_expcat**](docs/ExperimentsCategoriesApi.md#delete_expcat) | **DELETE** /teams/{id}/experiments_categories/{subid} | Delete a category.
|
||||
*ExperimentsCategoriesApi* | [**patch_expcat**](docs/ExperimentsCategoriesApi.md#patch_expcat) | **PATCH** /teams/{id}/experiments_categories/{subid} | Modify a category.
|
||||
*ExperimentsCategoriesApi* | [**post_team_one_expcat**](docs/ExperimentsCategoriesApi.md#post_team_one_expcat) | **POST** /teams/{id}/experiments_categories | Create a new category for experiments.
|
||||
*ExperimentsCategoriesApi* | [**read_team_experiments_categories**](docs/ExperimentsCategoriesApi.md#read_team_experiments_categories) | **GET** /teams/{id}/experiments_categories | Read experiments categories of a team.
|
||||
*ExperimentsCategoriesApi* | [**read_team_one_expcat**](docs/ExperimentsCategoriesApi.md#read_team_one_expcat) | **GET** /teams/{id}/experiments_categories/{subid} | Read a category.
|
||||
*ExperimentsStatusApi* | [**delete_expstatus**](docs/ExperimentsStatusApi.md#delete_expstatus) | **DELETE** /teams/{id}/experiments_status/{subid} | Delete a status.
|
||||
*ExperimentsStatusApi* | [**patch_expstatus**](docs/ExperimentsStatusApi.md#patch_expstatus) | **PATCH** /teams/{id}/experiments_status/{subid} | Modify a status.
|
||||
*ExperimentsStatusApi* | [**post_team_one_expstatus**](docs/ExperimentsStatusApi.md#post_team_one_expstatus) | **POST** /teams/{id}/experiments_status | Create a new experiments status.
|
||||
*ExperimentsStatusApi* | [**read_team_experiments_status**](docs/ExperimentsStatusApi.md#read_team_experiments_status) | **GET** /teams/{id}/experiments_status | Read experiments status of a team.
|
||||
*ExperimentsStatusApi* | [**read_team_one_expstatus**](docs/ExperimentsStatusApi.md#read_team_one_expstatus) | **GET** /teams/{id}/experiments_status/{subid} | Read a status.
|
||||
*ExperimentsTemplatesApi* | [**delete_experiment_template**](docs/ExperimentsTemplatesApi.md#delete_experiment_template) | **DELETE** /experiments_templates/{id} | Delete an experiment template.
|
||||
*ExperimentsTemplatesApi* | [**get_experiment_template**](docs/ExperimentsTemplatesApi.md#get_experiment_template) | **GET** /experiments_templates/{id} | Read an experiment template
|
||||
*ExperimentsTemplatesApi* | [**patch_experiment_template**](docs/ExperimentsTemplatesApi.md#patch_experiment_template) | **PATCH** /experiments_templates/{id} | Modify an experiment template
|
||||
*ExperimentsTemplatesApi* | [**post_experiment_template**](docs/ExperimentsTemplatesApi.md#post_experiment_template) | **POST** /experiments_templates | Create an experiment template
|
||||
*ExperimentsTemplatesApi* | [**post_experiment_template_by_id**](docs/ExperimentsTemplatesApi.md#post_experiment_template_by_id) | **POST** /experiments_templates/{id} | Duplicate an experiment template with its ID
|
||||
*ExperimentsTemplatesApi* | [**read_experiments_templates**](docs/ExperimentsTemplatesApi.md#read_experiments_templates) | **GET** /experiments_templates | Read all experiments_templates that are accessible
|
||||
*ExportsApi* | [**delete_export**](docs/ExportsApi.md#delete_export) | **DELETE** /exports/{id} | Remove an export request and its associated file
|
||||
*ExportsApi* | [**post_export**](docs/ExportsApi.md#post_export) | **POST** /exports | Register an export request
|
||||
*ExportsApi* | [**read_export**](docs/ExportsApi.md#read_export) | **GET** /exports/{id} | Get export
|
||||
*ExportsApi* | [**readall_exports**](docs/ExportsApi.md#readall_exports) | **GET** /exports | List exports
|
||||
*FavoriteTagsApi* | [**delete_favtag**](docs/FavoriteTagsApi.md#delete_favtag) | **DELETE** /favtags/{id} | Unfavorite a tag.
|
||||
*FavoriteTagsApi* | [**post_favtags**](docs/FavoriteTagsApi.md#post_favtags) | **POST** /favtags | Add a tag as favorite.
|
||||
*FavoriteTagsApi* | [**read_favtags**](docs/FavoriteTagsApi.md#read_favtags) | **GET** /favtags | Read all favorite tags for the user.
|
||||
*IdpsApi* | [**delete_idp**](docs/IdpsApi.md#delete_idp) | **DELETE** /idps/{id} | Delete an idp.
|
||||
*IdpsApi* | [**delete_idp_cert**](docs/IdpsApi.md#delete_idp_cert) | **DELETE** /idps/{id}/certs/{cert_id} | Delete an idp cert.
|
||||
*IdpsApi* | [**delete_idp_endpoint**](docs/IdpsApi.md#delete_idp_endpoint) | **DELETE** /idps/{id}/endpoints/{endpoint_id} | Delete an idp endpoint.
|
||||
*IdpsApi* | [**patch_idp**](docs/IdpsApi.md#patch_idp) | **PATCH** /idps/{id} | Actions on an idp.
|
||||
*IdpsApi* | [**post_idp**](docs/IdpsApi.md#post_idp) | **POST** /idps | Create an idp.
|
||||
*IdpsApi* | [**post_idp_cert**](docs/IdpsApi.md#post_idp_cert) | **POST** /idps/{id}/certs | Add a cert to this IdP.
|
||||
*IdpsApi* | [**post_idp_endpoint**](docs/IdpsApi.md#post_idp_endpoint) | **POST** /idps/{id}/endpoints | Add an endpoint to this IdP.
|
||||
*IdpsApi* | [**read_idp**](docs/IdpsApi.md#read_idp) | **GET** /idps/{id} | Read an idp.
|
||||
*IdpsApi* | [**read_idp_cert**](docs/IdpsApi.md#read_idp_cert) | **GET** /idps/{id}/certs/{cert_id} | Read a cert for an IdP.
|
||||
*IdpsApi* | [**read_idp_certs**](docs/IdpsApi.md#read_idp_certs) | **GET** /idps/{id}/certs | Read all certs for an IdP.
|
||||
*IdpsApi* | [**read_idp_endpoint**](docs/IdpsApi.md#read_idp_endpoint) | **GET** /idps/{id}/endpoints/{endpoint_id} | Read an endpoint for an IdP.
|
||||
*IdpsApi* | [**read_idp_endpoints**](docs/IdpsApi.md#read_idp_endpoints) | **GET** /idps/{id}/endpoints | Read all endpoints for an IdP.
|
||||
*IdpsApi* | [**read_idps**](docs/IdpsApi.md#read_idps) | **GET** /idps | Read all IDPs.
|
||||
*IdpsSourcesApi* | [**delete_idps_source**](docs/IdpsSourcesApi.md#delete_idps_source) | **DELETE** /idps_sources/{id} | Delete an idp source.
|
||||
*IdpsSourcesApi* | [**patch_idps_source**](docs/IdpsSourcesApi.md#patch_idps_source) | **PATCH** /idps_sources/{id} | Patch an idp source.
|
||||
*IdpsSourcesApi* | [**post_idp_source**](docs/IdpsSourcesApi.md#post_idp_source) | **POST** /idps_sources | Create an idp source.
|
||||
*IdpsSourcesApi* | [**read_idps_source**](docs/IdpsSourcesApi.md#read_idps_source) | **GET** /idps_sources/{id} | Read an IdPs source
|
||||
*IdpsSourcesApi* | [**read_idps_sources**](docs/IdpsSourcesApi.md#read_idps_sources) | **GET** /idps_sources | Read all IDPs sources
|
||||
*ImportApi* | [**post_import**](docs/ImportApi.md#post_import) | **POST** /import | Send a file to import
|
||||
*ImportApi* | [**read_import**](docs/ImportApi.md#read_import) | **GET** /import | Get information about this endpoint
|
||||
*InfoApi* | [**get_info**](docs/InfoApi.md#get_info) | **GET** /info | Get information about the instance.
|
||||
*InstanceApi* | [**post_instance**](docs/InstanceApi.md#post_instance) | **POST** /instance | Run an instance level action.
|
||||
*ItemsApi* | [**delete_item**](docs/ItemsApi.md#delete_item) | **DELETE** /items/{id} | Delete an item.
|
||||
*ItemsApi* | [**get_item**](docs/ItemsApi.md#get_item) | **GET** /items/{id} | Read an item
|
||||
*ItemsApi* | [**patch_item**](docs/ItemsApi.md#patch_item) | **PATCH** /items/{id} | Modify an item
|
||||
*ItemsApi* | [**post_item**](docs/ItemsApi.md#post_item) | **POST** /items | Create an item
|
||||
*ItemsApi* | [**post_item_by_id**](docs/ItemsApi.md#post_item_by_id) | **POST** /items/{id} | Duplicate an item with its ID
|
||||
*ItemsApi* | [**read_items**](docs/ItemsApi.md#read_items) | **GET** /items | Read all items that are accessible
|
||||
*ItemsTypesResourcesTemplatesApi* | [**delete_items_type**](docs/ItemsTypesResourcesTemplatesApi.md#delete_items_type) | **DELETE** /items_types/{id} | Delete a resource template.
|
||||
*ItemsTypesResourcesTemplatesApi* | [**get_items_type**](docs/ItemsTypesResourcesTemplatesApi.md#get_items_type) | **GET** /items_types/{id} | Read a resource template
|
||||
*ItemsTypesResourcesTemplatesApi* | [**patch_items_type**](docs/ItemsTypesResourcesTemplatesApi.md#patch_items_type) | **PATCH** /items_types/{id} | Modify a resource template
|
||||
*ItemsTypesResourcesTemplatesApi* | [**post_items_types**](docs/ItemsTypesResourcesTemplatesApi.md#post_items_types) | **POST** /items_types | Create a resource template
|
||||
*ItemsTypesResourcesTemplatesApi* | [**post_items_types_by_id**](docs/ItemsTypesResourcesTemplatesApi.md#post_items_types_by_id) | **POST** /items_types/{id} | Duplicate a resource template with its ID
|
||||
*ItemsTypesResourcesTemplatesApi* | [**read_items_types**](docs/ItemsTypesResourcesTemplatesApi.md#read_items_types) | **GET** /items_types | Read all resources templates that are accessible
|
||||
*LinksToCompoundsApi* | [**delete_entity_compounds_link**](docs/LinksToCompoundsApi.md#delete_entity_compounds_link) | **DELETE** /{entity_type}/{id}/compounds_links/{subid} | Delete a compound link.
|
||||
*LinksToCompoundsApi* | [**post_entity_compounds_links**](docs/LinksToCompoundsApi.md#post_entity_compounds_links) | **POST** /{entity_type}/{id}/compounds_links/{subid} | Link an entity to a compound.
|
||||
*LinksToCompoundsApi* | [**read_entity_compounds_links**](docs/LinksToCompoundsApi.md#read_entity_compounds_links) | **GET** /{entity_type}/{id}/compounds_links | Read all compounds links of that entity.
|
||||
*LinksToExperimentsApi* | [**delete_entity_experiments_link**](docs/LinksToExperimentsApi.md#delete_entity_experiments_link) | **DELETE** /{entity_type}/{id}/experiments_links/{subid} | Delete an experiment link.
|
||||
*LinksToExperimentsApi* | [**post_entity_experiments_links**](docs/LinksToExperimentsApi.md#post_entity_experiments_links) | **POST** /{entity_type}/{id}/experiments_links/{subid} | Create or import a link.
|
||||
*LinksToExperimentsApi* | [**read_entity_experiments_links**](docs/LinksToExperimentsApi.md#read_entity_experiments_links) | **GET** /{entity_type}/{id}/experiments_links | Read all experiments links of that entity.
|
||||
*LinksToItemsApi* | [**delete_entitiy_items_link**](docs/LinksToItemsApi.md#delete_entitiy_items_link) | **DELETE** /{entity_type}/{id}/items_links/{subid} | Delete an item link.
|
||||
*LinksToItemsApi* | [**post_entity_items_links**](docs/LinksToItemsApi.md#post_entity_items_links) | **POST** /{entity_type}/{id}/items_links/{subid} | Create or import a link.
|
||||
*LinksToItemsApi* | [**read_entity_items_links**](docs/LinksToItemsApi.md#read_entity_items_links) | **GET** /{entity_type}/{id}/items_links | Read all items links of that entity.
|
||||
*NotificationsApi* | [**delete_notifications**](docs/NotificationsApi.md#delete_notifications) | **DELETE** /users/{id}/notifications | Delete all notifications of the user.
|
||||
*NotificationsApi* | [**patch_notification**](docs/NotificationsApi.md#patch_notification) | **PATCH** /users/{id}/notifications/{subid} | Update the acknowledgment status of a notification.
|
||||
*NotificationsApi* | [**read_notification**](docs/NotificationsApi.md#read_notification) | **GET** /users/{id}/notifications/{subid} | Read a notification.
|
||||
*NotificationsApi* | [**read_notifications**](docs/NotificationsApi.md#read_notifications) | **GET** /users/{id}/notifications | Read notifications of a user.
|
||||
*ReportsApi* | [**get_reports**](docs/ReportsApi.md#get_reports) | **GET** /reports | Get usage reports
|
||||
*ResourcesCategoriesApi* | [**delete_rescat**](docs/ResourcesCategoriesApi.md#delete_rescat) | **DELETE** /teams/{id}/resources_categories/{subid} | Delete a category.
|
||||
*ResourcesCategoriesApi* | [**patch_rescat**](docs/ResourcesCategoriesApi.md#patch_rescat) | **PATCH** /teams/{id}/resources_categories/{subid} | Modify a category.
|
||||
*ResourcesCategoriesApi* | [**post_team_one_rescat**](docs/ResourcesCategoriesApi.md#post_team_one_rescat) | **POST** /teams/{id}/resources_categories | Create a new category for resources.
|
||||
*ResourcesCategoriesApi* | [**read_team_one_rescat**](docs/ResourcesCategoriesApi.md#read_team_one_rescat) | **GET** /teams/{id}/resources_categories/{subid} | Read a category.
|
||||
*ResourcesCategoriesApi* | [**read_team_resources_categories**](docs/ResourcesCategoriesApi.md#read_team_resources_categories) | **GET** /teams/{id}/resources_categories | Read resources categories of a team.
|
||||
*ResourcesStatusApi* | [**delete_resstatus**](docs/ResourcesStatusApi.md#delete_resstatus) | **DELETE** /teams/{id}/items_status/{subid} | Delete a status.
|
||||
*ResourcesStatusApi* | [**patch_resstatus**](docs/ResourcesStatusApi.md#patch_resstatus) | **PATCH** /teams/{id}/items_status/{subid} | Modify a status.
|
||||
*ResourcesStatusApi* | [**post_team_one_resstat**](docs/ResourcesStatusApi.md#post_team_one_resstat) | **POST** /teams/{id}/items_status | Create a new status for resources.
|
||||
*ResourcesStatusApi* | [**read_team_items_status**](docs/ResourcesStatusApi.md#read_team_items_status) | **GET** /teams/{id}/items_status | Read resources status of a team.
|
||||
*ResourcesStatusApi* | [**read_team_one_resstatus**](docs/ResourcesStatusApi.md#read_team_one_resstatus) | **GET** /teams/{id}/items_status/{subid} | Read a status.
|
||||
*RevisionsApi* | [**patch_entity_revision**](docs/RevisionsApi.md#patch_entity_revision) | **PATCH** /{entity_type}/{id}/revisions/{subid} | Restore a revision.
|
||||
*RevisionsApi* | [**read_entity_revision**](docs/RevisionsApi.md#read_entity_revision) | **GET** /{entity_type}/{id}/revisions/{subid} | Read a revision of that entity.
|
||||
*RevisionsApi* | [**read_entity_revisions**](docs/RevisionsApi.md#read_entity_revisions) | **GET** /{entity_type}/{id}/revisions | Read all revisions of that entity.
|
||||
*StepsApi* | [**delete_step**](docs/StepsApi.md#delete_step) | **DELETE** /{entity_type}/{id}/steps/{subid} | Delete a step.
|
||||
*StepsApi* | [**patch_step**](docs/StepsApi.md#patch_step) | **PATCH** /{entity_type}/{id}/steps/{subid} | Actions on a step.
|
||||
*StepsApi* | [**post_step**](docs/StepsApi.md#post_step) | **POST** /{entity_type}/{id}/steps | Create a step.
|
||||
*StepsApi* | [**read_steps**](docs/StepsApi.md#read_steps) | **GET** /{entity_type}/{id}/steps | Read all steps of that entity.
|
||||
*StorageUnitsApi* | [**delete_storage_unit**](docs/StorageUnitsApi.md#delete_storage_unit) | **DELETE** /storage_units/{id} | Delete a storage unit.
|
||||
*StorageUnitsApi* | [**patch_storage_unit**](docs/StorageUnitsApi.md#patch_storage_unit) | **PATCH** /storage_units/{id} | Modify a storage unit.
|
||||
*StorageUnitsApi* | [**post_storage_unit**](docs/StorageUnitsApi.md#post_storage_unit) | **POST** /storage_units | Create a new storage unit.
|
||||
*StorageUnitsApi* | [**read_storage_unit**](docs/StorageUnitsApi.md#read_storage_unit) | **GET** /storage_units/{id} | Read a storage unit.
|
||||
*StorageUnitsApi* | [**read_storage_units**](docs/StorageUnitsApi.md#read_storage_units) | **GET** /storage_units | Read all containers, or the storage unit hierarchy when `?hierarchy=true`.
|
||||
*TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /{entity_type}/{id}/tags | Delete all tags.
|
||||
*TagsApi* | [**patch_tag**](docs/TagsApi.md#patch_tag) | **PATCH** /{entity_type}/{id}/tags/{subid} | Actions on a tag (like removing it from the entity).
|
||||
*TagsApi* | [**post_tag**](docs/TagsApi.md#post_tag) | **POST** /{entity_type}/{id}/tags | Create a tag.
|
||||
*TagsApi* | [**read_tag**](docs/TagsApi.md#read_tag) | **GET** /{entity_type}/{id}/tags/{subid} | Read a tag.
|
||||
*TagsApi* | [**read_tags**](docs/TagsApi.md#read_tags) | **GET** /{entity_type}/{id}/tags | Read all tags of that entity.
|
||||
*TeamTagsApi* | [**delete_team_tag**](docs/TeamTagsApi.md#delete_team_tag) | **DELETE** /teams/{id}/tags/{subid} | Delete a tag.
|
||||
*TeamTagsApi* | [**patch_team_tag**](docs/TeamTagsApi.md#patch_team_tag) | **PATCH** /teams/{id}/tags/{subid} | Actions on a tag.
|
||||
*TeamTagsApi* | [**post_team_tag**](docs/TeamTagsApi.md#post_team_tag) | **POST** /teams/{id}/tags | Create a tag in the team.
|
||||
*TeamTagsApi* | [**read_team_tag**](docs/TeamTagsApi.md#read_team_tag) | **GET** /teams/{id}/tags/{subid} | Read a tag.
|
||||
*TeamTagsApi* | [**read_team_tags**](docs/TeamTagsApi.md#read_team_tags) | **GET** /teams/{id}/tags | Read all tags for the team.
|
||||
*TeamgroupsApi* | [**delete_teamgroup**](docs/TeamgroupsApi.md#delete_teamgroup) | **DELETE** /teams/{id}/teamgroups/{subid} | Delete a teamgroup.
|
||||
*TeamgroupsApi* | [**patch_teamgroup**](docs/TeamgroupsApi.md#patch_teamgroup) | **PATCH** /teams/{id}/teamgroups/{subid} | Modify a teamgroup.
|
||||
*TeamgroupsApi* | [**post_teamgroups**](docs/TeamgroupsApi.md#post_teamgroups) | **POST** /teams/{id}/teamgroups | Create a new teamgroup.
|
||||
*TeamgroupsApi* | [**read_team_teamgroups**](docs/TeamgroupsApi.md#read_team_teamgroups) | **GET** /teams/{id}/teamgroups | Read teamgroups of a team.
|
||||
*TeamgroupsApi* | [**read_teamgroup**](docs/TeamgroupsApi.md#read_teamgroup) | **GET** /teams/{id}/teamgroups/{subid} | Read a teamgroup.
|
||||
*TeamsApi* | [**patch_team**](docs/TeamsApi.md#patch_team) | **PATCH** /teams/{id} | Actions on a team.
|
||||
*TeamsApi* | [**post_teams**](docs/TeamsApi.md#post_teams) | **POST** /teams | Create a new team.
|
||||
*TeamsApi* | [**read_team**](docs/TeamsApi.md#read_team) | **GET** /teams/{id} | Read a team. Requires Admin permissions.
|
||||
*TeamsApi* | [**read_teams**](docs/TeamsApi.md#read_teams) | **GET** /teams | Read all teams. Requires Sysadmin permissions.
|
||||
*TodolistApi* | [**delete_todoitem**](docs/TodolistApi.md#delete_todoitem) | **DELETE** /todolist/{id} | Delete a todoitem.
|
||||
*TodolistApi* | [**patch_todoitem**](docs/TodolistApi.md#patch_todoitem) | **PATCH** /todolist/{id} | Actions on a todoitem.
|
||||
*TodolistApi* | [**post_todolist**](docs/TodolistApi.md#post_todolist) | **POST** /todolist | Create a todo item
|
||||
*TodolistApi* | [**read_todoitem**](docs/TodolistApi.md#read_todoitem) | **GET** /todolist/{id} | Read a todo entry.
|
||||
*TodolistApi* | [**read_todolist**](docs/TodolistApi.md#read_todolist) | **GET** /todolist | Read all todoitems.
|
||||
*UnfinishedStepsApi* | [**read_unfinished_steps**](docs/UnfinishedStepsApi.md#read_unfinished_steps) | **GET** /unfinished_steps | Read all unfinished steps.
|
||||
*UploadsApi* | [**delete_upload**](docs/UploadsApi.md#delete_upload) | **DELETE** /{entity_type}/{id}/uploads/{subid} | Delete an upload.
|
||||
*UploadsApi* | [**patch_upload**](docs/UploadsApi.md#patch_upload) | **PATCH** /{entity_type}/{id}/uploads/{subid} | Modify attributes such as \"real_name\", \"comment\" or \"state\" of an upload.
|
||||
*UploadsApi* | [**post_upload**](docs/UploadsApi.md#post_upload) | **POST** /{entity_type}/{id}/uploads | Create an upload.
|
||||
*UploadsApi* | [**post_upload_replace**](docs/UploadsApi.md#post_upload_replace) | **POST** /{entity_type}/{id}/uploads/{subid} | Replace an existing uploaded file. The existing file will be archived and the new one will be added.
|
||||
*UploadsApi* | [**read_upload**](docs/UploadsApi.md#read_upload) | **GET** /{entity_type}/{id}/uploads/{subid} | Read an upload.
|
||||
*UploadsApi* | [**read_uploads**](docs/UploadsApi.md#read_uploads) | **GET** /{entity_type}/{id}/uploads | Read attached files of that entity.
|
||||
*UserUploadsApi* | [**read_user_uploads**](docs/UserUploadsApi.md#read_user_uploads) | **GET** /users/{id}/uploads | Read attached files from a user
|
||||
*UsersApi* | [**patch_user**](docs/UsersApi.md#patch_user) | **PATCH** /users/{id} | Modify a user.
|
||||
*UsersApi* | [**post_user**](docs/UsersApi.md#post_user) | **POST** /users | Create a new user.
|
||||
*UsersApi* | [**read_user**](docs/UsersApi.md#read_user) | **GET** /users/{id} | Read information of a user.
|
||||
*UsersApi* | [**read_users**](docs/UsersApi.md#read_users) | **GET** /users | Read users from instance.
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [AllOfentityEditableMetadatamerge](docs/AllOfentityEditableMetadatamerge.md)
|
||||
- [AnyOfuploadsSubidBody1](docs/AnyOfuploadsSubidBody1.md)
|
||||
- [Apikey](docs/Apikey.md)
|
||||
- [ApikeysBody](docs/ApikeysBody.md)
|
||||
- [BrandingIdBody](docs/BrandingIdBody.md)
|
||||
- [Changelog](docs/Changelog.md)
|
||||
- [Comment](docs/Comment.md)
|
||||
- [Compound](docs/Compound.md)
|
||||
- [CompoundCreateRequest](docs/CompoundCreateRequest.md)
|
||||
- [CompoundDuplicateRequest](docs/CompoundDuplicateRequest.md)
|
||||
- [CompoundsBody](docs/CompoundsBody.md)
|
||||
- [CompoundsLinksSubidBody](docs/CompoundsLinksSubidBody.md)
|
||||
- [Config](docs/Config.md)
|
||||
- [Container](docs/Container.md)
|
||||
- [ContainersSubidBody](docs/ContainersSubidBody.md)
|
||||
- [ContainersSubidBody1](docs/ContainersSubidBody1.md)
|
||||
- [DspaceBody](docs/DspaceBody.md)
|
||||
- [DspaceBody1](docs/DspaceBody1.md)
|
||||
- [DspaceEntity](docs/DspaceEntity.md)
|
||||
- [DspaceMetadata](docs/DspaceMetadata.md)
|
||||
- [DspaceMetadata1](docs/DspaceMetadata1.md)
|
||||
- [Entity](docs/Entity.md)
|
||||
- [EntityAndItemEditable](docs/EntityAndItemEditable.md)
|
||||
- [EntityDuplicate](docs/EntityDuplicate.md)
|
||||
- [EntityEditable](docs/EntityEditable.md)
|
||||
- [EntityTemplate](docs/EntityTemplate.md)
|
||||
- [EntityTemplateEditable](docs/EntityTemplateEditable.md)
|
||||
- [Error](docs/Error.md)
|
||||
- [Event](docs/Event.md)
|
||||
- [EventIdBody](docs/EventIdBody.md)
|
||||
- [EventidDelta](docs/EventidDelta.md)
|
||||
- [EventsIdBody](docs/EventsIdBody.md)
|
||||
- [ExclusiveEditMode](docs/ExclusiveEditMode.md)
|
||||
- [Experiment](docs/Experiment.md)
|
||||
- [ExperimentsLinksSubidBody](docs/ExperimentsLinksSubidBody.md)
|
||||
- [ExperimentsTemplatesIdBody](docs/ExperimentsTemplatesIdBody.md)
|
||||
- [Export](docs/Export.md)
|
||||
- [ExportsBody](docs/ExportsBody.md)
|
||||
- [ExtraFieldsKeys](docs/ExtraFieldsKeys.md)
|
||||
- [FavtagsBody](docs/FavtagsBody.md)
|
||||
- [Id](docs/Id.md)
|
||||
- [Id1](docs/Id1.md)
|
||||
- [Id2](docs/Id2.md)
|
||||
- [Id3](docs/Id3.md)
|
||||
- [Id4](docs/Id4.md)
|
||||
- [IdCertsBody](docs/IdCertsBody.md)
|
||||
- [IdCommentsBody](docs/IdCommentsBody.md)
|
||||
- [IdEndpointsBody](docs/IdEndpointsBody.md)
|
||||
- [IdExperimentsCategoriesBody](docs/IdExperimentsCategoriesBody.md)
|
||||
- [IdExperimentsStatusBody](docs/IdExperimentsStatusBody.md)
|
||||
- [IdItemsStatusBody](docs/IdItemsStatusBody.md)
|
||||
- [IdResourcesCategoriesBody](docs/IdResourcesCategoriesBody.md)
|
||||
- [IdStepsBody](docs/IdStepsBody.md)
|
||||
- [IdTagsBody](docs/IdTagsBody.md)
|
||||
- [IdTagsBody1](docs/IdTagsBody1.md)
|
||||
- [IdTeamgroupsBody](docs/IdTeamgroupsBody.md)
|
||||
- [IdUploadsBody](docs/IdUploadsBody.md)
|
||||
- [Idp](docs/Idp.md)
|
||||
- [IdpCert](docs/IdpCert.md)
|
||||
- [IdpEndpoint](docs/IdpEndpoint.md)
|
||||
- [IdpSource](docs/IdpSource.md)
|
||||
- [IdpsBody](docs/IdpsBody.md)
|
||||
- [IdpsIdBody](docs/IdpsIdBody.md)
|
||||
- [IdpsSourcesBody](docs/IdpsSourcesBody.md)
|
||||
- [IdpsSourcesIdBody](docs/IdpsSourcesIdBody.md)
|
||||
- [ImportBody](docs/ImportBody.md)
|
||||
- [InlineResponse200](docs/InlineResponse200.md)
|
||||
- [InlineResponse2001](docs/InlineResponse2001.md)
|
||||
- [InlineResponse20010](docs/InlineResponse20010.md)
|
||||
- [InlineResponse2001Experiments](docs/InlineResponse2001Experiments.md)
|
||||
- [InlineResponse2001Items](docs/InlineResponse2001Items.md)
|
||||
- [InlineResponse2001Users](docs/InlineResponse2001Users.md)
|
||||
- [InlineResponse2002](docs/InlineResponse2002.md)
|
||||
- [InlineResponse2003](docs/InlineResponse2003.md)
|
||||
- [InlineResponse2004](docs/InlineResponse2004.md)
|
||||
- [InlineResponse2004QueryParameters](docs/InlineResponse2004QueryParameters.md)
|
||||
- [InlineResponse2005](docs/InlineResponse2005.md)
|
||||
- [InlineResponse2006](docs/InlineResponse2006.md)
|
||||
- [InlineResponse2007](docs/InlineResponse2007.md)
|
||||
- [InlineResponse2008](docs/InlineResponse2008.md)
|
||||
- [InlineResponse2009](docs/InlineResponse2009.md)
|
||||
- [InlineResponse2009Embedded](docs/InlineResponse2009Embedded.md)
|
||||
- [InlineResponse2009EmbeddedEntries](docs/InlineResponse2009EmbeddedEntries.md)
|
||||
- [InstanceBody](docs/InstanceBody.md)
|
||||
- [Item](docs/Item.md)
|
||||
- [ItemEditable](docs/ItemEditable.md)
|
||||
- [ItemsLinksSubidBody](docs/ItemsLinksSubidBody.md)
|
||||
- [ItemsTypesIdBody](docs/ItemsTypesIdBody.md)
|
||||
- [Link](docs/Link.md)
|
||||
- [Metadata](docs/Metadata.md)
|
||||
- [MetadataElabftw](docs/MetadataElabftw.md)
|
||||
- [MetadataElabftwExtraFieldsGroups](docs/MetadataElabftwExtraFieldsGroups.md)
|
||||
- [MetadataExtraFields](docs/MetadataExtraFields.md)
|
||||
- [Notification](docs/Notification.md)
|
||||
- [NotificationsSubidBody](docs/NotificationsSubidBody.md)
|
||||
- [PatchAction](docs/PatchAction.md)
|
||||
- [Revision](docs/Revision.md)
|
||||
- [RevisionsSubidBody](docs/RevisionsSubidBody.md)
|
||||
- [Statuslike](docs/Statuslike.md)
|
||||
- [Step](docs/Step.md)
|
||||
- [StepsSubidBody](docs/StepsSubidBody.md)
|
||||
- [StorageUnit](docs/StorageUnit.md)
|
||||
- [StorageUnitsBody](docs/StorageUnitsBody.md)
|
||||
- [StorageUnitsIdBody](docs/StorageUnitsIdBody.md)
|
||||
- [Tag](docs/Tag.md)
|
||||
- [TagsSubidBody](docs/TagsSubidBody.md)
|
||||
- [TagsSubidBody1](docs/TagsSubidBody1.md)
|
||||
- [Team](docs/Team.md)
|
||||
- [Teamgroup](docs/Teamgroup.md)
|
||||
- [TeamgroupUsers](docs/TeamgroupUsers.md)
|
||||
- [TeamgroupsSubidBody](docs/TeamgroupsSubidBody.md)
|
||||
- [TeamsBody](docs/TeamsBody.md)
|
||||
- [TeamsIdBody](docs/TeamsIdBody.md)
|
||||
- [Todoitem](docs/Todoitem.md)
|
||||
- [TodolistBody](docs/TodolistBody.md)
|
||||
- [TodolistIdBody](docs/TodolistIdBody.md)
|
||||
- [UnfinishedStep](docs/UnfinishedStep.md)
|
||||
- [UnfinishedSteps](docs/UnfinishedSteps.md)
|
||||
- [Upload](docs/Upload.md)
|
||||
- [UploadsSubidBody](docs/UploadsSubidBody.md)
|
||||
- [UploadsSubidBody1](docs/UploadsSubidBody1.md)
|
||||
- [Users](docs/Users.md)
|
||||
- [UsersBody](docs/UsersBody.md)
|
||||
- [UsersFull](docs/UsersFull.md)
|
||||
- [UsersFullTeams](docs/UsersFullTeams.md)
|
||||
- [UsersIdBody](docs/UsersIdBody.md)
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## token
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: Authorization
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: elabapi-python
|
||||
Version: 5.6.1
|
||||
Summary: eLabFTW REST API v2 Documentation
|
||||
Home-page: https://github.com/elabftw/elabapi-python
|
||||
Author-email:
|
||||
Keywords: Swagger,eLabFTW REST API v2 Documentation
|
||||
Requires-Dist: urllib3>=1.15
|
||||
Requires-Dist: six>=1.10
|
||||
Requires-Dist: certifi
|
||||
Requires-Dist: python-dateutil
|
||||
Dynamic: description
|
||||
Dynamic: home-page
|
||||
Dynamic: keywords
|
||||
Dynamic: requires-dist
|
||||
Dynamic: summary
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
README.md
|
||||
setup.py
|
||||
elabapi_python/__init__.py
|
||||
elabapi_python/api_client.py
|
||||
elabapi_python/configuration.py
|
||||
elabapi_python/rest.py
|
||||
elabapi_python.egg-info/PKG-INFO
|
||||
elabapi_python.egg-info/SOURCES.txt
|
||||
elabapi_python.egg-info/dependency_links.txt
|
||||
elabapi_python.egg-info/requires.txt
|
||||
elabapi_python.egg-info/top_level.txt
|
||||
elabapi_python/api/__init__.py
|
||||
elabapi_python/api/api_keys_api.py
|
||||
elabapi_python/api/branding_api.py
|
||||
elabapi_python/api/comments_api.py
|
||||
elabapi_python/api/compounds_api.py
|
||||
elabapi_python/api/config_api.py
|
||||
elabapi_python/api/containers_api.py
|
||||
elabapi_python/api/custom_fields_keys_api.py
|
||||
elabapi_python/api/d_space_api.py
|
||||
elabapi_python/api/events_api.py
|
||||
elabapi_python/api/experiments_api.py
|
||||
elabapi_python/api/experiments_categories_api.py
|
||||
elabapi_python/api/experiments_status_api.py
|
||||
elabapi_python/api/experiments_templates_api.py
|
||||
elabapi_python/api/exports_api.py
|
||||
elabapi_python/api/favorite_tags_api.py
|
||||
elabapi_python/api/idps_api.py
|
||||
elabapi_python/api/idps_sources_api.py
|
||||
elabapi_python/api/import_api.py
|
||||
elabapi_python/api/info_api.py
|
||||
elabapi_python/api/instance_api.py
|
||||
elabapi_python/api/items_api.py
|
||||
elabapi_python/api/items_types__resources_templates_api.py
|
||||
elabapi_python/api/links_to_compounds_api.py
|
||||
elabapi_python/api/links_to_experiments_api.py
|
||||
elabapi_python/api/links_to_items_api.py
|
||||
elabapi_python/api/notifications_api.py
|
||||
elabapi_python/api/reports_api.py
|
||||
elabapi_python/api/resources_categories_api.py
|
||||
elabapi_python/api/resources_status_api.py
|
||||
elabapi_python/api/revisions_api.py
|
||||
elabapi_python/api/steps_api.py
|
||||
elabapi_python/api/storage_units_api.py
|
||||
elabapi_python/api/tags_api.py
|
||||
elabapi_python/api/team_tags_api.py
|
||||
elabapi_python/api/teamgroups_api.py
|
||||
elabapi_python/api/teams_api.py
|
||||
elabapi_python/api/todolist_api.py
|
||||
elabapi_python/api/unfinished_steps_api.py
|
||||
elabapi_python/api/uploads_api.py
|
||||
elabapi_python/api/user_uploads_api.py
|
||||
elabapi_python/api/users_api.py
|
||||
elabapi_python/models/__init__.py
|
||||
elabapi_python/models/all_ofentity_editable_metadatamerge.py
|
||||
elabapi_python/models/any_ofuploads_subid_body1.py
|
||||
elabapi_python/models/apikey.py
|
||||
elabapi_python/models/apikeys_body.py
|
||||
elabapi_python/models/branding_id_body.py
|
||||
elabapi_python/models/changelog.py
|
||||
elabapi_python/models/comment.py
|
||||
elabapi_python/models/compound.py
|
||||
elabapi_python/models/compound_create_request.py
|
||||
elabapi_python/models/compound_duplicate_request.py
|
||||
elabapi_python/models/compounds_body.py
|
||||
elabapi_python/models/compounds_links_subid_body.py
|
||||
elabapi_python/models/config.py
|
||||
elabapi_python/models/container.py
|
||||
elabapi_python/models/containers_subid_body.py
|
||||
elabapi_python/models/containers_subid_body1.py
|
||||
elabapi_python/models/dspace_body.py
|
||||
elabapi_python/models/dspace_body1.py
|
||||
elabapi_python/models/dspace_entity.py
|
||||
elabapi_python/models/dspace_metadata.py
|
||||
elabapi_python/models/dspace_metadata1.py
|
||||
elabapi_python/models/entity.py
|
||||
elabapi_python/models/entity_and_item_editable.py
|
||||
elabapi_python/models/entity_duplicate.py
|
||||
elabapi_python/models/entity_editable.py
|
||||
elabapi_python/models/entity_template.py
|
||||
elabapi_python/models/entity_template_editable.py
|
||||
elabapi_python/models/error.py
|
||||
elabapi_python/models/event.py
|
||||
elabapi_python/models/event_id_body.py
|
||||
elabapi_python/models/eventid_delta.py
|
||||
elabapi_python/models/events_id_body.py
|
||||
elabapi_python/models/exclusive_edit_mode.py
|
||||
elabapi_python/models/experiment.py
|
||||
elabapi_python/models/experiments_links_subid_body.py
|
||||
elabapi_python/models/experiments_templates_id_body.py
|
||||
elabapi_python/models/export.py
|
||||
elabapi_python/models/exports_body.py
|
||||
elabapi_python/models/extra_fields_keys.py
|
||||
elabapi_python/models/favtags_body.py
|
||||
elabapi_python/models/id.py
|
||||
elabapi_python/models/id1.py
|
||||
elabapi_python/models/id2.py
|
||||
elabapi_python/models/id3.py
|
||||
elabapi_python/models/id4.py
|
||||
elabapi_python/models/id_certs_body.py
|
||||
elabapi_python/models/id_comments_body.py
|
||||
elabapi_python/models/id_endpoints_body.py
|
||||
elabapi_python/models/id_experiments_categories_body.py
|
||||
elabapi_python/models/id_experiments_status_body.py
|
||||
elabapi_python/models/id_items_status_body.py
|
||||
elabapi_python/models/id_resources_categories_body.py
|
||||
elabapi_python/models/id_steps_body.py
|
||||
elabapi_python/models/id_tags_body.py
|
||||
elabapi_python/models/id_tags_body1.py
|
||||
elabapi_python/models/id_teamgroups_body.py
|
||||
elabapi_python/models/id_uploads_body.py
|
||||
elabapi_python/models/idp.py
|
||||
elabapi_python/models/idp_cert.py
|
||||
elabapi_python/models/idp_endpoint.py
|
||||
elabapi_python/models/idp_source.py
|
||||
elabapi_python/models/idps_body.py
|
||||
elabapi_python/models/idps_id_body.py
|
||||
elabapi_python/models/idps_sources_body.py
|
||||
elabapi_python/models/idps_sources_id_body.py
|
||||
elabapi_python/models/import_body.py
|
||||
elabapi_python/models/inline_response200.py
|
||||
elabapi_python/models/inline_response2001.py
|
||||
elabapi_python/models/inline_response20010.py
|
||||
elabapi_python/models/inline_response2001_experiments.py
|
||||
elabapi_python/models/inline_response2001_items.py
|
||||
elabapi_python/models/inline_response2001_users.py
|
||||
elabapi_python/models/inline_response2002.py
|
||||
elabapi_python/models/inline_response2003.py
|
||||
elabapi_python/models/inline_response2004.py
|
||||
elabapi_python/models/inline_response2004_query_parameters.py
|
||||
elabapi_python/models/inline_response2005.py
|
||||
elabapi_python/models/inline_response2006.py
|
||||
elabapi_python/models/inline_response2007.py
|
||||
elabapi_python/models/inline_response2008.py
|
||||
elabapi_python/models/inline_response2009.py
|
||||
elabapi_python/models/inline_response2009_embedded.py
|
||||
elabapi_python/models/inline_response2009_embedded_entries.py
|
||||
elabapi_python/models/instance_body.py
|
||||
elabapi_python/models/item.py
|
||||
elabapi_python/models/item_editable.py
|
||||
elabapi_python/models/items_links_subid_body.py
|
||||
elabapi_python/models/items_types_id_body.py
|
||||
elabapi_python/models/link.py
|
||||
elabapi_python/models/metadata.py
|
||||
elabapi_python/models/metadata_elabftw.py
|
||||
elabapi_python/models/metadata_elabftw_extra_fields_groups.py
|
||||
elabapi_python/models/metadata_extra_fields.py
|
||||
elabapi_python/models/notification.py
|
||||
elabapi_python/models/notifications_subid_body.py
|
||||
elabapi_python/models/patch_action.py
|
||||
elabapi_python/models/revision.py
|
||||
elabapi_python/models/revisions_subid_body.py
|
||||
elabapi_python/models/statuslike.py
|
||||
elabapi_python/models/step.py
|
||||
elabapi_python/models/steps_subid_body.py
|
||||
elabapi_python/models/storage_unit.py
|
||||
elabapi_python/models/storage_units_body.py
|
||||
elabapi_python/models/storage_units_id_body.py
|
||||
elabapi_python/models/tag.py
|
||||
elabapi_python/models/tags_subid_body.py
|
||||
elabapi_python/models/tags_subid_body1.py
|
||||
elabapi_python/models/team.py
|
||||
elabapi_python/models/teamgroup.py
|
||||
elabapi_python/models/teamgroup_users.py
|
||||
elabapi_python/models/teamgroups_subid_body.py
|
||||
elabapi_python/models/teams_body.py
|
||||
elabapi_python/models/teams_id_body.py
|
||||
elabapi_python/models/todoitem.py
|
||||
elabapi_python/models/todolist_body.py
|
||||
elabapi_python/models/todolist_id_body.py
|
||||
elabapi_python/models/unfinished_step.py
|
||||
elabapi_python/models/unfinished_steps.py
|
||||
elabapi_python/models/upload.py
|
||||
elabapi_python/models/uploads_subid_body.py
|
||||
elabapi_python/models/uploads_subid_body1.py
|
||||
elabapi_python/models/users.py
|
||||
elabapi_python/models/users_body.py
|
||||
elabapi_python/models/users_full.py
|
||||
elabapi_python/models/users_full_teams.py
|
||||
elabapi_python/models/users_id_body.py
|
||||
test/__init__.py
|
||||
test/test_all_ofentity_editable_metadatamerge.py
|
||||
test/test_any_ofuploads_subid_body1.py
|
||||
test/test_api_keys_api.py
|
||||
test/test_apikey.py
|
||||
test/test_apikeys_body.py
|
||||
test/test_branding_api.py
|
||||
test/test_branding_id_body.py
|
||||
test/test_changelog.py
|
||||
test/test_comment.py
|
||||
test/test_comments_api.py
|
||||
test/test_compound.py
|
||||
test/test_compound_create_request.py
|
||||
test/test_compound_duplicate_request.py
|
||||
test/test_compounds_api.py
|
||||
test/test_compounds_body.py
|
||||
test/test_compounds_links_subid_body.py
|
||||
test/test_config.py
|
||||
test/test_config_api.py
|
||||
test/test_container.py
|
||||
test/test_containers_api.py
|
||||
test/test_containers_subid_body.py
|
||||
test/test_containers_subid_body1.py
|
||||
test/test_custom_fields_keys_api.py
|
||||
test/test_d_space_api.py
|
||||
test/test_dspace_body.py
|
||||
test/test_dspace_body1.py
|
||||
test/test_dspace_entity.py
|
||||
test/test_dspace_metadata.py
|
||||
test/test_dspace_metadata1.py
|
||||
test/test_entity.py
|
||||
test/test_entity_and_item_editable.py
|
||||
test/test_entity_duplicate.py
|
||||
test/test_entity_editable.py
|
||||
test/test_entity_template.py
|
||||
test/test_entity_template_editable.py
|
||||
test/test_error.py
|
||||
test/test_event.py
|
||||
test/test_event_id_body.py
|
||||
test/test_eventid_delta.py
|
||||
test/test_events_api.py
|
||||
test/test_events_id_body.py
|
||||
test/test_exclusive_edit_mode.py
|
||||
test/test_experiment.py
|
||||
test/test_experiments_api.py
|
||||
test/test_experiments_categories_api.py
|
||||
test/test_experiments_links_subid_body.py
|
||||
test/test_experiments_status_api.py
|
||||
test/test_experiments_templates_api.py
|
||||
test/test_experiments_templates_id_body.py
|
||||
test/test_export.py
|
||||
test/test_exports_api.py
|
||||
test/test_exports_body.py
|
||||
test/test_extra_fields_keys.py
|
||||
test/test_favorite_tags_api.py
|
||||
test/test_favtags_body.py
|
||||
test/test_id.py
|
||||
test/test_id1.py
|
||||
test/test_id2.py
|
||||
test/test_id3.py
|
||||
test/test_id4.py
|
||||
test/test_id_certs_body.py
|
||||
test/test_id_comments_body.py
|
||||
test/test_id_endpoints_body.py
|
||||
test/test_id_experiments_categories_body.py
|
||||
test/test_id_experiments_status_body.py
|
||||
test/test_id_items_status_body.py
|
||||
test/test_id_resources_categories_body.py
|
||||
test/test_id_steps_body.py
|
||||
test/test_id_tags_body.py
|
||||
test/test_id_tags_body1.py
|
||||
test/test_id_teamgroups_body.py
|
||||
test/test_id_uploads_body.py
|
||||
test/test_idp.py
|
||||
test/test_idp_cert.py
|
||||
test/test_idp_endpoint.py
|
||||
test/test_idp_source.py
|
||||
test/test_idps_api.py
|
||||
test/test_idps_body.py
|
||||
test/test_idps_id_body.py
|
||||
test/test_idps_sources_api.py
|
||||
test/test_idps_sources_body.py
|
||||
test/test_idps_sources_id_body.py
|
||||
test/test_import_api.py
|
||||
test/test_import_body.py
|
||||
test/test_info_api.py
|
||||
test/test_inline_response200.py
|
||||
test/test_inline_response2001.py
|
||||
test/test_inline_response20010.py
|
||||
test/test_inline_response2001_experiments.py
|
||||
test/test_inline_response2001_items.py
|
||||
test/test_inline_response2001_users.py
|
||||
test/test_inline_response2002.py
|
||||
test/test_inline_response2003.py
|
||||
test/test_inline_response2004.py
|
||||
test/test_inline_response2004_query_parameters.py
|
||||
test/test_inline_response2005.py
|
||||
test/test_inline_response2006.py
|
||||
test/test_inline_response2007.py
|
||||
test/test_inline_response2008.py
|
||||
test/test_inline_response2009.py
|
||||
test/test_inline_response2009_embedded.py
|
||||
test/test_inline_response2009_embedded_entries.py
|
||||
test/test_instance_api.py
|
||||
test/test_instance_body.py
|
||||
test/test_item.py
|
||||
test/test_item_editable.py
|
||||
test/test_items_api.py
|
||||
test/test_items_links_subid_body.py
|
||||
test/test_items_types__resources_templates_api.py
|
||||
test/test_items_types_id_body.py
|
||||
test/test_link.py
|
||||
test/test_links_to_compounds_api.py
|
||||
test/test_links_to_experiments_api.py
|
||||
test/test_links_to_items_api.py
|
||||
test/test_metadata.py
|
||||
test/test_metadata_elabftw.py
|
||||
test/test_metadata_elabftw_extra_fields_groups.py
|
||||
test/test_metadata_extra_fields.py
|
||||
test/test_notification.py
|
||||
test/test_notifications_api.py
|
||||
test/test_notifications_subid_body.py
|
||||
test/test_patch_action.py
|
||||
test/test_reports_api.py
|
||||
test/test_resources_categories_api.py
|
||||
test/test_resources_status_api.py
|
||||
test/test_revision.py
|
||||
test/test_revisions_api.py
|
||||
test/test_revisions_subid_body.py
|
||||
test/test_statuslike.py
|
||||
test/test_step.py
|
||||
test/test_steps_api.py
|
||||
test/test_steps_subid_body.py
|
||||
test/test_storage_unit.py
|
||||
test/test_storage_units_api.py
|
||||
test/test_storage_units_body.py
|
||||
test/test_storage_units_id_body.py
|
||||
test/test_tag.py
|
||||
test/test_tags_api.py
|
||||
test/test_tags_subid_body.py
|
||||
test/test_tags_subid_body1.py
|
||||
test/test_team.py
|
||||
test/test_team_tags_api.py
|
||||
test/test_teamgroup.py
|
||||
test/test_teamgroup_users.py
|
||||
test/test_teamgroups_api.py
|
||||
test/test_teamgroups_subid_body.py
|
||||
test/test_teams_api.py
|
||||
test/test_teams_body.py
|
||||
test/test_teams_id_body.py
|
||||
test/test_todoitem.py
|
||||
test/test_todolist_api.py
|
||||
test/test_todolist_body.py
|
||||
test/test_todolist_id_body.py
|
||||
test/test_unfinished_step.py
|
||||
test/test_unfinished_steps.py
|
||||
test/test_unfinished_steps_api.py
|
||||
test/test_upload.py
|
||||
test/test_uploads_api.py
|
||||
test/test_uploads_subid_body.py
|
||||
test/test_uploads_subid_body1.py
|
||||
test/test_user_uploads_api.py
|
||||
test/test_users.py
|
||||
test/test_users_api.py
|
||||
test/test_users_body.py
|
||||
test/test_users_full.py
|
||||
test/test_users_full_teams.py
|
||||
test/test_users_id_body.py
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
urllib3>=1.15
|
||||
six>=1.10
|
||||
certifi
|
||||
python-dateutil
|
||||
@@ -0,0 +1,2 @@
|
||||
elabapi_python
|
||||
test
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
# coding: utf-8
|
||||
|
||||
# flake8: noqa
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import apis into sdk package
|
||||
from elabapi_python.api.api_keys_api import ApiKeysApi
|
||||
from elabapi_python.api.branding_api import BrandingApi
|
||||
from elabapi_python.api.comments_api import CommentsApi
|
||||
from elabapi_python.api.compounds_api import CompoundsApi
|
||||
from elabapi_python.api.config_api import ConfigApi
|
||||
from elabapi_python.api.containers_api import ContainersApi
|
||||
from elabapi_python.api.custom_fields_keys_api import CustomFieldsKeysApi
|
||||
from elabapi_python.api.d_space_api import DSpaceApi
|
||||
from elabapi_python.api.events_api import EventsApi
|
||||
from elabapi_python.api.experiments_api import ExperimentsApi
|
||||
from elabapi_python.api.experiments_categories_api import ExperimentsCategoriesApi
|
||||
from elabapi_python.api.experiments_status_api import ExperimentsStatusApi
|
||||
from elabapi_python.api.experiments_templates_api import ExperimentsTemplatesApi
|
||||
from elabapi_python.api.exports_api import ExportsApi
|
||||
from elabapi_python.api.favorite_tags_api import FavoriteTagsApi
|
||||
from elabapi_python.api.idps_api import IdpsApi
|
||||
from elabapi_python.api.idps_sources_api import IdpsSourcesApi
|
||||
from elabapi_python.api.import_api import ImportApi
|
||||
from elabapi_python.api.info_api import InfoApi
|
||||
from elabapi_python.api.instance_api import InstanceApi
|
||||
from elabapi_python.api.items_api import ItemsApi
|
||||
from elabapi_python.api.items_types__resources_templates_api import ItemsTypesResourcesTemplatesApi
|
||||
from elabapi_python.api.links_to_compounds_api import LinksToCompoundsApi
|
||||
from elabapi_python.api.links_to_experiments_api import LinksToExperimentsApi
|
||||
from elabapi_python.api.links_to_items_api import LinksToItemsApi
|
||||
from elabapi_python.api.notifications_api import NotificationsApi
|
||||
from elabapi_python.api.reports_api import ReportsApi
|
||||
from elabapi_python.api.resources_categories_api import ResourcesCategoriesApi
|
||||
from elabapi_python.api.resources_status_api import ResourcesStatusApi
|
||||
from elabapi_python.api.revisions_api import RevisionsApi
|
||||
from elabapi_python.api.steps_api import StepsApi
|
||||
from elabapi_python.api.storage_units_api import StorageUnitsApi
|
||||
from elabapi_python.api.tags_api import TagsApi
|
||||
from elabapi_python.api.team_tags_api import TeamTagsApi
|
||||
from elabapi_python.api.teamgroups_api import TeamgroupsApi
|
||||
from elabapi_python.api.teams_api import TeamsApi
|
||||
from elabapi_python.api.todolist_api import TodolistApi
|
||||
from elabapi_python.api.unfinished_steps_api import UnfinishedStepsApi
|
||||
from elabapi_python.api.uploads_api import UploadsApi
|
||||
from elabapi_python.api.user_uploads_api import UserUploadsApi
|
||||
from elabapi_python.api.users_api import UsersApi
|
||||
# import ApiClient
|
||||
from elabapi_python.api_client import ApiClient
|
||||
from elabapi_python.configuration import Configuration
|
||||
# import models into sdk package
|
||||
from elabapi_python.models.all_ofentity_editable_metadatamerge import AllOfentityEditableMetadatamerge
|
||||
from elabapi_python.models.any_ofuploads_subid_body1 import AnyOfuploadsSubidBody1
|
||||
from elabapi_python.models.apikey import Apikey
|
||||
from elabapi_python.models.apikeys_body import ApikeysBody
|
||||
from elabapi_python.models.branding_id_body import BrandingIdBody
|
||||
from elabapi_python.models.changelog import Changelog
|
||||
from elabapi_python.models.comment import Comment
|
||||
from elabapi_python.models.compound import Compound
|
||||
from elabapi_python.models.compound_create_request import CompoundCreateRequest
|
||||
from elabapi_python.models.compound_duplicate_request import CompoundDuplicateRequest
|
||||
from elabapi_python.models.compounds_body import CompoundsBody
|
||||
from elabapi_python.models.compounds_links_subid_body import CompoundsLinksSubidBody
|
||||
from elabapi_python.models.config import Config
|
||||
from elabapi_python.models.container import Container
|
||||
from elabapi_python.models.containers_subid_body import ContainersSubidBody
|
||||
from elabapi_python.models.containers_subid_body1 import ContainersSubidBody1
|
||||
from elabapi_python.models.dspace_body import DspaceBody
|
||||
from elabapi_python.models.dspace_body1 import DspaceBody1
|
||||
from elabapi_python.models.dspace_entity import DspaceEntity
|
||||
from elabapi_python.models.dspace_metadata import DspaceMetadata
|
||||
from elabapi_python.models.dspace_metadata1 import DspaceMetadata1
|
||||
from elabapi_python.models.entity import Entity
|
||||
from elabapi_python.models.entity_and_item_editable import EntityAndItemEditable
|
||||
from elabapi_python.models.entity_duplicate import EntityDuplicate
|
||||
from elabapi_python.models.entity_editable import EntityEditable
|
||||
from elabapi_python.models.entity_template import EntityTemplate
|
||||
from elabapi_python.models.entity_template_editable import EntityTemplateEditable
|
||||
from elabapi_python.models.error import Error
|
||||
from elabapi_python.models.event import Event
|
||||
from elabapi_python.models.event_id_body import EventIdBody
|
||||
from elabapi_python.models.eventid_delta import EventidDelta
|
||||
from elabapi_python.models.events_id_body import EventsIdBody
|
||||
from elabapi_python.models.exclusive_edit_mode import ExclusiveEditMode
|
||||
from elabapi_python.models.experiment import Experiment
|
||||
from elabapi_python.models.experiments_links_subid_body import ExperimentsLinksSubidBody
|
||||
from elabapi_python.models.experiments_templates_id_body import ExperimentsTemplatesIdBody
|
||||
from elabapi_python.models.export import Export
|
||||
from elabapi_python.models.exports_body import ExportsBody
|
||||
from elabapi_python.models.extra_fields_keys import ExtraFieldsKeys
|
||||
from elabapi_python.models.favtags_body import FavtagsBody
|
||||
from elabapi_python.models.id import Id
|
||||
from elabapi_python.models.id1 import Id1
|
||||
from elabapi_python.models.id2 import Id2
|
||||
from elabapi_python.models.id3 import Id3
|
||||
from elabapi_python.models.id4 import Id4
|
||||
from elabapi_python.models.id_certs_body import IdCertsBody
|
||||
from elabapi_python.models.id_comments_body import IdCommentsBody
|
||||
from elabapi_python.models.id_endpoints_body import IdEndpointsBody
|
||||
from elabapi_python.models.id_experiments_categories_body import IdExperimentsCategoriesBody
|
||||
from elabapi_python.models.id_experiments_status_body import IdExperimentsStatusBody
|
||||
from elabapi_python.models.id_items_status_body import IdItemsStatusBody
|
||||
from elabapi_python.models.id_resources_categories_body import IdResourcesCategoriesBody
|
||||
from elabapi_python.models.id_steps_body import IdStepsBody
|
||||
from elabapi_python.models.id_tags_body import IdTagsBody
|
||||
from elabapi_python.models.id_tags_body1 import IdTagsBody1
|
||||
from elabapi_python.models.id_teamgroups_body import IdTeamgroupsBody
|
||||
from elabapi_python.models.id_uploads_body import IdUploadsBody
|
||||
from elabapi_python.models.idp import Idp
|
||||
from elabapi_python.models.idp_cert import IdpCert
|
||||
from elabapi_python.models.idp_endpoint import IdpEndpoint
|
||||
from elabapi_python.models.idp_source import IdpSource
|
||||
from elabapi_python.models.idps_body import IdpsBody
|
||||
from elabapi_python.models.idps_id_body import IdpsIdBody
|
||||
from elabapi_python.models.idps_sources_body import IdpsSourcesBody
|
||||
from elabapi_python.models.idps_sources_id_body import IdpsSourcesIdBody
|
||||
from elabapi_python.models.import_body import ImportBody
|
||||
from elabapi_python.models.inline_response200 import InlineResponse200
|
||||
from elabapi_python.models.inline_response2001 import InlineResponse2001
|
||||
from elabapi_python.models.inline_response20010 import InlineResponse20010
|
||||
from elabapi_python.models.inline_response2001_experiments import InlineResponse2001Experiments
|
||||
from elabapi_python.models.inline_response2001_items import InlineResponse2001Items
|
||||
from elabapi_python.models.inline_response2001_users import InlineResponse2001Users
|
||||
from elabapi_python.models.inline_response2002 import InlineResponse2002
|
||||
from elabapi_python.models.inline_response2003 import InlineResponse2003
|
||||
from elabapi_python.models.inline_response2004 import InlineResponse2004
|
||||
from elabapi_python.models.inline_response2004_query_parameters import InlineResponse2004QueryParameters
|
||||
from elabapi_python.models.inline_response2005 import InlineResponse2005
|
||||
from elabapi_python.models.inline_response2006 import InlineResponse2006
|
||||
from elabapi_python.models.inline_response2007 import InlineResponse2007
|
||||
from elabapi_python.models.inline_response2008 import InlineResponse2008
|
||||
from elabapi_python.models.inline_response2009 import InlineResponse2009
|
||||
from elabapi_python.models.inline_response2009_embedded import InlineResponse2009Embedded
|
||||
from elabapi_python.models.inline_response2009_embedded_entries import InlineResponse2009EmbeddedEntries
|
||||
from elabapi_python.models.instance_body import InstanceBody
|
||||
from elabapi_python.models.item import Item
|
||||
from elabapi_python.models.item_editable import ItemEditable
|
||||
from elabapi_python.models.items_links_subid_body import ItemsLinksSubidBody
|
||||
from elabapi_python.models.items_types_id_body import ItemsTypesIdBody
|
||||
from elabapi_python.models.link import Link
|
||||
from elabapi_python.models.metadata import Metadata
|
||||
from elabapi_python.models.metadata_elabftw import MetadataElabftw
|
||||
from elabapi_python.models.metadata_elabftw_extra_fields_groups import MetadataElabftwExtraFieldsGroups
|
||||
from elabapi_python.models.metadata_extra_fields import MetadataExtraFields
|
||||
from elabapi_python.models.notification import Notification
|
||||
from elabapi_python.models.notifications_subid_body import NotificationsSubidBody
|
||||
from elabapi_python.models.patch_action import PatchAction
|
||||
from elabapi_python.models.revision import Revision
|
||||
from elabapi_python.models.revisions_subid_body import RevisionsSubidBody
|
||||
from elabapi_python.models.statuslike import Statuslike
|
||||
from elabapi_python.models.step import Step
|
||||
from elabapi_python.models.steps_subid_body import StepsSubidBody
|
||||
from elabapi_python.models.storage_unit import StorageUnit
|
||||
from elabapi_python.models.storage_units_body import StorageUnitsBody
|
||||
from elabapi_python.models.storage_units_id_body import StorageUnitsIdBody
|
||||
from elabapi_python.models.tag import Tag
|
||||
from elabapi_python.models.tags_subid_body import TagsSubidBody
|
||||
from elabapi_python.models.tags_subid_body1 import TagsSubidBody1
|
||||
from elabapi_python.models.team import Team
|
||||
from elabapi_python.models.teamgroup import Teamgroup
|
||||
from elabapi_python.models.teamgroup_users import TeamgroupUsers
|
||||
from elabapi_python.models.teamgroups_subid_body import TeamgroupsSubidBody
|
||||
from elabapi_python.models.teams_body import TeamsBody
|
||||
from elabapi_python.models.teams_id_body import TeamsIdBody
|
||||
from elabapi_python.models.todoitem import Todoitem
|
||||
from elabapi_python.models.todolist_body import TodolistBody
|
||||
from elabapi_python.models.todolist_id_body import TodolistIdBody
|
||||
from elabapi_python.models.unfinished_step import UnfinishedStep
|
||||
from elabapi_python.models.unfinished_steps import UnfinishedSteps
|
||||
from elabapi_python.models.upload import Upload
|
||||
from elabapi_python.models.uploads_subid_body import UploadsSubidBody
|
||||
from elabapi_python.models.uploads_subid_body1 import UploadsSubidBody1
|
||||
from elabapi_python.models.users import Users
|
||||
from elabapi_python.models.users_body import UsersBody
|
||||
from elabapi_python.models.users_full import UsersFull
|
||||
from elabapi_python.models.users_full_teams import UsersFullTeams
|
||||
from elabapi_python.models.users_id_body import UsersIdBody
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# flake8: noqa
|
||||
|
||||
# import apis into api package
|
||||
from elabapi_python.api.api_keys_api import ApiKeysApi
|
||||
from elabapi_python.api.branding_api import BrandingApi
|
||||
from elabapi_python.api.comments_api import CommentsApi
|
||||
from elabapi_python.api.compounds_api import CompoundsApi
|
||||
from elabapi_python.api.config_api import ConfigApi
|
||||
from elabapi_python.api.containers_api import ContainersApi
|
||||
from elabapi_python.api.custom_fields_keys_api import CustomFieldsKeysApi
|
||||
from elabapi_python.api.d_space_api import DSpaceApi
|
||||
from elabapi_python.api.events_api import EventsApi
|
||||
from elabapi_python.api.experiments_api import ExperimentsApi
|
||||
from elabapi_python.api.experiments_categories_api import ExperimentsCategoriesApi
|
||||
from elabapi_python.api.experiments_status_api import ExperimentsStatusApi
|
||||
from elabapi_python.api.experiments_templates_api import ExperimentsTemplatesApi
|
||||
from elabapi_python.api.exports_api import ExportsApi
|
||||
from elabapi_python.api.favorite_tags_api import FavoriteTagsApi
|
||||
from elabapi_python.api.idps_api import IdpsApi
|
||||
from elabapi_python.api.idps_sources_api import IdpsSourcesApi
|
||||
from elabapi_python.api.import_api import ImportApi
|
||||
from elabapi_python.api.info_api import InfoApi
|
||||
from elabapi_python.api.instance_api import InstanceApi
|
||||
from elabapi_python.api.items_api import ItemsApi
|
||||
from elabapi_python.api.items_types__resources_templates_api import ItemsTypesResourcesTemplatesApi
|
||||
from elabapi_python.api.links_to_compounds_api import LinksToCompoundsApi
|
||||
from elabapi_python.api.links_to_experiments_api import LinksToExperimentsApi
|
||||
from elabapi_python.api.links_to_items_api import LinksToItemsApi
|
||||
from elabapi_python.api.notifications_api import NotificationsApi
|
||||
from elabapi_python.api.reports_api import ReportsApi
|
||||
from elabapi_python.api.resources_categories_api import ResourcesCategoriesApi
|
||||
from elabapi_python.api.resources_status_api import ResourcesStatusApi
|
||||
from elabapi_python.api.revisions_api import RevisionsApi
|
||||
from elabapi_python.api.steps_api import StepsApi
|
||||
from elabapi_python.api.storage_units_api import StorageUnitsApi
|
||||
from elabapi_python.api.tags_api import TagsApi
|
||||
from elabapi_python.api.team_tags_api import TeamTagsApi
|
||||
from elabapi_python.api.teamgroups_api import TeamgroupsApi
|
||||
from elabapi_python.api.teams_api import TeamsApi
|
||||
from elabapi_python.api.todolist_api import TodolistApi
|
||||
from elabapi_python.api.unfinished_steps_api import UnfinishedStepsApi
|
||||
from elabapi_python.api.uploads_api import UploadsApi
|
||||
from elabapi_python.api.user_uploads_api import UserUploadsApi
|
||||
from elabapi_python.api.users_api import UsersApi
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,310 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ApiKeysApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_apikey(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an API key. # noqa: E501
|
||||
|
||||
Delete an API key # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_apikey(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the API key (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_apikey_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_apikey_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_apikey_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an API key. # noqa: E501
|
||||
|
||||
Delete an API key # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_apikey_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the API key (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_apikey" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_apikey`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/apikeys/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_apikeys(self, **kwargs): # noqa: E501
|
||||
"""Read API keys # noqa: E501
|
||||
|
||||
Get list of API keys for currently logged in user. # 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_apikeys(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Apikey]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_apikeys_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_apikeys_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_apikeys_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read API keys # noqa: E501
|
||||
|
||||
Get list of API keys for currently logged in user. # 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_apikeys_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Apikey]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_apikeys" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/apikeys', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Apikey]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_apikeys(self, **kwargs): # noqa: E501
|
||||
"""Create an API key # noqa: E501
|
||||
|
||||
Create an API key. The cleartext key is sent back in the location header. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_apikeys(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param ApikeysBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_apikeys_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_apikeys_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_apikeys_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create an API key # noqa: E501
|
||||
|
||||
Create an API key. The cleartext key is sent back in the location header. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_apikeys_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param ApikeysBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_apikeys" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/apikeys', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,247 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class BrandingApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def get_instance_branding(self, id, format, **kwargs): # noqa: E501
|
||||
"""Read a branding asset as a binary file. # 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_instance_branding(id, format, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: Branding id. (required)
|
||||
:param str format: Use binary format to retrieve the branding asset. (required)
|
||||
:return: str
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_instance_branding_with_http_info(id, format, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_instance_branding_with_http_info(id, format, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_instance_branding_with_http_info(self, id, format, **kwargs): # noqa: E501
|
||||
"""Read a branding asset as a binary file. # 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_instance_branding_with_http_info(id, format, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: Branding id. (required)
|
||||
:param str format: Use binary format to retrieve the branding asset. (required)
|
||||
:return: str
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'format'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_instance_branding" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `get_instance_branding`") # noqa: E501
|
||||
# verify the required parameter 'format' is set
|
||||
if ('format' not in params or
|
||||
params['format'] is None):
|
||||
raise ValueError("Missing the required parameter `format` when calling `get_instance_branding`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'format' in params:
|
||||
query_params.append(('format', params['format'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['image/svg+xml', 'image/png', 'image/jpeg', 'image/webp', 'image/x-icon', 'image/vnd.microsoft.icon', 'application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/instance/branding/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='str', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_instance_branding(self, action, file, id, **kwargs): # noqa: E501
|
||||
"""Update a branding asset. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_instance_branding(action, file, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str action: (required)
|
||||
:param str file: (required)
|
||||
:param int id: Branding id. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_instance_branding_with_http_info(action, file, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_instance_branding_with_http_info(action, file, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_instance_branding_with_http_info(self, action, file, id, **kwargs): # noqa: E501
|
||||
"""Update a branding asset. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_instance_branding_with_http_info(action, file, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str action: (required)
|
||||
:param str file: (required)
|
||||
:param int id: Branding id. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['action', 'file', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_instance_branding" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'action' is set
|
||||
if ('action' not in params or
|
||||
params['action'] is None):
|
||||
raise ValueError("Missing the required parameter `action` when calling `post_instance_branding`") # noqa: E501
|
||||
# verify the required parameter 'file' is set
|
||||
if ('file' not in params or
|
||||
params['file'] is None):
|
||||
raise ValueError("Missing the required parameter `file` when calling `post_instance_branding`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_instance_branding`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
if 'action' in params:
|
||||
form_params.append(('action', params['action'])) # noqa: E501
|
||||
if 'file' in params:
|
||||
local_var_files['file'] = params['file'] # noqa: E501
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['multipart/form-data']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/instance/branding/{id}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,580 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class CommentsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_entity_comment(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an entity comment. # noqa: E501
|
||||
|
||||
The comment gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entity_comment(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the comment (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_entity_comment_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_entity_comment_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_entity_comment_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an entity comment. # noqa: E501
|
||||
|
||||
The comment gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entity_comment_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the comment (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_entity_comment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_entity_comment`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_entity_comment`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_entity_comment`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/comments/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_entity_comment(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify an entity comment. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_entity_comment(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the comment (required)
|
||||
:param Comment body: Parameters for patching an entity comment.
|
||||
:return: Comment
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_entity_comment_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_entity_comment_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_entity_comment_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify an entity comment. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_entity_comment_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the comment (required)
|
||||
:param Comment body: Parameters for patching an entity comment.
|
||||
:return: Comment
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_entity_comment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `patch_entity_comment`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_entity_comment`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_entity_comment`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/comments/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Comment', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_entity_comments(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create a comment. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_comments(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param IdCommentsBody body: Parameters for creating a comment
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_entity_comments_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_entity_comments_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_entity_comments_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create a comment. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_comments_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param IdCommentsBody body: Parameters for creating a comment
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_entity_comments" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_entity_comments`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_entity_comments`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/comments', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_comment(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a comment of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_comment(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the comment (required)
|
||||
:return: Comment
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_comment_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_comment_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_comment_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a comment of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_comment_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the comment (required)
|
||||
:return: Comment
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_comment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_comment`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_comment`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_entity_comment`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/comments/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Comment', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_comments(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all comments of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_comments(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Comment]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_comments_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_comments_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_comments_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all comments of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_comments_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Comment]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_comments" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_comments`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_comments`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/comments', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Comment]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,409 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class CompoundsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_compound(self, id, **kwargs): # noqa: E501
|
||||
"""Soft-delete a compound # noqa: E501
|
||||
|
||||
The compound gets marked as deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_compound(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the compound (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_compound_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_compound_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_compound_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Soft-delete a compound # noqa: E501
|
||||
|
||||
The compound gets marked as deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_compound_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the compound (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_compound" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_compound`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/compounds/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_compound(self, id, **kwargs): # noqa: E501
|
||||
"""Get a single compound # noqa: E501
|
||||
|
||||
Retrieve one compound by its ID # 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_compound(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the compound (required)
|
||||
:return: Compound
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_compound_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_compound_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_compound_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Get a single compound # noqa: E501
|
||||
|
||||
Retrieve one compound by its ID # 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_compound_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the compound (required)
|
||||
:return: Compound
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_compound" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `get_compound`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/compounds/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Compound', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_compounds(self, **kwargs): # noqa: E501
|
||||
"""Read compounds # noqa: E501
|
||||
|
||||
Get the list of all compounds # 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_compounds(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Compound]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_compounds_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_compounds_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_compounds_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read compounds # noqa: E501
|
||||
|
||||
Get the list of all compounds # 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_compounds_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Compound]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_compounds" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/compounds', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Compound]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_compounds(self, body, **kwargs): # noqa: E501
|
||||
"""Create or import a compound # noqa: E501
|
||||
|
||||
- If `action=duplicate`, import (or match) a compound from PubChem using `cid` or `cas`. If both parameters are present, only the `cid` is used. - Otherwise, create a compound directly from the provided fields. - If a compound with the same unique identifier already exists (e.g `cas_number`, `pubchem_cid`), the API will return the existing compound instead of creating a new one. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_compounds(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param CompoundsBody body: (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_compounds_with_http_info(body, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_compounds_with_http_info(body, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_compounds_with_http_info(self, body, **kwargs): # noqa: E501
|
||||
"""Create or import a compound # noqa: E501
|
||||
|
||||
- If `action=duplicate`, import (or match) a compound from PubChem using `cid` or `cas`. If both parameters are present, only the `cid` is used. - Otherwise, create a compound directly from the provided fields. - If a compound with the same unique identifier already exists (e.g `cas_number`, `pubchem_cid`), the API will return the existing compound instead of creating a new one. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_compounds_with_http_info(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param CompoundsBody body: (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_compounds" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `post_compounds`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/compounds', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,296 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ConfigApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_config(self, **kwargs): # noqa: E501
|
||||
"""Reset the config to default values # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_config(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_config_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_config_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_config_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Reset the config to default values # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_config_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_config" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/config', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_config(self, **kwargs): # noqa: E501
|
||||
"""Read the config # 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_config(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: Config
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_config_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_config_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_config_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read the config # 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_config_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: Config
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_config" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/config', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Config', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_config(self, **kwargs): # noqa: E501
|
||||
"""Modify the config # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_config(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Config body: The config values to change.
|
||||
:return: Config
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_config_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_config_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_config_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Modify the config # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_config_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Config body: The config values to change.
|
||||
:return: Config
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_config" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/config', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Config', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,596 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ContainersApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_container(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a container. # noqa: E501
|
||||
|
||||
Remove an entity from a storage unit. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_container(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_container_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a container. # noqa: E501
|
||||
|
||||
Remove an entity from a storage unit. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_container_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_container" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_container`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_container`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_container`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/containers/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_container(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a container. # noqa: E501
|
||||
|
||||
Update the quantity stored, the unit, or the storage location of a container. Setting `storage_id` moves the container to a different storage unit while preserving its `id` and `created_at`. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_container(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:param ContainersSubidBody1 body: Parameters for modifying a container.
|
||||
:return: Container
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_container_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a container. # noqa: E501
|
||||
|
||||
Update the quantity stored, the unit, or the storage location of a container. Setting `storage_id` moves the container to a different storage unit while preserving its `id` and `created_at`. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_container_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:param ContainersSubidBody1 body: Parameters for modifying a container.
|
||||
:return: Container
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_container" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `patch_container`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_container`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_container`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/containers/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Container', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_container(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Create a container for this entity. # noqa: E501
|
||||
|
||||
Store this entity in a storage unit with a specified quantity. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_container(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:param ContainersSubidBody body: Parameters for creating a container.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_container_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Create a container for this entity. # noqa: E501
|
||||
|
||||
Store this entity in a storage unit with a specified quantity. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_container_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:param ContainersSubidBody body: Parameters for creating a container.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_container" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_container`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_container`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `post_container`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/containers/{subid}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_container(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a container. # noqa: E501
|
||||
|
||||
Get details of a specific container entry. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_container(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:return: Container
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_container_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_container_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a container. # noqa: E501
|
||||
|
||||
Get details of a specific container entry. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_container_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the container (required)
|
||||
:return: Container
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_container" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_container`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_container`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_container`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/containers/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Container', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_containers(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all containers for this entity. # noqa: E501
|
||||
|
||||
Get a list of all storage locations (containers) where this entity is stored. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_containers(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Container]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_containers_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_containers_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_containers_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all containers for this entity. # noqa: E501
|
||||
|
||||
Get a list of all storage locations (containers) where this entity is stored. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_containers_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Container]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_containers" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_containers`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_containers`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/containers', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Container]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,126 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class CustomFieldsKeysApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def custom_fields_keys(self, **kwargs): # noqa: E501
|
||||
"""Read custom fields keys. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.custom_fields_keys(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in the custom fields keys.
|
||||
:param int limit: Number of custom fields keys that will be returned. Value >= -1; -1: no limit, 0: users default setting from UCP.
|
||||
:return: list[ExtraFieldsKeys]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.custom_fields_keys_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.custom_fields_keys_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def custom_fields_keys_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read custom fields keys. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.custom_fields_keys_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in the custom fields keys.
|
||||
:param int limit: Number of custom fields keys that will be returned. Value >= -1; -1: no limit, 0: users default setting from UCP.
|
||||
:return: list[ExtraFieldsKeys]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['q', 'limit'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method custom_fields_keys" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'q' in params:
|
||||
query_params.append(('q', params['q'])) # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/extra_fields_keys', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[ExtraFieldsKeys]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,320 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class DSpaceApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def dspace_create(self, body, **kwargs): # noqa: E501
|
||||
"""Create a new DSpace workspace item. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.dspace_create(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param DspaceBody body: (required)
|
||||
:return: str
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.dspace_create_with_http_info(body, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.dspace_create_with_http_info(body, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def dspace_create_with_http_info(self, body, **kwargs): # noqa: E501
|
||||
"""Create a new DSpace workspace item. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.dspace_create_with_http_info(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param DspaceBody body: (required)
|
||||
:return: str
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method dspace_create" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `dspace_create`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['text/html', 'application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/dspace', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='str', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def dspace_read(self, action, **kwargs): # noqa: E501
|
||||
"""Read DSpace information. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.dspace_read(action, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str action: Action to perform: - `getcollections`: list available DSpace collections. - `gettypes`: list DSpace item types (submission vocabularies). If omitted or invalid, the endpoint returns an error explaining valid usage. (required)
|
||||
:return: InlineResponse2009
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.dspace_read_with_http_info(action, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.dspace_read_with_http_info(action, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def dspace_read_with_http_info(self, action, **kwargs): # noqa: E501
|
||||
"""Read DSpace information. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.dspace_read_with_http_info(action, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str action: Action to perform: - `getcollections`: list available DSpace collections. - `gettypes`: list DSpace item types (submission vocabularies). If omitted or invalid, the endpoint returns an error explaining valid usage. (required)
|
||||
:return: InlineResponse2009
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['action'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method dspace_read" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'action' is set
|
||||
if ('action' not in params or
|
||||
params['action'] is None):
|
||||
raise ValueError("Missing the required parameter `action` when calling `dspace_read`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'action' in params:
|
||||
query_params.append(('action', params['action'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/dspace', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2009', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def dspace_submit(self, body, **kwargs): # noqa: E501
|
||||
"""Submit an eLabFTW entry to DSpace. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.dspace_submit(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param DspaceBody1 body: (required)
|
||||
:return: InlineResponse20010
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.dspace_submit_with_http_info(body, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.dspace_submit_with_http_info(body, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def dspace_submit_with_http_info(self, body, **kwargs): # noqa: E501
|
||||
"""Submit an eLabFTW entry to DSpace. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.dspace_submit_with_http_info(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param DspaceBody1 body: (required)
|
||||
:return: InlineResponse20010
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method dspace_submit" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `dspace_submit`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/dspace', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse20010', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,510 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class EventsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_event(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a booking slot. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_event(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the event to modify. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_event_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_event_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_event_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a booking slot. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_event_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the event to modify. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_event" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_event`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/event/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_event(self, body, id, **kwargs): # noqa: E501
|
||||
"""Modify a booking slot. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_event(body, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EventIdBody body: Parameters for modifying an event. (required)
|
||||
:param int id: ID of the event to modify. (required)
|
||||
:return: Event
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_event_with_http_info(body, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_event_with_http_info(body, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_event_with_http_info(self, body, id, **kwargs): # noqa: E501
|
||||
"""Modify a booking slot. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_event_with_http_info(body, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EventIdBody body: Parameters for modifying an event. (required)
|
||||
:param int id: ID of the event to modify. (required)
|
||||
:return: Event
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_event" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `patch_event`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_event`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/event/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Event', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_events(self, id, **kwargs): # noqa: E501
|
||||
"""Create an event for the item specified as id. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_events(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the item to book. (required)
|
||||
:param EventsIdBody body: Parameters for creating an event.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_events_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_events_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_events_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create an event for the item specified as id. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_events_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the item to book. (required)
|
||||
:param EventsIdBody body: Parameters for creating an event.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_events" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_events`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/events/{id}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_event(self, id, **kwargs): # noqa: E501
|
||||
"""Read a booking slot. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_event(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the event to modify. (required)
|
||||
:return: Event
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_event_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_event_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_event_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read a booking slot. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_event_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the event to modify. (required)
|
||||
:return: Event
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_event" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_event`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/event/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Event', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_events(self, **kwargs): # noqa: E501
|
||||
"""Read all events in the team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_events(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Event]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_events_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_events_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_events_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all events in the team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_events_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Event]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_events" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/events', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Event]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,686 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ExperimentsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_experiment(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an experiment. # noqa: E501
|
||||
|
||||
The experiment gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_experiment(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_experiment_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_experiment_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_experiment_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an experiment. # noqa: E501
|
||||
|
||||
The experiment gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_experiment_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_experiment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_experiment`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_experiment(self, id, **kwargs): # noqa: E501
|
||||
"""Read an experiment # 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_experiment(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment (required)
|
||||
:param str format: Get the entity in a different format like csv, pdf, eln or zip. \"pdfa\" means archive pdf (PDF/A), same with \"zipa\".
|
||||
:param bool json: Include a full JSON export in the ZIP archive. Only applicable if format is zip(a).
|
||||
:param bool with_title: Include the title in the QR code. Only applicable if format is qrpng.
|
||||
:param int size: Specify the size of the QR code in pixels. Only applicable if format is qrpng.
|
||||
:param bool changelog: Toggles if the changelog should be included in PDF exports (pdf, pdfa, zip, zipa). Changelog is by default included if the export provides PDF/A, otherwise not.
|
||||
:return: Entity
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_experiment_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_experiment_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_experiment_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read an experiment # 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_experiment_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment (required)
|
||||
:param str format: Get the entity in a different format like csv, pdf, eln or zip. \"pdfa\" means archive pdf (PDF/A), same with \"zipa\".
|
||||
:param bool json: Include a full JSON export in the ZIP archive. Only applicable if format is zip(a).
|
||||
:param bool with_title: Include the title in the QR code. Only applicable if format is qrpng.
|
||||
:param int size: Specify the size of the QR code in pixels. Only applicable if format is qrpng.
|
||||
:param bool changelog: Toggles if the changelog should be included in PDF exports (pdf, pdfa, zip, zipa). Changelog is by default included if the export provides PDF/A, otherwise not.
|
||||
:return: Entity
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'format', 'json', 'with_title', 'size', 'changelog'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_experiment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `get_experiment`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'format' in params:
|
||||
query_params.append(('format', params['format'])) # noqa: E501
|
||||
if 'json' in params:
|
||||
query_params.append(('json', params['json'])) # noqa: E501
|
||||
if 'with_title' in params:
|
||||
query_params.append(('withTitle', params['with_title'])) # noqa: E501
|
||||
if 'size' in params:
|
||||
query_params.append(('size', params['size'])) # noqa: E501
|
||||
if 'changelog' in params:
|
||||
query_params.append(('changelog', params['changelog'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Entity', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_experiment(self, body, id, **kwargs): # noqa: E501
|
||||
"""Modify an experiment # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_experiment(body, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param object body: Parameters for patching an entity (required)
|
||||
:param int id: ID of the experiment (required)
|
||||
:return: Experiment
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_experiment_with_http_info(body, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_experiment_with_http_info(body, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_experiment_with_http_info(self, body, id, **kwargs): # noqa: E501
|
||||
"""Modify an experiment # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_experiment_with_http_info(body, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param object body: Parameters for patching an entity (required)
|
||||
:param int id: ID of the experiment (required)
|
||||
:return: Experiment
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_experiment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `patch_experiment`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_experiment`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Experiment', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_experiment(self, **kwargs): # noqa: E501
|
||||
"""Create an experiment # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityEditable body: Parameters for creating an experiment
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_experiment_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_experiment_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_experiment_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create an experiment # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityEditable body: Parameters for creating an experiment
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_experiment" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_experiment_by_id(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate an experiment with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_by_id(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the experiment to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating an experiment
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_experiment_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_experiment_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_experiment_by_id_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate an experiment with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_by_id_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the experiment to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating an experiment
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_experiment_by_id" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_experiment_by_id`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments/{id}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_experiments(self, **kwargs): # noqa: E501
|
||||
"""Read all experiments that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_experiments(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[Experiment]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_experiments_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_experiments_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_experiments_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all experiments that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_experiments_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[Experiment]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state', 'full'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_experiments" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'q' in params:
|
||||
query_params.append(('q', params['q'])) # noqa: E501
|
||||
if 'extended' in params:
|
||||
query_params.append(('extended', params['extended'])) # noqa: E501
|
||||
if 'related' in params:
|
||||
query_params.append(('related', params['related'])) # noqa: E501
|
||||
if 'related_origin' in params:
|
||||
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
||||
if 'category' in params:
|
||||
query_params.append(('category', params['category'])) # noqa: E501
|
||||
if 'status' in params:
|
||||
query_params.append(('status', params['status'])) # noqa: E501
|
||||
if 'tags' in params:
|
||||
query_params.append(('tags[]', params['tags'])) # noqa: E501
|
||||
collection_formats['tags[]'] = 'multi' # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
if 'offset' in params:
|
||||
query_params.append(('offset', params['offset'])) # noqa: E501
|
||||
if 'owner' in params:
|
||||
query_params.append(('owner', params['owner'])) # noqa: E501
|
||||
if 'scope' in params:
|
||||
query_params.append(('scope', params['scope'])) # noqa: E501
|
||||
if 'order' in params:
|
||||
query_params.append(('order', params['order'])) # noqa: E501
|
||||
if 'sort' in params:
|
||||
query_params.append(('sort', params['sort'])) # noqa: E501
|
||||
if 'state' in params:
|
||||
query_params.append(('state', params['state'])) # noqa: E501
|
||||
if 'full' in params:
|
||||
query_params.append(('full', params['full'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Experiment]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,538 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ExperimentsCategoriesApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_expcat(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_expcat(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_expcat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_expcat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_expcat_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_expcat_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_expcat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_expcat`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_expcat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_categories/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_expcat(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_expcat(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:param Statuslike body: Parameters for modifying a category.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_expcat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_expcat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_expcat_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_expcat_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:param Statuslike body: Parameters for modifying a category.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_expcat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_expcat`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_expcat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_categories/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_team_one_expcat(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new category for experiments. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_expcat(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdExperimentsCategoriesBody body: Parameters for creating a category.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_team_one_expcat_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_team_one_expcat_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_team_one_expcat_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new category for experiments. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_expcat_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdExperimentsCategoriesBody body: Parameters for creating a category.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_team_one_expcat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_team_one_expcat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_categories', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_experiments_categories(self, id, **kwargs): # noqa: E501
|
||||
"""Read experiments categories of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_experiments_categories(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_experiments_categories_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_experiments_categories_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_experiments_categories_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read experiments categories of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_experiments_categories_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_experiments_categories" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_experiments_categories`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_categories', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Statuslike]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_one_expcat(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_expcat(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_one_expcat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_one_expcat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_one_expcat_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_expcat_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_one_expcat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_one_expcat`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_team_one_expcat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_categories/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,538 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ExperimentsStatusApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_expstatus(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_expstatus(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_expstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_expstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_expstatus_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_expstatus_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_expstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_expstatus`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_expstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_status/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_expstatus(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_expstatus(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:param Statuslike body: Parameters for modifying a status.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_expstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_expstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_expstatus_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_expstatus_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:param Statuslike body: Parameters for modifying a status.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_expstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_expstatus`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_expstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_status/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_team_one_expstatus(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new experiments status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_expstatus(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdExperimentsStatusBody body: Parameters for creating a status.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_team_one_expstatus_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_team_one_expstatus_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_team_one_expstatus_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new experiments status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_expstatus_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdExperimentsStatusBody body: Parameters for creating a status.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_team_one_expstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_team_one_expstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_status', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_experiments_status(self, id, **kwargs): # noqa: E501
|
||||
"""Read experiments status of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_experiments_status(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_experiments_status_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_experiments_status_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_experiments_status_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read experiments status of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_experiments_status_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_experiments_status" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_experiments_status`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_status', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Statuslike]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_one_expstatus(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_expstatus(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_one_expstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_one_expstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_one_expstatus_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_expstatus_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_one_expstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_one_expstatus`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_team_one_expstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/experiments_status/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,662 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ExperimentsTemplatesApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_experiment_template(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an experiment template. # noqa: E501
|
||||
|
||||
The experiment template gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_experiment_template(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment template (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_experiment_template_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_experiment_template_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_experiment_template_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an experiment template. # noqa: E501
|
||||
|
||||
The experiment template gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_experiment_template_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment template (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_experiment_template" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_experiment_template`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments_templates/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_experiment_template(self, id, **kwargs): # noqa: E501
|
||||
"""Read an experiment template # 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_experiment_template(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment template (required)
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_experiment_template_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_experiment_template_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_experiment_template_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read an experiment template # 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_experiment_template_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment template (required)
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_experiment_template" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `get_experiment_template`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments_templates/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='EntityTemplate', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_experiment_template(self, id, **kwargs): # noqa: E501
|
||||
"""Modify an experiment template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_experiment_template(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment template (required)
|
||||
:param ExperimentsTemplatesIdBody body: Parameters for modifying an experiment template
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_experiment_template_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_experiment_template_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_experiment_template_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Modify an experiment template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_experiment_template_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the experiment template (required)
|
||||
:param ExperimentsTemplatesIdBody body: Parameters for modifying an experiment template
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_experiment_template" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_experiment_template`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments_templates/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='EntityTemplate', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_experiment_template(self, **kwargs): # noqa: E501
|
||||
"""Create an experiment template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_template(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityTemplateEditable body: Parameters for creating an experiment template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_experiment_template_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_experiment_template_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_experiment_template_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create an experiment template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_template_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityTemplateEditable body: Parameters for creating an experiment template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_experiment_template" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments_templates', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_experiment_template_by_id(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate an experiment template with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_template_by_id(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the experiment template to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating an experiment template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_experiment_template_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_experiment_template_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_experiment_template_by_id_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate an experiment template with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_experiment_template_by_id_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the experiment template to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating an experiment template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_experiment_template_by_id" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_experiment_template_by_id`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments_templates/{id}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_experiments_templates(self, **kwargs): # noqa: E501
|
||||
"""Read all experiments_templates that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_experiments_templates(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[EntityTemplate]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_experiments_templates_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_experiments_templates_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_experiments_templates_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all experiments_templates that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_experiments_templates_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[EntityTemplate]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state', 'full'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_experiments_templates" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'q' in params:
|
||||
query_params.append(('q', params['q'])) # noqa: E501
|
||||
if 'extended' in params:
|
||||
query_params.append(('extended', params['extended'])) # noqa: E501
|
||||
if 'related' in params:
|
||||
query_params.append(('related', params['related'])) # noqa: E501
|
||||
if 'related_origin' in params:
|
||||
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
||||
if 'category' in params:
|
||||
query_params.append(('category', params['category'])) # noqa: E501
|
||||
if 'status' in params:
|
||||
query_params.append(('status', params['status'])) # noqa: E501
|
||||
if 'tags' in params:
|
||||
query_params.append(('tags[]', params['tags'])) # noqa: E501
|
||||
collection_formats['tags[]'] = 'multi' # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
if 'offset' in params:
|
||||
query_params.append(('offset', params['offset'])) # noqa: E501
|
||||
if 'owner' in params:
|
||||
query_params.append(('owner', params['owner'])) # noqa: E501
|
||||
if 'scope' in params:
|
||||
query_params.append(('scope', params['scope'])) # noqa: E501
|
||||
if 'order' in params:
|
||||
query_params.append(('order', params['order'])) # noqa: E501
|
||||
if 'sort' in params:
|
||||
query_params.append(('sort', params['sort'])) # noqa: E501
|
||||
if 'state' in params:
|
||||
query_params.append(('state', params['state'])) # noqa: E501
|
||||
if 'full' in params:
|
||||
query_params.append(('full', params['full'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/experiments_templates', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[EntityTemplate]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,399 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ExportsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_export(self, id, **kwargs): # noqa: E501
|
||||
"""Remove an export request and its associated file # noqa: E501
|
||||
|
||||
This method will remove the file from the server temporary storage and clear the export request. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_export(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the export request (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_export_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_export_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_export_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Remove an export request and its associated file # noqa: E501
|
||||
|
||||
This method will remove the file from the server temporary storage and clear the export request. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_export_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the export request (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_export" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_export`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/exports/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_export(self, **kwargs): # noqa: E501
|
||||
"""Register an export request # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_export(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param ExportsBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_export_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_export_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_export_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Register an export request # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_export_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param ExportsBody body:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_export" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/exports', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_export(self, id, **kwargs): # noqa: E501
|
||||
"""Get export # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_export(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the export request (required)
|
||||
:return: list[Export]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_export_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_export_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_export_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Get export # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_export_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the export request (required)
|
||||
:return: list[Export]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_export" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_export`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/exports/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Export]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def readall_exports(self, **kwargs): # noqa: E501
|
||||
"""List exports # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.readall_exports(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Export]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.readall_exports_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.readall_exports_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def readall_exports_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""List exports # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.readall_exports_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Export]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method readall_exports" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/exports', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Export]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,304 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class FavoriteTagsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_favtag(self, id, **kwargs): # noqa: E501
|
||||
"""Unfavorite a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_favtag(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the tag. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_favtag_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_favtag_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_favtag_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Unfavorite a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_favtag_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the tag. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_favtag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_favtag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/favtags/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_favtags(self, **kwargs): # noqa: E501
|
||||
"""Add a tag as favorite. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_favtags(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param FavtagsBody body: Parameters for adding a favorite tag.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_favtags_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_favtags_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_favtags_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Add a tag as favorite. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_favtags_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param FavtagsBody body: Parameters for adding a favorite tag.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_favtags" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/favtags', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_favtags(self, **kwargs): # noqa: E501
|
||||
"""Read all favorite tags for the user. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_favtags(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2003
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_favtags_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_favtags_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_favtags_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all favorite tags for the user. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_favtags_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2003
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_favtags" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/favtags', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2003', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
+1296
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,500 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class IdpsSourcesApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_idps_source(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an idp source. # noqa: E501
|
||||
|
||||
The idp source gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_idps_source(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the idps source (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_idps_source_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_idps_source_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_idps_source_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an idp source. # noqa: E501
|
||||
|
||||
The idp source gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_idps_source_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the idps source (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_idps_source" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_idps_source`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/idps_sources/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_idps_source(self, id, **kwargs): # noqa: E501
|
||||
"""Patch an idp source. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_idps_source(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the idps source (required)
|
||||
:param IdpsSourcesIdBody body: Parameters for patching an idp source.
|
||||
:return: IdpSource
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_idps_source_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_idps_source_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_idps_source_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Patch an idp source. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_idps_source_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the idps source (required)
|
||||
:param IdpsSourcesIdBody body: Parameters for patching an idp source.
|
||||
:return: IdpSource
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_idps_source" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_idps_source`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/idps_sources/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='IdpSource', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_idp_source(self, **kwargs): # noqa: E501
|
||||
"""Create an idp source. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_idp_source(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param IdpsSourcesBody body: Parameters for creating an idp source.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_idp_source_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_idp_source_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_idp_source_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create an idp source. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_idp_source_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param IdpsSourcesBody body: Parameters for creating an idp source.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_idp_source" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/idps_sources', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_idps_source(self, id, **kwargs): # noqa: E501
|
||||
"""Read an IdPs source # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_idps_source(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the idps source (required)
|
||||
:return: IdpSource
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_idps_source_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_idps_source_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_idps_source_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read an IdPs source # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_idps_source_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the idps source (required)
|
||||
:return: IdpSource
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_idps_source" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_idps_source`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/idps_sources/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='IdpSource', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_idps_sources(self, **kwargs): # noqa: E501
|
||||
"""Read all IDPs sources # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_idps_sources(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[IdpSource]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_idps_sources_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_idps_sources_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_idps_sources_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all IDPs sources # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_idps_sources_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[IdpSource]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_idps_sources" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/idps_sources', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[IdpSource]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,231 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ImportApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def post_import(self, **kwargs): # noqa: E501
|
||||
"""Send a file to import # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_import(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str file:
|
||||
:param str entity_type:
|
||||
:param int category:
|
||||
:param float canread_base:
|
||||
:param float canwrite_base:
|
||||
:param int owner:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_import_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_import_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_import_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Send a file to import # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_import_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str file:
|
||||
:param str entity_type:
|
||||
:param int category:
|
||||
:param float canread_base:
|
||||
:param float canwrite_base:
|
||||
:param int owner:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['file', 'entity_type', 'category', 'canread_base', 'canwrite_base', 'owner'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_import" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
if 'file' in params:
|
||||
local_var_files['file'] = params['file'] # noqa: E501
|
||||
if 'entity_type' in params:
|
||||
form_params.append(('entity_type', params['entity_type'])) # noqa: E501
|
||||
if 'category' in params:
|
||||
form_params.append(('category', params['category'])) # noqa: E501
|
||||
if 'canread_base' in params:
|
||||
form_params.append(('canread_base', params['canread_base'])) # noqa: E501
|
||||
if 'canwrite_base' in params:
|
||||
form_params.append(('canwrite_base', params['canwrite_base'])) # noqa: E501
|
||||
if 'owner' in params:
|
||||
form_params.append(('owner', params['owner'])) # noqa: E501
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['multipart/form-data']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/import', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_import(self, **kwargs): # noqa: E501
|
||||
"""Get information about this 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.read_import(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2002
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_import_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_import_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_import_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get information about this 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.read_import_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2002
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_import" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/import', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2002', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,128 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class InfoApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def get_info(self, **kwargs): # noqa: E501
|
||||
"""Get information about the instance. # noqa: E501
|
||||
|
||||
Get information about the instance. # 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_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param bool hist: Get usage information about the instance. If `hist` is present, returns cumulative histogram data for experiments, items (resources), and users.
|
||||
:param int columns: Number of columns (buckets) to display in histogram outputs.
|
||||
:return: InlineResponse2001
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_info_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_info_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_info_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get information about the instance. # noqa: E501
|
||||
|
||||
Get information about the instance. # 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_info_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param bool hist: Get usage information about the instance. If `hist` is present, returns cumulative histogram data for experiments, items (resources), and users.
|
||||
:param int columns: Number of columns (buckets) to display in histogram outputs.
|
||||
:return: InlineResponse2001
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['hist', 'columns'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_info" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'hist' in params:
|
||||
query_params.append(('hist', params['hist'])) # noqa: E501
|
||||
if 'columns' in params:
|
||||
query_params.append(('columns', params['columns'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/info', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2001', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,130 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class InstanceApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def post_instance(self, body, **kwargs): # noqa: E501
|
||||
"""Run an instance level action. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_instance(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param InstanceBody body: Parameters for the instance action. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_instance_with_http_info(body, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_instance_with_http_info(body, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_instance_with_http_info(self, body, **kwargs): # noqa: E501
|
||||
"""Run an instance level action. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_instance_with_http_info(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param InstanceBody body: Parameters for the instance action. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_instance" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `post_instance`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/instance', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,686 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ItemsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_item(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an item. # noqa: E501
|
||||
|
||||
The item gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_item(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the item (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_item_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_item_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_item_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete an item. # noqa: E501
|
||||
|
||||
The item gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_item_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the item (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_item" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_item`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_item(self, id, **kwargs): # noqa: E501
|
||||
"""Read an item # 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_item(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the item (required)
|
||||
:param str format: Get the entity in a different format like csv, pdf, eln or zip. \"pdfa\" means archive pdf (PDF/A), same with \"zipa\".
|
||||
:param bool json: Include a full JSON export in the ZIP archive. Only applicable if format is zip(a).
|
||||
:param bool with_title: Include the title in the QR code. Only applicable if format is qrpng.
|
||||
:param int size: Specify the size of the QR code in pixels. Only applicable if format is qrpng.
|
||||
:param bool changelog: Toggles if the changelog should be included in PDF exports (pdf, pdfa, zip, zipa). Changelog is by default included if the export provides PDF/A, otherwise not.
|
||||
:return: Entity
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_item_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_item_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_item_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read an item # 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_item_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the item (required)
|
||||
:param str format: Get the entity in a different format like csv, pdf, eln or zip. \"pdfa\" means archive pdf (PDF/A), same with \"zipa\".
|
||||
:param bool json: Include a full JSON export in the ZIP archive. Only applicable if format is zip(a).
|
||||
:param bool with_title: Include the title in the QR code. Only applicable if format is qrpng.
|
||||
:param int size: Specify the size of the QR code in pixels. Only applicable if format is qrpng.
|
||||
:param bool changelog: Toggles if the changelog should be included in PDF exports (pdf, pdfa, zip, zipa). Changelog is by default included if the export provides PDF/A, otherwise not.
|
||||
:return: Entity
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'format', 'json', 'with_title', 'size', 'changelog'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_item" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `get_item`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'format' in params:
|
||||
query_params.append(('format', params['format'])) # noqa: E501
|
||||
if 'json' in params:
|
||||
query_params.append(('json', params['json'])) # noqa: E501
|
||||
if 'with_title' in params:
|
||||
query_params.append(('withTitle', params['with_title'])) # noqa: E501
|
||||
if 'size' in params:
|
||||
query_params.append(('size', params['size'])) # noqa: E501
|
||||
if 'changelog' in params:
|
||||
query_params.append(('changelog', params['changelog'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Entity', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_item(self, body, id, **kwargs): # noqa: E501
|
||||
"""Modify an item # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_item(body, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param object body: Parameters for patching an item (required)
|
||||
:param int id: ID of the item (required)
|
||||
:return: Item
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_item_with_http_info(body, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_item_with_http_info(body, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_item_with_http_info(self, body, id, **kwargs): # noqa: E501
|
||||
"""Modify an item # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_item_with_http_info(body, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param object body: Parameters for patching an item (required)
|
||||
:param int id: ID of the item (required)
|
||||
:return: Item
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_item" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `patch_item`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_item`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Item', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_item(self, **kwargs): # noqa: E501
|
||||
"""Create an item # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_item(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityEditable body: Parameters for creating an item
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_item_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_item_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_item_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create an item # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_item_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityEditable body: Parameters for creating an item
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_item" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_item_by_id(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate an item with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_item_by_id(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the item to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating an item
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_item_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_item_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_item_by_id_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate an item with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_item_by_id_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the item to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating an item
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_item_by_id" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_item_by_id`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items/{id}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_items(self, **kwargs): # noqa: E501
|
||||
"""Read all items that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_items(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[Item]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_items_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_items_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_items_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all items that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_items_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[Item]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state', 'full'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_items" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'q' in params:
|
||||
query_params.append(('q', params['q'])) # noqa: E501
|
||||
if 'extended' in params:
|
||||
query_params.append(('extended', params['extended'])) # noqa: E501
|
||||
if 'related' in params:
|
||||
query_params.append(('related', params['related'])) # noqa: E501
|
||||
if 'related_origin' in params:
|
||||
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
||||
if 'category' in params:
|
||||
query_params.append(('category', params['category'])) # noqa: E501
|
||||
if 'status' in params:
|
||||
query_params.append(('status', params['status'])) # noqa: E501
|
||||
if 'tags' in params:
|
||||
query_params.append(('tags[]', params['tags'])) # noqa: E501
|
||||
collection_formats['tags[]'] = 'multi' # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
if 'offset' in params:
|
||||
query_params.append(('offset', params['offset'])) # noqa: E501
|
||||
if 'owner' in params:
|
||||
query_params.append(('owner', params['owner'])) # noqa: E501
|
||||
if 'scope' in params:
|
||||
query_params.append(('scope', params['scope'])) # noqa: E501
|
||||
if 'order' in params:
|
||||
query_params.append(('order', params['order'])) # noqa: E501
|
||||
if 'sort' in params:
|
||||
query_params.append(('sort', params['sort'])) # noqa: E501
|
||||
if 'state' in params:
|
||||
query_params.append(('state', params['state'])) # noqa: E501
|
||||
if 'full' in params:
|
||||
query_params.append(('full', params['full'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Item]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
+662
@@ -0,0 +1,662 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ItemsTypesResourcesTemplatesApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_items_type(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a resource template. # noqa: E501
|
||||
|
||||
The resource template gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_items_type(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the resource template (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_items_type_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_items_type_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_items_type_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a resource template. # noqa: E501
|
||||
|
||||
The resource template gets soft-deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_items_type_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the resource template (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_items_type" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_items_type`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items_types/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def get_items_type(self, id, **kwargs): # noqa: E501
|
||||
"""Read a resource template # 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_items_type(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the resource template (required)
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_items_type_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_items_type_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_items_type_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read a resource template # 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_items_type_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the resource template (required)
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_items_type" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `get_items_type`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items_types/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='EntityTemplate', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_items_type(self, id, **kwargs): # noqa: E501
|
||||
"""Modify a resource template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_items_type(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the resource template (required)
|
||||
:param ItemsTypesIdBody body: Parameters for modifying a resource template
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_items_type_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_items_type_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_items_type_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Modify a resource template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_items_type_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the resource template (required)
|
||||
:param ItemsTypesIdBody body: Parameters for modifying a resource template
|
||||
:return: EntityTemplate
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_items_type" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_items_type`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items_types/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='EntityTemplate', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_items_types(self, **kwargs): # noqa: E501
|
||||
"""Create a resource template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_items_types(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityTemplateEditable body: Parameters for creating a resource template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_items_types_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_items_types_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_items_types_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create a resource template # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_items_types_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param EntityTemplateEditable body: Parameters for creating a resource template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_items_types" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items_types', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_items_types_by_id(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate a resource template with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_items_types_by_id(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the resource template to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating a resource template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_items_types_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_items_types_by_id_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_items_types_by_id_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Duplicate a resource template with its ID # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_items_types_by_id_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: The unique identifier of the resource template to duplicate. (required)
|
||||
:param EntityDuplicate body: Parameters for duplicating a resource template
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_items_types_by_id" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_items_types_by_id`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items_types/{id}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_items_types(self, **kwargs): # noqa: E501
|
||||
"""Read all resources templates that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_items_types(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[EntityTemplate]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_items_types_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_items_types_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_items_types_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all resources templates that are accessible # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_items_types_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str q: Search for a term in title, body or elabid.
|
||||
:param str extended: Extended search (advanced query).
|
||||
:param int related: Look only for entries linked to this entry id.
|
||||
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
||||
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
||||
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
||||
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
||||
:param int limit: Limit the number of results.
|
||||
:param int offset: Skip a number of results. Use with limit to work the pagination.
|
||||
:param str owner: Filter results by author (user id)
|
||||
:param int scope: Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
|
||||
:param str order: Change the ordering of the results.
|
||||
:param str sort: Change the sorting of results: ascending or descending.
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:param int full: Return all columns of each entry when set to 1.
|
||||
:return: list[EntityTemplate]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state', 'full'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_items_types" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'q' in params:
|
||||
query_params.append(('q', params['q'])) # noqa: E501
|
||||
if 'extended' in params:
|
||||
query_params.append(('extended', params['extended'])) # noqa: E501
|
||||
if 'related' in params:
|
||||
query_params.append(('related', params['related'])) # noqa: E501
|
||||
if 'related_origin' in params:
|
||||
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
||||
if 'category' in params:
|
||||
query_params.append(('category', params['category'])) # noqa: E501
|
||||
if 'status' in params:
|
||||
query_params.append(('status', params['status'])) # noqa: E501
|
||||
if 'tags' in params:
|
||||
query_params.append(('tags[]', params['tags'])) # noqa: E501
|
||||
collection_formats['tags[]'] = 'multi' # noqa: E501
|
||||
if 'limit' in params:
|
||||
query_params.append(('limit', params['limit'])) # noqa: E501
|
||||
if 'offset' in params:
|
||||
query_params.append(('offset', params['offset'])) # noqa: E501
|
||||
if 'owner' in params:
|
||||
query_params.append(('owner', params['owner'])) # noqa: E501
|
||||
if 'scope' in params:
|
||||
query_params.append(('scope', params['scope'])) # noqa: E501
|
||||
if 'order' in params:
|
||||
query_params.append(('order', params['order'])) # noqa: E501
|
||||
if 'sort' in params:
|
||||
query_params.append(('sort', params['sort'])) # noqa: E501
|
||||
if 'state' in params:
|
||||
query_params.append(('state', params['state'])) # noqa: E501
|
||||
if 'full' in params:
|
||||
query_params.append(('full', params['full'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/items_types', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[EntityTemplate]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,362 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class LinksToCompoundsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_entity_compounds_link(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a compound link. # noqa: E501
|
||||
|
||||
The link gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entity_compounds_link(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the compound linked (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_entity_compounds_link_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_entity_compounds_link_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_entity_compounds_link_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a compound link. # noqa: E501
|
||||
|
||||
The link gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entity_compounds_link_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the compound linked (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_entity_compounds_link" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_entity_compounds_link`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_entity_compounds_link`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_entity_compounds_link`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/compounds_links/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_entity_compounds_links(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Link an entity to a compound. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_compounds_links(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the compound linked (required)
|
||||
:param CompoundsLinksSubidBody body: Parameters for creating a link.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_entity_compounds_links_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_entity_compounds_links_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_entity_compounds_links_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Link an entity to a compound. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_compounds_links_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the compound linked (required)
|
||||
:param CompoundsLinksSubidBody body: Parameters for creating a link.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_entity_compounds_links" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_entity_compounds_links`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_entity_compounds_links`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `post_entity_compounds_links`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/compounds_links/{subid}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_compounds_links(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all compounds links of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_compounds_links(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Link]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_compounds_links_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_compounds_links_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_compounds_links_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all compounds links of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_compounds_links_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Link]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_compounds_links" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_compounds_links`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_compounds_links`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/compounds_links', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Link]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,362 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class LinksToExperimentsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_entity_experiments_link(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an experiment link. # noqa: E501
|
||||
|
||||
The link gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entity_experiments_link(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the experiment linked (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_entity_experiments_link_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_entity_experiments_link_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_entity_experiments_link_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an experiment link. # noqa: E501
|
||||
|
||||
The link gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entity_experiments_link_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the experiment linked (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_entity_experiments_link" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_entity_experiments_link`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_entity_experiments_link`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_entity_experiments_link`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/experiments_links/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_entity_experiments_links(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Create or import a link. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_experiments_links(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the experiment linked (required)
|
||||
:param ExperimentsLinksSubidBody body: Parameters for creating or importing a link.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_entity_experiments_links_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_entity_experiments_links_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_entity_experiments_links_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Create or import a link. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_experiments_links_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the experiment linked (required)
|
||||
:param ExperimentsLinksSubidBody body: Parameters for creating or importing a link.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_entity_experiments_links" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_entity_experiments_links`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_entity_experiments_links`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `post_entity_experiments_links`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/experiments_links/{subid}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_experiments_links(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all experiments links of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_experiments_links(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Link]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_experiments_links_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_experiments_links_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_experiments_links_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all experiments links of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_experiments_links_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Link]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_experiments_links" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_experiments_links`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_experiments_links`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/experiments_links', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Link]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,362 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class LinksToItemsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_entitiy_items_link(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an item link. # noqa: E501
|
||||
|
||||
The link gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entitiy_items_link(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the item (link) (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_entitiy_items_link_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_entitiy_items_link_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_entitiy_items_link_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an item link. # noqa: E501
|
||||
|
||||
The link gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_entitiy_items_link_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the item (link) (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_entitiy_items_link" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_entitiy_items_link`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_entitiy_items_link`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_entitiy_items_link`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/items_links/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_entity_items_links(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Create or import a link. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_items_links(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the item (link) (required)
|
||||
:param ItemsLinksSubidBody body: Parameters for creating or importing a link.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_entity_items_links_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_entity_items_links_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_entity_items_links_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Create or import a link. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_entity_items_links_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the item (link) (required)
|
||||
:param ItemsLinksSubidBody body: Parameters for creating or importing a link.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_entity_items_links" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_entity_items_links`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_entity_items_links`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `post_entity_items_links`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/items_links/{subid}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_items_links(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all items links of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_items_links(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Link]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_items_links_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_items_links_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_items_links_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all items links of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_items_links_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Link]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_items_links" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_items_links`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_items_links`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/items_links', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Link]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,431 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class NotificationsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_notifications(self, id, **kwargs): # noqa: E501
|
||||
"""Delete all notifications of the user. # noqa: E501
|
||||
|
||||
All notifications for the user are deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_notifications(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id3 id: ID of the user or `me`. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_notifications_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_notifications_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_notifications_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete all notifications of the user. # noqa: E501
|
||||
|
||||
All notifications for the user are deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_notifications_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id3 id: ID of the user or `me`. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_notifications" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_notifications`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}/notifications', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_notification(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Update the acknowledgment status of a notification. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_notification(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id4 id: ID of the user or `me`. (required)
|
||||
:param int subid: ID of the notification. (required)
|
||||
:param NotificationsSubidBody body: Defines whether the notification is acknowledged.
|
||||
:return: Notification
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_notification_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_notification_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_notification_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Update the acknowledgment status of a notification. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_notification_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id4 id: ID of the user or `me`. (required)
|
||||
:param int subid: ID of the notification. (required)
|
||||
:param NotificationsSubidBody body: Defines whether the notification is acknowledged.
|
||||
:return: Notification
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_notification" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_notification`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_notification`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}/notifications/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Notification', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_notification(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a notification. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_notification(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id4 id: ID of the user or `me`. (required)
|
||||
:param int subid: ID of the notification. (required)
|
||||
:return: Notification
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_notification_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_notification_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_notification_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a notification. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_notification_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id4 id: ID of the user or `me`. (required)
|
||||
:param int subid: ID of the notification. (required)
|
||||
:return: Notification
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_notification" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_notification`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_notification`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}/notifications/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Notification', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_notifications(self, id, **kwargs): # noqa: E501
|
||||
"""Read notifications of a user. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_notifications(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id3 id: ID of the user or `me`. (required)
|
||||
:return: InlineResponse2007
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_notifications_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_notifications_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_notifications_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read notifications of a user. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_notifications_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id3 id: ID of the user or `me`. (required)
|
||||
:return: InlineResponse2007
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_notifications" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_notifications`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}/notifications', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2007', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,136 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ReportsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def get_reports(self, **kwargs): # noqa: E501
|
||||
"""Get usage reports # noqa: E501
|
||||
|
||||
Get usage reports at the instance or team level. # 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_reports(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str format: Select the output format
|
||||
:param str scope: Select the scope. Instance is for sysadmins only. Team will generate report for the current team. If scope is `compounds_history`, you can also provide `start` and `end` (format `YYYY-MM-DD`).
|
||||
:param date start: Start date (YYYY-MM-DD). Only used when scope is `compounds_history`.
|
||||
:param date end: End date (YYYY-MM-DD). Only used when scope is `compounds_history`.
|
||||
:return: InlineResponse2004
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.get_reports_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.get_reports_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def get_reports_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Get usage reports # noqa: E501
|
||||
|
||||
Get usage reports at the instance or team level. # 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_reports_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str format: Select the output format
|
||||
:param str scope: Select the scope. Instance is for sysadmins only. Team will generate report for the current team. If scope is `compounds_history`, you can also provide `start` and `end` (format `YYYY-MM-DD`).
|
||||
:param date start: Start date (YYYY-MM-DD). Only used when scope is `compounds_history`.
|
||||
:param date end: End date (YYYY-MM-DD). Only used when scope is `compounds_history`.
|
||||
:return: InlineResponse2004
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['format', 'scope', 'start', 'end'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method get_reports" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'format' in params:
|
||||
query_params.append(('format', params['format'])) # noqa: E501
|
||||
if 'scope' in params:
|
||||
query_params.append(('scope', params['scope'])) # noqa: E501
|
||||
if 'start' in params:
|
||||
query_params.append(('start', params['start'])) # noqa: E501
|
||||
if 'end' in params:
|
||||
query_params.append(('end', params['end'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json', 'text/csv']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/reports', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2004', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,538 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ResourcesCategoriesApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_rescat(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_rescat(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_rescat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_rescat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_rescat_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_rescat_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_rescat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_rescat`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_rescat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/resources_categories/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_rescat(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_rescat(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:param Statuslike body: Parameters for modifying a resource category.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_rescat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_rescat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_rescat_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_rescat_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:param Statuslike body: Parameters for modifying a resource category.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_rescat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_rescat`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_rescat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/resources_categories/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_team_one_rescat(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new category for resources. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_rescat(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdResourcesCategoriesBody body: Parameters for creating a resource category.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_team_one_rescat_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_team_one_rescat_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_team_one_rescat_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new category for resources. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_rescat_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdResourcesCategoriesBody body: Parameters for creating a resource category.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_team_one_rescat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_team_one_rescat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/resources_categories', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_one_rescat(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_rescat(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_one_rescat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_one_rescat_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_one_rescat_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a category. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_rescat_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the category. (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_one_rescat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_one_rescat`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_team_one_rescat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/resources_categories/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_resources_categories(self, id, **kwargs): # noqa: E501
|
||||
"""Read resources categories of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_resources_categories(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_resources_categories_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_resources_categories_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_resources_categories_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read resources categories of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_resources_categories_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_resources_categories" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_resources_categories`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/resources_categories', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Statuslike]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,538 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class ResourcesStatusApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_resstatus(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_resstatus(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_resstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_resstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_resstatus_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_resstatus_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_resstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_resstatus`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_resstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/items_status/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_resstatus(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_resstatus(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:param Statuslike body: Parameters for modifying a status.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_resstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_resstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_resstatus_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_resstatus_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:param Statuslike body: Parameters for modifying a status.
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_resstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_resstatus`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_resstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/items_status/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_team_one_resstat(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new status for resources. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_resstat(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdItemsStatusBody body: Parameters for creating a resources status.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_team_one_resstat_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_team_one_resstat_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_team_one_resstat_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new status for resources. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_one_resstat_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdItemsStatusBody body: Parameters for creating a resources status.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_team_one_resstat" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_team_one_resstat`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/items_status', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_items_status(self, id, **kwargs): # noqa: E501
|
||||
"""Read resources status of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_items_status(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_items_status_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_items_status_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_items_status_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read resources status of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_items_status_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Statuslike]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_items_status" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_items_status`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/items_status', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Statuslike]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_one_resstatus(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_resstatus(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_one_resstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_one_resstatus_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_one_resstatus_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a status. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_one_resstatus_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the status (required)
|
||||
:return: Statuslike
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_one_resstatus" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_one_resstatus`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_team_one_resstatus`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/items_status/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Statuslike', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,360 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class RevisionsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def patch_entity_revision(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Restore a revision. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_entity_revision(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the revision (required)
|
||||
:param RevisionsSubidBody body: Parameters for restoring an entity revision.
|
||||
:return: Revision
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_entity_revision_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_entity_revision_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_entity_revision_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Restore a revision. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_entity_revision_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the revision (required)
|
||||
:param RevisionsSubidBody body: Parameters for restoring an entity revision.
|
||||
:return: Revision
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_entity_revision" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `patch_entity_revision`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_entity_revision`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_entity_revision`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/revisions/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Revision', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_revision(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a revision of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_revision(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the revision (required)
|
||||
:return: Revision
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_revision_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_revision_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_revision_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a revision of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_revision_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the revision (required)
|
||||
:return: Revision
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_revision" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_revision`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_revision`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_entity_revision`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/revisions/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Revision', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_entity_revisions(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all revisions of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_revisions(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[InlineResponse2008]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_entity_revisions_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_entity_revisions_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_entity_revisions_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all revisions of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_entity_revisions_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[InlineResponse2008]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_entity_revisions" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_entity_revisions`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_entity_revisions`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/revisions', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[InlineResponse2008]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,471 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class StepsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_step(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a step. # noqa: E501
|
||||
|
||||
The step gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_step(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the step (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_step_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_step_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_step_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a step. # noqa: E501
|
||||
|
||||
The step gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_step_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the step (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_step" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_step`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_step`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_step`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/steps/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_step(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Actions on a step. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_step(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the step (required)
|
||||
:param StepsSubidBody body: Parameters for modifying a step
|
||||
:return: Step
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_step_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_step_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_step_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Actions on a step. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_step_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the step (required)
|
||||
:param StepsSubidBody body: Parameters for modifying a step
|
||||
:return: Step
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_step" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `patch_step`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_step`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_step`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/steps/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Step', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_step(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create a step. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_step(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param IdStepsBody body: Parameters for creating a step.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_step_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_step_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_step_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create a step. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_step_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param IdStepsBody body: Parameters for creating a step.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_step" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_step`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_step`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/steps', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_steps(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all steps of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_steps(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Step]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_steps_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_steps_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_steps_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all steps of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_steps_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Step]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_steps" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_steps`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_steps`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/steps', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Step]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,516 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class StorageUnitsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_storage_unit(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a storage unit. # noqa: E501
|
||||
|
||||
Delete a storage unit. Requires permission to manage inventory locations. Cannot delete a storage unit that has children or containers. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_storage_unit(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the storage unit. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_storage_unit_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_storage_unit_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_storage_unit_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a storage unit. # noqa: E501
|
||||
|
||||
Delete a storage unit. Requires permission to manage inventory locations. Cannot delete a storage unit that has children or containers. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_storage_unit_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the storage unit. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_storage_unit" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_storage_unit`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/storage_units/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_storage_unit(self, id, **kwargs): # noqa: E501
|
||||
"""Modify a storage unit. # noqa: E501
|
||||
|
||||
Update the name and/or the parent of a storage unit. Setting `parent_id` reparents the unit (and everything under it) in place. Pass `parent_id: null` to move the unit to the root. Requires permission to manage inventory locations. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_storage_unit(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the storage unit. (required)
|
||||
:param StorageUnitsIdBody body: Parameters for modifying a storage unit.
|
||||
:return: StorageUnit
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_storage_unit_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_storage_unit_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_storage_unit_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Modify a storage unit. # noqa: E501
|
||||
|
||||
Update the name and/or the parent of a storage unit. Setting `parent_id` reparents the unit (and everything under it) in place. Pass `parent_id: null` to move the unit to the root. Requires permission to manage inventory locations. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_storage_unit_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the storage unit. (required)
|
||||
:param StorageUnitsIdBody body: Parameters for modifying a storage unit.
|
||||
:return: StorageUnit
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_storage_unit" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_storage_unit`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/storage_units/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='StorageUnit', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_storage_unit(self, body, **kwargs): # noqa: E501
|
||||
"""Create a new storage unit. # noqa: E501
|
||||
|
||||
Create a new storage unit. Requires permission to manage inventory locations. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_storage_unit(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param StorageUnitsBody body: Parameters for creating a storage unit. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_storage_unit_with_http_info(body, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_storage_unit_with_http_info(body, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_storage_unit_with_http_info(self, body, **kwargs): # noqa: E501
|
||||
"""Create a new storage unit. # noqa: E501
|
||||
|
||||
Create a new storage unit. Requires permission to manage inventory locations. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_storage_unit_with_http_info(body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param StorageUnitsBody body: Parameters for creating a storage unit. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_storage_unit" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'body' is set
|
||||
if ('body' not in params or
|
||||
params['body'] is None):
|
||||
raise ValueError("Missing the required parameter `body` when calling `post_storage_unit`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/storage_units', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_storage_unit(self, id, **kwargs): # noqa: E501
|
||||
"""Read a storage unit. # noqa: E501
|
||||
|
||||
Get details of a specific storage unit including its full hierarchical path. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_storage_unit(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the storage unit. (required)
|
||||
:return: StorageUnit
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_storage_unit_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_storage_unit_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_storage_unit_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read a storage unit. # noqa: E501
|
||||
|
||||
Get details of a specific storage unit including its full hierarchical path. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_storage_unit_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the storage unit. (required)
|
||||
:return: StorageUnit
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_storage_unit" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_storage_unit`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/storage_units/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='StorageUnit', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_storage_units(self, **kwargs): # noqa: E501
|
||||
"""Read all containers, or the storage unit hierarchy when `?hierarchy=true`. # noqa: E501
|
||||
|
||||
Without parameters, returns the full list of containers (assignments of experiments or resources to storage locations) that you have access to. With `?hierarchy=true`, returns a flat list of all storage units (freezers, boxes, positions, etc.) with their hierarchy metadata (`id`, `name`, `parent_id`, `full_path`, `level_depth`, `children_count`). This allows clients to discover, traverse, or display the storage unit tree. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_storage_units(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param bool hierarchy: When true, returns a flat list of all storage units in the hierarchy (id, name, parent_id, full_path, level_depth, children_count) instead of the default container assignment list.
|
||||
:return: InlineResponse200
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_storage_units_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_storage_units_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_storage_units_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all containers, or the storage unit hierarchy when `?hierarchy=true`. # noqa: E501
|
||||
|
||||
Without parameters, returns the full list of containers (assignments of experiments or resources to storage locations) that you have access to. With `?hierarchy=true`, returns a flat list of all storage units (freezers, boxes, positions, etc.) with their hierarchy metadata (`id`, `name`, `parent_id`, `full_path`, `level_depth`, `children_count`). This allows clients to discover, traverse, or display the storage unit tree. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_storage_units_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param bool hierarchy: When true, returns a flat list of all storage units in the hierarchy (id, name, parent_id, full_path, level_depth, children_count) instead of the default container assignment list.
|
||||
:return: InlineResponse200
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['hierarchy'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_storage_units" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'hierarchy' in params:
|
||||
query_params.append(('hierarchy', params['hierarchy'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/storage_units', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse200', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,572 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class TagsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_tag(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Delete all tags. # noqa: E501
|
||||
|
||||
All the tags from that entity get removed. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_tag(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_tag_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_tag_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_tag_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Delete all tags. # noqa: E501
|
||||
|
||||
All the tags from that entity get removed. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_tag_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_tag`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/tags', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_tag(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Actions on a tag (like removing it from the entity). # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_tag(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the tag (required)
|
||||
:param TagsSubidBody1 body: Parameters for modifying a tag
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_tag_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_tag_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_tag_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Actions on a tag (like removing it from the entity). # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_tag_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the tag (required)
|
||||
:param TagsSubidBody1 body: Parameters for modifying a tag
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `patch_tag`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_tag`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/tags/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Tag', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_tag(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_tag(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param IdTagsBody1 body: Parameters for creating a tag.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_tag_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_tag_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_tag_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_tag_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param IdTagsBody1 body: Parameters for creating a tag.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_tag`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/tags', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_tag(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_tag(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the tag (required)
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_tag_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_tag_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_tag_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_tag_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the tag (required)
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_tag`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_tag`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/tags/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Tag', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_tags(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all tags of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_tags(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Tag]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_tags_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_tags_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_tags_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read all tags of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_tags_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:return: list[Tag]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_tags" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_tags`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_tags`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/tags', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Tag]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,538 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class TeamTagsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_team_tag(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_team_tag(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the tag. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_team_tag_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_team_tag_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_team_tag_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_team_tag_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the tag. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_team_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_team_tag`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_team_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/tags/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_team_tag(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Actions on a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_team_tag(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the tag. (required)
|
||||
:param TagsSubidBody body: Parameters for modifying a tag.
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_team_tag_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_team_tag_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_team_tag_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Actions on a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_team_tag_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the tag. (required)
|
||||
:param TagsSubidBody body: Parameters for modifying a tag.
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_team_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_team_tag`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_team_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/tags/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Tag', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_team_tag(self, id, **kwargs): # noqa: E501
|
||||
"""Create a tag in the team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_tag(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdTagsBody body: Parameters for adding a tag in the team.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_team_tag_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_team_tag_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_team_tag_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create a tag in the team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_team_tag_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdTagsBody body: Parameters for adding a tag in the team.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_team_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_team_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/tags', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_tag(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_tag(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the tag. (required)
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_tag_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_tag_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_tag_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a tag. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_tag_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the tag. (required)
|
||||
:return: Tag
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_tag" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_tag`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_team_tag`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/tags/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Tag', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_tags(self, id, **kwargs): # noqa: E501
|
||||
"""Read all tags for the team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_tags(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Tag]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_tags_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_tags_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_tags_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read all tags for the team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_tags_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: list[Tag]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_tags" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_tags`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/tags', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Tag]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,538 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class TeamgroupsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_teamgroup(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_teamgroup(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the teamgroup. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_teamgroup_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_teamgroup_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_teamgroup_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete a teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_teamgroup_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the teamgroup. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_teamgroup" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_teamgroup`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_teamgroup`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/teamgroups/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_teamgroup(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_teamgroup(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the teamgroup. (required)
|
||||
:param TeamgroupsSubidBody body: Parameters for modifying a teamgroup.
|
||||
:return: Teamgroup
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_teamgroup_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_teamgroup_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_teamgroup_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify a teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_teamgroup_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the teamgroup. (required)
|
||||
:param TeamgroupsSubidBody body: Parameters for modifying a teamgroup.
|
||||
:return: Teamgroup
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_teamgroup" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_teamgroup`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_teamgroup`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/teamgroups/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Teamgroup', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_teamgroups(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_teamgroups(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdTeamgroupsBody body: Parameters for creating a teamgroup.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_teamgroups_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_teamgroups_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_teamgroups_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Create a new teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_teamgroups_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param IdTeamgroupsBody body: Parameters for creating a teamgroup.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_teamgroups" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_teamgroups`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/teamgroups', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team_teamgroups(self, id, **kwargs): # noqa: E501
|
||||
"""Read teamgroups of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_teamgroups(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: dict(str, Teamgroup)
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_teamgroups_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_teamgroups_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_teamgroups_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read teamgroups of a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_teamgroups_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:return: dict(str, Teamgroup)
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team_teamgroups" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team_teamgroups`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/teamgroups', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='dict(str, Teamgroup)', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_teamgroup(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_teamgroup(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the teamgroup. (required)
|
||||
:return: InlineResponse2005
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_teamgroup_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_teamgroup_with_http_info(id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_teamgroup_with_http_info(self, id, subid, **kwargs): # noqa: E501
|
||||
"""Read a teamgroup. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_teamgroup_with_http_info(id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the team. (required)
|
||||
:param int subid: ID of the teamgroup. (required)
|
||||
:return: InlineResponse2005
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_teamgroup" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_teamgroup`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_teamgroup`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}/teamgroups/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2005', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,405 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class TeamsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def patch_team(self, id, **kwargs): # noqa: E501
|
||||
"""Actions on a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_team(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id id: ID of the team or `current`. (required)
|
||||
:param TeamsIdBody body: Parameters for modifying a team.
|
||||
:return: Team
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_team_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_team_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_team_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Actions on a team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_team_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id id: ID of the team or `current`. (required)
|
||||
:param TeamsIdBody body: Parameters for modifying a team.
|
||||
:return: Team
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_team" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_team`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Team', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_teams(self, **kwargs): # noqa: E501
|
||||
"""Create a new team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_teams(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param TeamsBody body: Parameters for creating a new team.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_teams_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_teams_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_teams_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create a new team. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_teams_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param TeamsBody body: Parameters for creating a new team.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_teams" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_team(self, id, **kwargs): # noqa: E501
|
||||
"""Read a team. Requires Admin permissions. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id id: ID of the team or `current`. (required)
|
||||
:return: Team
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_team_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_team_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_team_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read a team. Requires Admin permissions. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_team_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id id: ID of the team or `current`. (required)
|
||||
:return: Team
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_team" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_team`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Team', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_teams(self, **kwargs): # noqa: E501
|
||||
"""Read all teams. Requires Sysadmin permissions. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_teams(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Team]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_teams_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_teams_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_teams_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all teams. Requires Sysadmin permissions. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_teams_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Team]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_teams" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/teams', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Team]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,498 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class TodolistApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_todoitem(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a todoitem. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_todoitem(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the todoitem. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_todoitem_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_todoitem_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_todoitem_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Delete a todoitem. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_todoitem_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the todoitem. (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_todoitem" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_todoitem`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/todolist/{id}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_todoitem(self, id, **kwargs): # noqa: E501
|
||||
"""Actions on a todoitem. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_todoitem(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the todoitem. (required)
|
||||
:param TodolistIdBody body: Parameters for modifying a todoitem.
|
||||
:return: Todoitem
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_todoitem_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_todoitem_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_todoitem_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Actions on a todoitem. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_todoitem_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the todoitem. (required)
|
||||
:param TodolistIdBody body: Parameters for modifying a todoitem.
|
||||
:return: Todoitem
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_todoitem" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_todoitem`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/todolist/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Todoitem', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_todolist(self, **kwargs): # noqa: E501
|
||||
"""Create a todo item # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_todolist(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param TodolistBody body: Parameters for creating a todoitem.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_todolist_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_todolist_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_todolist_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create a todo item # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_todolist_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param TodolistBody body: Parameters for creating a todoitem.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_todolist" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/todolist', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_todoitem(self, id, **kwargs): # noqa: E501
|
||||
"""Read a todo entry. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_todoitem(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the todoitem. (required)
|
||||
:return: Todoitem
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_todoitem_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_todoitem_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_todoitem_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read a todo entry. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_todoitem_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int id: ID of the todoitem. (required)
|
||||
:return: Todoitem
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_todoitem" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_todoitem`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/todolist/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Todoitem', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_todolist(self, **kwargs): # noqa: E501
|
||||
"""Read all todoitems. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_todolist(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Todoitem]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_todolist_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_todolist_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_todolist_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all todoitems. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_todolist_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: list[Todoitem]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = [] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_todolist" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/todolist', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Todoitem]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,122 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class UnfinishedStepsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def read_unfinished_steps(self, **kwargs): # noqa: E501
|
||||
"""Read all unfinished steps. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_unfinished_steps(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str scope: Set to \"team\" to extend the list to other members.
|
||||
:return: list[UnfinishedSteps]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_unfinished_steps_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_unfinished_steps_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_unfinished_steps_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read all unfinished steps. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_unfinished_steps_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str scope: Set to \"team\" to extend the list to other members.
|
||||
:return: list[UnfinishedSteps]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['scope'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_unfinished_steps" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'scope' in params:
|
||||
query_params.append(('scope', params['scope'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/unfinished_steps', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[UnfinishedSteps]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,717 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class UploadsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def delete_upload(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an upload. # noqa: E501
|
||||
|
||||
The upload gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_upload(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.delete_upload_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.delete_upload_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def delete_upload_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Delete an upload. # noqa: E501
|
||||
|
||||
The upload gets deleted. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.delete_upload_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method delete_upload" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `delete_upload`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `delete_upload`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `delete_upload`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/uploads/{subid}', 'DELETE',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def patch_upload(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify attributes such as \"real_name\", \"comment\" or \"state\" of an upload. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_upload(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:param UploadsSubidBody1 body: Parameters for modifying an upload attributes.
|
||||
:return: Upload
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_upload_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_upload_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_upload_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Modify attributes such as \"real_name\", \"comment\" or \"state\" of an upload. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_upload_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:param UploadsSubidBody1 body: Parameters for modifying an upload attributes.
|
||||
:return: Upload
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_upload" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `patch_upload`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_upload`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `patch_upload`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/uploads/{subid}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Upload', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_upload(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create an upload. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_upload(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param str file:
|
||||
:param str comment:
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_upload_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_upload_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_upload_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Create an upload. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_upload_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param str file:
|
||||
:param str comment:
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'file', 'comment', 'state'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_upload" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_upload`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_upload`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'state' in params:
|
||||
query_params.append(('state', params['state'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
if 'file' in params:
|
||||
local_var_files['file'] = params['file'] # noqa: E501
|
||||
if 'comment' in params:
|
||||
form_params.append(('comment', params['comment'])) # noqa: E501
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['multipart/form-data']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/uploads', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_upload_replace(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Replace an existing uploaded file. The existing file will be archived and the new one will be added. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_upload_replace(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:param str file:
|
||||
:param str comment:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_upload_replace_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_upload_replace_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_upload_replace_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Replace an existing uploaded file. The existing file will be archived and the new one will be added. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_upload_replace_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:param str file:
|
||||
:param str comment:
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'file', 'comment'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_upload_replace" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `post_upload_replace`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `post_upload_replace`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `post_upload_replace`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
if 'file' in params:
|
||||
local_var_files['file'] = params['file'] # noqa: E501
|
||||
if 'comment' in params:
|
||||
form_params.append(('comment', params['comment'])) # noqa: E501
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['multipart/form-data']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/uploads/{subid}', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_upload(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read an upload. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_upload(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:param str format: To download the file itself, use `binary` format parameter. In python library, when downloading a file content, make sure to add ` _preload_content=False` into the call to `read_upload()`.
|
||||
:return: Upload
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_upload_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_upload_with_http_info(entity_type, id, subid, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_upload_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
||||
"""Read an upload. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_upload_with_http_info(entity_type, id, subid, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param int subid: ID of the upload (required)
|
||||
:param str format: To download the file itself, use `binary` format parameter. In python library, when downloading a file content, make sure to add ` _preload_content=False` into the call to `read_upload()`.
|
||||
:return: Upload
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'subid', 'format'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_upload" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_upload`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_upload`") # noqa: E501
|
||||
# verify the required parameter 'subid' is set
|
||||
if ('subid' not in params or
|
||||
params['subid'] is None):
|
||||
raise ValueError("Missing the required parameter `subid` when calling `read_upload`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
if 'subid' in params:
|
||||
path_params['subid'] = params['subid'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'format' in params:
|
||||
query_params.append(('format', params['format'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json', '*/*']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/uploads/{subid}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Upload', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_uploads(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read attached files of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_uploads(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:return: list[Upload]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_uploads_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_uploads_with_http_info(entity_type, id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_uploads_with_http_info(self, entity_type, id, **kwargs): # noqa: E501
|
||||
"""Read attached files of that entity. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_uploads_with_http_info(entity_type, id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param str entity_type: Entity type (required)
|
||||
:param int id: ID of the entity (required)
|
||||
:param str state: Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
|
||||
:return: list[Upload]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['entity_type', 'id', 'state'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_uploads" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'entity_type' is set
|
||||
if ('entity_type' not in params or
|
||||
params['entity_type'] is None):
|
||||
raise ValueError("Missing the required parameter `entity_type` when calling `read_uploads`") # noqa: E501
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_uploads`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'entity_type' in params:
|
||||
path_params['entity_type'] = params['entity_type'] # noqa: E501
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
if 'state' in params:
|
||||
query_params.append(('state', params['state'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/{entity_type}/{id}/uploads', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[Upload]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,126 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class UserUploadsApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def read_user_uploads(self, id, **kwargs): # noqa: E501
|
||||
"""Read attached files from a user # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_user_uploads(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id2 id: ID of the user or `me`. (required)
|
||||
:return: list[InlineResponse2006]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_user_uploads_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_user_uploads_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_user_uploads_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read attached files from a user # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_user_uploads_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id2 id: ID of the user or `me`. (required)
|
||||
:return: list[InlineResponse2006]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_user_uploads" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_user_uploads`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}/uploads', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[InlineResponse2006]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
@@ -0,0 +1,429 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re # noqa: F401
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
|
||||
from elabapi_python.api_client import ApiClient
|
||||
|
||||
|
||||
class UsersApi(object):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Do not edit the class manually.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
|
||||
def patch_user(self, id, **kwargs): # noqa: E501
|
||||
"""Modify a user. # noqa: E501
|
||||
|
||||
Note: it is possible to use \"me\" instead of the userid to access the user of the API key. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_user(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id1 id: ID of the user or `me`. (required)
|
||||
:param UsersIdBody body: Parameters for modifying a user.
|
||||
:return: Users
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.patch_user_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.patch_user_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def patch_user_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Modify a user. # noqa: E501
|
||||
|
||||
Note: it is possible to use \"me\" instead of the userid to access the user of the API key. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.patch_user_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id1 id: ID of the user or `me`. (required)
|
||||
:param UsersIdBody body: Parameters for modifying a user.
|
||||
:return: Users
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id', 'body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method patch_user" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `patch_user`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}', 'PATCH',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Users', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def post_user(self, **kwargs): # noqa: E501
|
||||
"""Create a new user. # noqa: E501
|
||||
|
||||
An Admin can create a user in its own team only. A sysadmin can specify the team. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_user(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param UsersBody body: Parameters for creating a user.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.post_user_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.post_user_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def post_user_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Create a new user. # noqa: E501
|
||||
|
||||
An Admin can create a user in its own team only. A sysadmin can specify the team. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.post_user_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param UsersBody body: Parameters for creating a user.
|
||||
:return: None
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['body'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method post_user" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in params:
|
||||
body_params = params['body']
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# HTTP header `Content-Type`
|
||||
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users', 'POST',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type=None, # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_user(self, id, **kwargs): # noqa: E501
|
||||
"""Read information of a user. # noqa: E501
|
||||
|
||||
Note: it is possible to use \"me\" instead of the userid to access the user of the API key. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_user(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id1 id: ID of the user or `me`. (required)
|
||||
:return: Users
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_user_with_http_info(id, **kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_user_with_http_info(id, **kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_user_with_http_info(self, id, **kwargs): # noqa: E501
|
||||
"""Read information of a user. # noqa: E501
|
||||
|
||||
Note: it is possible to use \"me\" instead of the userid to access the user of the API key. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_user_with_http_info(id, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param Id1 id: ID of the user or `me`. (required)
|
||||
:return: Users
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['id'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_user" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
# verify the required parameter 'id' is set
|
||||
if ('id' not in params or
|
||||
params['id'] is None):
|
||||
raise ValueError("Missing the required parameter `id` when calling `read_user`") # noqa: E501
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'id' in params:
|
||||
path_params['id'] = params['id'] # noqa: E501
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users/{id}', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='Users', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
|
||||
def read_users(self, **kwargs): # noqa: E501
|
||||
"""Read users from instance. # noqa: E501
|
||||
|
||||
Get a list of users with an active account on the instance. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_users(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int team: Add a filter on the team
|
||||
:param int current_team: If set to 1, use the requester's current team as filter.
|
||||
:param bool only_admins: Return only team admins.
|
||||
:param bool only_archived: Return only archived users.
|
||||
:return: list[object]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
kwargs['_return_http_data_only'] = True
|
||||
if kwargs.get('async_req'):
|
||||
return self.read_users_with_http_info(**kwargs) # noqa: E501
|
||||
else:
|
||||
(data) = self.read_users_with_http_info(**kwargs) # noqa: E501
|
||||
return data
|
||||
|
||||
def read_users_with_http_info(self, **kwargs): # noqa: E501
|
||||
"""Read users from instance. # noqa: E501
|
||||
|
||||
Get a list of users with an active account on the instance. # noqa: E501
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
>>> thread = api.read_users_with_http_info(async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param int team: Add a filter on the team
|
||||
:param int current_team: If set to 1, use the requester's current team as filter.
|
||||
:param bool only_admins: Return only team admins.
|
||||
:param bool only_archived: Return only archived users.
|
||||
:return: list[object]
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
|
||||
all_params = ['team', 'current_team', 'only_admins', 'only_archived'] # noqa: E501
|
||||
all_params.append('async_req')
|
||||
all_params.append('_return_http_data_only')
|
||||
all_params.append('_preload_content')
|
||||
all_params.append('_request_timeout')
|
||||
|
||||
params = locals()
|
||||
for key, val in six.iteritems(params['kwargs']):
|
||||
if key not in all_params:
|
||||
raise TypeError(
|
||||
"Got an unexpected keyword argument '%s'"
|
||||
" to method read_users" % key
|
||||
)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
if 'team' in params:
|
||||
query_params.append(('team', params['team'])) # noqa: E501
|
||||
if 'current_team' in params:
|
||||
query_params.append(('currentTeam', params['current_team'])) # noqa: E501
|
||||
if 'only_admins' in params:
|
||||
query_params.append(('onlyAdmins', params['only_admins'])) # noqa: E501
|
||||
if 'only_archived' in params:
|
||||
query_params.append(('onlyArchived', params['only_archived'])) # noqa: E501
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = []
|
||||
local_var_files = {}
|
||||
|
||||
body_params = None
|
||||
# HTTP header `Accept`
|
||||
header_params['Accept'] = self.api_client.select_header_accept(
|
||||
['application/json']) # noqa: E501
|
||||
|
||||
# Authentication setting
|
||||
auth_settings = ['token'] # noqa: E501
|
||||
|
||||
return self.api_client.call_api(
|
||||
'/users', 'GET',
|
||||
path_params,
|
||||
query_params,
|
||||
header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='list[object]', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
_preload_content=params.get('_preload_content', True),
|
||||
_request_timeout=params.get('_request_timeout'),
|
||||
collection_formats=collection_formats)
|
||||
+632
@@ -0,0 +1,632 @@
|
||||
# coding: utf-8
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import mimetypes
|
||||
from multiprocessing.pool import ThreadPool
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
|
||||
# python 2 and python 3 compatibility library
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
|
||||
from elabapi_python.configuration import Configuration
|
||||
import elabapi_python.models
|
||||
from elabapi_python import rest
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
"""Generic API client for Swagger client library builds.
|
||||
|
||||
Swagger generic API client. This client handles the client-
|
||||
server communication, and is invariant across implementations. Specifics of
|
||||
the methods and models for each application are generated from the Swagger
|
||||
templates.
|
||||
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
Do not edit the class manually.
|
||||
|
||||
:param configuration: .Configuration object for this client
|
||||
:param header_name: a header to pass when making calls to the API.
|
||||
:param header_value: a header value to pass when making calls to
|
||||
the API.
|
||||
:param cookie: a cookie to include in the header when making calls
|
||||
to the API
|
||||
"""
|
||||
|
||||
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
|
||||
NATIVE_TYPES_MAPPING = {
|
||||
'int': int,
|
||||
'long': int if six.PY3 else long, # noqa: F821
|
||||
'float': float,
|
||||
'str': str,
|
||||
'bool': bool,
|
||||
'date': datetime.date,
|
||||
'datetime': datetime.datetime,
|
||||
'object': object,
|
||||
}
|
||||
|
||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
||||
cookie=None):
|
||||
if configuration is None:
|
||||
configuration = Configuration()
|
||||
self.configuration = configuration
|
||||
|
||||
self.pool = ThreadPool()
|
||||
self.rest_client = rest.RESTClientObject(configuration)
|
||||
self.default_headers = {}
|
||||
if header_name is not None:
|
||||
self.default_headers[header_name] = header_value
|
||||
self.cookie = cookie
|
||||
# Set default User-Agent.
|
||||
self.user_agent = 'Swagger-Codegen/5.6.1/python'
|
||||
|
||||
def __del__(self):
|
||||
self.pool.close()
|
||||
self.pool.join()
|
||||
|
||||
@property
|
||||
def user_agent(self):
|
||||
"""User agent for this API client"""
|
||||
return self.default_headers['User-Agent']
|
||||
|
||||
@user_agent.setter
|
||||
def user_agent(self, value):
|
||||
self.default_headers['User-Agent'] = value
|
||||
|
||||
def set_default_header(self, header_name, header_value):
|
||||
self.default_headers[header_name] = header_value
|
||||
|
||||
def __call_api(
|
||||
self, resource_path, method, path_params=None,
|
||||
query_params=None, header_params=None, body=None, post_params=None,
|
||||
files=None, response_type=None, auth_settings=None,
|
||||
_return_http_data_only=None, collection_formats=None,
|
||||
_preload_content=True, _request_timeout=None):
|
||||
|
||||
config = self.configuration
|
||||
|
||||
# header parameters
|
||||
header_params = header_params or {}
|
||||
header_params.update(self.default_headers)
|
||||
if self.cookie:
|
||||
header_params['Cookie'] = self.cookie
|
||||
if header_params:
|
||||
header_params = self.sanitize_for_serialization(header_params)
|
||||
header_params = dict(self.parameters_to_tuples(header_params,
|
||||
collection_formats))
|
||||
|
||||
# path parameters
|
||||
if path_params:
|
||||
path_params = self.sanitize_for_serialization(path_params)
|
||||
path_params = self.parameters_to_tuples(path_params,
|
||||
collection_formats)
|
||||
for k, v in path_params:
|
||||
# specified safe chars, encode everything
|
||||
resource_path = resource_path.replace(
|
||||
'{%s}' % k,
|
||||
quote(str(v), safe=config.safe_chars_for_path_param)
|
||||
)
|
||||
|
||||
# query parameters
|
||||
if query_params:
|
||||
query_params = self.sanitize_for_serialization(query_params)
|
||||
query_params = self.parameters_to_tuples(query_params,
|
||||
collection_formats)
|
||||
|
||||
# post parameters
|
||||
if post_params or files:
|
||||
post_params = self.prepare_post_parameters(post_params, files)
|
||||
post_params = self.sanitize_for_serialization(post_params)
|
||||
post_params = self.parameters_to_tuples(post_params,
|
||||
collection_formats)
|
||||
|
||||
# auth setting
|
||||
self.update_params_for_auth(header_params, query_params, auth_settings)
|
||||
|
||||
# body
|
||||
if body:
|
||||
body = self.sanitize_for_serialization(body)
|
||||
|
||||
# request url
|
||||
url = self.configuration.host + resource_path
|
||||
|
||||
# perform request and return response
|
||||
response_data = self.request(
|
||||
method, url, query_params=query_params, headers=header_params,
|
||||
post_params=post_params, body=body,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout)
|
||||
|
||||
self.last_response = response_data
|
||||
|
||||
return_data = response_data
|
||||
if _preload_content:
|
||||
# deserialize response data
|
||||
if response_type:
|
||||
return_data = self.deserialize(response_data, response_type)
|
||||
else:
|
||||
return_data = None
|
||||
|
||||
if _return_http_data_only:
|
||||
return (return_data)
|
||||
else:
|
||||
return (return_data, response_data.status,
|
||||
response_data.getheaders())
|
||||
|
||||
def sanitize_for_serialization(self, obj):
|
||||
"""Builds a JSON POST object.
|
||||
|
||||
If obj is None, return None.
|
||||
If obj is str, int, long, float, bool, return directly.
|
||||
If obj is datetime.datetime, datetime.date
|
||||
convert to string in iso8601 format.
|
||||
If obj is list, sanitize each element in the list.
|
||||
If obj is dict, return the dict.
|
||||
If obj is swagger model, return the properties dict.
|
||||
|
||||
:param obj: The data to serialize.
|
||||
:return: The serialized form of data.
|
||||
"""
|
||||
if obj is None:
|
||||
return None
|
||||
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
||||
return obj
|
||||
elif isinstance(obj, list):
|
||||
return [self.sanitize_for_serialization(sub_obj)
|
||||
for sub_obj in obj]
|
||||
elif isinstance(obj, tuple):
|
||||
return tuple(self.sanitize_for_serialization(sub_obj)
|
||||
for sub_obj in obj)
|
||||
elif isinstance(obj, (datetime.datetime, datetime.date)):
|
||||
return obj.isoformat()
|
||||
|
||||
if isinstance(obj, dict):
|
||||
obj_dict = obj
|
||||
else:
|
||||
# Convert model obj to dict except
|
||||
# attributes `swagger_types`, `attribute_map`
|
||||
# and attributes which value is not None.
|
||||
# Convert attribute name to json key in
|
||||
# model definition for request.
|
||||
obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
|
||||
for attr, _ in six.iteritems(obj.swagger_types)
|
||||
if getattr(obj, attr) is not None}
|
||||
|
||||
return {key: self.sanitize_for_serialization(val)
|
||||
for key, val in six.iteritems(obj_dict)}
|
||||
|
||||
def deserialize(self, response, response_type):
|
||||
"""Deserializes response into an object.
|
||||
|
||||
:param response: RESTResponse object to be deserialized.
|
||||
:param response_type: class literal for
|
||||
deserialized object, or string of class name.
|
||||
|
||||
:return: deserialized object.
|
||||
"""
|
||||
# handle file downloading
|
||||
# save response body into a tmp file and return the instance
|
||||
if response_type == "file":
|
||||
return self.__deserialize_file(response)
|
||||
|
||||
# fetch data from response object
|
||||
try:
|
||||
data = json.loads(response.data)
|
||||
except ValueError:
|
||||
data = response.data
|
||||
|
||||
return self.__deserialize(data, response_type)
|
||||
|
||||
def __deserialize(self, data, klass):
|
||||
"""Deserializes dict, list, str into an object.
|
||||
|
||||
:param data: dict, list or str.
|
||||
:param klass: class literal, or string of class name.
|
||||
|
||||
:return: object.
|
||||
"""
|
||||
if data is None:
|
||||
return None
|
||||
|
||||
if type(klass) == str:
|
||||
if klass.startswith('list['):
|
||||
sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
|
||||
return [self.__deserialize(sub_data, sub_kls)
|
||||
for sub_data in data]
|
||||
|
||||
if klass.startswith('dict('):
|
||||
sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
|
||||
return {k: self.__deserialize(v, sub_kls)
|
||||
for k, v in six.iteritems(data)}
|
||||
|
||||
# convert str to class
|
||||
if klass in self.NATIVE_TYPES_MAPPING:
|
||||
klass = self.NATIVE_TYPES_MAPPING[klass]
|
||||
else:
|
||||
klass = getattr(elabapi_python.models, klass)
|
||||
|
||||
if klass in self.PRIMITIVE_TYPES:
|
||||
return self.__deserialize_primitive(data, klass)
|
||||
elif klass == object:
|
||||
return self.__deserialize_object(data)
|
||||
elif klass == datetime.date:
|
||||
return self.__deserialize_date(data)
|
||||
elif klass == datetime.datetime:
|
||||
return self.__deserialize_datatime(data)
|
||||
else:
|
||||
return self.__deserialize_model(data, klass)
|
||||
|
||||
def call_api(self, resource_path, method,
|
||||
path_params=None, query_params=None, header_params=None,
|
||||
body=None, post_params=None, files=None,
|
||||
response_type=None, auth_settings=None, async_req=None,
|
||||
_return_http_data_only=None, collection_formats=None,
|
||||
_preload_content=True, _request_timeout=None):
|
||||
"""Makes the HTTP request (synchronous) and returns deserialized data.
|
||||
|
||||
To make an async request, set the async_req parameter.
|
||||
|
||||
:param resource_path: Path to method endpoint.
|
||||
:param method: Method to call.
|
||||
:param path_params: Path parameters in the url.
|
||||
:param query_params: Query parameters in the url.
|
||||
:param header_params: Header parameters to be
|
||||
placed in the request header.
|
||||
:param body: Request body.
|
||||
:param post_params dict: Request post form parameters,
|
||||
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
||||
:param auth_settings list: Auth Settings names for the request.
|
||||
:param response: Response data type.
|
||||
:param files dict: key -> filename, value -> filepath,
|
||||
for `multipart/form-data`.
|
||||
:param async_req bool: execute request asynchronously
|
||||
:param _return_http_data_only: response data without head status code
|
||||
and headers
|
||||
:param collection_formats: dict of collection formats for path, query,
|
||||
header, and post parameters.
|
||||
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||
be returned without reading/decoding response
|
||||
data. Default is True.
|
||||
: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:
|
||||
If async_req parameter is True,
|
||||
the request will be called asynchronously.
|
||||
The method will return the request thread.
|
||||
If parameter async_req is False or missing,
|
||||
then the method will return the response directly.
|
||||
"""
|
||||
if not async_req:
|
||||
return self.__call_api(resource_path, method,
|
||||
path_params, query_params, header_params,
|
||||
body, post_params, files,
|
||||
response_type, auth_settings,
|
||||
_return_http_data_only, collection_formats,
|
||||
_preload_content, _request_timeout)
|
||||
else:
|
||||
thread = self.pool.apply_async(self.__call_api, (resource_path,
|
||||
method, path_params, query_params,
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type, auth_settings,
|
||||
_return_http_data_only,
|
||||
collection_formats,
|
||||
_preload_content, _request_timeout))
|
||||
return thread
|
||||
|
||||
def request(self, method, url, query_params=None, headers=None,
|
||||
post_params=None, body=None, _preload_content=True,
|
||||
_request_timeout=None):
|
||||
"""Makes the HTTP request using RESTClient."""
|
||||
if method == "GET":
|
||||
return self.rest_client.GET(url,
|
||||
query_params=query_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
headers=headers)
|
||||
elif method == "HEAD":
|
||||
return self.rest_client.HEAD(url,
|
||||
query_params=query_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
headers=headers)
|
||||
elif method == "OPTIONS":
|
||||
return self.rest_client.OPTIONS(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "POST":
|
||||
return self.rest_client.POST(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "PUT":
|
||||
return self.rest_client.PUT(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "PATCH":
|
||||
return self.rest_client.PATCH(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "DELETE":
|
||||
return self.rest_client.DELETE(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
else:
|
||||
raise ValueError(
|
||||
"http method must be `GET`, `HEAD`, `OPTIONS`,"
|
||||
" `POST`, `PATCH`, `PUT` or `DELETE`."
|
||||
)
|
||||
|
||||
def parameters_to_tuples(self, params, collection_formats):
|
||||
"""Get parameters as list of tuples, formatting collections.
|
||||
|
||||
:param params: Parameters as dict or list of two-tuples
|
||||
:param dict collection_formats: Parameter collection formats
|
||||
:return: Parameters as list of tuples, collections formatted
|
||||
"""
|
||||
new_params = []
|
||||
if collection_formats is None:
|
||||
collection_formats = {}
|
||||
for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
|
||||
if k in collection_formats:
|
||||
collection_format = collection_formats[k]
|
||||
if collection_format == 'multi':
|
||||
new_params.extend((k, value) for value in v)
|
||||
else:
|
||||
if collection_format == 'ssv':
|
||||
delimiter = ' '
|
||||
elif collection_format == 'tsv':
|
||||
delimiter = '\t'
|
||||
elif collection_format == 'pipes':
|
||||
delimiter = '|'
|
||||
else: # csv is the default
|
||||
delimiter = ','
|
||||
new_params.append(
|
||||
(k, delimiter.join(str(value) for value in v)))
|
||||
else:
|
||||
new_params.append((k, v))
|
||||
return new_params
|
||||
|
||||
def prepare_post_parameters(self, post_params=None, files=None):
|
||||
"""Builds form parameters.
|
||||
|
||||
:param post_params: Normal form parameters.
|
||||
:param files: File parameters.
|
||||
:return: Form parameters with files.
|
||||
"""
|
||||
params = []
|
||||
|
||||
if post_params:
|
||||
params = post_params
|
||||
|
||||
if files:
|
||||
for k, v in six.iteritems(files):
|
||||
if not v:
|
||||
continue
|
||||
file_names = v if type(v) is list else [v]
|
||||
for n in file_names:
|
||||
with open(n, 'rb') as f:
|
||||
filename = os.path.basename(f.name)
|
||||
filedata = f.read()
|
||||
mimetype = (mimetypes.guess_type(filename)[0] or
|
||||
'application/octet-stream')
|
||||
params.append(
|
||||
tuple([k, tuple([filename, filedata, mimetype])]))
|
||||
|
||||
return params
|
||||
|
||||
def select_header_accept(self, accepts):
|
||||
"""Returns `Accept` based on an array of accepts provided.
|
||||
|
||||
:param accepts: List of headers.
|
||||
:return: Accept (e.g. application/json).
|
||||
"""
|
||||
if not accepts:
|
||||
return
|
||||
|
||||
accepts = [x.lower() for x in accepts]
|
||||
|
||||
if 'application/json' in accepts:
|
||||
return 'application/json'
|
||||
else:
|
||||
return ', '.join(accepts)
|
||||
|
||||
def select_header_content_type(self, content_types):
|
||||
"""Returns `Content-Type` based on an array of content_types provided.
|
||||
|
||||
:param content_types: List of content-types.
|
||||
:return: Content-Type (e.g. application/json).
|
||||
"""
|
||||
if not content_types:
|
||||
return 'application/json'
|
||||
|
||||
content_types = [x.lower() for x in content_types]
|
||||
|
||||
if 'application/json' in content_types or '*/*' in content_types:
|
||||
return 'application/json'
|
||||
else:
|
||||
return content_types[0]
|
||||
|
||||
def update_params_for_auth(self, headers, querys, auth_settings):
|
||||
"""Updates header and query params based on authentication setting.
|
||||
|
||||
:param headers: Header parameters dict to be updated.
|
||||
:param querys: Query parameters tuple list to be updated.
|
||||
:param auth_settings: Authentication setting identifiers list.
|
||||
"""
|
||||
if not auth_settings:
|
||||
return
|
||||
|
||||
for auth in auth_settings:
|
||||
auth_setting = self.configuration.auth_settings().get(auth)
|
||||
if auth_setting:
|
||||
if not auth_setting['value']:
|
||||
continue
|
||||
elif auth_setting['in'] == 'header':
|
||||
headers[auth_setting['key']] = auth_setting['value']
|
||||
elif auth_setting['in'] == 'query':
|
||||
querys.append((auth_setting['key'], auth_setting['value']))
|
||||
else:
|
||||
raise ValueError(
|
||||
'Authentication token must be in `query` or `header`'
|
||||
)
|
||||
|
||||
def __deserialize_file(self, response):
|
||||
"""Deserializes body to file
|
||||
|
||||
Saves response body into a file in a temporary folder,
|
||||
using the filename from the `Content-Disposition` header if provided.
|
||||
|
||||
:param response: RESTResponse.
|
||||
:return: file path.
|
||||
"""
|
||||
fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
|
||||
os.close(fd)
|
||||
os.remove(path)
|
||||
|
||||
content_disposition = response.getheader("Content-Disposition")
|
||||
if content_disposition:
|
||||
filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
|
||||
content_disposition).group(1)
|
||||
path = os.path.join(os.path.dirname(path), filename)
|
||||
response_data = response.data
|
||||
with open(path, "wb") as f:
|
||||
if isinstance(response_data, str):
|
||||
# change str to bytes so we can write it
|
||||
response_data = response_data.encode('utf-8')
|
||||
f.write(response_data)
|
||||
else:
|
||||
f.write(response_data)
|
||||
return path
|
||||
|
||||
def __deserialize_primitive(self, data, klass):
|
||||
"""Deserializes string to primitive type.
|
||||
|
||||
:param data: str.
|
||||
:param klass: class literal.
|
||||
|
||||
:return: int, long, float, str, bool.
|
||||
"""
|
||||
try:
|
||||
return klass(data)
|
||||
except UnicodeEncodeError:
|
||||
return six.text_type(data)
|
||||
except TypeError:
|
||||
return data
|
||||
|
||||
def __deserialize_object(self, value):
|
||||
"""Return a original value.
|
||||
|
||||
:return: object.
|
||||
"""
|
||||
return value
|
||||
|
||||
def __deserialize_date(self, string):
|
||||
"""Deserializes string to date.
|
||||
|
||||
:param string: str.
|
||||
:return: date.
|
||||
"""
|
||||
try:
|
||||
from dateutil.parser import parse
|
||||
return parse(string).date()
|
||||
except ImportError:
|
||||
return string
|
||||
except ValueError:
|
||||
raise rest.ApiException(
|
||||
status=0,
|
||||
reason="Failed to parse `{0}` as date object".format(string)
|
||||
)
|
||||
|
||||
def __deserialize_datatime(self, string):
|
||||
"""Deserializes string to datetime.
|
||||
|
||||
The string should be in iso8601 datetime format.
|
||||
|
||||
:param string: str.
|
||||
:return: datetime.
|
||||
"""
|
||||
try:
|
||||
from dateutil.parser import parse
|
||||
return parse(string)
|
||||
except ImportError:
|
||||
return string
|
||||
except ValueError:
|
||||
raise rest.ApiException(
|
||||
status=0,
|
||||
reason=(
|
||||
"Failed to parse `{0}` as datetime object"
|
||||
.format(string)
|
||||
)
|
||||
)
|
||||
|
||||
def __hasattr(self, object, name):
|
||||
return name in object.__class__.__dict__
|
||||
|
||||
def __deserialize_model(self, data, klass):
|
||||
"""Deserializes list or dict to model.
|
||||
|
||||
:param data: dict, list.
|
||||
:param klass: class literal.
|
||||
:return: model object.
|
||||
"""
|
||||
|
||||
if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'):
|
||||
return data
|
||||
|
||||
kwargs = {}
|
||||
if klass.swagger_types is not None:
|
||||
for attr, attr_type in six.iteritems(klass.swagger_types):
|
||||
if (data is not None and
|
||||
klass.attribute_map[attr] in data and
|
||||
isinstance(data, (list, dict))):
|
||||
value = data[klass.attribute_map[attr]]
|
||||
kwargs[attr] = self.__deserialize(value, attr_type)
|
||||
|
||||
instance = klass(**kwargs)
|
||||
|
||||
if (isinstance(instance, dict) and
|
||||
klass.swagger_types is not None and
|
||||
isinstance(data, dict)):
|
||||
for key, value in data.items():
|
||||
if key not in klass.swagger_types:
|
||||
instance[key] = value
|
||||
if self.__hasattr(instance, 'get_real_child_model'):
|
||||
klass_name = instance.get_real_child_model(data)
|
||||
if klass_name:
|
||||
instance = self.__deserialize(data, klass_name)
|
||||
return instance
|
||||
@@ -0,0 +1,254 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import copy
|
||||
import logging
|
||||
import multiprocessing
|
||||
import sys
|
||||
import urllib3
|
||||
|
||||
import six
|
||||
from six.moves import http_client as httplib
|
||||
|
||||
|
||||
class TypeWithDefault(type):
|
||||
def __init__(cls, name, bases, dct):
|
||||
super(TypeWithDefault, cls).__init__(name, bases, dct)
|
||||
cls._default = None
|
||||
|
||||
def __call__(cls):
|
||||
if cls._default is None:
|
||||
cls._default = type.__call__(cls)
|
||||
return copy.copy(cls._default)
|
||||
|
||||
def set_default(cls, default):
|
||||
cls._default = copy.copy(default)
|
||||
|
||||
|
||||
class Configuration(six.with_metaclass(TypeWithDefault, object)):
|
||||
"""NOTE: This class is auto generated by the swagger code generator program.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Constructor"""
|
||||
# Default Base url
|
||||
self.host = "https://elab.local:3148/api/v2"
|
||||
# Temp file folder for downloading files
|
||||
self.temp_folder_path = None
|
||||
|
||||
# Authentication Settings
|
||||
# dict to store API key(s)
|
||||
self.api_key = {}
|
||||
# dict to store API prefix (e.g. Bearer)
|
||||
self.api_key_prefix = {}
|
||||
# function to refresh API key if expired
|
||||
self.refresh_api_key_hook = None
|
||||
# Username for HTTP basic authentication
|
||||
self.username = ""
|
||||
# Password for HTTP basic authentication
|
||||
self.password = ""
|
||||
# Logging Settings
|
||||
self.logger = {}
|
||||
self.logger["package_logger"] = logging.getLogger("elabapi_python")
|
||||
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
|
||||
# Log format
|
||||
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
|
||||
# Log stream handler
|
||||
self.logger_stream_handler = None
|
||||
# Log file handler
|
||||
self.logger_file_handler = None
|
||||
# Debug file location
|
||||
self.logger_file = None
|
||||
# Debug switch
|
||||
self.debug = False
|
||||
|
||||
# SSL/TLS verification
|
||||
# Set this to false to skip verifying SSL certificate when calling API
|
||||
# from https server.
|
||||
self.verify_ssl = True
|
||||
# Set this to customize the certificate file to verify the peer.
|
||||
self.ssl_ca_cert = None
|
||||
# client certificate file
|
||||
self.cert_file = None
|
||||
# client key file
|
||||
self.key_file = None
|
||||
# Set this to True/False to enable/disable SSL hostname verification.
|
||||
self.assert_hostname = None
|
||||
|
||||
# urllib3 connection pool's maximum number of connections saved
|
||||
# per pool. urllib3 uses 1 connection as default value, but this is
|
||||
# not the best value when you are making a lot of possibly parallel
|
||||
# requests to the same host, which is often the case here.
|
||||
# cpu_count * 5 is used as default value to increase performance.
|
||||
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
|
||||
|
||||
# Proxy URL
|
||||
self.proxy = None
|
||||
# Safe chars for path_param
|
||||
self.safe_chars_for_path_param = ''
|
||||
|
||||
@property
|
||||
def logger_file(self):
|
||||
"""The logger file.
|
||||
|
||||
If the logger_file is None, then add stream handler and remove file
|
||||
handler. Otherwise, add file handler and remove stream handler.
|
||||
|
||||
:param value: The logger_file path.
|
||||
:type: str
|
||||
"""
|
||||
return self.__logger_file
|
||||
|
||||
@logger_file.setter
|
||||
def logger_file(self, value):
|
||||
"""The logger file.
|
||||
|
||||
If the logger_file is None, then add stream handler and remove file
|
||||
handler. Otherwise, add file handler and remove stream handler.
|
||||
|
||||
:param value: The logger_file path.
|
||||
:type: str
|
||||
"""
|
||||
self.__logger_file = value
|
||||
if self.__logger_file:
|
||||
# If set logging file,
|
||||
# then add file handler and remove stream handler.
|
||||
self.logger_file_handler = logging.FileHandler(self.__logger_file)
|
||||
self.logger_file_handler.setFormatter(self.logger_formatter)
|
||||
for _, logger in six.iteritems(self.logger):
|
||||
logger.addHandler(self.logger_file_handler)
|
||||
if self.logger_stream_handler:
|
||||
logger.removeHandler(self.logger_stream_handler)
|
||||
else:
|
||||
# If not set logging file,
|
||||
# then add stream handler and remove file handler.
|
||||
self.logger_stream_handler = logging.StreamHandler()
|
||||
self.logger_stream_handler.setFormatter(self.logger_formatter)
|
||||
for _, logger in six.iteritems(self.logger):
|
||||
logger.addHandler(self.logger_stream_handler)
|
||||
if self.logger_file_handler:
|
||||
logger.removeHandler(self.logger_file_handler)
|
||||
|
||||
@property
|
||||
def debug(self):
|
||||
"""Debug status
|
||||
|
||||
:param value: The debug status, True or False.
|
||||
:type: bool
|
||||
"""
|
||||
return self.__debug
|
||||
|
||||
@debug.setter
|
||||
def debug(self, value):
|
||||
"""Debug status
|
||||
|
||||
:param value: The debug status, True or False.
|
||||
:type: bool
|
||||
"""
|
||||
self.__debug = value
|
||||
if self.__debug:
|
||||
# if debug status is True, turn on debug logging
|
||||
for _, logger in six.iteritems(self.logger):
|
||||
logger.setLevel(logging.DEBUG)
|
||||
# turn on httplib debug
|
||||
httplib.HTTPConnection.debuglevel = 1
|
||||
else:
|
||||
# if debug status is False, turn off debug logging,
|
||||
# setting log level to default `logging.WARNING`
|
||||
for _, logger in six.iteritems(self.logger):
|
||||
logger.setLevel(logging.WARNING)
|
||||
# turn off httplib debug
|
||||
httplib.HTTPConnection.debuglevel = 0
|
||||
|
||||
@property
|
||||
def logger_format(self):
|
||||
"""The logger format.
|
||||
|
||||
The logger_formatter will be updated when sets logger_format.
|
||||
|
||||
:param value: The format string.
|
||||
:type: str
|
||||
"""
|
||||
return self.__logger_format
|
||||
|
||||
@logger_format.setter
|
||||
def logger_format(self, value):
|
||||
"""The logger format.
|
||||
|
||||
The logger_formatter will be updated when sets logger_format.
|
||||
|
||||
:param value: The format string.
|
||||
:type: str
|
||||
"""
|
||||
self.__logger_format = value
|
||||
self.logger_formatter = logging.Formatter(self.__logger_format)
|
||||
|
||||
def get_api_key_with_prefix(self, identifier):
|
||||
"""Gets API key (with prefix if set).
|
||||
|
||||
:param identifier: The identifier of apiKey.
|
||||
:return: The token for api key authentication.
|
||||
"""
|
||||
if self.refresh_api_key_hook:
|
||||
self.refresh_api_key_hook(self)
|
||||
|
||||
key = self.api_key.get(identifier)
|
||||
if key:
|
||||
prefix = self.api_key_prefix.get(identifier)
|
||||
if prefix:
|
||||
return "%s %s" % (prefix, key)
|
||||
else:
|
||||
return key
|
||||
|
||||
def get_basic_auth_token(self):
|
||||
"""Gets HTTP basic authentication header (string).
|
||||
|
||||
:return: The token for basic HTTP authentication.
|
||||
"""
|
||||
token = ""
|
||||
if self.username or self.password:
|
||||
token = urllib3.util.make_headers(
|
||||
basic_auth=self.username + ':' + self.password
|
||||
).get('authorization')
|
||||
return token
|
||||
|
||||
def auth_settings(self):
|
||||
"""Gets Auth Settings dict for api client.
|
||||
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
return {
|
||||
'token':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'Authorization',
|
||||
'value': self.get_api_key_with_prefix('Authorization')
|
||||
},
|
||||
}
|
||||
|
||||
def to_debug_report(self):
|
||||
"""Gets the essential information for debugging.
|
||||
|
||||
:return: The report for debugging.
|
||||
"""
|
||||
return "Python SDK Debug Report:\n"\
|
||||
"OS: {env}\n"\
|
||||
"Python Version: {pyversion}\n"\
|
||||
"Version of the API: 2.0.0\n"\
|
||||
"SDK Package Version: 5.6.1".\
|
||||
format(env=sys.platform, pyversion=sys.version)
|
||||
@@ -0,0 +1,142 @@
|
||||
# coding: utf-8
|
||||
|
||||
# flake8: noqa
|
||||
"""
|
||||
eLabFTW REST API v2 Documentation
|
||||
|
||||
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
||||
|
||||
OpenAPI spec version: 2.0.0
|
||||
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import models into model package
|
||||
from elabapi_python.models.all_ofentity_editable_metadatamerge import AllOfentityEditableMetadatamerge
|
||||
from elabapi_python.models.any_ofuploads_subid_body1 import AnyOfuploadsSubidBody1
|
||||
from elabapi_python.models.apikey import Apikey
|
||||
from elabapi_python.models.apikeys_body import ApikeysBody
|
||||
from elabapi_python.models.branding_id_body import BrandingIdBody
|
||||
from elabapi_python.models.changelog import Changelog
|
||||
from elabapi_python.models.comment import Comment
|
||||
from elabapi_python.models.compound import Compound
|
||||
from elabapi_python.models.compound_create_request import CompoundCreateRequest
|
||||
from elabapi_python.models.compound_duplicate_request import CompoundDuplicateRequest
|
||||
from elabapi_python.models.compounds_body import CompoundsBody
|
||||
from elabapi_python.models.compounds_links_subid_body import CompoundsLinksSubidBody
|
||||
from elabapi_python.models.config import Config
|
||||
from elabapi_python.models.container import Container
|
||||
from elabapi_python.models.containers_subid_body import ContainersSubidBody
|
||||
from elabapi_python.models.containers_subid_body1 import ContainersSubidBody1
|
||||
from elabapi_python.models.dspace_body import DspaceBody
|
||||
from elabapi_python.models.dspace_body1 import DspaceBody1
|
||||
from elabapi_python.models.dspace_entity import DspaceEntity
|
||||
from elabapi_python.models.dspace_metadata import DspaceMetadata
|
||||
from elabapi_python.models.dspace_metadata1 import DspaceMetadata1
|
||||
from elabapi_python.models.entity import Entity
|
||||
from elabapi_python.models.entity_and_item_editable import EntityAndItemEditable
|
||||
from elabapi_python.models.entity_duplicate import EntityDuplicate
|
||||
from elabapi_python.models.entity_editable import EntityEditable
|
||||
from elabapi_python.models.entity_template import EntityTemplate
|
||||
from elabapi_python.models.entity_template_editable import EntityTemplateEditable
|
||||
from elabapi_python.models.error import Error
|
||||
from elabapi_python.models.event import Event
|
||||
from elabapi_python.models.event_id_body import EventIdBody
|
||||
from elabapi_python.models.eventid_delta import EventidDelta
|
||||
from elabapi_python.models.events_id_body import EventsIdBody
|
||||
from elabapi_python.models.exclusive_edit_mode import ExclusiveEditMode
|
||||
from elabapi_python.models.experiment import Experiment
|
||||
from elabapi_python.models.experiments_links_subid_body import ExperimentsLinksSubidBody
|
||||
from elabapi_python.models.experiments_templates_id_body import ExperimentsTemplatesIdBody
|
||||
from elabapi_python.models.export import Export
|
||||
from elabapi_python.models.exports_body import ExportsBody
|
||||
from elabapi_python.models.extra_fields_keys import ExtraFieldsKeys
|
||||
from elabapi_python.models.favtags_body import FavtagsBody
|
||||
from elabapi_python.models.id import Id
|
||||
from elabapi_python.models.id1 import Id1
|
||||
from elabapi_python.models.id2 import Id2
|
||||
from elabapi_python.models.id3 import Id3
|
||||
from elabapi_python.models.id4 import Id4
|
||||
from elabapi_python.models.id_certs_body import IdCertsBody
|
||||
from elabapi_python.models.id_comments_body import IdCommentsBody
|
||||
from elabapi_python.models.id_endpoints_body import IdEndpointsBody
|
||||
from elabapi_python.models.id_experiments_categories_body import IdExperimentsCategoriesBody
|
||||
from elabapi_python.models.id_experiments_status_body import IdExperimentsStatusBody
|
||||
from elabapi_python.models.id_items_status_body import IdItemsStatusBody
|
||||
from elabapi_python.models.id_resources_categories_body import IdResourcesCategoriesBody
|
||||
from elabapi_python.models.id_steps_body import IdStepsBody
|
||||
from elabapi_python.models.id_tags_body import IdTagsBody
|
||||
from elabapi_python.models.id_tags_body1 import IdTagsBody1
|
||||
from elabapi_python.models.id_teamgroups_body import IdTeamgroupsBody
|
||||
from elabapi_python.models.id_uploads_body import IdUploadsBody
|
||||
from elabapi_python.models.idp import Idp
|
||||
from elabapi_python.models.idp_cert import IdpCert
|
||||
from elabapi_python.models.idp_endpoint import IdpEndpoint
|
||||
from elabapi_python.models.idp_source import IdpSource
|
||||
from elabapi_python.models.idps_body import IdpsBody
|
||||
from elabapi_python.models.idps_id_body import IdpsIdBody
|
||||
from elabapi_python.models.idps_sources_body import IdpsSourcesBody
|
||||
from elabapi_python.models.idps_sources_id_body import IdpsSourcesIdBody
|
||||
from elabapi_python.models.import_body import ImportBody
|
||||
from elabapi_python.models.inline_response200 import InlineResponse200
|
||||
from elabapi_python.models.inline_response2001 import InlineResponse2001
|
||||
from elabapi_python.models.inline_response20010 import InlineResponse20010
|
||||
from elabapi_python.models.inline_response2001_experiments import InlineResponse2001Experiments
|
||||
from elabapi_python.models.inline_response2001_items import InlineResponse2001Items
|
||||
from elabapi_python.models.inline_response2001_users import InlineResponse2001Users
|
||||
from elabapi_python.models.inline_response2002 import InlineResponse2002
|
||||
from elabapi_python.models.inline_response2003 import InlineResponse2003
|
||||
from elabapi_python.models.inline_response2004 import InlineResponse2004
|
||||
from elabapi_python.models.inline_response2004_query_parameters import InlineResponse2004QueryParameters
|
||||
from elabapi_python.models.inline_response2005 import InlineResponse2005
|
||||
from elabapi_python.models.inline_response2006 import InlineResponse2006
|
||||
from elabapi_python.models.inline_response2007 import InlineResponse2007
|
||||
from elabapi_python.models.inline_response2008 import InlineResponse2008
|
||||
from elabapi_python.models.inline_response2009 import InlineResponse2009
|
||||
from elabapi_python.models.inline_response2009_embedded import InlineResponse2009Embedded
|
||||
from elabapi_python.models.inline_response2009_embedded_entries import InlineResponse2009EmbeddedEntries
|
||||
from elabapi_python.models.instance_body import InstanceBody
|
||||
from elabapi_python.models.item import Item
|
||||
from elabapi_python.models.item_editable import ItemEditable
|
||||
from elabapi_python.models.items_links_subid_body import ItemsLinksSubidBody
|
||||
from elabapi_python.models.items_types_id_body import ItemsTypesIdBody
|
||||
from elabapi_python.models.link import Link
|
||||
from elabapi_python.models.metadata import Metadata
|
||||
from elabapi_python.models.metadata_elabftw import MetadataElabftw
|
||||
from elabapi_python.models.metadata_elabftw_extra_fields_groups import MetadataElabftwExtraFieldsGroups
|
||||
from elabapi_python.models.metadata_extra_fields import MetadataExtraFields
|
||||
from elabapi_python.models.notification import Notification
|
||||
from elabapi_python.models.notifications_subid_body import NotificationsSubidBody
|
||||
from elabapi_python.models.patch_action import PatchAction
|
||||
from elabapi_python.models.revision import Revision
|
||||
from elabapi_python.models.revisions_subid_body import RevisionsSubidBody
|
||||
from elabapi_python.models.statuslike import Statuslike
|
||||
from elabapi_python.models.step import Step
|
||||
from elabapi_python.models.steps_subid_body import StepsSubidBody
|
||||
from elabapi_python.models.storage_unit import StorageUnit
|
||||
from elabapi_python.models.storage_units_body import StorageUnitsBody
|
||||
from elabapi_python.models.storage_units_id_body import StorageUnitsIdBody
|
||||
from elabapi_python.models.tag import Tag
|
||||
from elabapi_python.models.tags_subid_body import TagsSubidBody
|
||||
from elabapi_python.models.tags_subid_body1 import TagsSubidBody1
|
||||
from elabapi_python.models.team import Team
|
||||
from elabapi_python.models.teamgroup import Teamgroup
|
||||
from elabapi_python.models.teamgroup_users import TeamgroupUsers
|
||||
from elabapi_python.models.teamgroups_subid_body import TeamgroupsSubidBody
|
||||
from elabapi_python.models.teams_body import TeamsBody
|
||||
from elabapi_python.models.teams_id_body import TeamsIdBody
|
||||
from elabapi_python.models.todoitem import Todoitem
|
||||
from elabapi_python.models.todolist_body import TodolistBody
|
||||
from elabapi_python.models.todolist_id_body import TodolistIdBody
|
||||
from elabapi_python.models.unfinished_step import UnfinishedStep
|
||||
from elabapi_python.models.unfinished_steps import UnfinishedSteps
|
||||
from elabapi_python.models.upload import Upload
|
||||
from elabapi_python.models.uploads_subid_body import UploadsSubidBody
|
||||
from elabapi_python.models.uploads_subid_body1 import UploadsSubidBody1
|
||||
from elabapi_python.models.users import Users
|
||||
from elabapi_python.models.users_body import UsersBody
|
||||
from elabapi_python.models.users_full import UsersFull
|
||||
from elabapi_python.models.users_full_teams import UsersFullTeams
|
||||
from elabapi_python.models.users_id_body import UsersIdBody
|
||||
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user