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,223 @@
|
|
|
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 VoterPollsApi(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_polls_as_voter(self, **kwargs): # noqa: E501
|
|
36
|
+
"""Get the list of recent voter only polls. # noqa: E501
|
|
37
|
+
|
|
38
|
+
Get the list of recent polls as voter from the poll queue. if size and page are passed in use those arguments to limit return data. # 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.get_polls_as_voter(async_req=True)
|
|
42
|
+
>>> result = thread.get()
|
|
43
|
+
|
|
44
|
+
:param async_req bool
|
|
45
|
+
:param int size: Size of the page to retrieve.
|
|
46
|
+
:param int page: Number of the page to retrieve.
|
|
47
|
+
:return: VoterPager
|
|
48
|
+
If the method is called asynchronously,
|
|
49
|
+
returns the request thread.
|
|
50
|
+
"""
|
|
51
|
+
kwargs['_return_http_data_only'] = True
|
|
52
|
+
if kwargs.get('async_req'):
|
|
53
|
+
return self.get_polls_as_voter_with_http_info(**kwargs) # noqa: E501
|
|
54
|
+
else:
|
|
55
|
+
(data) = self.get_polls_as_voter_with_http_info(**kwargs) # noqa: E501
|
|
56
|
+
return data
|
|
57
|
+
|
|
58
|
+
def get_polls_as_voter_with_http_info(self, **kwargs): # noqa: E501
|
|
59
|
+
"""Get the list of recent voter only polls. # noqa: E501
|
|
60
|
+
|
|
61
|
+
Get the list of recent polls as voter from the poll queue. if size and page are passed in use those arguments to limit return data. # noqa: E501
|
|
62
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
63
|
+
asynchronous HTTP request, please pass async_req=True
|
|
64
|
+
>>> thread = api.get_polls_as_voter_with_http_info(async_req=True)
|
|
65
|
+
>>> result = thread.get()
|
|
66
|
+
|
|
67
|
+
:param async_req bool
|
|
68
|
+
:param int size: Size of the page to retrieve.
|
|
69
|
+
:param int page: Number of the page to retrieve.
|
|
70
|
+
:return: VoterPager
|
|
71
|
+
If the method is called asynchronously,
|
|
72
|
+
returns the request thread.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
all_params = ['size', 'page'] # noqa: E501
|
|
76
|
+
all_params.append('async_req')
|
|
77
|
+
all_params.append('_return_http_data_only')
|
|
78
|
+
all_params.append('_preload_content')
|
|
79
|
+
all_params.append('_request_timeout')
|
|
80
|
+
|
|
81
|
+
params = locals()
|
|
82
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
83
|
+
if key not in all_params:
|
|
84
|
+
raise TypeError(
|
|
85
|
+
"Got an unexpected keyword argument '%s'"
|
|
86
|
+
" to method get_polls_as_voter" % key
|
|
87
|
+
)
|
|
88
|
+
params[key] = val
|
|
89
|
+
del params['kwargs']
|
|
90
|
+
|
|
91
|
+
collection_formats = {}
|
|
92
|
+
|
|
93
|
+
path_params = {}
|
|
94
|
+
|
|
95
|
+
query_params = []
|
|
96
|
+
if 'size' in params:
|
|
97
|
+
query_params.append(('size', params['size'])) # noqa: E501
|
|
98
|
+
if 'page' in params:
|
|
99
|
+
query_params.append(('page', params['page'])) # noqa: E501
|
|
100
|
+
|
|
101
|
+
header_params = {}
|
|
102
|
+
|
|
103
|
+
form_params = []
|
|
104
|
+
local_var_files = {}
|
|
105
|
+
|
|
106
|
+
body_params = None
|
|
107
|
+
# HTTP header `Accept`
|
|
108
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
109
|
+
['application/json']) # noqa: E501
|
|
110
|
+
|
|
111
|
+
# Authentication setting
|
|
112
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
113
|
+
|
|
114
|
+
return self.api_client.call_api(
|
|
115
|
+
'/polls/voter', 'GET',
|
|
116
|
+
path_params,
|
|
117
|
+
query_params,
|
|
118
|
+
header_params,
|
|
119
|
+
body=body_params,
|
|
120
|
+
post_params=form_params,
|
|
121
|
+
files=local_var_files,
|
|
122
|
+
response_type='VoterPager', # noqa: E501
|
|
123
|
+
auth_settings=auth_settings,
|
|
124
|
+
async_req=params.get('async_req'),
|
|
125
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
126
|
+
_preload_content=params.get('_preload_content', True),
|
|
127
|
+
_request_timeout=params.get('_request_timeout'),
|
|
128
|
+
collection_formats=collection_formats)
|
|
129
|
+
|
|
130
|
+
def get_voter_poll_details(self, poll_key, **kwargs): # noqa: E501
|
|
131
|
+
"""VoterDetails # noqa: E501
|
|
132
|
+
|
|
133
|
+
Return the detailed information about a poll. # noqa: E501
|
|
134
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
135
|
+
asynchronous HTTP request, please pass async_req=True
|
|
136
|
+
>>> thread = api.get_voter_poll_details(poll_key, async_req=True)
|
|
137
|
+
>>> result = thread.get()
|
|
138
|
+
|
|
139
|
+
:param async_req bool
|
|
140
|
+
:param str poll_key: The key assigned by the PollManager. (required)
|
|
141
|
+
:return: VoterDetail
|
|
142
|
+
If the method is called asynchronously,
|
|
143
|
+
returns the request thread.
|
|
144
|
+
"""
|
|
145
|
+
kwargs['_return_http_data_only'] = True
|
|
146
|
+
if kwargs.get('async_req'):
|
|
147
|
+
return self.get_voter_poll_details_with_http_info(poll_key, **kwargs) # noqa: E501
|
|
148
|
+
else:
|
|
149
|
+
(data) = self.get_voter_poll_details_with_http_info(poll_key, **kwargs) # noqa: E501
|
|
150
|
+
return data
|
|
151
|
+
|
|
152
|
+
def get_voter_poll_details_with_http_info(self, poll_key, **kwargs): # noqa: E501
|
|
153
|
+
"""VoterDetails # noqa: E501
|
|
154
|
+
|
|
155
|
+
Return the detailed information about a poll. # noqa: E501
|
|
156
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
157
|
+
asynchronous HTTP request, please pass async_req=True
|
|
158
|
+
>>> thread = api.get_voter_poll_details_with_http_info(poll_key, async_req=True)
|
|
159
|
+
>>> result = thread.get()
|
|
160
|
+
|
|
161
|
+
:param async_req bool
|
|
162
|
+
:param str poll_key: The key assigned by the PollManager. (required)
|
|
163
|
+
:return: VoterDetail
|
|
164
|
+
If the method is called asynchronously,
|
|
165
|
+
returns the request thread.
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
all_params = ['poll_key'] # noqa: E501
|
|
169
|
+
all_params.append('async_req')
|
|
170
|
+
all_params.append('_return_http_data_only')
|
|
171
|
+
all_params.append('_preload_content')
|
|
172
|
+
all_params.append('_request_timeout')
|
|
173
|
+
|
|
174
|
+
params = locals()
|
|
175
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
176
|
+
if key not in all_params:
|
|
177
|
+
raise TypeError(
|
|
178
|
+
"Got an unexpected keyword argument '%s'"
|
|
179
|
+
" to method get_voter_poll_details" % key
|
|
180
|
+
)
|
|
181
|
+
params[key] = val
|
|
182
|
+
del params['kwargs']
|
|
183
|
+
# verify the required parameter 'poll_key' is set
|
|
184
|
+
if ('poll_key' not in params or
|
|
185
|
+
params['poll_key'] is None):
|
|
186
|
+
raise ValueError("Missing the required parameter `poll_key` when calling `get_voter_poll_details`") # noqa: E501
|
|
187
|
+
|
|
188
|
+
collection_formats = {}
|
|
189
|
+
|
|
190
|
+
path_params = {}
|
|
191
|
+
if 'poll_key' in params:
|
|
192
|
+
path_params['pollKey'] = params['poll_key'] # noqa: E501
|
|
193
|
+
|
|
194
|
+
query_params = []
|
|
195
|
+
|
|
196
|
+
header_params = {}
|
|
197
|
+
|
|
198
|
+
form_params = []
|
|
199
|
+
local_var_files = {}
|
|
200
|
+
|
|
201
|
+
body_params = None
|
|
202
|
+
# HTTP header `Accept`
|
|
203
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
204
|
+
['application/json']) # noqa: E501
|
|
205
|
+
|
|
206
|
+
# Authentication setting
|
|
207
|
+
auth_settings = ['basicAuth'] # noqa: E501
|
|
208
|
+
|
|
209
|
+
return self.api_client.call_api(
|
|
210
|
+
'/polls/voter/{pollKey}', 'GET',
|
|
211
|
+
path_params,
|
|
212
|
+
query_params,
|
|
213
|
+
header_params,
|
|
214
|
+
body=body_params,
|
|
215
|
+
post_params=form_params,
|
|
216
|
+
files=local_var_files,
|
|
217
|
+
response_type='VoterDetail', # noqa: E501
|
|
218
|
+
auth_settings=auth_settings,
|
|
219
|
+
async_req=params.get('async_req'),
|
|
220
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
221
|
+
_preload_content=params.get('_preload_content', True),
|
|
222
|
+
_request_timeout=params.get('_request_timeout'),
|
|
223
|
+
collection_formats=collection_formats)
|