lockss-pyclient 0.1.0.dev1__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.
- lockss/pyclient/__init__.py +67 -0
- lockss/pyclient/config/__init__.py +42 -0
- lockss/pyclient/config/api/__init__.py +12 -0
- lockss/pyclient/config/api/aus_api.py +2195 -0
- lockss/pyclient/config/api/config_api.py +718 -0
- lockss/pyclient/config/api/plugins_api.py +128 -0
- lockss/pyclient/config/api/status_api.py +120 -0
- lockss/pyclient/config/api/tdb_api.py +318 -0
- lockss/pyclient/config/api/users_api.py +516 -0
- lockss/pyclient/config/api/utils_api.py +128 -0
- lockss/pyclient/config/api_client.py +632 -0
- lockss/pyclient/config/configuration.py +254 -0
- lockss/pyclient/config/models/__init__.py +30 -0
- lockss/pyclient/config/models/api_status.py +344 -0
- lockss/pyclient/config/models/au_configuration.py +142 -0
- lockss/pyclient/config/models/au_status.py +113 -0
- lockss/pyclient/config/models/au_ws_result.py +113 -0
- lockss/pyclient/config/models/auids_body.py +168 -0
- lockss/pyclient/config/models/check_substance_result.py +212 -0
- lockss/pyclient/config/models/content_configuration_result.py +200 -0
- lockss/pyclient/config/models/file_section_name_body.py +113 -0
- lockss/pyclient/config/models/platform_configuration_ws_result.py +113 -0
- lockss/pyclient/config/models/plugin_ws_result.py +345 -0
- lockss/pyclient/config/models/request_au_control_result.py +171 -0
- lockss/pyclient/config/models/tdb_au_ws_result.py +360 -0
- lockss/pyclient/config/models/tdb_publisher_ws_result.py +113 -0
- lockss/pyclient/config/models/tdb_title_ws_result.py +390 -0
- lockss/pyclient/config/rest.py +317 -0
- lockss/pyclient/crawler/__init__.py +45 -0
- lockss/pyclient/crawler/api/__init__.py +10 -0
- lockss/pyclient/crawler/api/crawlers_api.py +215 -0
- lockss/pyclient/crawler/api/crawls_api.py +952 -0
- lockss/pyclient/crawler/api/jobs_api.py +504 -0
- lockss/pyclient/crawler/api/status_api.py +120 -0
- lockss/pyclient/crawler/api/ws_api.py +128 -0
- lockss/pyclient/crawler/api_client.py +632 -0
- lockss/pyclient/crawler/configuration.py +254 -0
- lockss/pyclient/crawler/models/__init__.py +35 -0
- lockss/pyclient/crawler/models/api_status.py +344 -0
- lockss/pyclient/crawler/models/counter.py +142 -0
- lockss/pyclient/crawler/models/crawl_desc.py +344 -0
- lockss/pyclient/crawler/models/crawl_job.py +280 -0
- lockss/pyclient/crawler/models/crawl_pager.py +140 -0
- lockss/pyclient/crawler/models/crawl_status.py +780 -0
- lockss/pyclient/crawler/models/crawl_ws_result.py +814 -0
- lockss/pyclient/crawler/models/crawl_ws_result_pages_with_errors.py +162 -0
- lockss/pyclient/crawler/models/crawler_config.py +142 -0
- lockss/pyclient/crawler/models/crawler_status.py +279 -0
- lockss/pyclient/crawler/models/crawler_statuses.py +112 -0
- lockss/pyclient/crawler/models/error_result.py +164 -0
- lockss/pyclient/crawler/models/job_pager.py +140 -0
- lockss/pyclient/crawler/models/job_status.py +147 -0
- lockss/pyclient/crawler/models/mime_counter.py +169 -0
- lockss/pyclient/crawler/models/page_info.py +228 -0
- lockss/pyclient/crawler/models/url_error.py +148 -0
- lockss/pyclient/crawler/models/url_info.py +167 -0
- lockss/pyclient/crawler/models/url_pager.py +140 -0
- lockss/pyclient/crawler/rest.py +317 -0
- lockss/pyclient/md/__init__.py +36 -0
- lockss/pyclient/md/api/__init__.py +9 -0
- lockss/pyclient/md/api/mdupdates_api.py +508 -0
- lockss/pyclient/md/api/metadata_api.py +136 -0
- lockss/pyclient/md/api/status_api.py +120 -0
- lockss/pyclient/md/api/urls_api.py +224 -0
- lockss/pyclient/md/api_client.py +632 -0
- lockss/pyclient/md/configuration.py +254 -0
- lockss/pyclient/md/models/__init__.py +27 -0
- lockss/pyclient/md/models/api_status.py +344 -0
- lockss/pyclient/md/models/au.py +169 -0
- lockss/pyclient/md/models/au_metadata_page_info.py +140 -0
- lockss/pyclient/md/models/error_result.py +164 -0
- lockss/pyclient/md/models/item_metadata.py +196 -0
- lockss/pyclient/md/models/job.py +280 -0
- lockss/pyclient/md/models/job_page_info.py +140 -0
- lockss/pyclient/md/models/metadata_update_spec.py +142 -0
- lockss/pyclient/md/models/page_info.py +228 -0
- lockss/pyclient/md/models/status.py +142 -0
- lockss/pyclient/md/models/url_info.py +142 -0
- lockss/pyclient/md/rest.py +317 -0
- lockss/pyclient/poller/__init__.py +54 -0
- lockss/pyclient/poller/api/__init__.py +13 -0
- lockss/pyclient/poller/api/export_api.py +156 -0
- lockss/pyclient/poller/api/hash_api.py +413 -0
- lockss/pyclient/poller/api/import_api.py +157 -0
- lockss/pyclient/poller/api/poll_detail_api.py +374 -0
- lockss/pyclient/poller/api/poller_polls_api.py +223 -0
- lockss/pyclient/poller/api/repo_api.py +223 -0
- lockss/pyclient/poller/api/service_api.py +694 -0
- lockss/pyclient/poller/api/voter_polls_api.py +223 -0
- lockss/pyclient/poller/api_client.py +632 -0
- lockss/pyclient/poller/configuration.py +254 -0
- lockss/pyclient/poller/models/__init__.py +41 -0
- lockss/pyclient/poller/models/api_status.py +344 -0
- lockss/pyclient/poller/models/aus_import_body.py +199 -0
- lockss/pyclient/poller/models/cached_uri_set_spec.py +169 -0
- lockss/pyclient/poller/models/error_result.py +164 -0
- lockss/pyclient/poller/models/hasher_ws_params.py +432 -0
- lockss/pyclient/poller/models/link_desc.py +141 -0
- lockss/pyclient/poller/models/page_desc.py +227 -0
- lockss/pyclient/poller/models/peer_data.py +638 -0
- lockss/pyclient/poller/models/peer_ws_result.py +113 -0
- lockss/pyclient/poller/models/poll_desc.py +285 -0
- lockss/pyclient/poller/models/poll_ws_result.py +142 -0
- lockss/pyclient/poller/models/poller_detail.py +613 -0
- lockss/pyclient/poller/models/poller_pager.py +139 -0
- lockss/pyclient/poller/models/poller_summary.py +452 -0
- lockss/pyclient/poller/models/repair_data.py +176 -0
- lockss/pyclient/poller/models/repair_pager.py +139 -0
- lockss/pyclient/poller/models/repair_queue.py +249 -0
- lockss/pyclient/poller/models/repository_space_ws_result.py +113 -0
- lockss/pyclient/poller/models/repository_ws_result.py +113 -0
- lockss/pyclient/poller/models/tally_data.py +471 -0
- lockss/pyclient/poller/models/url_pager.py +139 -0
- lockss/pyclient/poller/models/vote_ws_result.py +142 -0
- lockss/pyclient/poller/models/voter_detail.py +701 -0
- lockss/pyclient/poller/models/voter_pager.py +139 -0
- lockss/pyclient/poller/models/voter_summary.py +284 -0
- lockss/pyclient/poller/rest.py +317 -0
- lockss/pyclient/rs/__init__.py +41 -0
- lockss/pyclient/rs/api/__init__.py +10 -0
- lockss/pyclient/rs/api/artifacts_api.py +988 -0
- lockss/pyclient/rs/api/aus_api.py +334 -0
- lockss/pyclient/rs/api/repo_api.py +379 -0
- lockss/pyclient/rs/api/status_api.py +120 -0
- lockss/pyclient/rs/api/wayback_api.py +386 -0
- lockss/pyclient/rs/api_client.py +632 -0
- lockss/pyclient/rs/configuration.py +247 -0
- lockss/pyclient/rs/models/__init__.py +31 -0
- lockss/pyclient/rs/models/api_status.py +344 -0
- lockss/pyclient/rs/models/archives_body.py +142 -0
- lockss/pyclient/rs/models/artifact.py +344 -0
- lockss/pyclient/rs/models/artifact_page_info.py +140 -0
- lockss/pyclient/rs/models/artifact_properties.py +344 -0
- lockss/pyclient/rs/models/artifacts_body.py +170 -0
- lockss/pyclient/rs/models/au_size.py +162 -0
- lockss/pyclient/rs/models/auid_page_info.py +140 -0
- lockss/pyclient/rs/models/error_result.py +164 -0
- lockss/pyclient/rs/models/import_status.py +298 -0
- lockss/pyclient/rs/models/page_info.py +229 -0
- lockss/pyclient/rs/models/repository_info.py +164 -0
- lockss/pyclient/rs/models/repository_statistics.py +112 -0
- lockss/pyclient/rs/models/storage_info.py +287 -0
- lockss/pyclient/rs/models/streaming_response_body.py +84 -0
- lockss/pyclient/rs/rest.py +317 -0
- lockss_pyclient-0.1.0.dev1.dist-info/LICENSE +27 -0
- lockss_pyclient-0.1.0.dev1.dist-info/METADATA +29 -0
- lockss_pyclient-0.1.0.dev1.dist-info/RECORD +148 -0
- lockss_pyclient-0.1.0.dev1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,694 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LOCKSS Poller Service REST API
|
|
5
|
+
|
|
6
|
+
REST API of the LOCKSS Poller Service # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0.0
|
|
9
|
+
Contact: lockss-support@lockss.org
|
|
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 lockss.pyclient.poller.api_client import ApiClient
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ServiceApi(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 call_poll(self, body, **kwargs): # noqa: E501
|
|
36
|
+
"""Send a request to call a poll to the poller # noqa: E501
|
|
37
|
+
|
|
38
|
+
Use the information found in the descriptor object to initiate a poll. # noqa: E501
|
|
39
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
40
|
+
asynchronous HTTP request, please pass async_req=True
|
|
41
|
+
>>> thread = api.call_poll(body, async_req=True)
|
|
42
|
+
>>> result = thread.get()
|
|
43
|
+
|
|
44
|
+
:param async_req bool
|
|
45
|
+
:param PollDesc body: A poll descriptor object used to define the poll being requested. (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.call_poll_with_http_info(body, **kwargs) # noqa: E501
|
|
53
|
+
else:
|
|
54
|
+
(data) = self.call_poll_with_http_info(body, **kwargs) # noqa: E501
|
|
55
|
+
return data
|
|
56
|
+
|
|
57
|
+
def call_poll_with_http_info(self, body, **kwargs): # noqa: E501
|
|
58
|
+
"""Send a request to call a poll to the poller # noqa: E501
|
|
59
|
+
|
|
60
|
+
Use the information found in the descriptor object to initiate a poll. # noqa: E501
|
|
61
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
62
|
+
asynchronous HTTP request, please pass async_req=True
|
|
63
|
+
>>> thread = api.call_poll_with_http_info(body, async_req=True)
|
|
64
|
+
>>> result = thread.get()
|
|
65
|
+
|
|
66
|
+
:param async_req bool
|
|
67
|
+
:param PollDesc body: A poll descriptor object used to define the poll being requested. (required)
|
|
68
|
+
:return: str
|
|
69
|
+
If the method is called asynchronously,
|
|
70
|
+
returns the request thread.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
all_params = ['body'] # 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 call_poll" % key
|
|
85
|
+
)
|
|
86
|
+
params[key] = val
|
|
87
|
+
del params['kwargs']
|
|
88
|
+
# verify the required parameter 'body' is set
|
|
89
|
+
if ('body' not in params or
|
|
90
|
+
params['body'] is None):
|
|
91
|
+
raise ValueError("Missing the required parameter `body` when calling `call_poll`") # noqa: E501
|
|
92
|
+
|
|
93
|
+
collection_formats = {}
|
|
94
|
+
|
|
95
|
+
path_params = {}
|
|
96
|
+
|
|
97
|
+
query_params = []
|
|
98
|
+
|
|
99
|
+
header_params = {}
|
|
100
|
+
|
|
101
|
+
form_params = []
|
|
102
|
+
local_var_files = {}
|
|
103
|
+
|
|
104
|
+
body_params = None
|
|
105
|
+
if 'body' in params:
|
|
106
|
+
body_params = params['body']
|
|
107
|
+
# HTTP header `Accept`
|
|
108
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
109
|
+
['application/json']) # noqa: E501
|
|
110
|
+
|
|
111
|
+
# HTTP header `Content-Type`
|
|
112
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
113
|
+
['application/json']) # noqa: E501
|
|
114
|
+
|
|
115
|
+
# Authentication setting
|
|
116
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
117
|
+
|
|
118
|
+
return self.api_client.call_api(
|
|
119
|
+
'/polls', 'POST',
|
|
120
|
+
path_params,
|
|
121
|
+
query_params,
|
|
122
|
+
header_params,
|
|
123
|
+
body=body_params,
|
|
124
|
+
post_params=form_params,
|
|
125
|
+
files=local_var_files,
|
|
126
|
+
response_type='str', # noqa: E501
|
|
127
|
+
auth_settings=auth_settings,
|
|
128
|
+
async_req=params.get('async_req'),
|
|
129
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
130
|
+
_preload_content=params.get('_preload_content', True),
|
|
131
|
+
_request_timeout=params.get('_request_timeout'),
|
|
132
|
+
collection_formats=collection_formats)
|
|
133
|
+
|
|
134
|
+
def cancel_poll(self, ps_id, **kwargs): # noqa: E501
|
|
135
|
+
"""Stop a poll and remove from queue. # noqa: E501
|
|
136
|
+
|
|
137
|
+
Stop a running poll and delete any schecduled polls for poll with the poll service id. # noqa: E501
|
|
138
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
139
|
+
asynchronous HTTP request, please pass async_req=True
|
|
140
|
+
>>> thread = api.cancel_poll(ps_id, async_req=True)
|
|
141
|
+
>>> result = thread.get()
|
|
142
|
+
|
|
143
|
+
:param async_req bool
|
|
144
|
+
:param str ps_id: The poll id. (required)
|
|
145
|
+
:return: None
|
|
146
|
+
If the method is called asynchronously,
|
|
147
|
+
returns the request thread.
|
|
148
|
+
"""
|
|
149
|
+
kwargs['_return_http_data_only'] = True
|
|
150
|
+
if kwargs.get('async_req'):
|
|
151
|
+
return self.cancel_poll_with_http_info(ps_id, **kwargs) # noqa: E501
|
|
152
|
+
else:
|
|
153
|
+
(data) = self.cancel_poll_with_http_info(ps_id, **kwargs) # noqa: E501
|
|
154
|
+
return data
|
|
155
|
+
|
|
156
|
+
def cancel_poll_with_http_info(self, ps_id, **kwargs): # noqa: E501
|
|
157
|
+
"""Stop a poll and remove from queue. # noqa: E501
|
|
158
|
+
|
|
159
|
+
Stop a running poll and delete any schecduled polls for poll with the poll service id. # noqa: E501
|
|
160
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
161
|
+
asynchronous HTTP request, please pass async_req=True
|
|
162
|
+
>>> thread = api.cancel_poll_with_http_info(ps_id, async_req=True)
|
|
163
|
+
>>> result = thread.get()
|
|
164
|
+
|
|
165
|
+
:param async_req bool
|
|
166
|
+
:param str ps_id: The poll id. (required)
|
|
167
|
+
:return: None
|
|
168
|
+
If the method is called asynchronously,
|
|
169
|
+
returns the request thread.
|
|
170
|
+
"""
|
|
171
|
+
|
|
172
|
+
all_params = ['ps_id'] # noqa: E501
|
|
173
|
+
all_params.append('async_req')
|
|
174
|
+
all_params.append('_return_http_data_only')
|
|
175
|
+
all_params.append('_preload_content')
|
|
176
|
+
all_params.append('_request_timeout')
|
|
177
|
+
|
|
178
|
+
params = locals()
|
|
179
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
180
|
+
if key not in all_params:
|
|
181
|
+
raise TypeError(
|
|
182
|
+
"Got an unexpected keyword argument '%s'"
|
|
183
|
+
" to method cancel_poll" % key
|
|
184
|
+
)
|
|
185
|
+
params[key] = val
|
|
186
|
+
del params['kwargs']
|
|
187
|
+
# verify the required parameter 'ps_id' is set
|
|
188
|
+
if ('ps_id' not in params or
|
|
189
|
+
params['ps_id'] is None):
|
|
190
|
+
raise ValueError("Missing the required parameter `ps_id` when calling `cancel_poll`") # noqa: E501
|
|
191
|
+
|
|
192
|
+
collection_formats = {}
|
|
193
|
+
|
|
194
|
+
path_params = {}
|
|
195
|
+
if 'ps_id' in params:
|
|
196
|
+
path_params['psId'] = params['ps_id'] # noqa: E501
|
|
197
|
+
|
|
198
|
+
query_params = []
|
|
199
|
+
|
|
200
|
+
header_params = {}
|
|
201
|
+
|
|
202
|
+
form_params = []
|
|
203
|
+
local_var_files = {}
|
|
204
|
+
|
|
205
|
+
body_params = None
|
|
206
|
+
# HTTP header `Accept`
|
|
207
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
208
|
+
['application/json']) # noqa: E501
|
|
209
|
+
|
|
210
|
+
# Authentication setting
|
|
211
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
212
|
+
|
|
213
|
+
return self.api_client.call_api(
|
|
214
|
+
'/polls/{psId}', 'DELETE',
|
|
215
|
+
path_params,
|
|
216
|
+
query_params,
|
|
217
|
+
header_params,
|
|
218
|
+
body=body_params,
|
|
219
|
+
post_params=form_params,
|
|
220
|
+
files=local_var_files,
|
|
221
|
+
response_type=None, # noqa: E501
|
|
222
|
+
auth_settings=auth_settings,
|
|
223
|
+
async_req=params.get('async_req'),
|
|
224
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
225
|
+
_preload_content=params.get('_preload_content', True),
|
|
226
|
+
_request_timeout=params.get('_request_timeout'),
|
|
227
|
+
collection_formats=collection_formats)
|
|
228
|
+
|
|
229
|
+
def get_peers(self, peer_query, **kwargs): # noqa: E501
|
|
230
|
+
"""Query for peer properties # noqa: E501
|
|
231
|
+
|
|
232
|
+
Query for peers that meet a set of specified conditions # noqa: E501
|
|
233
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
234
|
+
asynchronous HTTP request, please pass async_req=True
|
|
235
|
+
>>> thread = api.get_peers(peer_query, async_req=True)
|
|
236
|
+
>>> result = thread.get()
|
|
237
|
+
|
|
238
|
+
:param async_req bool
|
|
239
|
+
:param str peer_query: The query that specifies the peers to be returned (required)
|
|
240
|
+
:return: list[PeerWsResult]
|
|
241
|
+
If the method is called asynchronously,
|
|
242
|
+
returns the request thread.
|
|
243
|
+
"""
|
|
244
|
+
kwargs['_return_http_data_only'] = True
|
|
245
|
+
if kwargs.get('async_req'):
|
|
246
|
+
return self.get_peers_with_http_info(peer_query, **kwargs) # noqa: E501
|
|
247
|
+
else:
|
|
248
|
+
(data) = self.get_peers_with_http_info(peer_query, **kwargs) # noqa: E501
|
|
249
|
+
return data
|
|
250
|
+
|
|
251
|
+
def get_peers_with_http_info(self, peer_query, **kwargs): # noqa: E501
|
|
252
|
+
"""Query for peer properties # noqa: E501
|
|
253
|
+
|
|
254
|
+
Query for peers that meet a set of specified conditions # noqa: E501
|
|
255
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
256
|
+
asynchronous HTTP request, please pass async_req=True
|
|
257
|
+
>>> thread = api.get_peers_with_http_info(peer_query, async_req=True)
|
|
258
|
+
>>> result = thread.get()
|
|
259
|
+
|
|
260
|
+
:param async_req bool
|
|
261
|
+
:param str peer_query: The query that specifies the peers to be returned (required)
|
|
262
|
+
:return: list[PeerWsResult]
|
|
263
|
+
If the method is called asynchronously,
|
|
264
|
+
returns the request thread.
|
|
265
|
+
"""
|
|
266
|
+
|
|
267
|
+
all_params = ['peer_query'] # noqa: E501
|
|
268
|
+
all_params.append('async_req')
|
|
269
|
+
all_params.append('_return_http_data_only')
|
|
270
|
+
all_params.append('_preload_content')
|
|
271
|
+
all_params.append('_request_timeout')
|
|
272
|
+
|
|
273
|
+
params = locals()
|
|
274
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
275
|
+
if key not in all_params:
|
|
276
|
+
raise TypeError(
|
|
277
|
+
"Got an unexpected keyword argument '%s'"
|
|
278
|
+
" to method get_peers" % key
|
|
279
|
+
)
|
|
280
|
+
params[key] = val
|
|
281
|
+
del params['kwargs']
|
|
282
|
+
# verify the required parameter 'peer_query' is set
|
|
283
|
+
if ('peer_query' not in params or
|
|
284
|
+
params['peer_query'] is None):
|
|
285
|
+
raise ValueError("Missing the required parameter `peer_query` when calling `get_peers`") # noqa: E501
|
|
286
|
+
|
|
287
|
+
collection_formats = {}
|
|
288
|
+
|
|
289
|
+
path_params = {}
|
|
290
|
+
|
|
291
|
+
query_params = []
|
|
292
|
+
if 'peer_query' in params:
|
|
293
|
+
query_params.append(('peerQuery', params['peer_query'])) # noqa: E501
|
|
294
|
+
|
|
295
|
+
header_params = {}
|
|
296
|
+
|
|
297
|
+
form_params = []
|
|
298
|
+
local_var_files = {}
|
|
299
|
+
|
|
300
|
+
body_params = None
|
|
301
|
+
# HTTP header `Accept`
|
|
302
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
303
|
+
['application/json']) # noqa: E501
|
|
304
|
+
|
|
305
|
+
# Authentication setting
|
|
306
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
307
|
+
|
|
308
|
+
return self.api_client.call_api(
|
|
309
|
+
'/ws/peers', 'GET',
|
|
310
|
+
path_params,
|
|
311
|
+
query_params,
|
|
312
|
+
header_params,
|
|
313
|
+
body=body_params,
|
|
314
|
+
post_params=form_params,
|
|
315
|
+
files=local_var_files,
|
|
316
|
+
response_type='list[PeerWsResult]', # noqa: E501
|
|
317
|
+
auth_settings=auth_settings,
|
|
318
|
+
async_req=params.get('async_req'),
|
|
319
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
320
|
+
_preload_content=params.get('_preload_content', True),
|
|
321
|
+
_request_timeout=params.get('_request_timeout'),
|
|
322
|
+
collection_formats=collection_formats)
|
|
323
|
+
|
|
324
|
+
def get_poll_status(self, ps_id, **kwargs): # noqa: E501
|
|
325
|
+
"""Get queued poll status # noqa: E501
|
|
326
|
+
|
|
327
|
+
Get the status of a previously queued poll. # noqa: E501
|
|
328
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
329
|
+
asynchronous HTTP request, please pass async_req=True
|
|
330
|
+
>>> thread = api.get_poll_status(ps_id, async_req=True)
|
|
331
|
+
>>> result = thread.get()
|
|
332
|
+
|
|
333
|
+
:param async_req bool
|
|
334
|
+
:param str ps_id: The poll id. (required)
|
|
335
|
+
:return: PollerSummary
|
|
336
|
+
If the method is called asynchronously,
|
|
337
|
+
returns the request thread.
|
|
338
|
+
"""
|
|
339
|
+
kwargs['_return_http_data_only'] = True
|
|
340
|
+
if kwargs.get('async_req'):
|
|
341
|
+
return self.get_poll_status_with_http_info(ps_id, **kwargs) # noqa: E501
|
|
342
|
+
else:
|
|
343
|
+
(data) = self.get_poll_status_with_http_info(ps_id, **kwargs) # noqa: E501
|
|
344
|
+
return data
|
|
345
|
+
|
|
346
|
+
def get_poll_status_with_http_info(self, ps_id, **kwargs): # noqa: E501
|
|
347
|
+
"""Get queued poll status # noqa: E501
|
|
348
|
+
|
|
349
|
+
Get the status of a previously queued poll. # noqa: E501
|
|
350
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
351
|
+
asynchronous HTTP request, please pass async_req=True
|
|
352
|
+
>>> thread = api.get_poll_status_with_http_info(ps_id, async_req=True)
|
|
353
|
+
>>> result = thread.get()
|
|
354
|
+
|
|
355
|
+
:param async_req bool
|
|
356
|
+
:param str ps_id: The poll id. (required)
|
|
357
|
+
:return: PollerSummary
|
|
358
|
+
If the method is called asynchronously,
|
|
359
|
+
returns the request thread.
|
|
360
|
+
"""
|
|
361
|
+
|
|
362
|
+
all_params = ['ps_id'] # noqa: E501
|
|
363
|
+
all_params.append('async_req')
|
|
364
|
+
all_params.append('_return_http_data_only')
|
|
365
|
+
all_params.append('_preload_content')
|
|
366
|
+
all_params.append('_request_timeout')
|
|
367
|
+
|
|
368
|
+
params = locals()
|
|
369
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
370
|
+
if key not in all_params:
|
|
371
|
+
raise TypeError(
|
|
372
|
+
"Got an unexpected keyword argument '%s'"
|
|
373
|
+
" to method get_poll_status" % key
|
|
374
|
+
)
|
|
375
|
+
params[key] = val
|
|
376
|
+
del params['kwargs']
|
|
377
|
+
# verify the required parameter 'ps_id' is set
|
|
378
|
+
if ('ps_id' not in params or
|
|
379
|
+
params['ps_id'] is None):
|
|
380
|
+
raise ValueError("Missing the required parameter `ps_id` when calling `get_poll_status`") # noqa: E501
|
|
381
|
+
|
|
382
|
+
collection_formats = {}
|
|
383
|
+
|
|
384
|
+
path_params = {}
|
|
385
|
+
if 'ps_id' in params:
|
|
386
|
+
path_params['psId'] = params['ps_id'] # noqa: E501
|
|
387
|
+
|
|
388
|
+
query_params = []
|
|
389
|
+
|
|
390
|
+
header_params = {}
|
|
391
|
+
|
|
392
|
+
form_params = []
|
|
393
|
+
local_var_files = {}
|
|
394
|
+
|
|
395
|
+
body_params = None
|
|
396
|
+
# HTTP header `Accept`
|
|
397
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
398
|
+
['application/json']) # noqa: E501
|
|
399
|
+
|
|
400
|
+
# Authentication setting
|
|
401
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
402
|
+
|
|
403
|
+
return self.api_client.call_api(
|
|
404
|
+
'/polls/{psId}', 'GET',
|
|
405
|
+
path_params,
|
|
406
|
+
query_params,
|
|
407
|
+
header_params,
|
|
408
|
+
body=body_params,
|
|
409
|
+
post_params=form_params,
|
|
410
|
+
files=local_var_files,
|
|
411
|
+
response_type='PollerSummary', # noqa: E501
|
|
412
|
+
auth_settings=auth_settings,
|
|
413
|
+
async_req=params.get('async_req'),
|
|
414
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
415
|
+
_preload_content=params.get('_preload_content', True),
|
|
416
|
+
_request_timeout=params.get('_request_timeout'),
|
|
417
|
+
collection_formats=collection_formats)
|
|
418
|
+
|
|
419
|
+
def get_polls(self, poll_query, **kwargs): # noqa: E501
|
|
420
|
+
"""Query for poll properties # noqa: E501
|
|
421
|
+
|
|
422
|
+
Query for polls that meet a set of specified conditions # noqa: E501
|
|
423
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
424
|
+
asynchronous HTTP request, please pass async_req=True
|
|
425
|
+
>>> thread = api.get_polls(poll_query, async_req=True)
|
|
426
|
+
>>> result = thread.get()
|
|
427
|
+
|
|
428
|
+
:param async_req bool
|
|
429
|
+
:param str poll_query: The query that specifies the polls to be returned (required)
|
|
430
|
+
:return: list[PollWsResult]
|
|
431
|
+
If the method is called asynchronously,
|
|
432
|
+
returns the request thread.
|
|
433
|
+
"""
|
|
434
|
+
kwargs['_return_http_data_only'] = True
|
|
435
|
+
if kwargs.get('async_req'):
|
|
436
|
+
return self.get_polls_with_http_info(poll_query, **kwargs) # noqa: E501
|
|
437
|
+
else:
|
|
438
|
+
(data) = self.get_polls_with_http_info(poll_query, **kwargs) # noqa: E501
|
|
439
|
+
return data
|
|
440
|
+
|
|
441
|
+
def get_polls_with_http_info(self, poll_query, **kwargs): # noqa: E501
|
|
442
|
+
"""Query for poll properties # noqa: E501
|
|
443
|
+
|
|
444
|
+
Query for polls that meet a set of specified conditions # noqa: E501
|
|
445
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
446
|
+
asynchronous HTTP request, please pass async_req=True
|
|
447
|
+
>>> thread = api.get_polls_with_http_info(poll_query, async_req=True)
|
|
448
|
+
>>> result = thread.get()
|
|
449
|
+
|
|
450
|
+
:param async_req bool
|
|
451
|
+
:param str poll_query: The query that specifies the polls to be returned (required)
|
|
452
|
+
:return: list[PollWsResult]
|
|
453
|
+
If the method is called asynchronously,
|
|
454
|
+
returns the request thread.
|
|
455
|
+
"""
|
|
456
|
+
|
|
457
|
+
all_params = ['poll_query'] # noqa: E501
|
|
458
|
+
all_params.append('async_req')
|
|
459
|
+
all_params.append('_return_http_data_only')
|
|
460
|
+
all_params.append('_preload_content')
|
|
461
|
+
all_params.append('_request_timeout')
|
|
462
|
+
|
|
463
|
+
params = locals()
|
|
464
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
465
|
+
if key not in all_params:
|
|
466
|
+
raise TypeError(
|
|
467
|
+
"Got an unexpected keyword argument '%s'"
|
|
468
|
+
" to method get_polls" % key
|
|
469
|
+
)
|
|
470
|
+
params[key] = val
|
|
471
|
+
del params['kwargs']
|
|
472
|
+
# verify the required parameter 'poll_query' is set
|
|
473
|
+
if ('poll_query' not in params or
|
|
474
|
+
params['poll_query'] is None):
|
|
475
|
+
raise ValueError("Missing the required parameter `poll_query` when calling `get_polls`") # noqa: E501
|
|
476
|
+
|
|
477
|
+
collection_formats = {}
|
|
478
|
+
|
|
479
|
+
path_params = {}
|
|
480
|
+
|
|
481
|
+
query_params = []
|
|
482
|
+
if 'poll_query' in params:
|
|
483
|
+
query_params.append(('pollQuery', params['poll_query'])) # noqa: E501
|
|
484
|
+
|
|
485
|
+
header_params = {}
|
|
486
|
+
|
|
487
|
+
form_params = []
|
|
488
|
+
local_var_files = {}
|
|
489
|
+
|
|
490
|
+
body_params = None
|
|
491
|
+
# HTTP header `Accept`
|
|
492
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
493
|
+
['application/json']) # noqa: E501
|
|
494
|
+
|
|
495
|
+
# Authentication setting
|
|
496
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
497
|
+
|
|
498
|
+
return self.api_client.call_api(
|
|
499
|
+
'/ws/polls', 'GET',
|
|
500
|
+
path_params,
|
|
501
|
+
query_params,
|
|
502
|
+
header_params,
|
|
503
|
+
body=body_params,
|
|
504
|
+
post_params=form_params,
|
|
505
|
+
files=local_var_files,
|
|
506
|
+
response_type='list[PollWsResult]', # noqa: E501
|
|
507
|
+
auth_settings=auth_settings,
|
|
508
|
+
async_req=params.get('async_req'),
|
|
509
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
510
|
+
_preload_content=params.get('_preload_content', True),
|
|
511
|
+
_request_timeout=params.get('_request_timeout'),
|
|
512
|
+
collection_formats=collection_formats)
|
|
513
|
+
|
|
514
|
+
def get_status(self, **kwargs): # noqa: E501
|
|
515
|
+
"""Get the status of the service # noqa: E501
|
|
516
|
+
|
|
517
|
+
Get the status of the service # noqa: E501
|
|
518
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
519
|
+
asynchronous HTTP request, please pass async_req=True
|
|
520
|
+
>>> thread = api.get_status(async_req=True)
|
|
521
|
+
>>> result = thread.get()
|
|
522
|
+
|
|
523
|
+
:param async_req bool
|
|
524
|
+
:return: ApiStatus
|
|
525
|
+
If the method is called asynchronously,
|
|
526
|
+
returns the request thread.
|
|
527
|
+
"""
|
|
528
|
+
kwargs['_return_http_data_only'] = True
|
|
529
|
+
if kwargs.get('async_req'):
|
|
530
|
+
return self.get_status_with_http_info(**kwargs) # noqa: E501
|
|
531
|
+
else:
|
|
532
|
+
(data) = self.get_status_with_http_info(**kwargs) # noqa: E501
|
|
533
|
+
return data
|
|
534
|
+
|
|
535
|
+
def get_status_with_http_info(self, **kwargs): # noqa: E501
|
|
536
|
+
"""Get the status of the service # noqa: E501
|
|
537
|
+
|
|
538
|
+
Get the status of the service # noqa: E501
|
|
539
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
540
|
+
asynchronous HTTP request, please pass async_req=True
|
|
541
|
+
>>> thread = api.get_status_with_http_info(async_req=True)
|
|
542
|
+
>>> result = thread.get()
|
|
543
|
+
|
|
544
|
+
:param async_req bool
|
|
545
|
+
:return: ApiStatus
|
|
546
|
+
If the method is called asynchronously,
|
|
547
|
+
returns the request thread.
|
|
548
|
+
"""
|
|
549
|
+
|
|
550
|
+
all_params = [] # noqa: E501
|
|
551
|
+
all_params.append('async_req')
|
|
552
|
+
all_params.append('_return_http_data_only')
|
|
553
|
+
all_params.append('_preload_content')
|
|
554
|
+
all_params.append('_request_timeout')
|
|
555
|
+
|
|
556
|
+
params = locals()
|
|
557
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
558
|
+
if key not in all_params:
|
|
559
|
+
raise TypeError(
|
|
560
|
+
"Got an unexpected keyword argument '%s'"
|
|
561
|
+
" to method get_status" % key
|
|
562
|
+
)
|
|
563
|
+
params[key] = val
|
|
564
|
+
del params['kwargs']
|
|
565
|
+
|
|
566
|
+
collection_formats = {}
|
|
567
|
+
|
|
568
|
+
path_params = {}
|
|
569
|
+
|
|
570
|
+
query_params = []
|
|
571
|
+
|
|
572
|
+
header_params = {}
|
|
573
|
+
|
|
574
|
+
form_params = []
|
|
575
|
+
local_var_files = {}
|
|
576
|
+
|
|
577
|
+
body_params = None
|
|
578
|
+
# HTTP header `Accept`
|
|
579
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
580
|
+
['application/json']) # noqa: E501
|
|
581
|
+
|
|
582
|
+
# Authentication setting
|
|
583
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
584
|
+
|
|
585
|
+
return self.api_client.call_api(
|
|
586
|
+
'/status', 'GET',
|
|
587
|
+
path_params,
|
|
588
|
+
query_params,
|
|
589
|
+
header_params,
|
|
590
|
+
body=body_params,
|
|
591
|
+
post_params=form_params,
|
|
592
|
+
files=local_var_files,
|
|
593
|
+
response_type='ApiStatus', # noqa: E501
|
|
594
|
+
auth_settings=auth_settings,
|
|
595
|
+
async_req=params.get('async_req'),
|
|
596
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
597
|
+
_preload_content=params.get('_preload_content', True),
|
|
598
|
+
_request_timeout=params.get('_request_timeout'),
|
|
599
|
+
collection_formats=collection_formats)
|
|
600
|
+
|
|
601
|
+
def get_votes(self, vote_query, **kwargs): # noqa: E501
|
|
602
|
+
"""Query for vote properties # noqa: E501
|
|
603
|
+
|
|
604
|
+
Query for votes that meet a set of specified conditions # noqa: E501
|
|
605
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
606
|
+
asynchronous HTTP request, please pass async_req=True
|
|
607
|
+
>>> thread = api.get_votes(vote_query, async_req=True)
|
|
608
|
+
>>> result = thread.get()
|
|
609
|
+
|
|
610
|
+
:param async_req bool
|
|
611
|
+
:param str vote_query: The query that specifies the votes to be returned (required)
|
|
612
|
+
:return: list[VoteWsResult]
|
|
613
|
+
If the method is called asynchronously,
|
|
614
|
+
returns the request thread.
|
|
615
|
+
"""
|
|
616
|
+
kwargs['_return_http_data_only'] = True
|
|
617
|
+
if kwargs.get('async_req'):
|
|
618
|
+
return self.get_votes_with_http_info(vote_query, **kwargs) # noqa: E501
|
|
619
|
+
else:
|
|
620
|
+
(data) = self.get_votes_with_http_info(vote_query, **kwargs) # noqa: E501
|
|
621
|
+
return data
|
|
622
|
+
|
|
623
|
+
def get_votes_with_http_info(self, vote_query, **kwargs): # noqa: E501
|
|
624
|
+
"""Query for vote properties # noqa: E501
|
|
625
|
+
|
|
626
|
+
Query for votes that meet a set of specified conditions # noqa: E501
|
|
627
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
628
|
+
asynchronous HTTP request, please pass async_req=True
|
|
629
|
+
>>> thread = api.get_votes_with_http_info(vote_query, async_req=True)
|
|
630
|
+
>>> result = thread.get()
|
|
631
|
+
|
|
632
|
+
:param async_req bool
|
|
633
|
+
:param str vote_query: The query that specifies the votes to be returned (required)
|
|
634
|
+
:return: list[VoteWsResult]
|
|
635
|
+
If the method is called asynchronously,
|
|
636
|
+
returns the request thread.
|
|
637
|
+
"""
|
|
638
|
+
|
|
639
|
+
all_params = ['vote_query'] # noqa: E501
|
|
640
|
+
all_params.append('async_req')
|
|
641
|
+
all_params.append('_return_http_data_only')
|
|
642
|
+
all_params.append('_preload_content')
|
|
643
|
+
all_params.append('_request_timeout')
|
|
644
|
+
|
|
645
|
+
params = locals()
|
|
646
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
647
|
+
if key not in all_params:
|
|
648
|
+
raise TypeError(
|
|
649
|
+
"Got an unexpected keyword argument '%s'"
|
|
650
|
+
" to method get_votes" % key
|
|
651
|
+
)
|
|
652
|
+
params[key] = val
|
|
653
|
+
del params['kwargs']
|
|
654
|
+
# verify the required parameter 'vote_query' is set
|
|
655
|
+
if ('vote_query' not in params or
|
|
656
|
+
params['vote_query'] is None):
|
|
657
|
+
raise ValueError("Missing the required parameter `vote_query` when calling `get_votes`") # noqa: E501
|
|
658
|
+
|
|
659
|
+
collection_formats = {}
|
|
660
|
+
|
|
661
|
+
path_params = {}
|
|
662
|
+
|
|
663
|
+
query_params = []
|
|
664
|
+
if 'vote_query' in params:
|
|
665
|
+
query_params.append(('voteQuery', params['vote_query'])) # noqa: E501
|
|
666
|
+
|
|
667
|
+
header_params = {}
|
|
668
|
+
|
|
669
|
+
form_params = []
|
|
670
|
+
local_var_files = {}
|
|
671
|
+
|
|
672
|
+
body_params = None
|
|
673
|
+
# HTTP header `Accept`
|
|
674
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
675
|
+
['application/json']) # noqa: E501
|
|
676
|
+
|
|
677
|
+
# Authentication setting
|
|
678
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
679
|
+
|
|
680
|
+
return self.api_client.call_api(
|
|
681
|
+
'/ws/votes', 'GET',
|
|
682
|
+
path_params,
|
|
683
|
+
query_params,
|
|
684
|
+
header_params,
|
|
685
|
+
body=body_params,
|
|
686
|
+
post_params=form_params,
|
|
687
|
+
files=local_var_files,
|
|
688
|
+
response_type='list[VoteWsResult]', # noqa: E501
|
|
689
|
+
auth_settings=auth_settings,
|
|
690
|
+
async_req=params.get('async_req'),
|
|
691
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
692
|
+
_preload_content=params.get('_preload_content', True),
|
|
693
|
+
_request_timeout=params.get('_request_timeout'),
|
|
694
|
+
collection_formats=collection_formats)
|