mycelium-ai 0.5.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.
- mycelium/__init__.py +0 -0
- mycelium/api/__init__.py +0 -0
- mycelium/api/app.py +1147 -0
- mycelium/api/client_app.py +170 -0
- mycelium/api/generated_sources/__init__.py +0 -0
- mycelium/api/generated_sources/server_schemas/__init__.py +97 -0
- mycelium/api/generated_sources/server_schemas/api/__init__.py +5 -0
- mycelium/api/generated_sources/server_schemas/api/default_api.py +2473 -0
- mycelium/api/generated_sources/server_schemas/api_client.py +766 -0
- mycelium/api/generated_sources/server_schemas/api_response.py +25 -0
- mycelium/api/generated_sources/server_schemas/configuration.py +434 -0
- mycelium/api/generated_sources/server_schemas/exceptions.py +166 -0
- mycelium/api/generated_sources/server_schemas/models/__init__.py +41 -0
- mycelium/api/generated_sources/server_schemas/models/api_section.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/chroma_section.py +69 -0
- mycelium/api/generated_sources/server_schemas/models/clap_section.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/compute_on_server200_response.py +79 -0
- mycelium/api/generated_sources/server_schemas/models/compute_on_server_request.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/compute_text_search_request.py +69 -0
- mycelium/api/generated_sources/server_schemas/models/config_request.py +81 -0
- mycelium/api/generated_sources/server_schemas/models/config_response.py +107 -0
- mycelium/api/generated_sources/server_schemas/models/create_playlist_request.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/get_similar_by_track200_response.py +143 -0
- mycelium/api/generated_sources/server_schemas/models/library_stats_response.py +77 -0
- mycelium/api/generated_sources/server_schemas/models/logging_section.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/media_server_section.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/playlist_response.py +73 -0
- mycelium/api/generated_sources/server_schemas/models/plex_section.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/processing_response.py +90 -0
- mycelium/api/generated_sources/server_schemas/models/save_config_response.py +73 -0
- mycelium/api/generated_sources/server_schemas/models/scan_library_response.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/search_result_response.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/server_section.py +67 -0
- mycelium/api/generated_sources/server_schemas/models/stop_processing_response.py +71 -0
- mycelium/api/generated_sources/server_schemas/models/task_status_response.py +87 -0
- mycelium/api/generated_sources/server_schemas/models/track_database_stats.py +75 -0
- mycelium/api/generated_sources/server_schemas/models/track_response.py +77 -0
- mycelium/api/generated_sources/server_schemas/models/tracks_list_response.py +81 -0
- mycelium/api/generated_sources/server_schemas/rest.py +329 -0
- mycelium/api/generated_sources/server_schemas/test/__init__.py +0 -0
- mycelium/api/generated_sources/server_schemas/test/test_api_section.py +57 -0
- mycelium/api/generated_sources/server_schemas/test/test_chroma_section.py +55 -0
- mycelium/api/generated_sources/server_schemas/test/test_clap_section.py +60 -0
- mycelium/api/generated_sources/server_schemas/test/test_compute_on_server200_response.py +52 -0
- mycelium/api/generated_sources/server_schemas/test/test_compute_on_server_request.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_compute_text_search_request.py +54 -0
- mycelium/api/generated_sources/server_schemas/test/test_config_request.py +66 -0
- mycelium/api/generated_sources/server_schemas/test/test_config_response.py +97 -0
- mycelium/api/generated_sources/server_schemas/test/test_create_playlist_request.py +60 -0
- mycelium/api/generated_sources/server_schemas/test/test_default_api.py +150 -0
- mycelium/api/generated_sources/server_schemas/test/test_get_similar_by_track200_response.py +61 -0
- mycelium/api/generated_sources/server_schemas/test/test_library_stats_response.py +63 -0
- mycelium/api/generated_sources/server_schemas/test/test_logging_section.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_media_server_section.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_playlist_response.py +58 -0
- mycelium/api/generated_sources/server_schemas/test/test_plex_section.py +56 -0
- mycelium/api/generated_sources/server_schemas/test/test_processing_response.py +61 -0
- mycelium/api/generated_sources/server_schemas/test/test_save_config_response.py +58 -0
- mycelium/api/generated_sources/server_schemas/test/test_scan_library_response.py +61 -0
- mycelium/api/generated_sources/server_schemas/test/test_search_result_response.py +69 -0
- mycelium/api/generated_sources/server_schemas/test/test_server_section.py +53 -0
- mycelium/api/generated_sources/server_schemas/test/test_stop_processing_response.py +55 -0
- mycelium/api/generated_sources/server_schemas/test/test_task_status_response.py +71 -0
- mycelium/api/generated_sources/server_schemas/test/test_track_database_stats.py +60 -0
- mycelium/api/generated_sources/server_schemas/test/test_track_response.py +63 -0
- mycelium/api/generated_sources/server_schemas/test/test_tracks_list_response.py +75 -0
- mycelium/api/generated_sources/worker_schemas/__init__.py +61 -0
- mycelium/api/generated_sources/worker_schemas/api/__init__.py +5 -0
- mycelium/api/generated_sources/worker_schemas/api/default_api.py +318 -0
- mycelium/api/generated_sources/worker_schemas/api_client.py +766 -0
- mycelium/api/generated_sources/worker_schemas/api_response.py +25 -0
- mycelium/api/generated_sources/worker_schemas/configuration.py +434 -0
- mycelium/api/generated_sources/worker_schemas/exceptions.py +166 -0
- mycelium/api/generated_sources/worker_schemas/models/__init__.py +23 -0
- mycelium/api/generated_sources/worker_schemas/models/save_config_response.py +73 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_clap_section.py +75 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_client_api_section.py +69 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_client_section.py +79 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_config_request.py +73 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_config_response.py +89 -0
- mycelium/api/generated_sources/worker_schemas/models/worker_logging_section.py +67 -0
- mycelium/api/generated_sources/worker_schemas/rest.py +329 -0
- mycelium/api/generated_sources/worker_schemas/test/__init__.py +0 -0
- mycelium/api/generated_sources/worker_schemas/test/test_default_api.py +45 -0
- mycelium/api/generated_sources/worker_schemas/test/test_save_config_response.py +58 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_clap_section.py +60 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_client_api_section.py +55 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_client_section.py +65 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_config_request.py +59 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_config_response.py +89 -0
- mycelium/api/generated_sources/worker_schemas/test/test_worker_logging_section.py +53 -0
- mycelium/api/worker_models.py +99 -0
- mycelium/application/__init__.py +11 -0
- mycelium/application/job_queue.py +323 -0
- mycelium/application/library_management_use_cases.py +292 -0
- mycelium/application/search_use_cases.py +96 -0
- mycelium/application/services.py +340 -0
- mycelium/client.py +554 -0
- mycelium/client_config.py +251 -0
- mycelium/client_frontend_dist/404.html +1 -0
- mycelium/client_frontend_dist/_next/static/a4iyRdfsvkjdyMAK9cE9Y/_buildManifest.js +1 -0
- mycelium/client_frontend_dist/_next/static/a4iyRdfsvkjdyMAK9cE9Y/_ssgManifest.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/964-830f77d7ce1c2463.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/app/_not-found/page-d25eede5a9099bd3.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/app/layout-9b3d32f96dfe13b6.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/app/page-cc6bad295789134e.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/framework-7c95b8e5103c9e90.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/main-6b37be50736577a2.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/main-app-4153d115599d3126.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/pages/_app-0a0020ddd67f79cf.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/pages/_error-03529f2c21436739.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- mycelium/client_frontend_dist/_next/static/chunks/webpack-c81e624915b2ea70.js +1 -0
- mycelium/client_frontend_dist/_next/static/css/1eb7f0e2c78e0734.css +1 -0
- mycelium/client_frontend_dist/favicon.ico +0 -0
- mycelium/client_frontend_dist/file.svg +1 -0
- mycelium/client_frontend_dist/globe.svg +1 -0
- mycelium/client_frontend_dist/index.html +1 -0
- mycelium/client_frontend_dist/index.txt +20 -0
- mycelium/client_frontend_dist/next.svg +1 -0
- mycelium/client_frontend_dist/vercel.svg +1 -0
- mycelium/client_frontend_dist/window.svg +1 -0
- mycelium/config.py +346 -0
- mycelium/domain/__init__.py +13 -0
- mycelium/domain/models.py +71 -0
- mycelium/domain/repositories.py +98 -0
- mycelium/domain/worker.py +77 -0
- mycelium/frontend_dist/404.html +1 -0
- mycelium/frontend_dist/_next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/964-830f77d7ce1c2463.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/app/_not-found/page-d25eede5a9099bd3.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/app/layout-9b3d32f96dfe13b6.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/app/page-a761463485e0540b.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/framework-7c95b8e5103c9e90.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/main-6b37be50736577a2.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/main-app-4153d115599d3126.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/pages/_app-0a0020ddd67f79cf.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/pages/_error-03529f2c21436739.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- mycelium/frontend_dist/_next/static/chunks/webpack-c81e624915b2ea70.js +1 -0
- mycelium/frontend_dist/_next/static/css/1eb7f0e2c78e0734.css +1 -0
- mycelium/frontend_dist/_next/static/glVJ0yJSL0zWN7anTTG3_/_buildManifest.js +1 -0
- mycelium/frontend_dist/_next/static/glVJ0yJSL0zWN7anTTG3_/_ssgManifest.js +1 -0
- mycelium/frontend_dist/favicon.ico +0 -0
- mycelium/frontend_dist/file.svg +1 -0
- mycelium/frontend_dist/globe.svg +1 -0
- mycelium/frontend_dist/index.html +10 -0
- mycelium/frontend_dist/index.txt +20 -0
- mycelium/frontend_dist/next.svg +1 -0
- mycelium/frontend_dist/vercel.svg +1 -0
- mycelium/frontend_dist/window.svg +1 -0
- mycelium/infrastructure/__init__.py +17 -0
- mycelium/infrastructure/chroma_adapter.py +232 -0
- mycelium/infrastructure/clap_adapter.py +280 -0
- mycelium/infrastructure/plex_adapter.py +145 -0
- mycelium/infrastructure/track_database.py +467 -0
- mycelium/main.py +183 -0
- mycelium_ai-0.5.0.dist-info/METADATA +312 -0
- mycelium_ai-0.5.0.dist-info/RECORD +164 -0
- mycelium_ai-0.5.0.dist-info/WHEEL +5 -0
- mycelium_ai-0.5.0.dist-info/entry_points.txt +2 -0
- mycelium_ai-0.5.0.dist-info/licenses/LICENSE +21 -0
- mycelium_ai-0.5.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2473 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Mycelium API
|
5
|
+
|
6
|
+
Plex music collection and recommendation system using CLAP embeddings
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
import re # noqa: F401
|
16
|
+
import io
|
17
|
+
import warnings
|
18
|
+
|
19
|
+
from pydantic import validate_arguments, ValidationError
|
20
|
+
|
21
|
+
from pydantic import StrictBytes, StrictInt, StrictStr, conint
|
22
|
+
|
23
|
+
from typing import List, Optional, Union
|
24
|
+
|
25
|
+
from mycelium.api.generated_sources.server_schemas.models.compute_on_server200_response import ComputeOnServer200Response
|
26
|
+
from mycelium.api.generated_sources.server_schemas.models.compute_on_server_request import ComputeOnServerRequest
|
27
|
+
from mycelium.api.generated_sources.server_schemas.models.compute_text_search_request import ComputeTextSearchRequest
|
28
|
+
from mycelium.api.generated_sources.server_schemas.models.config_request import ConfigRequest
|
29
|
+
from mycelium.api.generated_sources.server_schemas.models.config_response import ConfigResponse
|
30
|
+
from mycelium.api.generated_sources.server_schemas.models.create_playlist_request import CreatePlaylistRequest
|
31
|
+
from mycelium.api.generated_sources.server_schemas.models.get_similar_by_track200_response import GetSimilarByTrack200Response
|
32
|
+
from mycelium.api.generated_sources.server_schemas.models.library_stats_response import LibraryStatsResponse
|
33
|
+
from mycelium.api.generated_sources.server_schemas.models.playlist_response import PlaylistResponse
|
34
|
+
from mycelium.api.generated_sources.server_schemas.models.processing_response import ProcessingResponse
|
35
|
+
from mycelium.api.generated_sources.server_schemas.models.save_config_response import SaveConfigResponse
|
36
|
+
from mycelium.api.generated_sources.server_schemas.models.scan_library_response import ScanLibraryResponse
|
37
|
+
from mycelium.api.generated_sources.server_schemas.models.search_result_response import SearchResultResponse
|
38
|
+
from mycelium.api.generated_sources.server_schemas.models.stop_processing_response import StopProcessingResponse
|
39
|
+
from mycelium.api.generated_sources.server_schemas.models.task_status_response import TaskStatusResponse
|
40
|
+
from mycelium.api.generated_sources.server_schemas.models.track_database_stats import TrackDatabaseStats
|
41
|
+
from mycelium.api.generated_sources.server_schemas.models.tracks_list_response import TracksListResponse
|
42
|
+
|
43
|
+
from mycelium.api.generated_sources.server_schemas.api_client import ApiClient
|
44
|
+
from mycelium.api.generated_sources.server_schemas.api_response import ApiResponse
|
45
|
+
from mycelium.api.generated_sources.server_schemas.exceptions import ( # noqa: F401
|
46
|
+
ApiTypeError,
|
47
|
+
ApiValueError
|
48
|
+
)
|
49
|
+
|
50
|
+
|
51
|
+
class DefaultApi:
|
52
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
53
|
+
Ref: https://openapi-generator.tech
|
54
|
+
|
55
|
+
Do not edit the class manually.
|
56
|
+
"""
|
57
|
+
|
58
|
+
def __init__(self, api_client=None) -> None:
|
59
|
+
if api_client is None:
|
60
|
+
api_client = ApiClient.get_default()
|
61
|
+
self.api_client = api_client
|
62
|
+
|
63
|
+
@validate_arguments
|
64
|
+
def compute_audio_search(self, audio : Optional[Union[StrictBytes, StrictStr]] = None, n_results : Optional[StrictInt] = None, **kwargs) -> List[SearchResultResponse]: # noqa: E501
|
65
|
+
"""Compute audio search on server # noqa: E501
|
66
|
+
|
67
|
+
This method makes a synchronous HTTP request by default. To make an
|
68
|
+
asynchronous HTTP request, please pass async_req=True
|
69
|
+
|
70
|
+
>>> thread = api.compute_audio_search(audio, n_results, async_req=True)
|
71
|
+
>>> result = thread.get()
|
72
|
+
|
73
|
+
:param audio:
|
74
|
+
:type audio: bytearray
|
75
|
+
:param n_results:
|
76
|
+
:type n_results: int
|
77
|
+
:param async_req: Whether to execute the request asynchronously.
|
78
|
+
:type async_req: bool, optional
|
79
|
+
:param _request_timeout: timeout setting for this request.
|
80
|
+
If one number provided, it will be total request
|
81
|
+
timeout. It can also be a pair (tuple) of
|
82
|
+
(connection, read) timeouts.
|
83
|
+
:return: Returns the result object.
|
84
|
+
If the method is called asynchronously,
|
85
|
+
returns the request thread.
|
86
|
+
:rtype: List[SearchResultResponse]
|
87
|
+
"""
|
88
|
+
kwargs['_return_http_data_only'] = True
|
89
|
+
if '_preload_content' in kwargs:
|
90
|
+
message = "Error! Please call the compute_audio_search_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
91
|
+
raise ValueError(message)
|
92
|
+
return self.compute_audio_search_with_http_info(audio, n_results, **kwargs) # noqa: E501
|
93
|
+
|
94
|
+
@validate_arguments
|
95
|
+
def compute_audio_search_with_http_info(self, audio : Optional[Union[StrictBytes, StrictStr]] = None, n_results : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
|
96
|
+
"""Compute audio search on server # noqa: E501
|
97
|
+
|
98
|
+
This method makes a synchronous HTTP request by default. To make an
|
99
|
+
asynchronous HTTP request, please pass async_req=True
|
100
|
+
|
101
|
+
>>> thread = api.compute_audio_search_with_http_info(audio, n_results, async_req=True)
|
102
|
+
>>> result = thread.get()
|
103
|
+
|
104
|
+
:param audio:
|
105
|
+
:type audio: bytearray
|
106
|
+
:param n_results:
|
107
|
+
:type n_results: int
|
108
|
+
:param async_req: Whether to execute the request asynchronously.
|
109
|
+
:type async_req: bool, optional
|
110
|
+
:param _preload_content: if False, the ApiResponse.data will
|
111
|
+
be set to none and raw_data will store the
|
112
|
+
HTTP response body without reading/decoding.
|
113
|
+
Default is True.
|
114
|
+
:type _preload_content: bool, optional
|
115
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
116
|
+
object with status code, headers, etc
|
117
|
+
:type _return_http_data_only: bool, optional
|
118
|
+
:param _request_timeout: timeout setting for this request. If one
|
119
|
+
number provided, it will be total request
|
120
|
+
timeout. It can also be a pair (tuple) of
|
121
|
+
(connection, read) timeouts.
|
122
|
+
:param _request_auth: set to override the auth_settings for an a single
|
123
|
+
request; this effectively ignores the authentication
|
124
|
+
in the spec for a single request.
|
125
|
+
:type _request_auth: dict, optional
|
126
|
+
:type _content_type: string, optional: force content-type for the request
|
127
|
+
:return: Returns the result object.
|
128
|
+
If the method is called asynchronously,
|
129
|
+
returns the request thread.
|
130
|
+
:rtype: tuple(List[SearchResultResponse], status_code(int), headers(HTTPHeaderDict))
|
131
|
+
"""
|
132
|
+
|
133
|
+
_params = locals()
|
134
|
+
|
135
|
+
_all_params = [
|
136
|
+
'audio',
|
137
|
+
'n_results'
|
138
|
+
]
|
139
|
+
_all_params.extend(
|
140
|
+
[
|
141
|
+
'async_req',
|
142
|
+
'_return_http_data_only',
|
143
|
+
'_preload_content',
|
144
|
+
'_request_timeout',
|
145
|
+
'_request_auth',
|
146
|
+
'_content_type',
|
147
|
+
'_headers'
|
148
|
+
]
|
149
|
+
)
|
150
|
+
|
151
|
+
# validate the arguments
|
152
|
+
for _key, _val in _params['kwargs'].items():
|
153
|
+
if _key not in _all_params:
|
154
|
+
raise ApiTypeError(
|
155
|
+
"Got an unexpected keyword argument '%s'"
|
156
|
+
" to method compute_audio_search" % _key
|
157
|
+
)
|
158
|
+
_params[_key] = _val
|
159
|
+
del _params['kwargs']
|
160
|
+
|
161
|
+
_collection_formats = {}
|
162
|
+
|
163
|
+
# process the path parameters
|
164
|
+
_path_params = {}
|
165
|
+
|
166
|
+
# process the query parameters
|
167
|
+
_query_params = []
|
168
|
+
# process the header parameters
|
169
|
+
_header_params = dict(_params.get('_headers', {}))
|
170
|
+
# process the form parameters
|
171
|
+
_form_params = []
|
172
|
+
_files = {}
|
173
|
+
if _params['audio'] is not None:
|
174
|
+
_files['audio'] = _params['audio']
|
175
|
+
|
176
|
+
if _params['n_results'] is not None:
|
177
|
+
_form_params.append(('n_results', _params['n_results']))
|
178
|
+
|
179
|
+
# process the body parameter
|
180
|
+
_body_params = None
|
181
|
+
# set the HTTP header `Accept`
|
182
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
183
|
+
['application/json']) # noqa: E501
|
184
|
+
|
185
|
+
# set the HTTP header `Content-Type`
|
186
|
+
_content_types_list = _params.get('_content_type',
|
187
|
+
self.api_client.select_header_content_type(
|
188
|
+
['multipart/form-data']))
|
189
|
+
if _content_types_list:
|
190
|
+
_header_params['Content-Type'] = _content_types_list
|
191
|
+
|
192
|
+
# authentication setting
|
193
|
+
_auth_settings = [] # noqa: E501
|
194
|
+
|
195
|
+
_response_types_map = {
|
196
|
+
'200': "List[SearchResultResponse]",
|
197
|
+
}
|
198
|
+
|
199
|
+
return self.api_client.call_api(
|
200
|
+
'/compute/search/audio', 'POST',
|
201
|
+
_path_params,
|
202
|
+
_query_params,
|
203
|
+
_header_params,
|
204
|
+
body=_body_params,
|
205
|
+
post_params=_form_params,
|
206
|
+
files=_files,
|
207
|
+
response_types_map=_response_types_map,
|
208
|
+
auth_settings=_auth_settings,
|
209
|
+
async_req=_params.get('async_req'),
|
210
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
211
|
+
_preload_content=_params.get('_preload_content', True),
|
212
|
+
_request_timeout=_params.get('_request_timeout'),
|
213
|
+
collection_formats=_collection_formats,
|
214
|
+
_request_auth=_params.get('_request_auth'))
|
215
|
+
|
216
|
+
@validate_arguments
|
217
|
+
def compute_on_server(self, compute_on_server_request : ComputeOnServerRequest, **kwargs) -> ComputeOnServer200Response: # noqa: E501
|
218
|
+
"""Compute embedding on server # noqa: E501
|
219
|
+
|
220
|
+
This method makes a synchronous HTTP request by default. To make an
|
221
|
+
asynchronous HTTP request, please pass async_req=True
|
222
|
+
|
223
|
+
>>> thread = api.compute_on_server(compute_on_server_request, async_req=True)
|
224
|
+
>>> result = thread.get()
|
225
|
+
|
226
|
+
:param compute_on_server_request: (required)
|
227
|
+
:type compute_on_server_request: ComputeOnServerRequest
|
228
|
+
:param async_req: Whether to execute the request asynchronously.
|
229
|
+
:type async_req: bool, optional
|
230
|
+
:param _request_timeout: timeout setting for this request.
|
231
|
+
If one number provided, it will be total request
|
232
|
+
timeout. It can also be a pair (tuple) of
|
233
|
+
(connection, read) timeouts.
|
234
|
+
:return: Returns the result object.
|
235
|
+
If the method is called asynchronously,
|
236
|
+
returns the request thread.
|
237
|
+
:rtype: ComputeOnServer200Response
|
238
|
+
"""
|
239
|
+
kwargs['_return_http_data_only'] = True
|
240
|
+
if '_preload_content' in kwargs:
|
241
|
+
message = "Error! Please call the compute_on_server_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
242
|
+
raise ValueError(message)
|
243
|
+
return self.compute_on_server_with_http_info(compute_on_server_request, **kwargs) # noqa: E501
|
244
|
+
|
245
|
+
@validate_arguments
|
246
|
+
def compute_on_server_with_http_info(self, compute_on_server_request : ComputeOnServerRequest, **kwargs) -> ApiResponse: # noqa: E501
|
247
|
+
"""Compute embedding on server # noqa: E501
|
248
|
+
|
249
|
+
This method makes a synchronous HTTP request by default. To make an
|
250
|
+
asynchronous HTTP request, please pass async_req=True
|
251
|
+
|
252
|
+
>>> thread = api.compute_on_server_with_http_info(compute_on_server_request, async_req=True)
|
253
|
+
>>> result = thread.get()
|
254
|
+
|
255
|
+
:param compute_on_server_request: (required)
|
256
|
+
:type compute_on_server_request: ComputeOnServerRequest
|
257
|
+
:param async_req: Whether to execute the request asynchronously.
|
258
|
+
:type async_req: bool, optional
|
259
|
+
:param _preload_content: if False, the ApiResponse.data will
|
260
|
+
be set to none and raw_data will store the
|
261
|
+
HTTP response body without reading/decoding.
|
262
|
+
Default is True.
|
263
|
+
:type _preload_content: bool, optional
|
264
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
265
|
+
object with status code, headers, etc
|
266
|
+
:type _return_http_data_only: bool, optional
|
267
|
+
:param _request_timeout: timeout setting for this request. If one
|
268
|
+
number provided, it will be total request
|
269
|
+
timeout. It can also be a pair (tuple) of
|
270
|
+
(connection, read) timeouts.
|
271
|
+
:param _request_auth: set to override the auth_settings for an a single
|
272
|
+
request; this effectively ignores the authentication
|
273
|
+
in the spec for a single request.
|
274
|
+
:type _request_auth: dict, optional
|
275
|
+
:type _content_type: string, optional: force content-type for the request
|
276
|
+
:return: Returns the result object.
|
277
|
+
If the method is called asynchronously,
|
278
|
+
returns the request thread.
|
279
|
+
:rtype: tuple(ComputeOnServer200Response, status_code(int), headers(HTTPHeaderDict))
|
280
|
+
"""
|
281
|
+
|
282
|
+
_params = locals()
|
283
|
+
|
284
|
+
_all_params = [
|
285
|
+
'compute_on_server_request'
|
286
|
+
]
|
287
|
+
_all_params.extend(
|
288
|
+
[
|
289
|
+
'async_req',
|
290
|
+
'_return_http_data_only',
|
291
|
+
'_preload_content',
|
292
|
+
'_request_timeout',
|
293
|
+
'_request_auth',
|
294
|
+
'_content_type',
|
295
|
+
'_headers'
|
296
|
+
]
|
297
|
+
)
|
298
|
+
|
299
|
+
# validate the arguments
|
300
|
+
for _key, _val in _params['kwargs'].items():
|
301
|
+
if _key not in _all_params:
|
302
|
+
raise ApiTypeError(
|
303
|
+
"Got an unexpected keyword argument '%s'"
|
304
|
+
" to method compute_on_server" % _key
|
305
|
+
)
|
306
|
+
_params[_key] = _val
|
307
|
+
del _params['kwargs']
|
308
|
+
|
309
|
+
_collection_formats = {}
|
310
|
+
|
311
|
+
# process the path parameters
|
312
|
+
_path_params = {}
|
313
|
+
|
314
|
+
# process the query parameters
|
315
|
+
_query_params = []
|
316
|
+
# process the header parameters
|
317
|
+
_header_params = dict(_params.get('_headers', {}))
|
318
|
+
# process the form parameters
|
319
|
+
_form_params = []
|
320
|
+
_files = {}
|
321
|
+
# process the body parameter
|
322
|
+
_body_params = None
|
323
|
+
if _params['compute_on_server_request'] is not None:
|
324
|
+
_body_params = _params['compute_on_server_request']
|
325
|
+
|
326
|
+
# set the HTTP header `Accept`
|
327
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
328
|
+
['application/json']) # noqa: E501
|
329
|
+
|
330
|
+
# set the HTTP header `Content-Type`
|
331
|
+
_content_types_list = _params.get('_content_type',
|
332
|
+
self.api_client.select_header_content_type(
|
333
|
+
['application/json']))
|
334
|
+
if _content_types_list:
|
335
|
+
_header_params['Content-Type'] = _content_types_list
|
336
|
+
|
337
|
+
# authentication setting
|
338
|
+
_auth_settings = [] # noqa: E501
|
339
|
+
|
340
|
+
_response_types_map = {
|
341
|
+
'200': "ComputeOnServer200Response",
|
342
|
+
}
|
343
|
+
|
344
|
+
return self.api_client.call_api(
|
345
|
+
'/compute/on_server', 'POST',
|
346
|
+
_path_params,
|
347
|
+
_query_params,
|
348
|
+
_header_params,
|
349
|
+
body=_body_params,
|
350
|
+
post_params=_form_params,
|
351
|
+
files=_files,
|
352
|
+
response_types_map=_response_types_map,
|
353
|
+
auth_settings=_auth_settings,
|
354
|
+
async_req=_params.get('async_req'),
|
355
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
356
|
+
_preload_content=_params.get('_preload_content', True),
|
357
|
+
_request_timeout=_params.get('_request_timeout'),
|
358
|
+
collection_formats=_collection_formats,
|
359
|
+
_request_auth=_params.get('_request_auth'))
|
360
|
+
|
361
|
+
@validate_arguments
|
362
|
+
def compute_text_search(self, compute_text_search_request : ComputeTextSearchRequest, **kwargs) -> List[SearchResultResponse]: # noqa: E501
|
363
|
+
"""Compute text search on server # noqa: E501
|
364
|
+
|
365
|
+
This method makes a synchronous HTTP request by default. To make an
|
366
|
+
asynchronous HTTP request, please pass async_req=True
|
367
|
+
|
368
|
+
>>> thread = api.compute_text_search(compute_text_search_request, async_req=True)
|
369
|
+
>>> result = thread.get()
|
370
|
+
|
371
|
+
:param compute_text_search_request: (required)
|
372
|
+
:type compute_text_search_request: ComputeTextSearchRequest
|
373
|
+
:param async_req: Whether to execute the request asynchronously.
|
374
|
+
:type async_req: bool, optional
|
375
|
+
:param _request_timeout: timeout setting for this request.
|
376
|
+
If one number provided, it will be total request
|
377
|
+
timeout. It can also be a pair (tuple) of
|
378
|
+
(connection, read) timeouts.
|
379
|
+
:return: Returns the result object.
|
380
|
+
If the method is called asynchronously,
|
381
|
+
returns the request thread.
|
382
|
+
:rtype: List[SearchResultResponse]
|
383
|
+
"""
|
384
|
+
kwargs['_return_http_data_only'] = True
|
385
|
+
if '_preload_content' in kwargs:
|
386
|
+
message = "Error! Please call the compute_text_search_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
387
|
+
raise ValueError(message)
|
388
|
+
return self.compute_text_search_with_http_info(compute_text_search_request, **kwargs) # noqa: E501
|
389
|
+
|
390
|
+
@validate_arguments
|
391
|
+
def compute_text_search_with_http_info(self, compute_text_search_request : ComputeTextSearchRequest, **kwargs) -> ApiResponse: # noqa: E501
|
392
|
+
"""Compute text search on server # noqa: E501
|
393
|
+
|
394
|
+
This method makes a synchronous HTTP request by default. To make an
|
395
|
+
asynchronous HTTP request, please pass async_req=True
|
396
|
+
|
397
|
+
>>> thread = api.compute_text_search_with_http_info(compute_text_search_request, async_req=True)
|
398
|
+
>>> result = thread.get()
|
399
|
+
|
400
|
+
:param compute_text_search_request: (required)
|
401
|
+
:type compute_text_search_request: ComputeTextSearchRequest
|
402
|
+
:param async_req: Whether to execute the request asynchronously.
|
403
|
+
:type async_req: bool, optional
|
404
|
+
:param _preload_content: if False, the ApiResponse.data will
|
405
|
+
be set to none and raw_data will store the
|
406
|
+
HTTP response body without reading/decoding.
|
407
|
+
Default is True.
|
408
|
+
:type _preload_content: bool, optional
|
409
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
410
|
+
object with status code, headers, etc
|
411
|
+
:type _return_http_data_only: bool, optional
|
412
|
+
:param _request_timeout: timeout setting for this request. If one
|
413
|
+
number provided, it will be total request
|
414
|
+
timeout. It can also be a pair (tuple) of
|
415
|
+
(connection, read) timeouts.
|
416
|
+
:param _request_auth: set to override the auth_settings for an a single
|
417
|
+
request; this effectively ignores the authentication
|
418
|
+
in the spec for a single request.
|
419
|
+
:type _request_auth: dict, optional
|
420
|
+
:type _content_type: string, optional: force content-type for the request
|
421
|
+
:return: Returns the result object.
|
422
|
+
If the method is called asynchronously,
|
423
|
+
returns the request thread.
|
424
|
+
:rtype: tuple(List[SearchResultResponse], status_code(int), headers(HTTPHeaderDict))
|
425
|
+
"""
|
426
|
+
|
427
|
+
_params = locals()
|
428
|
+
|
429
|
+
_all_params = [
|
430
|
+
'compute_text_search_request'
|
431
|
+
]
|
432
|
+
_all_params.extend(
|
433
|
+
[
|
434
|
+
'async_req',
|
435
|
+
'_return_http_data_only',
|
436
|
+
'_preload_content',
|
437
|
+
'_request_timeout',
|
438
|
+
'_request_auth',
|
439
|
+
'_content_type',
|
440
|
+
'_headers'
|
441
|
+
]
|
442
|
+
)
|
443
|
+
|
444
|
+
# validate the arguments
|
445
|
+
for _key, _val in _params['kwargs'].items():
|
446
|
+
if _key not in _all_params:
|
447
|
+
raise ApiTypeError(
|
448
|
+
"Got an unexpected keyword argument '%s'"
|
449
|
+
" to method compute_text_search" % _key
|
450
|
+
)
|
451
|
+
_params[_key] = _val
|
452
|
+
del _params['kwargs']
|
453
|
+
|
454
|
+
_collection_formats = {}
|
455
|
+
|
456
|
+
# process the path parameters
|
457
|
+
_path_params = {}
|
458
|
+
|
459
|
+
# process the query parameters
|
460
|
+
_query_params = []
|
461
|
+
# process the header parameters
|
462
|
+
_header_params = dict(_params.get('_headers', {}))
|
463
|
+
# process the form parameters
|
464
|
+
_form_params = []
|
465
|
+
_files = {}
|
466
|
+
# process the body parameter
|
467
|
+
_body_params = None
|
468
|
+
if _params['compute_text_search_request'] is not None:
|
469
|
+
_body_params = _params['compute_text_search_request']
|
470
|
+
|
471
|
+
# set the HTTP header `Accept`
|
472
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
473
|
+
['application/json']) # noqa: E501
|
474
|
+
|
475
|
+
# set the HTTP header `Content-Type`
|
476
|
+
_content_types_list = _params.get('_content_type',
|
477
|
+
self.api_client.select_header_content_type(
|
478
|
+
['application/json']))
|
479
|
+
if _content_types_list:
|
480
|
+
_header_params['Content-Type'] = _content_types_list
|
481
|
+
|
482
|
+
# authentication setting
|
483
|
+
_auth_settings = [] # noqa: E501
|
484
|
+
|
485
|
+
_response_types_map = {
|
486
|
+
'200': "List[SearchResultResponse]",
|
487
|
+
}
|
488
|
+
|
489
|
+
return self.api_client.call_api(
|
490
|
+
'/compute/search/text', 'POST',
|
491
|
+
_path_params,
|
492
|
+
_query_params,
|
493
|
+
_header_params,
|
494
|
+
body=_body_params,
|
495
|
+
post_params=_form_params,
|
496
|
+
files=_files,
|
497
|
+
response_types_map=_response_types_map,
|
498
|
+
auth_settings=_auth_settings,
|
499
|
+
async_req=_params.get('async_req'),
|
500
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
501
|
+
_preload_content=_params.get('_preload_content', True),
|
502
|
+
_request_timeout=_params.get('_request_timeout'),
|
503
|
+
collection_formats=_collection_formats,
|
504
|
+
_request_auth=_params.get('_request_auth'))
|
505
|
+
|
506
|
+
@validate_arguments
|
507
|
+
def create_playlist(self, create_playlist_request : CreatePlaylistRequest, **kwargs) -> PlaylistResponse: # noqa: E501
|
508
|
+
"""Create a playlist from track IDs # noqa: E501
|
509
|
+
|
510
|
+
This method makes a synchronous HTTP request by default. To make an
|
511
|
+
asynchronous HTTP request, please pass async_req=True
|
512
|
+
|
513
|
+
>>> thread = api.create_playlist(create_playlist_request, async_req=True)
|
514
|
+
>>> result = thread.get()
|
515
|
+
|
516
|
+
:param create_playlist_request: (required)
|
517
|
+
:type create_playlist_request: CreatePlaylistRequest
|
518
|
+
:param async_req: Whether to execute the request asynchronously.
|
519
|
+
:type async_req: bool, optional
|
520
|
+
:param _request_timeout: timeout setting for this request.
|
521
|
+
If one number provided, it will be total request
|
522
|
+
timeout. It can also be a pair (tuple) of
|
523
|
+
(connection, read) timeouts.
|
524
|
+
:return: Returns the result object.
|
525
|
+
If the method is called asynchronously,
|
526
|
+
returns the request thread.
|
527
|
+
:rtype: PlaylistResponse
|
528
|
+
"""
|
529
|
+
kwargs['_return_http_data_only'] = True
|
530
|
+
if '_preload_content' in kwargs:
|
531
|
+
message = "Error! Please call the create_playlist_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
532
|
+
raise ValueError(message)
|
533
|
+
return self.create_playlist_with_http_info(create_playlist_request, **kwargs) # noqa: E501
|
534
|
+
|
535
|
+
@validate_arguments
|
536
|
+
def create_playlist_with_http_info(self, create_playlist_request : CreatePlaylistRequest, **kwargs) -> ApiResponse: # noqa: E501
|
537
|
+
"""Create a playlist from track IDs # noqa: E501
|
538
|
+
|
539
|
+
This method makes a synchronous HTTP request by default. To make an
|
540
|
+
asynchronous HTTP request, please pass async_req=True
|
541
|
+
|
542
|
+
>>> thread = api.create_playlist_with_http_info(create_playlist_request, async_req=True)
|
543
|
+
>>> result = thread.get()
|
544
|
+
|
545
|
+
:param create_playlist_request: (required)
|
546
|
+
:type create_playlist_request: CreatePlaylistRequest
|
547
|
+
:param async_req: Whether to execute the request asynchronously.
|
548
|
+
:type async_req: bool, optional
|
549
|
+
:param _preload_content: if False, the ApiResponse.data will
|
550
|
+
be set to none and raw_data will store the
|
551
|
+
HTTP response body without reading/decoding.
|
552
|
+
Default is True.
|
553
|
+
:type _preload_content: bool, optional
|
554
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
555
|
+
object with status code, headers, etc
|
556
|
+
:type _return_http_data_only: bool, optional
|
557
|
+
:param _request_timeout: timeout setting for this request. If one
|
558
|
+
number provided, it will be total request
|
559
|
+
timeout. It can also be a pair (tuple) of
|
560
|
+
(connection, read) timeouts.
|
561
|
+
:param _request_auth: set to override the auth_settings for an a single
|
562
|
+
request; this effectively ignores the authentication
|
563
|
+
in the spec for a single request.
|
564
|
+
:type _request_auth: dict, optional
|
565
|
+
:type _content_type: string, optional: force content-type for the request
|
566
|
+
:return: Returns the result object.
|
567
|
+
If the method is called asynchronously,
|
568
|
+
returns the request thread.
|
569
|
+
:rtype: tuple(PlaylistResponse, status_code(int), headers(HTTPHeaderDict))
|
570
|
+
"""
|
571
|
+
|
572
|
+
_params = locals()
|
573
|
+
|
574
|
+
_all_params = [
|
575
|
+
'create_playlist_request'
|
576
|
+
]
|
577
|
+
_all_params.extend(
|
578
|
+
[
|
579
|
+
'async_req',
|
580
|
+
'_return_http_data_only',
|
581
|
+
'_preload_content',
|
582
|
+
'_request_timeout',
|
583
|
+
'_request_auth',
|
584
|
+
'_content_type',
|
585
|
+
'_headers'
|
586
|
+
]
|
587
|
+
)
|
588
|
+
|
589
|
+
# validate the arguments
|
590
|
+
for _key, _val in _params['kwargs'].items():
|
591
|
+
if _key not in _all_params:
|
592
|
+
raise ApiTypeError(
|
593
|
+
"Got an unexpected keyword argument '%s'"
|
594
|
+
" to method create_playlist" % _key
|
595
|
+
)
|
596
|
+
_params[_key] = _val
|
597
|
+
del _params['kwargs']
|
598
|
+
|
599
|
+
_collection_formats = {}
|
600
|
+
|
601
|
+
# process the path parameters
|
602
|
+
_path_params = {}
|
603
|
+
|
604
|
+
# process the query parameters
|
605
|
+
_query_params = []
|
606
|
+
# process the header parameters
|
607
|
+
_header_params = dict(_params.get('_headers', {}))
|
608
|
+
# process the form parameters
|
609
|
+
_form_params = []
|
610
|
+
_files = {}
|
611
|
+
# process the body parameter
|
612
|
+
_body_params = None
|
613
|
+
if _params['create_playlist_request'] is not None:
|
614
|
+
_body_params = _params['create_playlist_request']
|
615
|
+
|
616
|
+
# set the HTTP header `Accept`
|
617
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
618
|
+
['application/json']) # noqa: E501
|
619
|
+
|
620
|
+
# set the HTTP header `Content-Type`
|
621
|
+
_content_types_list = _params.get('_content_type',
|
622
|
+
self.api_client.select_header_content_type(
|
623
|
+
['application/json']))
|
624
|
+
if _content_types_list:
|
625
|
+
_header_params['Content-Type'] = _content_types_list
|
626
|
+
|
627
|
+
# authentication setting
|
628
|
+
_auth_settings = [] # noqa: E501
|
629
|
+
|
630
|
+
_response_types_map = {
|
631
|
+
'200': "PlaylistResponse",
|
632
|
+
}
|
633
|
+
|
634
|
+
return self.api_client.call_api(
|
635
|
+
'/api/playlists/create', 'POST',
|
636
|
+
_path_params,
|
637
|
+
_query_params,
|
638
|
+
_header_params,
|
639
|
+
body=_body_params,
|
640
|
+
post_params=_form_params,
|
641
|
+
files=_files,
|
642
|
+
response_types_map=_response_types_map,
|
643
|
+
auth_settings=_auth_settings,
|
644
|
+
async_req=_params.get('async_req'),
|
645
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
646
|
+
_preload_content=_params.get('_preload_content', True),
|
647
|
+
_request_timeout=_params.get('_request_timeout'),
|
648
|
+
collection_formats=_collection_formats,
|
649
|
+
_request_auth=_params.get('_request_auth'))
|
650
|
+
|
651
|
+
@validate_arguments
|
652
|
+
def get_config(self, **kwargs) -> ConfigResponse: # noqa: E501
|
653
|
+
"""Get configuration # noqa: E501
|
654
|
+
|
655
|
+
This method makes a synchronous HTTP request by default. To make an
|
656
|
+
asynchronous HTTP request, please pass async_req=True
|
657
|
+
|
658
|
+
>>> thread = api.get_config(async_req=True)
|
659
|
+
>>> result = thread.get()
|
660
|
+
|
661
|
+
:param async_req: Whether to execute the request asynchronously.
|
662
|
+
:type async_req: bool, optional
|
663
|
+
:param _request_timeout: timeout setting for this request.
|
664
|
+
If one number provided, it will be total request
|
665
|
+
timeout. It can also be a pair (tuple) of
|
666
|
+
(connection, read) timeouts.
|
667
|
+
:return: Returns the result object.
|
668
|
+
If the method is called asynchronously,
|
669
|
+
returns the request thread.
|
670
|
+
:rtype: ConfigResponse
|
671
|
+
"""
|
672
|
+
kwargs['_return_http_data_only'] = True
|
673
|
+
if '_preload_content' in kwargs:
|
674
|
+
message = "Error! Please call the get_config_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
675
|
+
raise ValueError(message)
|
676
|
+
return self.get_config_with_http_info(**kwargs) # noqa: E501
|
677
|
+
|
678
|
+
@validate_arguments
|
679
|
+
def get_config_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
680
|
+
"""Get configuration # noqa: E501
|
681
|
+
|
682
|
+
This method makes a synchronous HTTP request by default. To make an
|
683
|
+
asynchronous HTTP request, please pass async_req=True
|
684
|
+
|
685
|
+
>>> thread = api.get_config_with_http_info(async_req=True)
|
686
|
+
>>> result = thread.get()
|
687
|
+
|
688
|
+
:param async_req: Whether to execute the request asynchronously.
|
689
|
+
:type async_req: bool, optional
|
690
|
+
:param _preload_content: if False, the ApiResponse.data will
|
691
|
+
be set to none and raw_data will store the
|
692
|
+
HTTP response body without reading/decoding.
|
693
|
+
Default is True.
|
694
|
+
:type _preload_content: bool, optional
|
695
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
696
|
+
object with status code, headers, etc
|
697
|
+
:type _return_http_data_only: bool, optional
|
698
|
+
:param _request_timeout: timeout setting for this request. If one
|
699
|
+
number provided, it will be total request
|
700
|
+
timeout. It can also be a pair (tuple) of
|
701
|
+
(connection, read) timeouts.
|
702
|
+
:param _request_auth: set to override the auth_settings for an a single
|
703
|
+
request; this effectively ignores the authentication
|
704
|
+
in the spec for a single request.
|
705
|
+
:type _request_auth: dict, optional
|
706
|
+
:type _content_type: string, optional: force content-type for the request
|
707
|
+
:return: Returns the result object.
|
708
|
+
If the method is called asynchronously,
|
709
|
+
returns the request thread.
|
710
|
+
:rtype: tuple(ConfigResponse, status_code(int), headers(HTTPHeaderDict))
|
711
|
+
"""
|
712
|
+
|
713
|
+
_params = locals()
|
714
|
+
|
715
|
+
_all_params = [
|
716
|
+
]
|
717
|
+
_all_params.extend(
|
718
|
+
[
|
719
|
+
'async_req',
|
720
|
+
'_return_http_data_only',
|
721
|
+
'_preload_content',
|
722
|
+
'_request_timeout',
|
723
|
+
'_request_auth',
|
724
|
+
'_content_type',
|
725
|
+
'_headers'
|
726
|
+
]
|
727
|
+
)
|
728
|
+
|
729
|
+
# validate the arguments
|
730
|
+
for _key, _val in _params['kwargs'].items():
|
731
|
+
if _key not in _all_params:
|
732
|
+
raise ApiTypeError(
|
733
|
+
"Got an unexpected keyword argument '%s'"
|
734
|
+
" to method get_config" % _key
|
735
|
+
)
|
736
|
+
_params[_key] = _val
|
737
|
+
del _params['kwargs']
|
738
|
+
|
739
|
+
_collection_formats = {}
|
740
|
+
|
741
|
+
# process the path parameters
|
742
|
+
_path_params = {}
|
743
|
+
|
744
|
+
# process the query parameters
|
745
|
+
_query_params = []
|
746
|
+
# process the header parameters
|
747
|
+
_header_params = dict(_params.get('_headers', {}))
|
748
|
+
# process the form parameters
|
749
|
+
_form_params = []
|
750
|
+
_files = {}
|
751
|
+
# process the body parameter
|
752
|
+
_body_params = None
|
753
|
+
# set the HTTP header `Accept`
|
754
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
755
|
+
['application/json']) # noqa: E501
|
756
|
+
|
757
|
+
# authentication setting
|
758
|
+
_auth_settings = [] # noqa: E501
|
759
|
+
|
760
|
+
_response_types_map = {
|
761
|
+
'200': "ConfigResponse",
|
762
|
+
}
|
763
|
+
|
764
|
+
return self.api_client.call_api(
|
765
|
+
'/api/config', 'GET',
|
766
|
+
_path_params,
|
767
|
+
_query_params,
|
768
|
+
_header_params,
|
769
|
+
body=_body_params,
|
770
|
+
post_params=_form_params,
|
771
|
+
files=_files,
|
772
|
+
response_types_map=_response_types_map,
|
773
|
+
auth_settings=_auth_settings,
|
774
|
+
async_req=_params.get('async_req'),
|
775
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
776
|
+
_preload_content=_params.get('_preload_content', True),
|
777
|
+
_request_timeout=_params.get('_request_timeout'),
|
778
|
+
collection_formats=_collection_formats,
|
779
|
+
_request_auth=_params.get('_request_auth'))
|
780
|
+
|
781
|
+
@validate_arguments
|
782
|
+
def get_library_stats(self, **kwargs) -> LibraryStatsResponse: # noqa: E501
|
783
|
+
"""Get library statistics # noqa: E501
|
784
|
+
|
785
|
+
This method makes a synchronous HTTP request by default. To make an
|
786
|
+
asynchronous HTTP request, please pass async_req=True
|
787
|
+
|
788
|
+
>>> thread = api.get_library_stats(async_req=True)
|
789
|
+
>>> result = thread.get()
|
790
|
+
|
791
|
+
:param async_req: Whether to execute the request asynchronously.
|
792
|
+
:type async_req: bool, optional
|
793
|
+
:param _request_timeout: timeout setting for this request.
|
794
|
+
If one number provided, it will be total request
|
795
|
+
timeout. It can also be a pair (tuple) of
|
796
|
+
(connection, read) timeouts.
|
797
|
+
:return: Returns the result object.
|
798
|
+
If the method is called asynchronously,
|
799
|
+
returns the request thread.
|
800
|
+
:rtype: LibraryStatsResponse
|
801
|
+
"""
|
802
|
+
kwargs['_return_http_data_only'] = True
|
803
|
+
if '_preload_content' in kwargs:
|
804
|
+
message = "Error! Please call the get_library_stats_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
805
|
+
raise ValueError(message)
|
806
|
+
return self.get_library_stats_with_http_info(**kwargs) # noqa: E501
|
807
|
+
|
808
|
+
@validate_arguments
|
809
|
+
def get_library_stats_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
810
|
+
"""Get library statistics # noqa: E501
|
811
|
+
|
812
|
+
This method makes a synchronous HTTP request by default. To make an
|
813
|
+
asynchronous HTTP request, please pass async_req=True
|
814
|
+
|
815
|
+
>>> thread = api.get_library_stats_with_http_info(async_req=True)
|
816
|
+
>>> result = thread.get()
|
817
|
+
|
818
|
+
:param async_req: Whether to execute the request asynchronously.
|
819
|
+
:type async_req: bool, optional
|
820
|
+
:param _preload_content: if False, the ApiResponse.data will
|
821
|
+
be set to none and raw_data will store the
|
822
|
+
HTTP response body without reading/decoding.
|
823
|
+
Default is True.
|
824
|
+
:type _preload_content: bool, optional
|
825
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
826
|
+
object with status code, headers, etc
|
827
|
+
:type _return_http_data_only: bool, optional
|
828
|
+
:param _request_timeout: timeout setting for this request. If one
|
829
|
+
number provided, it will be total request
|
830
|
+
timeout. It can also be a pair (tuple) of
|
831
|
+
(connection, read) timeouts.
|
832
|
+
:param _request_auth: set to override the auth_settings for an a single
|
833
|
+
request; this effectively ignores the authentication
|
834
|
+
in the spec for a single request.
|
835
|
+
:type _request_auth: dict, optional
|
836
|
+
:type _content_type: string, optional: force content-type for the request
|
837
|
+
:return: Returns the result object.
|
838
|
+
If the method is called asynchronously,
|
839
|
+
returns the request thread.
|
840
|
+
:rtype: tuple(LibraryStatsResponse, status_code(int), headers(HTTPHeaderDict))
|
841
|
+
"""
|
842
|
+
|
843
|
+
_params = locals()
|
844
|
+
|
845
|
+
_all_params = [
|
846
|
+
]
|
847
|
+
_all_params.extend(
|
848
|
+
[
|
849
|
+
'async_req',
|
850
|
+
'_return_http_data_only',
|
851
|
+
'_preload_content',
|
852
|
+
'_request_timeout',
|
853
|
+
'_request_auth',
|
854
|
+
'_content_type',
|
855
|
+
'_headers'
|
856
|
+
]
|
857
|
+
)
|
858
|
+
|
859
|
+
# validate the arguments
|
860
|
+
for _key, _val in _params['kwargs'].items():
|
861
|
+
if _key not in _all_params:
|
862
|
+
raise ApiTypeError(
|
863
|
+
"Got an unexpected keyword argument '%s'"
|
864
|
+
" to method get_library_stats" % _key
|
865
|
+
)
|
866
|
+
_params[_key] = _val
|
867
|
+
del _params['kwargs']
|
868
|
+
|
869
|
+
_collection_formats = {}
|
870
|
+
|
871
|
+
# process the path parameters
|
872
|
+
_path_params = {}
|
873
|
+
|
874
|
+
# process the query parameters
|
875
|
+
_query_params = []
|
876
|
+
# process the header parameters
|
877
|
+
_header_params = dict(_params.get('_headers', {}))
|
878
|
+
# process the form parameters
|
879
|
+
_form_params = []
|
880
|
+
_files = {}
|
881
|
+
# process the body parameter
|
882
|
+
_body_params = None
|
883
|
+
# set the HTTP header `Accept`
|
884
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
885
|
+
['application/json']) # noqa: E501
|
886
|
+
|
887
|
+
# authentication setting
|
888
|
+
_auth_settings = [] # noqa: E501
|
889
|
+
|
890
|
+
_response_types_map = {
|
891
|
+
'200': "LibraryStatsResponse",
|
892
|
+
}
|
893
|
+
|
894
|
+
return self.api_client.call_api(
|
895
|
+
'/api/library/stats', 'GET',
|
896
|
+
_path_params,
|
897
|
+
_query_params,
|
898
|
+
_header_params,
|
899
|
+
body=_body_params,
|
900
|
+
post_params=_form_params,
|
901
|
+
files=_files,
|
902
|
+
response_types_map=_response_types_map,
|
903
|
+
auth_settings=_auth_settings,
|
904
|
+
async_req=_params.get('async_req'),
|
905
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
906
|
+
_preload_content=_params.get('_preload_content', True),
|
907
|
+
_request_timeout=_params.get('_request_timeout'),
|
908
|
+
collection_formats=_collection_formats,
|
909
|
+
_request_auth=_params.get('_request_auth'))
|
910
|
+
|
911
|
+
@validate_arguments
|
912
|
+
def get_library_tracks(self, page : Optional[conint(strict=True, ge=1)] = None, limit : Optional[conint(strict=True, le=200, ge=1)] = None, search : Optional[StrictStr] = None, artist : Optional[StrictStr] = None, album : Optional[StrictStr] = None, title : Optional[StrictStr] = None, **kwargs) -> TracksListResponse: # noqa: E501
|
913
|
+
"""List library tracks # noqa: E501
|
914
|
+
|
915
|
+
This method makes a synchronous HTTP request by default. To make an
|
916
|
+
asynchronous HTTP request, please pass async_req=True
|
917
|
+
|
918
|
+
>>> thread = api.get_library_tracks(page, limit, search, artist, album, title, async_req=True)
|
919
|
+
>>> result = thread.get()
|
920
|
+
|
921
|
+
:param page:
|
922
|
+
:type page: int
|
923
|
+
:param limit:
|
924
|
+
:type limit: int
|
925
|
+
:param search:
|
926
|
+
:type search: str
|
927
|
+
:param artist:
|
928
|
+
:type artist: str
|
929
|
+
:param album:
|
930
|
+
:type album: str
|
931
|
+
:param title:
|
932
|
+
:type title: str
|
933
|
+
:param async_req: Whether to execute the request asynchronously.
|
934
|
+
:type async_req: bool, optional
|
935
|
+
:param _request_timeout: timeout setting for this request.
|
936
|
+
If one number provided, it will be total request
|
937
|
+
timeout. It can also be a pair (tuple) of
|
938
|
+
(connection, read) timeouts.
|
939
|
+
:return: Returns the result object.
|
940
|
+
If the method is called asynchronously,
|
941
|
+
returns the request thread.
|
942
|
+
:rtype: TracksListResponse
|
943
|
+
"""
|
944
|
+
kwargs['_return_http_data_only'] = True
|
945
|
+
if '_preload_content' in kwargs:
|
946
|
+
message = "Error! Please call the get_library_tracks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
947
|
+
raise ValueError(message)
|
948
|
+
return self.get_library_tracks_with_http_info(page, limit, search, artist, album, title, **kwargs) # noqa: E501
|
949
|
+
|
950
|
+
@validate_arguments
|
951
|
+
def get_library_tracks_with_http_info(self, page : Optional[conint(strict=True, ge=1)] = None, limit : Optional[conint(strict=True, le=200, ge=1)] = None, search : Optional[StrictStr] = None, artist : Optional[StrictStr] = None, album : Optional[StrictStr] = None, title : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
|
952
|
+
"""List library tracks # noqa: E501
|
953
|
+
|
954
|
+
This method makes a synchronous HTTP request by default. To make an
|
955
|
+
asynchronous HTTP request, please pass async_req=True
|
956
|
+
|
957
|
+
>>> thread = api.get_library_tracks_with_http_info(page, limit, search, artist, album, title, async_req=True)
|
958
|
+
>>> result = thread.get()
|
959
|
+
|
960
|
+
:param page:
|
961
|
+
:type page: int
|
962
|
+
:param limit:
|
963
|
+
:type limit: int
|
964
|
+
:param search:
|
965
|
+
:type search: str
|
966
|
+
:param artist:
|
967
|
+
:type artist: str
|
968
|
+
:param album:
|
969
|
+
:type album: str
|
970
|
+
:param title:
|
971
|
+
:type title: str
|
972
|
+
:param async_req: Whether to execute the request asynchronously.
|
973
|
+
:type async_req: bool, optional
|
974
|
+
:param _preload_content: if False, the ApiResponse.data will
|
975
|
+
be set to none and raw_data will store the
|
976
|
+
HTTP response body without reading/decoding.
|
977
|
+
Default is True.
|
978
|
+
:type _preload_content: bool, optional
|
979
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
980
|
+
object with status code, headers, etc
|
981
|
+
:type _return_http_data_only: bool, optional
|
982
|
+
:param _request_timeout: timeout setting for this request. If one
|
983
|
+
number provided, it will be total request
|
984
|
+
timeout. It can also be a pair (tuple) of
|
985
|
+
(connection, read) timeouts.
|
986
|
+
:param _request_auth: set to override the auth_settings for an a single
|
987
|
+
request; this effectively ignores the authentication
|
988
|
+
in the spec for a single request.
|
989
|
+
:type _request_auth: dict, optional
|
990
|
+
:type _content_type: string, optional: force content-type for the request
|
991
|
+
:return: Returns the result object.
|
992
|
+
If the method is called asynchronously,
|
993
|
+
returns the request thread.
|
994
|
+
:rtype: tuple(TracksListResponse, status_code(int), headers(HTTPHeaderDict))
|
995
|
+
"""
|
996
|
+
|
997
|
+
_params = locals()
|
998
|
+
|
999
|
+
_all_params = [
|
1000
|
+
'page',
|
1001
|
+
'limit',
|
1002
|
+
'search',
|
1003
|
+
'artist',
|
1004
|
+
'album',
|
1005
|
+
'title'
|
1006
|
+
]
|
1007
|
+
_all_params.extend(
|
1008
|
+
[
|
1009
|
+
'async_req',
|
1010
|
+
'_return_http_data_only',
|
1011
|
+
'_preload_content',
|
1012
|
+
'_request_timeout',
|
1013
|
+
'_request_auth',
|
1014
|
+
'_content_type',
|
1015
|
+
'_headers'
|
1016
|
+
]
|
1017
|
+
)
|
1018
|
+
|
1019
|
+
# validate the arguments
|
1020
|
+
for _key, _val in _params['kwargs'].items():
|
1021
|
+
if _key not in _all_params:
|
1022
|
+
raise ApiTypeError(
|
1023
|
+
"Got an unexpected keyword argument '%s'"
|
1024
|
+
" to method get_library_tracks" % _key
|
1025
|
+
)
|
1026
|
+
_params[_key] = _val
|
1027
|
+
del _params['kwargs']
|
1028
|
+
|
1029
|
+
_collection_formats = {}
|
1030
|
+
|
1031
|
+
# process the path parameters
|
1032
|
+
_path_params = {}
|
1033
|
+
|
1034
|
+
# process the query parameters
|
1035
|
+
_query_params = []
|
1036
|
+
if _params.get('page') is not None: # noqa: E501
|
1037
|
+
_query_params.append(('page', _params['page']))
|
1038
|
+
|
1039
|
+
if _params.get('limit') is not None: # noqa: E501
|
1040
|
+
_query_params.append(('limit', _params['limit']))
|
1041
|
+
|
1042
|
+
if _params.get('search') is not None: # noqa: E501
|
1043
|
+
_query_params.append(('search', _params['search']))
|
1044
|
+
|
1045
|
+
if _params.get('artist') is not None: # noqa: E501
|
1046
|
+
_query_params.append(('artist', _params['artist']))
|
1047
|
+
|
1048
|
+
if _params.get('album') is not None: # noqa: E501
|
1049
|
+
_query_params.append(('album', _params['album']))
|
1050
|
+
|
1051
|
+
if _params.get('title') is not None: # noqa: E501
|
1052
|
+
_query_params.append(('title', _params['title']))
|
1053
|
+
|
1054
|
+
# process the header parameters
|
1055
|
+
_header_params = dict(_params.get('_headers', {}))
|
1056
|
+
# process the form parameters
|
1057
|
+
_form_params = []
|
1058
|
+
_files = {}
|
1059
|
+
# process the body parameter
|
1060
|
+
_body_params = None
|
1061
|
+
# set the HTTP header `Accept`
|
1062
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1063
|
+
['application/json']) # noqa: E501
|
1064
|
+
|
1065
|
+
# authentication setting
|
1066
|
+
_auth_settings = [] # noqa: E501
|
1067
|
+
|
1068
|
+
_response_types_map = {
|
1069
|
+
'200': "TracksListResponse",
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
return self.api_client.call_api(
|
1073
|
+
'/api/library/tracks', 'GET',
|
1074
|
+
_path_params,
|
1075
|
+
_query_params,
|
1076
|
+
_header_params,
|
1077
|
+
body=_body_params,
|
1078
|
+
post_params=_form_params,
|
1079
|
+
files=_files,
|
1080
|
+
response_types_map=_response_types_map,
|
1081
|
+
auth_settings=_auth_settings,
|
1082
|
+
async_req=_params.get('async_req'),
|
1083
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1084
|
+
_preload_content=_params.get('_preload_content', True),
|
1085
|
+
_request_timeout=_params.get('_request_timeout'),
|
1086
|
+
collection_formats=_collection_formats,
|
1087
|
+
_request_auth=_params.get('_request_auth'))
|
1088
|
+
|
1089
|
+
@validate_arguments
|
1090
|
+
def get_processing_progress(self, model_id : Optional[StrictStr] = None, **kwargs) -> TrackDatabaseStats: # noqa: E501
|
1091
|
+
"""Get processing progress # noqa: E501
|
1092
|
+
|
1093
|
+
This method makes a synchronous HTTP request by default. To make an
|
1094
|
+
asynchronous HTTP request, please pass async_req=True
|
1095
|
+
|
1096
|
+
>>> thread = api.get_processing_progress(model_id, async_req=True)
|
1097
|
+
>>> result = thread.get()
|
1098
|
+
|
1099
|
+
:param model_id:
|
1100
|
+
:type model_id: str
|
1101
|
+
:param async_req: Whether to execute the request asynchronously.
|
1102
|
+
:type async_req: bool, optional
|
1103
|
+
:param _request_timeout: timeout setting for this request.
|
1104
|
+
If one number provided, it will be total request
|
1105
|
+
timeout. It can also be a pair (tuple) of
|
1106
|
+
(connection, read) timeouts.
|
1107
|
+
:return: Returns the result object.
|
1108
|
+
If the method is called asynchronously,
|
1109
|
+
returns the request thread.
|
1110
|
+
:rtype: TrackDatabaseStats
|
1111
|
+
"""
|
1112
|
+
kwargs['_return_http_data_only'] = True
|
1113
|
+
if '_preload_content' in kwargs:
|
1114
|
+
message = "Error! Please call the get_processing_progress_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1115
|
+
raise ValueError(message)
|
1116
|
+
return self.get_processing_progress_with_http_info(model_id, **kwargs) # noqa: E501
|
1117
|
+
|
1118
|
+
@validate_arguments
|
1119
|
+
def get_processing_progress_with_http_info(self, model_id : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
|
1120
|
+
"""Get processing progress # noqa: E501
|
1121
|
+
|
1122
|
+
This method makes a synchronous HTTP request by default. To make an
|
1123
|
+
asynchronous HTTP request, please pass async_req=True
|
1124
|
+
|
1125
|
+
>>> thread = api.get_processing_progress_with_http_info(model_id, async_req=True)
|
1126
|
+
>>> result = thread.get()
|
1127
|
+
|
1128
|
+
:param model_id:
|
1129
|
+
:type model_id: str
|
1130
|
+
:param async_req: Whether to execute the request asynchronously.
|
1131
|
+
:type async_req: bool, optional
|
1132
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1133
|
+
be set to none and raw_data will store the
|
1134
|
+
HTTP response body without reading/decoding.
|
1135
|
+
Default is True.
|
1136
|
+
:type _preload_content: bool, optional
|
1137
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1138
|
+
object with status code, headers, etc
|
1139
|
+
:type _return_http_data_only: bool, optional
|
1140
|
+
:param _request_timeout: timeout setting for this request. If one
|
1141
|
+
number provided, it will be total request
|
1142
|
+
timeout. It can also be a pair (tuple) of
|
1143
|
+
(connection, read) timeouts.
|
1144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1145
|
+
request; this effectively ignores the authentication
|
1146
|
+
in the spec for a single request.
|
1147
|
+
:type _request_auth: dict, optional
|
1148
|
+
:type _content_type: string, optional: force content-type for the request
|
1149
|
+
:return: Returns the result object.
|
1150
|
+
If the method is called asynchronously,
|
1151
|
+
returns the request thread.
|
1152
|
+
:rtype: tuple(TrackDatabaseStats, status_code(int), headers(HTTPHeaderDict))
|
1153
|
+
"""
|
1154
|
+
|
1155
|
+
_params = locals()
|
1156
|
+
|
1157
|
+
_all_params = [
|
1158
|
+
'model_id'
|
1159
|
+
]
|
1160
|
+
_all_params.extend(
|
1161
|
+
[
|
1162
|
+
'async_req',
|
1163
|
+
'_return_http_data_only',
|
1164
|
+
'_preload_content',
|
1165
|
+
'_request_timeout',
|
1166
|
+
'_request_auth',
|
1167
|
+
'_content_type',
|
1168
|
+
'_headers'
|
1169
|
+
]
|
1170
|
+
)
|
1171
|
+
|
1172
|
+
# validate the arguments
|
1173
|
+
for _key, _val in _params['kwargs'].items():
|
1174
|
+
if _key not in _all_params:
|
1175
|
+
raise ApiTypeError(
|
1176
|
+
"Got an unexpected keyword argument '%s'"
|
1177
|
+
" to method get_processing_progress" % _key
|
1178
|
+
)
|
1179
|
+
_params[_key] = _val
|
1180
|
+
del _params['kwargs']
|
1181
|
+
|
1182
|
+
_collection_formats = {}
|
1183
|
+
|
1184
|
+
# process the path parameters
|
1185
|
+
_path_params = {}
|
1186
|
+
|
1187
|
+
# process the query parameters
|
1188
|
+
_query_params = []
|
1189
|
+
if _params.get('model_id') is not None: # noqa: E501
|
1190
|
+
_query_params.append(('model_id', _params['model_id']))
|
1191
|
+
|
1192
|
+
# process the header parameters
|
1193
|
+
_header_params = dict(_params.get('_headers', {}))
|
1194
|
+
# process the form parameters
|
1195
|
+
_form_params = []
|
1196
|
+
_files = {}
|
1197
|
+
# process the body parameter
|
1198
|
+
_body_params = None
|
1199
|
+
# set the HTTP header `Accept`
|
1200
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1201
|
+
['application/json']) # noqa: E501
|
1202
|
+
|
1203
|
+
# authentication setting
|
1204
|
+
_auth_settings = [] # noqa: E501
|
1205
|
+
|
1206
|
+
_response_types_map = {
|
1207
|
+
'200': "TrackDatabaseStats",
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
return self.api_client.call_api(
|
1211
|
+
'/api/library/progress', 'GET',
|
1212
|
+
_path_params,
|
1213
|
+
_query_params,
|
1214
|
+
_header_params,
|
1215
|
+
body=_body_params,
|
1216
|
+
post_params=_form_params,
|
1217
|
+
files=_files,
|
1218
|
+
response_types_map=_response_types_map,
|
1219
|
+
auth_settings=_auth_settings,
|
1220
|
+
async_req=_params.get('async_req'),
|
1221
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1222
|
+
_preload_content=_params.get('_preload_content', True),
|
1223
|
+
_request_timeout=_params.get('_request_timeout'),
|
1224
|
+
collection_formats=_collection_formats,
|
1225
|
+
_request_auth=_params.get('_request_auth'))
|
1226
|
+
|
1227
|
+
@validate_arguments
|
1228
|
+
def get_similar_by_track(self, track_id : StrictStr, n_results : Optional[StrictInt] = None, **kwargs) -> GetSimilarByTrack200Response: # noqa: E501
|
1229
|
+
"""Similar tracks by track_id # noqa: E501
|
1230
|
+
|
1231
|
+
This method makes a synchronous HTTP request by default. To make an
|
1232
|
+
asynchronous HTTP request, please pass async_req=True
|
1233
|
+
|
1234
|
+
>>> thread = api.get_similar_by_track(track_id, n_results, async_req=True)
|
1235
|
+
>>> result = thread.get()
|
1236
|
+
|
1237
|
+
:param track_id: (required)
|
1238
|
+
:type track_id: str
|
1239
|
+
:param n_results:
|
1240
|
+
:type n_results: int
|
1241
|
+
:param async_req: Whether to execute the request asynchronously.
|
1242
|
+
:type async_req: bool, optional
|
1243
|
+
:param _request_timeout: timeout setting for this request.
|
1244
|
+
If one number provided, it will be total request
|
1245
|
+
timeout. It can also be a pair (tuple) of
|
1246
|
+
(connection, read) timeouts.
|
1247
|
+
:return: Returns the result object.
|
1248
|
+
If the method is called asynchronously,
|
1249
|
+
returns the request thread.
|
1250
|
+
:rtype: GetSimilarByTrack200Response
|
1251
|
+
"""
|
1252
|
+
kwargs['_return_http_data_only'] = True
|
1253
|
+
if '_preload_content' in kwargs:
|
1254
|
+
message = "Error! Please call the get_similar_by_track_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1255
|
+
raise ValueError(message)
|
1256
|
+
return self.get_similar_by_track_with_http_info(track_id, n_results, **kwargs) # noqa: E501
|
1257
|
+
|
1258
|
+
@validate_arguments
|
1259
|
+
def get_similar_by_track_with_http_info(self, track_id : StrictStr, n_results : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
|
1260
|
+
"""Similar tracks by track_id # noqa: E501
|
1261
|
+
|
1262
|
+
This method makes a synchronous HTTP request by default. To make an
|
1263
|
+
asynchronous HTTP request, please pass async_req=True
|
1264
|
+
|
1265
|
+
>>> thread = api.get_similar_by_track_with_http_info(track_id, n_results, async_req=True)
|
1266
|
+
>>> result = thread.get()
|
1267
|
+
|
1268
|
+
:param track_id: (required)
|
1269
|
+
:type track_id: str
|
1270
|
+
:param n_results:
|
1271
|
+
:type n_results: int
|
1272
|
+
:param async_req: Whether to execute the request asynchronously.
|
1273
|
+
:type async_req: bool, optional
|
1274
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1275
|
+
be set to none and raw_data will store the
|
1276
|
+
HTTP response body without reading/decoding.
|
1277
|
+
Default is True.
|
1278
|
+
:type _preload_content: bool, optional
|
1279
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1280
|
+
object with status code, headers, etc
|
1281
|
+
:type _return_http_data_only: bool, optional
|
1282
|
+
:param _request_timeout: timeout setting for this request. If one
|
1283
|
+
number provided, it will be total request
|
1284
|
+
timeout. It can also be a pair (tuple) of
|
1285
|
+
(connection, read) timeouts.
|
1286
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1287
|
+
request; this effectively ignores the authentication
|
1288
|
+
in the spec for a single request.
|
1289
|
+
:type _request_auth: dict, optional
|
1290
|
+
:type _content_type: string, optional: force content-type for the request
|
1291
|
+
:return: Returns the result object.
|
1292
|
+
If the method is called asynchronously,
|
1293
|
+
returns the request thread.
|
1294
|
+
:rtype: tuple(GetSimilarByTrack200Response, status_code(int), headers(HTTPHeaderDict))
|
1295
|
+
"""
|
1296
|
+
|
1297
|
+
_params = locals()
|
1298
|
+
|
1299
|
+
_all_params = [
|
1300
|
+
'track_id',
|
1301
|
+
'n_results'
|
1302
|
+
]
|
1303
|
+
_all_params.extend(
|
1304
|
+
[
|
1305
|
+
'async_req',
|
1306
|
+
'_return_http_data_only',
|
1307
|
+
'_preload_content',
|
1308
|
+
'_request_timeout',
|
1309
|
+
'_request_auth',
|
1310
|
+
'_content_type',
|
1311
|
+
'_headers'
|
1312
|
+
]
|
1313
|
+
)
|
1314
|
+
|
1315
|
+
# validate the arguments
|
1316
|
+
for _key, _val in _params['kwargs'].items():
|
1317
|
+
if _key not in _all_params:
|
1318
|
+
raise ApiTypeError(
|
1319
|
+
"Got an unexpected keyword argument '%s'"
|
1320
|
+
" to method get_similar_by_track" % _key
|
1321
|
+
)
|
1322
|
+
_params[_key] = _val
|
1323
|
+
del _params['kwargs']
|
1324
|
+
|
1325
|
+
_collection_formats = {}
|
1326
|
+
|
1327
|
+
# process the path parameters
|
1328
|
+
_path_params = {}
|
1329
|
+
if _params['track_id'] is not None:
|
1330
|
+
_path_params['track_id'] = _params['track_id']
|
1331
|
+
|
1332
|
+
|
1333
|
+
# process the query parameters
|
1334
|
+
_query_params = []
|
1335
|
+
if _params.get('n_results') is not None: # noqa: E501
|
1336
|
+
_query_params.append(('n_results', _params['n_results']))
|
1337
|
+
|
1338
|
+
# process the header parameters
|
1339
|
+
_header_params = dict(_params.get('_headers', {}))
|
1340
|
+
# process the form parameters
|
1341
|
+
_form_params = []
|
1342
|
+
_files = {}
|
1343
|
+
# process the body parameter
|
1344
|
+
_body_params = None
|
1345
|
+
# set the HTTP header `Accept`
|
1346
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1347
|
+
['application/json']) # noqa: E501
|
1348
|
+
|
1349
|
+
# authentication setting
|
1350
|
+
_auth_settings = [] # noqa: E501
|
1351
|
+
|
1352
|
+
_response_types_map = {
|
1353
|
+
'200': "GetSimilarByTrack200Response",
|
1354
|
+
}
|
1355
|
+
|
1356
|
+
return self.api_client.call_api(
|
1357
|
+
'/similar/by_track/{track_id}', 'GET',
|
1358
|
+
_path_params,
|
1359
|
+
_query_params,
|
1360
|
+
_header_params,
|
1361
|
+
body=_body_params,
|
1362
|
+
post_params=_form_params,
|
1363
|
+
files=_files,
|
1364
|
+
response_types_map=_response_types_map,
|
1365
|
+
auth_settings=_auth_settings,
|
1366
|
+
async_req=_params.get('async_req'),
|
1367
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1368
|
+
_preload_content=_params.get('_preload_content', True),
|
1369
|
+
_request_timeout=_params.get('_request_timeout'),
|
1370
|
+
collection_formats=_collection_formats,
|
1371
|
+
_request_auth=_params.get('_request_auth'))
|
1372
|
+
|
1373
|
+
@validate_arguments
|
1374
|
+
def get_task_status(self, task_id : StrictStr, **kwargs) -> TaskStatusResponse: # noqa: E501
|
1375
|
+
"""Get task status # noqa: E501
|
1376
|
+
|
1377
|
+
This method makes a synchronous HTTP request by default. To make an
|
1378
|
+
asynchronous HTTP request, please pass async_req=True
|
1379
|
+
|
1380
|
+
>>> thread = api.get_task_status(task_id, async_req=True)
|
1381
|
+
>>> result = thread.get()
|
1382
|
+
|
1383
|
+
:param task_id: (required)
|
1384
|
+
:type task_id: str
|
1385
|
+
:param async_req: Whether to execute the request asynchronously.
|
1386
|
+
:type async_req: bool, optional
|
1387
|
+
:param _request_timeout: timeout setting for this request.
|
1388
|
+
If one number provided, it will be total request
|
1389
|
+
timeout. It can also be a pair (tuple) of
|
1390
|
+
(connection, read) timeouts.
|
1391
|
+
:return: Returns the result object.
|
1392
|
+
If the method is called asynchronously,
|
1393
|
+
returns the request thread.
|
1394
|
+
:rtype: TaskStatusResponse
|
1395
|
+
"""
|
1396
|
+
kwargs['_return_http_data_only'] = True
|
1397
|
+
if '_preload_content' in kwargs:
|
1398
|
+
message = "Error! Please call the get_task_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1399
|
+
raise ValueError(message)
|
1400
|
+
return self.get_task_status_with_http_info(task_id, **kwargs) # noqa: E501
|
1401
|
+
|
1402
|
+
@validate_arguments
|
1403
|
+
def get_task_status_with_http_info(self, task_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
|
1404
|
+
"""Get task status # noqa: E501
|
1405
|
+
|
1406
|
+
This method makes a synchronous HTTP request by default. To make an
|
1407
|
+
asynchronous HTTP request, please pass async_req=True
|
1408
|
+
|
1409
|
+
>>> thread = api.get_task_status_with_http_info(task_id, async_req=True)
|
1410
|
+
>>> result = thread.get()
|
1411
|
+
|
1412
|
+
:param task_id: (required)
|
1413
|
+
:type task_id: str
|
1414
|
+
:param async_req: Whether to execute the request asynchronously.
|
1415
|
+
:type async_req: bool, optional
|
1416
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1417
|
+
be set to none and raw_data will store the
|
1418
|
+
HTTP response body without reading/decoding.
|
1419
|
+
Default is True.
|
1420
|
+
:type _preload_content: bool, optional
|
1421
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1422
|
+
object with status code, headers, etc
|
1423
|
+
:type _return_http_data_only: bool, optional
|
1424
|
+
:param _request_timeout: timeout setting for this request. If one
|
1425
|
+
number provided, it will be total request
|
1426
|
+
timeout. It can also be a pair (tuple) of
|
1427
|
+
(connection, read) timeouts.
|
1428
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1429
|
+
request; this effectively ignores the authentication
|
1430
|
+
in the spec for a single request.
|
1431
|
+
:type _request_auth: dict, optional
|
1432
|
+
:type _content_type: string, optional: force content-type for the request
|
1433
|
+
:return: Returns the result object.
|
1434
|
+
If the method is called asynchronously,
|
1435
|
+
returns the request thread.
|
1436
|
+
:rtype: tuple(TaskStatusResponse, status_code(int), headers(HTTPHeaderDict))
|
1437
|
+
"""
|
1438
|
+
|
1439
|
+
_params = locals()
|
1440
|
+
|
1441
|
+
_all_params = [
|
1442
|
+
'task_id'
|
1443
|
+
]
|
1444
|
+
_all_params.extend(
|
1445
|
+
[
|
1446
|
+
'async_req',
|
1447
|
+
'_return_http_data_only',
|
1448
|
+
'_preload_content',
|
1449
|
+
'_request_timeout',
|
1450
|
+
'_request_auth',
|
1451
|
+
'_content_type',
|
1452
|
+
'_headers'
|
1453
|
+
]
|
1454
|
+
)
|
1455
|
+
|
1456
|
+
# validate the arguments
|
1457
|
+
for _key, _val in _params['kwargs'].items():
|
1458
|
+
if _key not in _all_params:
|
1459
|
+
raise ApiTypeError(
|
1460
|
+
"Got an unexpected keyword argument '%s'"
|
1461
|
+
" to method get_task_status" % _key
|
1462
|
+
)
|
1463
|
+
_params[_key] = _val
|
1464
|
+
del _params['kwargs']
|
1465
|
+
|
1466
|
+
_collection_formats = {}
|
1467
|
+
|
1468
|
+
# process the path parameters
|
1469
|
+
_path_params = {}
|
1470
|
+
if _params['task_id'] is not None:
|
1471
|
+
_path_params['task_id'] = _params['task_id']
|
1472
|
+
|
1473
|
+
|
1474
|
+
# process the query parameters
|
1475
|
+
_query_params = []
|
1476
|
+
# process the header parameters
|
1477
|
+
_header_params = dict(_params.get('_headers', {}))
|
1478
|
+
# process the form parameters
|
1479
|
+
_form_params = []
|
1480
|
+
_files = {}
|
1481
|
+
# process the body parameter
|
1482
|
+
_body_params = None
|
1483
|
+
# set the HTTP header `Accept`
|
1484
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1485
|
+
['application/json']) # noqa: E501
|
1486
|
+
|
1487
|
+
# authentication setting
|
1488
|
+
_auth_settings = [] # noqa: E501
|
1489
|
+
|
1490
|
+
_response_types_map = {
|
1491
|
+
'200': "TaskStatusResponse",
|
1492
|
+
}
|
1493
|
+
|
1494
|
+
return self.api_client.call_api(
|
1495
|
+
'/api/queue/task/{task_id}', 'GET',
|
1496
|
+
_path_params,
|
1497
|
+
_query_params,
|
1498
|
+
_header_params,
|
1499
|
+
body=_body_params,
|
1500
|
+
post_params=_form_params,
|
1501
|
+
files=_files,
|
1502
|
+
response_types_map=_response_types_map,
|
1503
|
+
auth_settings=_auth_settings,
|
1504
|
+
async_req=_params.get('async_req'),
|
1505
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1506
|
+
_preload_content=_params.get('_preload_content', True),
|
1507
|
+
_request_timeout=_params.get('_request_timeout'),
|
1508
|
+
collection_formats=_collection_formats,
|
1509
|
+
_request_auth=_params.get('_request_auth'))
|
1510
|
+
|
1511
|
+
@validate_arguments
|
1512
|
+
def process_library(self, **kwargs) -> ProcessingResponse: # noqa: E501
|
1513
|
+
"""Start embeddings processing # noqa: E501
|
1514
|
+
|
1515
|
+
This method makes a synchronous HTTP request by default. To make an
|
1516
|
+
asynchronous HTTP request, please pass async_req=True
|
1517
|
+
|
1518
|
+
>>> thread = api.process_library(async_req=True)
|
1519
|
+
>>> result = thread.get()
|
1520
|
+
|
1521
|
+
:param async_req: Whether to execute the request asynchronously.
|
1522
|
+
:type async_req: bool, optional
|
1523
|
+
:param _request_timeout: timeout setting for this request.
|
1524
|
+
If one number provided, it will be total request
|
1525
|
+
timeout. It can also be a pair (tuple) of
|
1526
|
+
(connection, read) timeouts.
|
1527
|
+
:return: Returns the result object.
|
1528
|
+
If the method is called asynchronously,
|
1529
|
+
returns the request thread.
|
1530
|
+
:rtype: ProcessingResponse
|
1531
|
+
"""
|
1532
|
+
kwargs['_return_http_data_only'] = True
|
1533
|
+
if '_preload_content' in kwargs:
|
1534
|
+
message = "Error! Please call the process_library_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1535
|
+
raise ValueError(message)
|
1536
|
+
return self.process_library_with_http_info(**kwargs) # noqa: E501
|
1537
|
+
|
1538
|
+
@validate_arguments
|
1539
|
+
def process_library_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
1540
|
+
"""Start embeddings processing # noqa: E501
|
1541
|
+
|
1542
|
+
This method makes a synchronous HTTP request by default. To make an
|
1543
|
+
asynchronous HTTP request, please pass async_req=True
|
1544
|
+
|
1545
|
+
>>> thread = api.process_library_with_http_info(async_req=True)
|
1546
|
+
>>> result = thread.get()
|
1547
|
+
|
1548
|
+
:param async_req: Whether to execute the request asynchronously.
|
1549
|
+
:type async_req: bool, optional
|
1550
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1551
|
+
be set to none and raw_data will store the
|
1552
|
+
HTTP response body without reading/decoding.
|
1553
|
+
Default is True.
|
1554
|
+
:type _preload_content: bool, optional
|
1555
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1556
|
+
object with status code, headers, etc
|
1557
|
+
:type _return_http_data_only: bool, optional
|
1558
|
+
:param _request_timeout: timeout setting for this request. If one
|
1559
|
+
number provided, it will be total request
|
1560
|
+
timeout. It can also be a pair (tuple) of
|
1561
|
+
(connection, read) timeouts.
|
1562
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1563
|
+
request; this effectively ignores the authentication
|
1564
|
+
in the spec for a single request.
|
1565
|
+
:type _request_auth: dict, optional
|
1566
|
+
:type _content_type: string, optional: force content-type for the request
|
1567
|
+
:return: Returns the result object.
|
1568
|
+
If the method is called asynchronously,
|
1569
|
+
returns the request thread.
|
1570
|
+
:rtype: tuple(ProcessingResponse, status_code(int), headers(HTTPHeaderDict))
|
1571
|
+
"""
|
1572
|
+
|
1573
|
+
_params = locals()
|
1574
|
+
|
1575
|
+
_all_params = [
|
1576
|
+
]
|
1577
|
+
_all_params.extend(
|
1578
|
+
[
|
1579
|
+
'async_req',
|
1580
|
+
'_return_http_data_only',
|
1581
|
+
'_preload_content',
|
1582
|
+
'_request_timeout',
|
1583
|
+
'_request_auth',
|
1584
|
+
'_content_type',
|
1585
|
+
'_headers'
|
1586
|
+
]
|
1587
|
+
)
|
1588
|
+
|
1589
|
+
# validate the arguments
|
1590
|
+
for _key, _val in _params['kwargs'].items():
|
1591
|
+
if _key not in _all_params:
|
1592
|
+
raise ApiTypeError(
|
1593
|
+
"Got an unexpected keyword argument '%s'"
|
1594
|
+
" to method process_library" % _key
|
1595
|
+
)
|
1596
|
+
_params[_key] = _val
|
1597
|
+
del _params['kwargs']
|
1598
|
+
|
1599
|
+
_collection_formats = {}
|
1600
|
+
|
1601
|
+
# process the path parameters
|
1602
|
+
_path_params = {}
|
1603
|
+
|
1604
|
+
# process the query parameters
|
1605
|
+
_query_params = []
|
1606
|
+
# process the header parameters
|
1607
|
+
_header_params = dict(_params.get('_headers', {}))
|
1608
|
+
# process the form parameters
|
1609
|
+
_form_params = []
|
1610
|
+
_files = {}
|
1611
|
+
# process the body parameter
|
1612
|
+
_body_params = None
|
1613
|
+
# set the HTTP header `Accept`
|
1614
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1615
|
+
['application/json']) # noqa: E501
|
1616
|
+
|
1617
|
+
# authentication setting
|
1618
|
+
_auth_settings = [] # noqa: E501
|
1619
|
+
|
1620
|
+
_response_types_map = {
|
1621
|
+
'200': "ProcessingResponse",
|
1622
|
+
}
|
1623
|
+
|
1624
|
+
return self.api_client.call_api(
|
1625
|
+
'/api/library/process', 'POST',
|
1626
|
+
_path_params,
|
1627
|
+
_query_params,
|
1628
|
+
_header_params,
|
1629
|
+
body=_body_params,
|
1630
|
+
post_params=_form_params,
|
1631
|
+
files=_files,
|
1632
|
+
response_types_map=_response_types_map,
|
1633
|
+
auth_settings=_auth_settings,
|
1634
|
+
async_req=_params.get('async_req'),
|
1635
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1636
|
+
_preload_content=_params.get('_preload_content', True),
|
1637
|
+
_request_timeout=_params.get('_request_timeout'),
|
1638
|
+
collection_formats=_collection_formats,
|
1639
|
+
_request_auth=_params.get('_request_auth'))
|
1640
|
+
|
1641
|
+
@validate_arguments
|
1642
|
+
def process_library_on_server(self, **kwargs) -> ProcessingResponse: # noqa: E501
|
1643
|
+
"""Start server-side processing # noqa: E501
|
1644
|
+
|
1645
|
+
This method makes a synchronous HTTP request by default. To make an
|
1646
|
+
asynchronous HTTP request, please pass async_req=True
|
1647
|
+
|
1648
|
+
>>> thread = api.process_library_on_server(async_req=True)
|
1649
|
+
>>> result = thread.get()
|
1650
|
+
|
1651
|
+
:param async_req: Whether to execute the request asynchronously.
|
1652
|
+
:type async_req: bool, optional
|
1653
|
+
:param _request_timeout: timeout setting for this request.
|
1654
|
+
If one number provided, it will be total request
|
1655
|
+
timeout. It can also be a pair (tuple) of
|
1656
|
+
(connection, read) timeouts.
|
1657
|
+
:return: Returns the result object.
|
1658
|
+
If the method is called asynchronously,
|
1659
|
+
returns the request thread.
|
1660
|
+
:rtype: ProcessingResponse
|
1661
|
+
"""
|
1662
|
+
kwargs['_return_http_data_only'] = True
|
1663
|
+
if '_preload_content' in kwargs:
|
1664
|
+
message = "Error! Please call the process_library_on_server_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1665
|
+
raise ValueError(message)
|
1666
|
+
return self.process_library_on_server_with_http_info(**kwargs) # noqa: E501
|
1667
|
+
|
1668
|
+
@validate_arguments
|
1669
|
+
def process_library_on_server_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
1670
|
+
"""Start server-side processing # noqa: E501
|
1671
|
+
|
1672
|
+
This method makes a synchronous HTTP request by default. To make an
|
1673
|
+
asynchronous HTTP request, please pass async_req=True
|
1674
|
+
|
1675
|
+
>>> thread = api.process_library_on_server_with_http_info(async_req=True)
|
1676
|
+
>>> result = thread.get()
|
1677
|
+
|
1678
|
+
:param async_req: Whether to execute the request asynchronously.
|
1679
|
+
:type async_req: bool, optional
|
1680
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1681
|
+
be set to none and raw_data will store the
|
1682
|
+
HTTP response body without reading/decoding.
|
1683
|
+
Default is True.
|
1684
|
+
:type _preload_content: bool, optional
|
1685
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1686
|
+
object with status code, headers, etc
|
1687
|
+
:type _return_http_data_only: bool, optional
|
1688
|
+
:param _request_timeout: timeout setting for this request. If one
|
1689
|
+
number provided, it will be total request
|
1690
|
+
timeout. It can also be a pair (tuple) of
|
1691
|
+
(connection, read) timeouts.
|
1692
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1693
|
+
request; this effectively ignores the authentication
|
1694
|
+
in the spec for a single request.
|
1695
|
+
:type _request_auth: dict, optional
|
1696
|
+
:type _content_type: string, optional: force content-type for the request
|
1697
|
+
:return: Returns the result object.
|
1698
|
+
If the method is called asynchronously,
|
1699
|
+
returns the request thread.
|
1700
|
+
:rtype: tuple(ProcessingResponse, status_code(int), headers(HTTPHeaderDict))
|
1701
|
+
"""
|
1702
|
+
|
1703
|
+
_params = locals()
|
1704
|
+
|
1705
|
+
_all_params = [
|
1706
|
+
]
|
1707
|
+
_all_params.extend(
|
1708
|
+
[
|
1709
|
+
'async_req',
|
1710
|
+
'_return_http_data_only',
|
1711
|
+
'_preload_content',
|
1712
|
+
'_request_timeout',
|
1713
|
+
'_request_auth',
|
1714
|
+
'_content_type',
|
1715
|
+
'_headers'
|
1716
|
+
]
|
1717
|
+
)
|
1718
|
+
|
1719
|
+
# validate the arguments
|
1720
|
+
for _key, _val in _params['kwargs'].items():
|
1721
|
+
if _key not in _all_params:
|
1722
|
+
raise ApiTypeError(
|
1723
|
+
"Got an unexpected keyword argument '%s'"
|
1724
|
+
" to method process_library_on_server" % _key
|
1725
|
+
)
|
1726
|
+
_params[_key] = _val
|
1727
|
+
del _params['kwargs']
|
1728
|
+
|
1729
|
+
_collection_formats = {}
|
1730
|
+
|
1731
|
+
# process the path parameters
|
1732
|
+
_path_params = {}
|
1733
|
+
|
1734
|
+
# process the query parameters
|
1735
|
+
_query_params = []
|
1736
|
+
# process the header parameters
|
1737
|
+
_header_params = dict(_params.get('_headers', {}))
|
1738
|
+
# process the form parameters
|
1739
|
+
_form_params = []
|
1740
|
+
_files = {}
|
1741
|
+
# process the body parameter
|
1742
|
+
_body_params = None
|
1743
|
+
# set the HTTP header `Accept`
|
1744
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1745
|
+
['application/json']) # noqa: E501
|
1746
|
+
|
1747
|
+
# authentication setting
|
1748
|
+
_auth_settings = [] # noqa: E501
|
1749
|
+
|
1750
|
+
_response_types_map = {
|
1751
|
+
'200': "ProcessingResponse",
|
1752
|
+
}
|
1753
|
+
|
1754
|
+
return self.api_client.call_api(
|
1755
|
+
'/api/library/process/server', 'POST',
|
1756
|
+
_path_params,
|
1757
|
+
_query_params,
|
1758
|
+
_header_params,
|
1759
|
+
body=_body_params,
|
1760
|
+
post_params=_form_params,
|
1761
|
+
files=_files,
|
1762
|
+
response_types_map=_response_types_map,
|
1763
|
+
auth_settings=_auth_settings,
|
1764
|
+
async_req=_params.get('async_req'),
|
1765
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1766
|
+
_preload_content=_params.get('_preload_content', True),
|
1767
|
+
_request_timeout=_params.get('_request_timeout'),
|
1768
|
+
collection_formats=_collection_formats,
|
1769
|
+
_request_auth=_params.get('_request_auth'))
|
1770
|
+
|
1771
|
+
@validate_arguments
|
1772
|
+
def save_config(self, config_request : ConfigRequest, **kwargs) -> SaveConfigResponse: # noqa: E501
|
1773
|
+
"""Save configuration # noqa: E501
|
1774
|
+
|
1775
|
+
This method makes a synchronous HTTP request by default. To make an
|
1776
|
+
asynchronous HTTP request, please pass async_req=True
|
1777
|
+
|
1778
|
+
>>> thread = api.save_config(config_request, async_req=True)
|
1779
|
+
>>> result = thread.get()
|
1780
|
+
|
1781
|
+
:param config_request: (required)
|
1782
|
+
:type config_request: ConfigRequest
|
1783
|
+
:param async_req: Whether to execute the request asynchronously.
|
1784
|
+
:type async_req: bool, optional
|
1785
|
+
:param _request_timeout: timeout setting for this request.
|
1786
|
+
If one number provided, it will be total request
|
1787
|
+
timeout. It can also be a pair (tuple) of
|
1788
|
+
(connection, read) timeouts.
|
1789
|
+
:return: Returns the result object.
|
1790
|
+
If the method is called asynchronously,
|
1791
|
+
returns the request thread.
|
1792
|
+
:rtype: SaveConfigResponse
|
1793
|
+
"""
|
1794
|
+
kwargs['_return_http_data_only'] = True
|
1795
|
+
if '_preload_content' in kwargs:
|
1796
|
+
message = "Error! Please call the save_config_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1797
|
+
raise ValueError(message)
|
1798
|
+
return self.save_config_with_http_info(config_request, **kwargs) # noqa: E501
|
1799
|
+
|
1800
|
+
@validate_arguments
|
1801
|
+
def save_config_with_http_info(self, config_request : ConfigRequest, **kwargs) -> ApiResponse: # noqa: E501
|
1802
|
+
"""Save configuration # noqa: E501
|
1803
|
+
|
1804
|
+
This method makes a synchronous HTTP request by default. To make an
|
1805
|
+
asynchronous HTTP request, please pass async_req=True
|
1806
|
+
|
1807
|
+
>>> thread = api.save_config_with_http_info(config_request, async_req=True)
|
1808
|
+
>>> result = thread.get()
|
1809
|
+
|
1810
|
+
:param config_request: (required)
|
1811
|
+
:type config_request: ConfigRequest
|
1812
|
+
:param async_req: Whether to execute the request asynchronously.
|
1813
|
+
:type async_req: bool, optional
|
1814
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1815
|
+
be set to none and raw_data will store the
|
1816
|
+
HTTP response body without reading/decoding.
|
1817
|
+
Default is True.
|
1818
|
+
:type _preload_content: bool, optional
|
1819
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1820
|
+
object with status code, headers, etc
|
1821
|
+
:type _return_http_data_only: bool, optional
|
1822
|
+
:param _request_timeout: timeout setting for this request. If one
|
1823
|
+
number provided, it will be total request
|
1824
|
+
timeout. It can also be a pair (tuple) of
|
1825
|
+
(connection, read) timeouts.
|
1826
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1827
|
+
request; this effectively ignores the authentication
|
1828
|
+
in the spec for a single request.
|
1829
|
+
:type _request_auth: dict, optional
|
1830
|
+
:type _content_type: string, optional: force content-type for the request
|
1831
|
+
:return: Returns the result object.
|
1832
|
+
If the method is called asynchronously,
|
1833
|
+
returns the request thread.
|
1834
|
+
:rtype: tuple(SaveConfigResponse, status_code(int), headers(HTTPHeaderDict))
|
1835
|
+
"""
|
1836
|
+
|
1837
|
+
_params = locals()
|
1838
|
+
|
1839
|
+
_all_params = [
|
1840
|
+
'config_request'
|
1841
|
+
]
|
1842
|
+
_all_params.extend(
|
1843
|
+
[
|
1844
|
+
'async_req',
|
1845
|
+
'_return_http_data_only',
|
1846
|
+
'_preload_content',
|
1847
|
+
'_request_timeout',
|
1848
|
+
'_request_auth',
|
1849
|
+
'_content_type',
|
1850
|
+
'_headers'
|
1851
|
+
]
|
1852
|
+
)
|
1853
|
+
|
1854
|
+
# validate the arguments
|
1855
|
+
for _key, _val in _params['kwargs'].items():
|
1856
|
+
if _key not in _all_params:
|
1857
|
+
raise ApiTypeError(
|
1858
|
+
"Got an unexpected keyword argument '%s'"
|
1859
|
+
" to method save_config" % _key
|
1860
|
+
)
|
1861
|
+
_params[_key] = _val
|
1862
|
+
del _params['kwargs']
|
1863
|
+
|
1864
|
+
_collection_formats = {}
|
1865
|
+
|
1866
|
+
# process the path parameters
|
1867
|
+
_path_params = {}
|
1868
|
+
|
1869
|
+
# process the query parameters
|
1870
|
+
_query_params = []
|
1871
|
+
# process the header parameters
|
1872
|
+
_header_params = dict(_params.get('_headers', {}))
|
1873
|
+
# process the form parameters
|
1874
|
+
_form_params = []
|
1875
|
+
_files = {}
|
1876
|
+
# process the body parameter
|
1877
|
+
_body_params = None
|
1878
|
+
if _params['config_request'] is not None:
|
1879
|
+
_body_params = _params['config_request']
|
1880
|
+
|
1881
|
+
# set the HTTP header `Accept`
|
1882
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1883
|
+
['application/json']) # noqa: E501
|
1884
|
+
|
1885
|
+
# set the HTTP header `Content-Type`
|
1886
|
+
_content_types_list = _params.get('_content_type',
|
1887
|
+
self.api_client.select_header_content_type(
|
1888
|
+
['application/json']))
|
1889
|
+
if _content_types_list:
|
1890
|
+
_header_params['Content-Type'] = _content_types_list
|
1891
|
+
|
1892
|
+
# authentication setting
|
1893
|
+
_auth_settings = [] # noqa: E501
|
1894
|
+
|
1895
|
+
_response_types_map = {
|
1896
|
+
'200': "SaveConfigResponse",
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
return self.api_client.call_api(
|
1900
|
+
'/api/config', 'POST',
|
1901
|
+
_path_params,
|
1902
|
+
_query_params,
|
1903
|
+
_header_params,
|
1904
|
+
body=_body_params,
|
1905
|
+
post_params=_form_params,
|
1906
|
+
files=_files,
|
1907
|
+
response_types_map=_response_types_map,
|
1908
|
+
auth_settings=_auth_settings,
|
1909
|
+
async_req=_params.get('async_req'),
|
1910
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1911
|
+
_preload_content=_params.get('_preload_content', True),
|
1912
|
+
_request_timeout=_params.get('_request_timeout'),
|
1913
|
+
collection_formats=_collection_formats,
|
1914
|
+
_request_auth=_params.get('_request_auth'))
|
1915
|
+
|
1916
|
+
@validate_arguments
|
1917
|
+
def scan_library(self, **kwargs) -> ScanLibraryResponse: # noqa: E501
|
1918
|
+
"""Scan the Plex music library # noqa: E501
|
1919
|
+
|
1920
|
+
This method makes a synchronous HTTP request by default. To make an
|
1921
|
+
asynchronous HTTP request, please pass async_req=True
|
1922
|
+
|
1923
|
+
>>> thread = api.scan_library(async_req=True)
|
1924
|
+
>>> result = thread.get()
|
1925
|
+
|
1926
|
+
:param async_req: Whether to execute the request asynchronously.
|
1927
|
+
:type async_req: bool, optional
|
1928
|
+
:param _request_timeout: timeout setting for this request.
|
1929
|
+
If one number provided, it will be total request
|
1930
|
+
timeout. It can also be a pair (tuple) of
|
1931
|
+
(connection, read) timeouts.
|
1932
|
+
:return: Returns the result object.
|
1933
|
+
If the method is called asynchronously,
|
1934
|
+
returns the request thread.
|
1935
|
+
:rtype: ScanLibraryResponse
|
1936
|
+
"""
|
1937
|
+
kwargs['_return_http_data_only'] = True
|
1938
|
+
if '_preload_content' in kwargs:
|
1939
|
+
message = "Error! Please call the scan_library_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1940
|
+
raise ValueError(message)
|
1941
|
+
return self.scan_library_with_http_info(**kwargs) # noqa: E501
|
1942
|
+
|
1943
|
+
@validate_arguments
|
1944
|
+
def scan_library_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
1945
|
+
"""Scan the Plex music library # noqa: E501
|
1946
|
+
|
1947
|
+
This method makes a synchronous HTTP request by default. To make an
|
1948
|
+
asynchronous HTTP request, please pass async_req=True
|
1949
|
+
|
1950
|
+
>>> thread = api.scan_library_with_http_info(async_req=True)
|
1951
|
+
>>> result = thread.get()
|
1952
|
+
|
1953
|
+
:param async_req: Whether to execute the request asynchronously.
|
1954
|
+
:type async_req: bool, optional
|
1955
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1956
|
+
be set to none and raw_data will store the
|
1957
|
+
HTTP response body without reading/decoding.
|
1958
|
+
Default is True.
|
1959
|
+
:type _preload_content: bool, optional
|
1960
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1961
|
+
object with status code, headers, etc
|
1962
|
+
:type _return_http_data_only: bool, optional
|
1963
|
+
:param _request_timeout: timeout setting for this request. If one
|
1964
|
+
number provided, it will be total request
|
1965
|
+
timeout. It can also be a pair (tuple) of
|
1966
|
+
(connection, read) timeouts.
|
1967
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1968
|
+
request; this effectively ignores the authentication
|
1969
|
+
in the spec for a single request.
|
1970
|
+
:type _request_auth: dict, optional
|
1971
|
+
:type _content_type: string, optional: force content-type for the request
|
1972
|
+
:return: Returns the result object.
|
1973
|
+
If the method is called asynchronously,
|
1974
|
+
returns the request thread.
|
1975
|
+
:rtype: tuple(ScanLibraryResponse, status_code(int), headers(HTTPHeaderDict))
|
1976
|
+
"""
|
1977
|
+
|
1978
|
+
_params = locals()
|
1979
|
+
|
1980
|
+
_all_params = [
|
1981
|
+
]
|
1982
|
+
_all_params.extend(
|
1983
|
+
[
|
1984
|
+
'async_req',
|
1985
|
+
'_return_http_data_only',
|
1986
|
+
'_preload_content',
|
1987
|
+
'_request_timeout',
|
1988
|
+
'_request_auth',
|
1989
|
+
'_content_type',
|
1990
|
+
'_headers'
|
1991
|
+
]
|
1992
|
+
)
|
1993
|
+
|
1994
|
+
# validate the arguments
|
1995
|
+
for _key, _val in _params['kwargs'].items():
|
1996
|
+
if _key not in _all_params:
|
1997
|
+
raise ApiTypeError(
|
1998
|
+
"Got an unexpected keyword argument '%s'"
|
1999
|
+
" to method scan_library" % _key
|
2000
|
+
)
|
2001
|
+
_params[_key] = _val
|
2002
|
+
del _params['kwargs']
|
2003
|
+
|
2004
|
+
_collection_formats = {}
|
2005
|
+
|
2006
|
+
# process the path parameters
|
2007
|
+
_path_params = {}
|
2008
|
+
|
2009
|
+
# process the query parameters
|
2010
|
+
_query_params = []
|
2011
|
+
# process the header parameters
|
2012
|
+
_header_params = dict(_params.get('_headers', {}))
|
2013
|
+
# process the form parameters
|
2014
|
+
_form_params = []
|
2015
|
+
_files = {}
|
2016
|
+
# process the body parameter
|
2017
|
+
_body_params = None
|
2018
|
+
# set the HTTP header `Accept`
|
2019
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2020
|
+
['application/json']) # noqa: E501
|
2021
|
+
|
2022
|
+
# authentication setting
|
2023
|
+
_auth_settings = [] # noqa: E501
|
2024
|
+
|
2025
|
+
_response_types_map = {
|
2026
|
+
'200': "ScanLibraryResponse",
|
2027
|
+
}
|
2028
|
+
|
2029
|
+
return self.api_client.call_api(
|
2030
|
+
'/api/library/scan', 'POST',
|
2031
|
+
_path_params,
|
2032
|
+
_query_params,
|
2033
|
+
_header_params,
|
2034
|
+
body=_body_params,
|
2035
|
+
post_params=_form_params,
|
2036
|
+
files=_files,
|
2037
|
+
response_types_map=_response_types_map,
|
2038
|
+
auth_settings=_auth_settings,
|
2039
|
+
async_req=_params.get('async_req'),
|
2040
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
2041
|
+
_preload_content=_params.get('_preload_content', True),
|
2042
|
+
_request_timeout=_params.get('_request_timeout'),
|
2043
|
+
collection_formats=_collection_formats,
|
2044
|
+
_request_auth=_params.get('_request_auth'))
|
2045
|
+
|
2046
|
+
@validate_arguments
|
2047
|
+
def search_audio(self, audio : Optional[Union[StrictBytes, StrictStr]] = None, n_results : Optional[StrictInt] = None, **kwargs) -> ProcessingResponse: # noqa: E501
|
2048
|
+
"""Search by audio file # noqa: E501
|
2049
|
+
|
2050
|
+
This method makes a synchronous HTTP request by default. To make an
|
2051
|
+
asynchronous HTTP request, please pass async_req=True
|
2052
|
+
|
2053
|
+
>>> thread = api.search_audio(audio, n_results, async_req=True)
|
2054
|
+
>>> result = thread.get()
|
2055
|
+
|
2056
|
+
:param audio:
|
2057
|
+
:type audio: bytearray
|
2058
|
+
:param n_results:
|
2059
|
+
:type n_results: int
|
2060
|
+
:param async_req: Whether to execute the request asynchronously.
|
2061
|
+
:type async_req: bool, optional
|
2062
|
+
:param _request_timeout: timeout setting for this request.
|
2063
|
+
If one number provided, it will be total request
|
2064
|
+
timeout. It can also be a pair (tuple) of
|
2065
|
+
(connection, read) timeouts.
|
2066
|
+
:return: Returns the result object.
|
2067
|
+
If the method is called asynchronously,
|
2068
|
+
returns the request thread.
|
2069
|
+
:rtype: ProcessingResponse
|
2070
|
+
"""
|
2071
|
+
kwargs['_return_http_data_only'] = True
|
2072
|
+
if '_preload_content' in kwargs:
|
2073
|
+
message = "Error! Please call the search_audio_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
2074
|
+
raise ValueError(message)
|
2075
|
+
return self.search_audio_with_http_info(audio, n_results, **kwargs) # noqa: E501
|
2076
|
+
|
2077
|
+
@validate_arguments
|
2078
|
+
def search_audio_with_http_info(self, audio : Optional[Union[StrictBytes, StrictStr]] = None, n_results : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
|
2079
|
+
"""Search by audio file # noqa: E501
|
2080
|
+
|
2081
|
+
This method makes a synchronous HTTP request by default. To make an
|
2082
|
+
asynchronous HTTP request, please pass async_req=True
|
2083
|
+
|
2084
|
+
>>> thread = api.search_audio_with_http_info(audio, n_results, async_req=True)
|
2085
|
+
>>> result = thread.get()
|
2086
|
+
|
2087
|
+
:param audio:
|
2088
|
+
:type audio: bytearray
|
2089
|
+
:param n_results:
|
2090
|
+
:type n_results: int
|
2091
|
+
:param async_req: Whether to execute the request asynchronously.
|
2092
|
+
:type async_req: bool, optional
|
2093
|
+
:param _preload_content: if False, the ApiResponse.data will
|
2094
|
+
be set to none and raw_data will store the
|
2095
|
+
HTTP response body without reading/decoding.
|
2096
|
+
Default is True.
|
2097
|
+
:type _preload_content: bool, optional
|
2098
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
2099
|
+
object with status code, headers, etc
|
2100
|
+
:type _return_http_data_only: bool, optional
|
2101
|
+
:param _request_timeout: timeout setting for this request. If one
|
2102
|
+
number provided, it will be total request
|
2103
|
+
timeout. It can also be a pair (tuple) of
|
2104
|
+
(connection, read) timeouts.
|
2105
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2106
|
+
request; this effectively ignores the authentication
|
2107
|
+
in the spec for a single request.
|
2108
|
+
:type _request_auth: dict, optional
|
2109
|
+
:type _content_type: string, optional: force content-type for the request
|
2110
|
+
:return: Returns the result object.
|
2111
|
+
If the method is called asynchronously,
|
2112
|
+
returns the request thread.
|
2113
|
+
:rtype: tuple(ProcessingResponse, status_code(int), headers(HTTPHeaderDict))
|
2114
|
+
"""
|
2115
|
+
|
2116
|
+
_params = locals()
|
2117
|
+
|
2118
|
+
_all_params = [
|
2119
|
+
'audio',
|
2120
|
+
'n_results'
|
2121
|
+
]
|
2122
|
+
_all_params.extend(
|
2123
|
+
[
|
2124
|
+
'async_req',
|
2125
|
+
'_return_http_data_only',
|
2126
|
+
'_preload_content',
|
2127
|
+
'_request_timeout',
|
2128
|
+
'_request_auth',
|
2129
|
+
'_content_type',
|
2130
|
+
'_headers'
|
2131
|
+
]
|
2132
|
+
)
|
2133
|
+
|
2134
|
+
# validate the arguments
|
2135
|
+
for _key, _val in _params['kwargs'].items():
|
2136
|
+
if _key not in _all_params:
|
2137
|
+
raise ApiTypeError(
|
2138
|
+
"Got an unexpected keyword argument '%s'"
|
2139
|
+
" to method search_audio" % _key
|
2140
|
+
)
|
2141
|
+
_params[_key] = _val
|
2142
|
+
del _params['kwargs']
|
2143
|
+
|
2144
|
+
_collection_formats = {}
|
2145
|
+
|
2146
|
+
# process the path parameters
|
2147
|
+
_path_params = {}
|
2148
|
+
|
2149
|
+
# process the query parameters
|
2150
|
+
_query_params = []
|
2151
|
+
# process the header parameters
|
2152
|
+
_header_params = dict(_params.get('_headers', {}))
|
2153
|
+
# process the form parameters
|
2154
|
+
_form_params = []
|
2155
|
+
_files = {}
|
2156
|
+
if _params['audio'] is not None:
|
2157
|
+
_files['audio'] = _params['audio']
|
2158
|
+
|
2159
|
+
if _params['n_results'] is not None:
|
2160
|
+
_form_params.append(('n_results', _params['n_results']))
|
2161
|
+
|
2162
|
+
# process the body parameter
|
2163
|
+
_body_params = None
|
2164
|
+
# set the HTTP header `Accept`
|
2165
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2166
|
+
['application/json']) # noqa: E501
|
2167
|
+
|
2168
|
+
# set the HTTP header `Content-Type`
|
2169
|
+
_content_types_list = _params.get('_content_type',
|
2170
|
+
self.api_client.select_header_content_type(
|
2171
|
+
['multipart/form-data']))
|
2172
|
+
if _content_types_list:
|
2173
|
+
_header_params['Content-Type'] = _content_types_list
|
2174
|
+
|
2175
|
+
# authentication setting
|
2176
|
+
_auth_settings = [] # noqa: E501
|
2177
|
+
|
2178
|
+
_response_types_map = {
|
2179
|
+
'200': "ProcessingResponse",
|
2180
|
+
}
|
2181
|
+
|
2182
|
+
return self.api_client.call_api(
|
2183
|
+
'/api/search/audio', 'POST',
|
2184
|
+
_path_params,
|
2185
|
+
_query_params,
|
2186
|
+
_header_params,
|
2187
|
+
body=_body_params,
|
2188
|
+
post_params=_form_params,
|
2189
|
+
files=_files,
|
2190
|
+
response_types_map=_response_types_map,
|
2191
|
+
auth_settings=_auth_settings,
|
2192
|
+
async_req=_params.get('async_req'),
|
2193
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
2194
|
+
_preload_content=_params.get('_preload_content', True),
|
2195
|
+
_request_timeout=_params.get('_request_timeout'),
|
2196
|
+
collection_formats=_collection_formats,
|
2197
|
+
_request_auth=_params.get('_request_auth'))
|
2198
|
+
|
2199
|
+
@validate_arguments
|
2200
|
+
def search_text(self, q : StrictStr, n_results : Optional[StrictInt] = None, **kwargs) -> ProcessingResponse: # noqa: E501
|
2201
|
+
"""Search by text # noqa: E501
|
2202
|
+
|
2203
|
+
This method makes a synchronous HTTP request by default. To make an
|
2204
|
+
asynchronous HTTP request, please pass async_req=True
|
2205
|
+
|
2206
|
+
>>> thread = api.search_text(q, n_results, async_req=True)
|
2207
|
+
>>> result = thread.get()
|
2208
|
+
|
2209
|
+
:param q: (required)
|
2210
|
+
:type q: str
|
2211
|
+
:param n_results:
|
2212
|
+
:type n_results: int
|
2213
|
+
:param async_req: Whether to execute the request asynchronously.
|
2214
|
+
:type async_req: bool, optional
|
2215
|
+
:param _request_timeout: timeout setting for this request.
|
2216
|
+
If one number provided, it will be total request
|
2217
|
+
timeout. It can also be a pair (tuple) of
|
2218
|
+
(connection, read) timeouts.
|
2219
|
+
:return: Returns the result object.
|
2220
|
+
If the method is called asynchronously,
|
2221
|
+
returns the request thread.
|
2222
|
+
:rtype: ProcessingResponse
|
2223
|
+
"""
|
2224
|
+
kwargs['_return_http_data_only'] = True
|
2225
|
+
if '_preload_content' in kwargs:
|
2226
|
+
message = "Error! Please call the search_text_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
2227
|
+
raise ValueError(message)
|
2228
|
+
return self.search_text_with_http_info(q, n_results, **kwargs) # noqa: E501
|
2229
|
+
|
2230
|
+
@validate_arguments
|
2231
|
+
def search_text_with_http_info(self, q : StrictStr, n_results : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
|
2232
|
+
"""Search by text # noqa: E501
|
2233
|
+
|
2234
|
+
This method makes a synchronous HTTP request by default. To make an
|
2235
|
+
asynchronous HTTP request, please pass async_req=True
|
2236
|
+
|
2237
|
+
>>> thread = api.search_text_with_http_info(q, n_results, async_req=True)
|
2238
|
+
>>> result = thread.get()
|
2239
|
+
|
2240
|
+
:param q: (required)
|
2241
|
+
:type q: str
|
2242
|
+
:param n_results:
|
2243
|
+
:type n_results: int
|
2244
|
+
:param async_req: Whether to execute the request asynchronously.
|
2245
|
+
:type async_req: bool, optional
|
2246
|
+
:param _preload_content: if False, the ApiResponse.data will
|
2247
|
+
be set to none and raw_data will store the
|
2248
|
+
HTTP response body without reading/decoding.
|
2249
|
+
Default is True.
|
2250
|
+
:type _preload_content: bool, optional
|
2251
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
2252
|
+
object with status code, headers, etc
|
2253
|
+
:type _return_http_data_only: bool, optional
|
2254
|
+
:param _request_timeout: timeout setting for this request. If one
|
2255
|
+
number provided, it will be total request
|
2256
|
+
timeout. It can also be a pair (tuple) of
|
2257
|
+
(connection, read) timeouts.
|
2258
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2259
|
+
request; this effectively ignores the authentication
|
2260
|
+
in the spec for a single request.
|
2261
|
+
:type _request_auth: dict, optional
|
2262
|
+
:type _content_type: string, optional: force content-type for the request
|
2263
|
+
:return: Returns the result object.
|
2264
|
+
If the method is called asynchronously,
|
2265
|
+
returns the request thread.
|
2266
|
+
:rtype: tuple(ProcessingResponse, status_code(int), headers(HTTPHeaderDict))
|
2267
|
+
"""
|
2268
|
+
|
2269
|
+
_params = locals()
|
2270
|
+
|
2271
|
+
_all_params = [
|
2272
|
+
'q',
|
2273
|
+
'n_results'
|
2274
|
+
]
|
2275
|
+
_all_params.extend(
|
2276
|
+
[
|
2277
|
+
'async_req',
|
2278
|
+
'_return_http_data_only',
|
2279
|
+
'_preload_content',
|
2280
|
+
'_request_timeout',
|
2281
|
+
'_request_auth',
|
2282
|
+
'_content_type',
|
2283
|
+
'_headers'
|
2284
|
+
]
|
2285
|
+
)
|
2286
|
+
|
2287
|
+
# validate the arguments
|
2288
|
+
for _key, _val in _params['kwargs'].items():
|
2289
|
+
if _key not in _all_params:
|
2290
|
+
raise ApiTypeError(
|
2291
|
+
"Got an unexpected keyword argument '%s'"
|
2292
|
+
" to method search_text" % _key
|
2293
|
+
)
|
2294
|
+
_params[_key] = _val
|
2295
|
+
del _params['kwargs']
|
2296
|
+
|
2297
|
+
_collection_formats = {}
|
2298
|
+
|
2299
|
+
# process the path parameters
|
2300
|
+
_path_params = {}
|
2301
|
+
|
2302
|
+
# process the query parameters
|
2303
|
+
_query_params = []
|
2304
|
+
if _params.get('q') is not None: # noqa: E501
|
2305
|
+
_query_params.append(('q', _params['q']))
|
2306
|
+
|
2307
|
+
if _params.get('n_results') is not None: # noqa: E501
|
2308
|
+
_query_params.append(('n_results', _params['n_results']))
|
2309
|
+
|
2310
|
+
# process the header parameters
|
2311
|
+
_header_params = dict(_params.get('_headers', {}))
|
2312
|
+
# process the form parameters
|
2313
|
+
_form_params = []
|
2314
|
+
_files = {}
|
2315
|
+
# process the body parameter
|
2316
|
+
_body_params = None
|
2317
|
+
# set the HTTP header `Accept`
|
2318
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2319
|
+
['application/json']) # noqa: E501
|
2320
|
+
|
2321
|
+
# authentication setting
|
2322
|
+
_auth_settings = [] # noqa: E501
|
2323
|
+
|
2324
|
+
_response_types_map = {
|
2325
|
+
'200': "ProcessingResponse",
|
2326
|
+
}
|
2327
|
+
|
2328
|
+
return self.api_client.call_api(
|
2329
|
+
'/api/search/text', 'GET',
|
2330
|
+
_path_params,
|
2331
|
+
_query_params,
|
2332
|
+
_header_params,
|
2333
|
+
body=_body_params,
|
2334
|
+
post_params=_form_params,
|
2335
|
+
files=_files,
|
2336
|
+
response_types_map=_response_types_map,
|
2337
|
+
auth_settings=_auth_settings,
|
2338
|
+
async_req=_params.get('async_req'),
|
2339
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
2340
|
+
_preload_content=_params.get('_preload_content', True),
|
2341
|
+
_request_timeout=_params.get('_request_timeout'),
|
2342
|
+
collection_formats=_collection_formats,
|
2343
|
+
_request_auth=_params.get('_request_auth'))
|
2344
|
+
|
2345
|
+
@validate_arguments
|
2346
|
+
def stop_processing(self, **kwargs) -> StopProcessingResponse: # noqa: E501
|
2347
|
+
"""Stop processing # noqa: E501
|
2348
|
+
|
2349
|
+
This method makes a synchronous HTTP request by default. To make an
|
2350
|
+
asynchronous HTTP request, please pass async_req=True
|
2351
|
+
|
2352
|
+
>>> thread = api.stop_processing(async_req=True)
|
2353
|
+
>>> result = thread.get()
|
2354
|
+
|
2355
|
+
:param async_req: Whether to execute the request asynchronously.
|
2356
|
+
:type async_req: bool, optional
|
2357
|
+
:param _request_timeout: timeout setting for this request.
|
2358
|
+
If one number provided, it will be total request
|
2359
|
+
timeout. It can also be a pair (tuple) of
|
2360
|
+
(connection, read) timeouts.
|
2361
|
+
:return: Returns the result object.
|
2362
|
+
If the method is called asynchronously,
|
2363
|
+
returns the request thread.
|
2364
|
+
:rtype: StopProcessingResponse
|
2365
|
+
"""
|
2366
|
+
kwargs['_return_http_data_only'] = True
|
2367
|
+
if '_preload_content' in kwargs:
|
2368
|
+
message = "Error! Please call the stop_processing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
2369
|
+
raise ValueError(message)
|
2370
|
+
return self.stop_processing_with_http_info(**kwargs) # noqa: E501
|
2371
|
+
|
2372
|
+
@validate_arguments
|
2373
|
+
def stop_processing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
|
2374
|
+
"""Stop processing # noqa: E501
|
2375
|
+
|
2376
|
+
This method makes a synchronous HTTP request by default. To make an
|
2377
|
+
asynchronous HTTP request, please pass async_req=True
|
2378
|
+
|
2379
|
+
>>> thread = api.stop_processing_with_http_info(async_req=True)
|
2380
|
+
>>> result = thread.get()
|
2381
|
+
|
2382
|
+
:param async_req: Whether to execute the request asynchronously.
|
2383
|
+
:type async_req: bool, optional
|
2384
|
+
:param _preload_content: if False, the ApiResponse.data will
|
2385
|
+
be set to none and raw_data will store the
|
2386
|
+
HTTP response body without reading/decoding.
|
2387
|
+
Default is True.
|
2388
|
+
:type _preload_content: bool, optional
|
2389
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
2390
|
+
object with status code, headers, etc
|
2391
|
+
:type _return_http_data_only: bool, optional
|
2392
|
+
:param _request_timeout: timeout setting for this request. If one
|
2393
|
+
number provided, it will be total request
|
2394
|
+
timeout. It can also be a pair (tuple) of
|
2395
|
+
(connection, read) timeouts.
|
2396
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2397
|
+
request; this effectively ignores the authentication
|
2398
|
+
in the spec for a single request.
|
2399
|
+
:type _request_auth: dict, optional
|
2400
|
+
:type _content_type: string, optional: force content-type for the request
|
2401
|
+
:return: Returns the result object.
|
2402
|
+
If the method is called asynchronously,
|
2403
|
+
returns the request thread.
|
2404
|
+
:rtype: tuple(StopProcessingResponse, status_code(int), headers(HTTPHeaderDict))
|
2405
|
+
"""
|
2406
|
+
|
2407
|
+
_params = locals()
|
2408
|
+
|
2409
|
+
_all_params = [
|
2410
|
+
]
|
2411
|
+
_all_params.extend(
|
2412
|
+
[
|
2413
|
+
'async_req',
|
2414
|
+
'_return_http_data_only',
|
2415
|
+
'_preload_content',
|
2416
|
+
'_request_timeout',
|
2417
|
+
'_request_auth',
|
2418
|
+
'_content_type',
|
2419
|
+
'_headers'
|
2420
|
+
]
|
2421
|
+
)
|
2422
|
+
|
2423
|
+
# validate the arguments
|
2424
|
+
for _key, _val in _params['kwargs'].items():
|
2425
|
+
if _key not in _all_params:
|
2426
|
+
raise ApiTypeError(
|
2427
|
+
"Got an unexpected keyword argument '%s'"
|
2428
|
+
" to method stop_processing" % _key
|
2429
|
+
)
|
2430
|
+
_params[_key] = _val
|
2431
|
+
del _params['kwargs']
|
2432
|
+
|
2433
|
+
_collection_formats = {}
|
2434
|
+
|
2435
|
+
# process the path parameters
|
2436
|
+
_path_params = {}
|
2437
|
+
|
2438
|
+
# process the query parameters
|
2439
|
+
_query_params = []
|
2440
|
+
# process the header parameters
|
2441
|
+
_header_params = dict(_params.get('_headers', {}))
|
2442
|
+
# process the form parameters
|
2443
|
+
_form_params = []
|
2444
|
+
_files = {}
|
2445
|
+
# process the body parameter
|
2446
|
+
_body_params = None
|
2447
|
+
# set the HTTP header `Accept`
|
2448
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2449
|
+
['application/json']) # noqa: E501
|
2450
|
+
|
2451
|
+
# authentication setting
|
2452
|
+
_auth_settings = [] # noqa: E501
|
2453
|
+
|
2454
|
+
_response_types_map = {
|
2455
|
+
'200': "StopProcessingResponse",
|
2456
|
+
}
|
2457
|
+
|
2458
|
+
return self.api_client.call_api(
|
2459
|
+
'/api/library/process/stop', 'POST',
|
2460
|
+
_path_params,
|
2461
|
+
_query_params,
|
2462
|
+
_header_params,
|
2463
|
+
body=_body_params,
|
2464
|
+
post_params=_form_params,
|
2465
|
+
files=_files,
|
2466
|
+
response_types_map=_response_types_map,
|
2467
|
+
auth_settings=_auth_settings,
|
2468
|
+
async_req=_params.get('async_req'),
|
2469
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
2470
|
+
_preload_content=_params.get('_preload_content', True),
|
2471
|
+
_request_timeout=_params.get('_request_timeout'),
|
2472
|
+
collection_formats=_collection_formats,
|
2473
|
+
_request_auth=_params.get('_request_auth'))
|