elabapi-python 5.5.10__py3-none-any.whl → 5.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elabapi_python/__init__.py +7 -1
- elabapi_python/api/__init__.py +3 -1
- elabapi_python/api/branding_api.py +247 -0
- elabapi_python/api/containers_api.py +2 -2
- elabapi_python/api/{extra_fields_keys_api.py → custom_fields_keys_api.py} +14 -14
- elabapi_python/api/experiments_api.py +5 -5
- elabapi_python/api/experiments_templates_api.py +5 -5
- elabapi_python/api/instance_api.py +130 -0
- elabapi_python/api/items_api.py +5 -5
- elabapi_python/api/items_types__resources_templates_api.py +5 -5
- elabapi_python/api/notifications_api.py +11 -3
- elabapi_python/api/storage_units_api.py +2 -2
- elabapi_python/api_client.py +1 -1
- elabapi_python/configuration.py +1 -1
- elabapi_python/models/__init__.py +4 -0
- elabapi_python/models/all_ofentity_editable_metadatamerge.py +90 -0
- elabapi_python/models/branding_id_body.py +147 -0
- elabapi_python/models/containers_subid_body1.py +31 -3
- elabapi_python/models/entity_and_item_editable.py +93 -3
- elabapi_python/models/entity_editable.py +57 -1
- elabapi_python/models/event.py +407 -109
- elabapi_python/models/events_id_body.py +10 -10
- elabapi_python/models/id_certs_body.py +1 -1
- elabapi_python/models/id_experiments_categories_body.py +3 -31
- elabapi_python/models/id_experiments_status_body.py +3 -31
- elabapi_python/models/id_items_status_body.py +3 -31
- elabapi_python/models/id_resources_categories_body.py +3 -31
- elabapi_python/models/idp.py +53 -27
- elabapi_python/models/idps_body.py +59 -31
- elabapi_python/models/instance_body.py +84 -0
- elabapi_python/models/item.py +93 -3
- elabapi_python/models/item_editable.py +93 -3
- elabapi_python/models/metadata_elabftw.py +2 -2
- elabapi_python/models/notifications_subid_body.py +118 -0
- elabapi_python/models/statuslike.py +3 -29
- elabapi_python/models/storage_units_id_body.py +33 -6
- elabapi_python/models/team.py +31 -1
- {elabapi_python-5.5.10.dist-info → elabapi_python-5.6.0.dist-info}/METADATA +1 -1
- {elabapi_python-5.5.10.dist-info → elabapi_python-5.6.0.dist-info}/RECORD +49 -37
- {elabapi_python-5.5.10.dist-info → elabapi_python-5.6.0.dist-info}/WHEEL +1 -1
- test/test_all_ofentity_editable_metadatamerge.py +39 -0
- test/test_branding_api.py +47 -0
- test/test_branding_id_body.py +39 -0
- test/test_custom_fields_keys_api.py +40 -0
- test/{test_extra_fields_keys_api.py → test_instance_api.py} +7 -7
- test/test_instance_body.py +39 -0
- test/test_notifications_api.py +1 -1
- test/test_notifications_subid_body.py +39 -0
- {elabapi_python-5.5.10.dist-info → elabapi_python-5.6.0.dist-info}/top_level.txt +0 -0
elabapi_python/__init__.py
CHANGED
|
@@ -16,10 +16,12 @@ from __future__ import absolute_import
|
|
|
16
16
|
|
|
17
17
|
# import apis into sdk package
|
|
18
18
|
from elabapi_python.api.api_keys_api import ApiKeysApi
|
|
19
|
+
from elabapi_python.api.branding_api import BrandingApi
|
|
19
20
|
from elabapi_python.api.comments_api import CommentsApi
|
|
20
21
|
from elabapi_python.api.compounds_api import CompoundsApi
|
|
21
22
|
from elabapi_python.api.config_api import ConfigApi
|
|
22
23
|
from elabapi_python.api.containers_api import ContainersApi
|
|
24
|
+
from elabapi_python.api.custom_fields_keys_api import CustomFieldsKeysApi
|
|
23
25
|
from elabapi_python.api.d_space_api import DSpaceApi
|
|
24
26
|
from elabapi_python.api.events_api import EventsApi
|
|
25
27
|
from elabapi_python.api.experiments_api import ExperimentsApi
|
|
@@ -27,12 +29,12 @@ from elabapi_python.api.experiments_categories_api import ExperimentsCategoriesA
|
|
|
27
29
|
from elabapi_python.api.experiments_status_api import ExperimentsStatusApi
|
|
28
30
|
from elabapi_python.api.experiments_templates_api import ExperimentsTemplatesApi
|
|
29
31
|
from elabapi_python.api.exports_api import ExportsApi
|
|
30
|
-
from elabapi_python.api.extra_fields_keys_api import ExtraFieldsKeysApi
|
|
31
32
|
from elabapi_python.api.favorite_tags_api import FavoriteTagsApi
|
|
32
33
|
from elabapi_python.api.idps_api import IdpsApi
|
|
33
34
|
from elabapi_python.api.idps_sources_api import IdpsSourcesApi
|
|
34
35
|
from elabapi_python.api.import_api import ImportApi
|
|
35
36
|
from elabapi_python.api.info_api import InfoApi
|
|
37
|
+
from elabapi_python.api.instance_api import InstanceApi
|
|
36
38
|
from elabapi_python.api.items_api import ItemsApi
|
|
37
39
|
from elabapi_python.api.items_types__resources_templates_api import ItemsTypesResourcesTemplatesApi
|
|
38
40
|
from elabapi_python.api.links_to_compounds_api import LinksToCompoundsApi
|
|
@@ -58,9 +60,11 @@ from elabapi_python.api.users_api import UsersApi
|
|
|
58
60
|
from elabapi_python.api_client import ApiClient
|
|
59
61
|
from elabapi_python.configuration import Configuration
|
|
60
62
|
# import models into sdk package
|
|
63
|
+
from elabapi_python.models.all_ofentity_editable_metadatamerge import AllOfentityEditableMetadatamerge
|
|
61
64
|
from elabapi_python.models.any_ofuploads_subid_body1 import AnyOfuploadsSubidBody1
|
|
62
65
|
from elabapi_python.models.apikey import Apikey
|
|
63
66
|
from elabapi_python.models.apikeys_body import ApikeysBody
|
|
67
|
+
from elabapi_python.models.branding_id_body import BrandingIdBody
|
|
64
68
|
from elabapi_python.models.changelog import Changelog
|
|
65
69
|
from elabapi_python.models.comment import Comment
|
|
66
70
|
from elabapi_python.models.compound import Compound
|
|
@@ -139,6 +143,7 @@ from elabapi_python.models.inline_response2008 import InlineResponse2008
|
|
|
139
143
|
from elabapi_python.models.inline_response2009 import InlineResponse2009
|
|
140
144
|
from elabapi_python.models.inline_response2009_embedded import InlineResponse2009Embedded
|
|
141
145
|
from elabapi_python.models.inline_response2009_embedded_entries import InlineResponse2009EmbeddedEntries
|
|
146
|
+
from elabapi_python.models.instance_body import InstanceBody
|
|
142
147
|
from elabapi_python.models.item import Item
|
|
143
148
|
from elabapi_python.models.item_editable import ItemEditable
|
|
144
149
|
from elabapi_python.models.items_links_subid_body import ItemsLinksSubidBody
|
|
@@ -149,6 +154,7 @@ from elabapi_python.models.metadata_elabftw import MetadataElabftw
|
|
|
149
154
|
from elabapi_python.models.metadata_elabftw_extra_fields_groups import MetadataElabftwExtraFieldsGroups
|
|
150
155
|
from elabapi_python.models.metadata_extra_fields import MetadataExtraFields
|
|
151
156
|
from elabapi_python.models.notification import Notification
|
|
157
|
+
from elabapi_python.models.notifications_subid_body import NotificationsSubidBody
|
|
152
158
|
from elabapi_python.models.patch_action import PatchAction
|
|
153
159
|
from elabapi_python.models.revision import Revision
|
|
154
160
|
from elabapi_python.models.revisions_subid_body import RevisionsSubidBody
|
elabapi_python/api/__init__.py
CHANGED
|
@@ -4,10 +4,12 @@ from __future__ import absolute_import
|
|
|
4
4
|
|
|
5
5
|
# import apis into api package
|
|
6
6
|
from elabapi_python.api.api_keys_api import ApiKeysApi
|
|
7
|
+
from elabapi_python.api.branding_api import BrandingApi
|
|
7
8
|
from elabapi_python.api.comments_api import CommentsApi
|
|
8
9
|
from elabapi_python.api.compounds_api import CompoundsApi
|
|
9
10
|
from elabapi_python.api.config_api import ConfigApi
|
|
10
11
|
from elabapi_python.api.containers_api import ContainersApi
|
|
12
|
+
from elabapi_python.api.custom_fields_keys_api import CustomFieldsKeysApi
|
|
11
13
|
from elabapi_python.api.d_space_api import DSpaceApi
|
|
12
14
|
from elabapi_python.api.events_api import EventsApi
|
|
13
15
|
from elabapi_python.api.experiments_api import ExperimentsApi
|
|
@@ -15,12 +17,12 @@ from elabapi_python.api.experiments_categories_api import ExperimentsCategoriesA
|
|
|
15
17
|
from elabapi_python.api.experiments_status_api import ExperimentsStatusApi
|
|
16
18
|
from elabapi_python.api.experiments_templates_api import ExperimentsTemplatesApi
|
|
17
19
|
from elabapi_python.api.exports_api import ExportsApi
|
|
18
|
-
from elabapi_python.api.extra_fields_keys_api import ExtraFieldsKeysApi
|
|
19
20
|
from elabapi_python.api.favorite_tags_api import FavoriteTagsApi
|
|
20
21
|
from elabapi_python.api.idps_api import IdpsApi
|
|
21
22
|
from elabapi_python.api.idps_sources_api import IdpsSourcesApi
|
|
22
23
|
from elabapi_python.api.import_api import ImportApi
|
|
23
24
|
from elabapi_python.api.info_api import InfoApi
|
|
25
|
+
from elabapi_python.api.instance_api import InstanceApi
|
|
24
26
|
from elabapi_python.api.items_api import ItemsApi
|
|
25
27
|
from elabapi_python.api.items_types__resources_templates_api import ItemsTypesResourcesTemplatesApi
|
|
26
28
|
from elabapi_python.api.links_to_compounds_api import LinksToCompoundsApi
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
eLabFTW REST API v2 Documentation
|
|
5
|
+
|
|
6
|
+
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import absolute_import
|
|
14
|
+
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
# python 2 and python 3 compatibility library
|
|
18
|
+
import six
|
|
19
|
+
|
|
20
|
+
from elabapi_python.api_client import ApiClient
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class BrandingApi(object):
|
|
24
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
25
|
+
|
|
26
|
+
Do not edit the class manually.
|
|
27
|
+
Ref: https://github.com/swagger-api/swagger-codegen
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
def __init__(self, api_client=None):
|
|
31
|
+
if api_client is None:
|
|
32
|
+
api_client = ApiClient()
|
|
33
|
+
self.api_client = api_client
|
|
34
|
+
|
|
35
|
+
def get_instance_branding(self, id, format, **kwargs): # noqa: E501
|
|
36
|
+
"""Read a branding asset as a binary file. # noqa: E501
|
|
37
|
+
|
|
38
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
39
|
+
asynchronous HTTP request, please pass async_req=True
|
|
40
|
+
>>> thread = api.get_instance_branding(id, format, async_req=True)
|
|
41
|
+
>>> result = thread.get()
|
|
42
|
+
|
|
43
|
+
:param async_req bool
|
|
44
|
+
:param int id: Branding id. (required)
|
|
45
|
+
:param str format: Use binary format to retrieve the branding asset. (required)
|
|
46
|
+
:return: str
|
|
47
|
+
If the method is called asynchronously,
|
|
48
|
+
returns the request thread.
|
|
49
|
+
"""
|
|
50
|
+
kwargs['_return_http_data_only'] = True
|
|
51
|
+
if kwargs.get('async_req'):
|
|
52
|
+
return self.get_instance_branding_with_http_info(id, format, **kwargs) # noqa: E501
|
|
53
|
+
else:
|
|
54
|
+
(data) = self.get_instance_branding_with_http_info(id, format, **kwargs) # noqa: E501
|
|
55
|
+
return data
|
|
56
|
+
|
|
57
|
+
def get_instance_branding_with_http_info(self, id, format, **kwargs): # noqa: E501
|
|
58
|
+
"""Read a branding asset as a binary file. # noqa: E501
|
|
59
|
+
|
|
60
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
61
|
+
asynchronous HTTP request, please pass async_req=True
|
|
62
|
+
>>> thread = api.get_instance_branding_with_http_info(id, format, async_req=True)
|
|
63
|
+
>>> result = thread.get()
|
|
64
|
+
|
|
65
|
+
:param async_req bool
|
|
66
|
+
:param int id: Branding id. (required)
|
|
67
|
+
:param str format: Use binary format to retrieve the branding asset. (required)
|
|
68
|
+
:return: str
|
|
69
|
+
If the method is called asynchronously,
|
|
70
|
+
returns the request thread.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
all_params = ['id', 'format'] # noqa: E501
|
|
74
|
+
all_params.append('async_req')
|
|
75
|
+
all_params.append('_return_http_data_only')
|
|
76
|
+
all_params.append('_preload_content')
|
|
77
|
+
all_params.append('_request_timeout')
|
|
78
|
+
|
|
79
|
+
params = locals()
|
|
80
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
81
|
+
if key not in all_params:
|
|
82
|
+
raise TypeError(
|
|
83
|
+
"Got an unexpected keyword argument '%s'"
|
|
84
|
+
" to method get_instance_branding" % key
|
|
85
|
+
)
|
|
86
|
+
params[key] = val
|
|
87
|
+
del params['kwargs']
|
|
88
|
+
# verify the required parameter 'id' is set
|
|
89
|
+
if ('id' not in params or
|
|
90
|
+
params['id'] is None):
|
|
91
|
+
raise ValueError("Missing the required parameter `id` when calling `get_instance_branding`") # noqa: E501
|
|
92
|
+
# verify the required parameter 'format' is set
|
|
93
|
+
if ('format' not in params or
|
|
94
|
+
params['format'] is None):
|
|
95
|
+
raise ValueError("Missing the required parameter `format` when calling `get_instance_branding`") # noqa: E501
|
|
96
|
+
|
|
97
|
+
collection_formats = {}
|
|
98
|
+
|
|
99
|
+
path_params = {}
|
|
100
|
+
if 'id' in params:
|
|
101
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
102
|
+
|
|
103
|
+
query_params = []
|
|
104
|
+
if 'format' in params:
|
|
105
|
+
query_params.append(('format', params['format'])) # noqa: E501
|
|
106
|
+
|
|
107
|
+
header_params = {}
|
|
108
|
+
|
|
109
|
+
form_params = []
|
|
110
|
+
local_var_files = {}
|
|
111
|
+
|
|
112
|
+
body_params = None
|
|
113
|
+
# HTTP header `Accept`
|
|
114
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
115
|
+
['image/svg+xml', 'image/png', 'image/jpeg', 'image/webp', 'image/x-icon', 'image/vnd.microsoft.icon', 'application/json']) # noqa: E501
|
|
116
|
+
|
|
117
|
+
# Authentication setting
|
|
118
|
+
auth_settings = ['token'] # noqa: E501
|
|
119
|
+
|
|
120
|
+
return self.api_client.call_api(
|
|
121
|
+
'/instance/branding/{id}', 'GET',
|
|
122
|
+
path_params,
|
|
123
|
+
query_params,
|
|
124
|
+
header_params,
|
|
125
|
+
body=body_params,
|
|
126
|
+
post_params=form_params,
|
|
127
|
+
files=local_var_files,
|
|
128
|
+
response_type='str', # noqa: E501
|
|
129
|
+
auth_settings=auth_settings,
|
|
130
|
+
async_req=params.get('async_req'),
|
|
131
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
132
|
+
_preload_content=params.get('_preload_content', True),
|
|
133
|
+
_request_timeout=params.get('_request_timeout'),
|
|
134
|
+
collection_formats=collection_formats)
|
|
135
|
+
|
|
136
|
+
def post_instance_branding(self, action, file, id, **kwargs): # noqa: E501
|
|
137
|
+
"""Update a branding asset. # noqa: E501
|
|
138
|
+
|
|
139
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
140
|
+
asynchronous HTTP request, please pass async_req=True
|
|
141
|
+
>>> thread = api.post_instance_branding(action, file, id, async_req=True)
|
|
142
|
+
>>> result = thread.get()
|
|
143
|
+
|
|
144
|
+
:param async_req bool
|
|
145
|
+
:param str action: (required)
|
|
146
|
+
:param str file: (required)
|
|
147
|
+
:param int id: Branding id. (required)
|
|
148
|
+
:return: None
|
|
149
|
+
If the method is called asynchronously,
|
|
150
|
+
returns the request thread.
|
|
151
|
+
"""
|
|
152
|
+
kwargs['_return_http_data_only'] = True
|
|
153
|
+
if kwargs.get('async_req'):
|
|
154
|
+
return self.post_instance_branding_with_http_info(action, file, id, **kwargs) # noqa: E501
|
|
155
|
+
else:
|
|
156
|
+
(data) = self.post_instance_branding_with_http_info(action, file, id, **kwargs) # noqa: E501
|
|
157
|
+
return data
|
|
158
|
+
|
|
159
|
+
def post_instance_branding_with_http_info(self, action, file, id, **kwargs): # noqa: E501
|
|
160
|
+
"""Update a branding asset. # noqa: E501
|
|
161
|
+
|
|
162
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
163
|
+
asynchronous HTTP request, please pass async_req=True
|
|
164
|
+
>>> thread = api.post_instance_branding_with_http_info(action, file, id, async_req=True)
|
|
165
|
+
>>> result = thread.get()
|
|
166
|
+
|
|
167
|
+
:param async_req bool
|
|
168
|
+
:param str action: (required)
|
|
169
|
+
:param str file: (required)
|
|
170
|
+
:param int id: Branding id. (required)
|
|
171
|
+
:return: None
|
|
172
|
+
If the method is called asynchronously,
|
|
173
|
+
returns the request thread.
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
all_params = ['action', 'file', 'id'] # noqa: E501
|
|
177
|
+
all_params.append('async_req')
|
|
178
|
+
all_params.append('_return_http_data_only')
|
|
179
|
+
all_params.append('_preload_content')
|
|
180
|
+
all_params.append('_request_timeout')
|
|
181
|
+
|
|
182
|
+
params = locals()
|
|
183
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
184
|
+
if key not in all_params:
|
|
185
|
+
raise TypeError(
|
|
186
|
+
"Got an unexpected keyword argument '%s'"
|
|
187
|
+
" to method post_instance_branding" % key
|
|
188
|
+
)
|
|
189
|
+
params[key] = val
|
|
190
|
+
del params['kwargs']
|
|
191
|
+
# verify the required parameter 'action' is set
|
|
192
|
+
if ('action' not in params or
|
|
193
|
+
params['action'] is None):
|
|
194
|
+
raise ValueError("Missing the required parameter `action` when calling `post_instance_branding`") # noqa: E501
|
|
195
|
+
# verify the required parameter 'file' is set
|
|
196
|
+
if ('file' not in params or
|
|
197
|
+
params['file'] is None):
|
|
198
|
+
raise ValueError("Missing the required parameter `file` when calling `post_instance_branding`") # noqa: E501
|
|
199
|
+
# verify the required parameter 'id' is set
|
|
200
|
+
if ('id' not in params or
|
|
201
|
+
params['id'] is None):
|
|
202
|
+
raise ValueError("Missing the required parameter `id` when calling `post_instance_branding`") # noqa: E501
|
|
203
|
+
|
|
204
|
+
collection_formats = {}
|
|
205
|
+
|
|
206
|
+
path_params = {}
|
|
207
|
+
if 'id' in params:
|
|
208
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
209
|
+
|
|
210
|
+
query_params = []
|
|
211
|
+
|
|
212
|
+
header_params = {}
|
|
213
|
+
|
|
214
|
+
form_params = []
|
|
215
|
+
local_var_files = {}
|
|
216
|
+
if 'action' in params:
|
|
217
|
+
form_params.append(('action', params['action'])) # noqa: E501
|
|
218
|
+
if 'file' in params:
|
|
219
|
+
local_var_files['file'] = params['file'] # noqa: E501
|
|
220
|
+
|
|
221
|
+
body_params = None
|
|
222
|
+
# HTTP header `Accept`
|
|
223
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
224
|
+
['application/json']) # noqa: E501
|
|
225
|
+
|
|
226
|
+
# HTTP header `Content-Type`
|
|
227
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
228
|
+
['multipart/form-data']) # noqa: E501
|
|
229
|
+
|
|
230
|
+
# Authentication setting
|
|
231
|
+
auth_settings = ['token'] # noqa: E501
|
|
232
|
+
|
|
233
|
+
return self.api_client.call_api(
|
|
234
|
+
'/instance/branding/{id}', 'POST',
|
|
235
|
+
path_params,
|
|
236
|
+
query_params,
|
|
237
|
+
header_params,
|
|
238
|
+
body=body_params,
|
|
239
|
+
post_params=form_params,
|
|
240
|
+
files=local_var_files,
|
|
241
|
+
response_type=None, # noqa: E501
|
|
242
|
+
auth_settings=auth_settings,
|
|
243
|
+
async_req=params.get('async_req'),
|
|
244
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
245
|
+
_preload_content=params.get('_preload_content', True),
|
|
246
|
+
_request_timeout=params.get('_request_timeout'),
|
|
247
|
+
collection_formats=collection_formats)
|
|
@@ -146,7 +146,7 @@ class ContainersApi(object):
|
|
|
146
146
|
def patch_container(self, entity_type, id, subid, **kwargs): # noqa: E501
|
|
147
147
|
"""Modify a container. # noqa: E501
|
|
148
148
|
|
|
149
|
-
Update the quantity stored or the
|
|
149
|
+
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
|
|
150
150
|
This method makes a synchronous HTTP request by default. To make an
|
|
151
151
|
asynchronous HTTP request, please pass async_req=True
|
|
152
152
|
>>> thread = api.patch_container(entity_type, id, subid, async_req=True)
|
|
@@ -171,7 +171,7 @@ class ContainersApi(object):
|
|
|
171
171
|
def patch_container_with_http_info(self, entity_type, id, subid, **kwargs): # noqa: E501
|
|
172
172
|
"""Modify a container. # noqa: E501
|
|
173
173
|
|
|
174
|
-
Update the quantity stored or the
|
|
174
|
+
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
|
|
175
175
|
This method makes a synchronous HTTP request by default. To make an
|
|
176
176
|
asynchronous HTTP request, please pass async_req=True
|
|
177
177
|
>>> thread = api.patch_container_with_http_info(entity_type, id, subid, async_req=True)
|
|
@@ -20,7 +20,7 @@ import six
|
|
|
20
20
|
from elabapi_python.api_client import ApiClient
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class
|
|
23
|
+
class CustomFieldsKeysApi(object):
|
|
24
24
|
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
25
25
|
|
|
26
26
|
Do not edit the class manually.
|
|
@@ -32,39 +32,39 @@ class ExtraFieldsKeysApi(object):
|
|
|
32
32
|
api_client = ApiClient()
|
|
33
33
|
self.api_client = api_client
|
|
34
34
|
|
|
35
|
-
def
|
|
36
|
-
"""Read
|
|
35
|
+
def custom_fields_keys(self, **kwargs): # noqa: E501
|
|
36
|
+
"""Read custom fields keys. # noqa: E501
|
|
37
37
|
|
|
38
38
|
This method makes a synchronous HTTP request by default. To make an
|
|
39
39
|
asynchronous HTTP request, please pass async_req=True
|
|
40
|
-
>>> thread = api.
|
|
40
|
+
>>> thread = api.custom_fields_keys(async_req=True)
|
|
41
41
|
>>> result = thread.get()
|
|
42
42
|
|
|
43
43
|
:param async_req bool
|
|
44
|
-
:param str q: Search for a term in the
|
|
45
|
-
:param int limit: Number of
|
|
44
|
+
:param str q: Search for a term in the custom fields keys.
|
|
45
|
+
:param int limit: Number of custom fields keys that will be returned. Value >= -1; -1: no limit, 0: users default setting from UCP.
|
|
46
46
|
:return: list[ExtraFieldsKeys]
|
|
47
47
|
If the method is called asynchronously,
|
|
48
48
|
returns the request thread.
|
|
49
49
|
"""
|
|
50
50
|
kwargs['_return_http_data_only'] = True
|
|
51
51
|
if kwargs.get('async_req'):
|
|
52
|
-
return self.
|
|
52
|
+
return self.custom_fields_keys_with_http_info(**kwargs) # noqa: E501
|
|
53
53
|
else:
|
|
54
|
-
(data) = self.
|
|
54
|
+
(data) = self.custom_fields_keys_with_http_info(**kwargs) # noqa: E501
|
|
55
55
|
return data
|
|
56
56
|
|
|
57
|
-
def
|
|
58
|
-
"""Read
|
|
57
|
+
def custom_fields_keys_with_http_info(self, **kwargs): # noqa: E501
|
|
58
|
+
"""Read custom fields keys. # noqa: E501
|
|
59
59
|
|
|
60
60
|
This method makes a synchronous HTTP request by default. To make an
|
|
61
61
|
asynchronous HTTP request, please pass async_req=True
|
|
62
|
-
>>> thread = api.
|
|
62
|
+
>>> thread = api.custom_fields_keys_with_http_info(async_req=True)
|
|
63
63
|
>>> result = thread.get()
|
|
64
64
|
|
|
65
65
|
:param async_req bool
|
|
66
|
-
:param str q: Search for a term in the
|
|
67
|
-
:param int limit: Number of
|
|
66
|
+
:param str q: Search for a term in the custom fields keys.
|
|
67
|
+
:param int limit: Number of custom fields keys that will be returned. Value >= -1; -1: no limit, 0: users default setting from UCP.
|
|
68
68
|
:return: list[ExtraFieldsKeys]
|
|
69
69
|
If the method is called asynchronously,
|
|
70
70
|
returns the request thread.
|
|
@@ -81,7 +81,7 @@ class ExtraFieldsKeysApi(object):
|
|
|
81
81
|
if key not in all_params:
|
|
82
82
|
raise TypeError(
|
|
83
83
|
"Got an unexpected keyword argument '%s'"
|
|
84
|
-
" to method
|
|
84
|
+
" to method custom_fields_keys" % key
|
|
85
85
|
)
|
|
86
86
|
params[key] = val
|
|
87
87
|
del params['kwargs']
|
|
@@ -552,7 +552,7 @@ class ExperimentsApi(object):
|
|
|
552
552
|
:param str extended: Extended search (advanced query).
|
|
553
553
|
:param int related: Look only for entries linked to this entry id.
|
|
554
554
|
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
|
555
|
-
:param str
|
|
555
|
+
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
|
556
556
|
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
|
557
557
|
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
|
558
558
|
:param int limit: Limit the number of results.
|
|
@@ -586,7 +586,7 @@ class ExperimentsApi(object):
|
|
|
586
586
|
:param str extended: Extended search (advanced query).
|
|
587
587
|
:param int related: Look only for entries linked to this entry id.
|
|
588
588
|
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
|
589
|
-
:param str
|
|
589
|
+
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
|
590
590
|
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
|
591
591
|
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
|
592
592
|
:param int limit: Limit the number of results.
|
|
@@ -601,7 +601,7 @@ class ExperimentsApi(object):
|
|
|
601
601
|
returns the request thread.
|
|
602
602
|
"""
|
|
603
603
|
|
|
604
|
-
all_params = ['q', 'extended', 'related', 'related_origin', '
|
|
604
|
+
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state'] # noqa: E501
|
|
605
605
|
all_params.append('async_req')
|
|
606
606
|
all_params.append('_return_http_data_only')
|
|
607
607
|
all_params.append('_preload_content')
|
|
@@ -630,8 +630,8 @@ class ExperimentsApi(object):
|
|
|
630
630
|
query_params.append(('related', params['related'])) # noqa: E501
|
|
631
631
|
if 'related_origin' in params:
|
|
632
632
|
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
|
633
|
-
if '
|
|
634
|
-
query_params.append(('
|
|
633
|
+
if 'category' in params:
|
|
634
|
+
query_params.append(('category', params['category'])) # noqa: E501
|
|
635
635
|
if 'status' in params:
|
|
636
636
|
query_params.append(('status', params['status'])) # noqa: E501
|
|
637
637
|
if 'tags' in params:
|
|
@@ -528,7 +528,7 @@ class ExperimentsTemplatesApi(object):
|
|
|
528
528
|
:param str extended: Extended search (advanced query).
|
|
529
529
|
:param int related: Look only for entries linked to this entry id.
|
|
530
530
|
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
|
531
|
-
:param str
|
|
531
|
+
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
|
532
532
|
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
|
533
533
|
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
|
534
534
|
:param int limit: Limit the number of results.
|
|
@@ -562,7 +562,7 @@ class ExperimentsTemplatesApi(object):
|
|
|
562
562
|
:param str extended: Extended search (advanced query).
|
|
563
563
|
:param int related: Look only for entries linked to this entry id.
|
|
564
564
|
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
|
565
|
-
:param str
|
|
565
|
+
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
|
566
566
|
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
|
567
567
|
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
|
568
568
|
:param int limit: Limit the number of results.
|
|
@@ -577,7 +577,7 @@ class ExperimentsTemplatesApi(object):
|
|
|
577
577
|
returns the request thread.
|
|
578
578
|
"""
|
|
579
579
|
|
|
580
|
-
all_params = ['q', 'extended', 'related', 'related_origin', '
|
|
580
|
+
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state'] # noqa: E501
|
|
581
581
|
all_params.append('async_req')
|
|
582
582
|
all_params.append('_return_http_data_only')
|
|
583
583
|
all_params.append('_preload_content')
|
|
@@ -606,8 +606,8 @@ class ExperimentsTemplatesApi(object):
|
|
|
606
606
|
query_params.append(('related', params['related'])) # noqa: E501
|
|
607
607
|
if 'related_origin' in params:
|
|
608
608
|
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
|
609
|
-
if '
|
|
610
|
-
query_params.append(('
|
|
609
|
+
if 'category' in params:
|
|
610
|
+
query_params.append(('category', params['category'])) # noqa: E501
|
|
611
611
|
if 'status' in params:
|
|
612
612
|
query_params.append(('status', params['status'])) # noqa: E501
|
|
613
613
|
if 'tags' in params:
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
eLabFTW REST API v2 Documentation
|
|
5
|
+
|
|
6
|
+
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import absolute_import
|
|
14
|
+
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
# python 2 and python 3 compatibility library
|
|
18
|
+
import six
|
|
19
|
+
|
|
20
|
+
from elabapi_python.api_client import ApiClient
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class InstanceApi(object):
|
|
24
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
25
|
+
|
|
26
|
+
Do not edit the class manually.
|
|
27
|
+
Ref: https://github.com/swagger-api/swagger-codegen
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
def __init__(self, api_client=None):
|
|
31
|
+
if api_client is None:
|
|
32
|
+
api_client = ApiClient()
|
|
33
|
+
self.api_client = api_client
|
|
34
|
+
|
|
35
|
+
def post_instance(self, body, **kwargs): # noqa: E501
|
|
36
|
+
"""Run an instance level action. # noqa: E501
|
|
37
|
+
|
|
38
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
39
|
+
asynchronous HTTP request, please pass async_req=True
|
|
40
|
+
>>> thread = api.post_instance(body, async_req=True)
|
|
41
|
+
>>> result = thread.get()
|
|
42
|
+
|
|
43
|
+
:param async_req bool
|
|
44
|
+
:param InstanceBody body: Parameters for the instance action. (required)
|
|
45
|
+
:return: None
|
|
46
|
+
If the method is called asynchronously,
|
|
47
|
+
returns the request thread.
|
|
48
|
+
"""
|
|
49
|
+
kwargs['_return_http_data_only'] = True
|
|
50
|
+
if kwargs.get('async_req'):
|
|
51
|
+
return self.post_instance_with_http_info(body, **kwargs) # noqa: E501
|
|
52
|
+
else:
|
|
53
|
+
(data) = self.post_instance_with_http_info(body, **kwargs) # noqa: E501
|
|
54
|
+
return data
|
|
55
|
+
|
|
56
|
+
def post_instance_with_http_info(self, body, **kwargs): # noqa: E501
|
|
57
|
+
"""Run an instance level action. # noqa: E501
|
|
58
|
+
|
|
59
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
60
|
+
asynchronous HTTP request, please pass async_req=True
|
|
61
|
+
>>> thread = api.post_instance_with_http_info(body, async_req=True)
|
|
62
|
+
>>> result = thread.get()
|
|
63
|
+
|
|
64
|
+
:param async_req bool
|
|
65
|
+
:param InstanceBody body: Parameters for the instance action. (required)
|
|
66
|
+
:return: None
|
|
67
|
+
If the method is called asynchronously,
|
|
68
|
+
returns the request thread.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
all_params = ['body'] # noqa: E501
|
|
72
|
+
all_params.append('async_req')
|
|
73
|
+
all_params.append('_return_http_data_only')
|
|
74
|
+
all_params.append('_preload_content')
|
|
75
|
+
all_params.append('_request_timeout')
|
|
76
|
+
|
|
77
|
+
params = locals()
|
|
78
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
79
|
+
if key not in all_params:
|
|
80
|
+
raise TypeError(
|
|
81
|
+
"Got an unexpected keyword argument '%s'"
|
|
82
|
+
" to method post_instance" % key
|
|
83
|
+
)
|
|
84
|
+
params[key] = val
|
|
85
|
+
del params['kwargs']
|
|
86
|
+
# verify the required parameter 'body' is set
|
|
87
|
+
if ('body' not in params or
|
|
88
|
+
params['body'] is None):
|
|
89
|
+
raise ValueError("Missing the required parameter `body` when calling `post_instance`") # noqa: E501
|
|
90
|
+
|
|
91
|
+
collection_formats = {}
|
|
92
|
+
|
|
93
|
+
path_params = {}
|
|
94
|
+
|
|
95
|
+
query_params = []
|
|
96
|
+
|
|
97
|
+
header_params = {}
|
|
98
|
+
|
|
99
|
+
form_params = []
|
|
100
|
+
local_var_files = {}
|
|
101
|
+
|
|
102
|
+
body_params = None
|
|
103
|
+
if 'body' in params:
|
|
104
|
+
body_params = params['body']
|
|
105
|
+
# HTTP header `Accept`
|
|
106
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
107
|
+
['application/json']) # noqa: E501
|
|
108
|
+
|
|
109
|
+
# HTTP header `Content-Type`
|
|
110
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
111
|
+
['application/json']) # noqa: E501
|
|
112
|
+
|
|
113
|
+
# Authentication setting
|
|
114
|
+
auth_settings = ['token'] # noqa: E501
|
|
115
|
+
|
|
116
|
+
return self.api_client.call_api(
|
|
117
|
+
'/instance', 'POST',
|
|
118
|
+
path_params,
|
|
119
|
+
query_params,
|
|
120
|
+
header_params,
|
|
121
|
+
body=body_params,
|
|
122
|
+
post_params=form_params,
|
|
123
|
+
files=local_var_files,
|
|
124
|
+
response_type=None, # noqa: E501
|
|
125
|
+
auth_settings=auth_settings,
|
|
126
|
+
async_req=params.get('async_req'),
|
|
127
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
128
|
+
_preload_content=params.get('_preload_content', True),
|
|
129
|
+
_request_timeout=params.get('_request_timeout'),
|
|
130
|
+
collection_formats=collection_formats)
|
elabapi_python/api/items_api.py
CHANGED
|
@@ -552,7 +552,7 @@ class ItemsApi(object):
|
|
|
552
552
|
:param str extended: Extended search (advanced query).
|
|
553
553
|
:param int related: Look only for entries linked to this entry id.
|
|
554
554
|
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
|
555
|
-
:param str
|
|
555
|
+
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
|
556
556
|
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
|
557
557
|
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
|
558
558
|
:param int limit: Limit the number of results.
|
|
@@ -586,7 +586,7 @@ class ItemsApi(object):
|
|
|
586
586
|
:param str extended: Extended search (advanced query).
|
|
587
587
|
:param int related: Look only for entries linked to this entry id.
|
|
588
588
|
:param str related_origin: When using the \"related\" query parameter, select the type of the related ID (experiments or items)
|
|
589
|
-
:param str
|
|
589
|
+
:param str category: Add a filter on the Category. Supports comma separated list of numbers, including \"null\".
|
|
590
590
|
:param str status: Add a filter on the Status. Supports comma separated list of numbers, including \"null\".
|
|
591
591
|
:param list[str] tags: An array of tags for filtering results containing all of these tags.
|
|
592
592
|
:param int limit: Limit the number of results.
|
|
@@ -601,7 +601,7 @@ class ItemsApi(object):
|
|
|
601
601
|
returns the request thread.
|
|
602
602
|
"""
|
|
603
603
|
|
|
604
|
-
all_params = ['q', 'extended', 'related', 'related_origin', '
|
|
604
|
+
all_params = ['q', 'extended', 'related', 'related_origin', 'category', 'status', 'tags', 'limit', 'offset', 'owner', 'scope', 'order', 'sort', 'state'] # noqa: E501
|
|
605
605
|
all_params.append('async_req')
|
|
606
606
|
all_params.append('_return_http_data_only')
|
|
607
607
|
all_params.append('_preload_content')
|
|
@@ -630,8 +630,8 @@ class ItemsApi(object):
|
|
|
630
630
|
query_params.append(('related', params['related'])) # noqa: E501
|
|
631
631
|
if 'related_origin' in params:
|
|
632
632
|
query_params.append(('related_origin', params['related_origin'])) # noqa: E501
|
|
633
|
-
if '
|
|
634
|
-
query_params.append(('
|
|
633
|
+
if 'category' in params:
|
|
634
|
+
query_params.append(('category', params['category'])) # noqa: E501
|
|
635
635
|
if 'status' in params:
|
|
636
636
|
query_params.append(('status', params['status'])) # noqa: E501
|
|
637
637
|
if 'tags' in params:
|