Skip to content

Commit 8e44ac9

Browse files
committed
Document that new exception will be raised
1 parent 44fb28b commit 8e44ac9

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/vws/query.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ def query(
6060
none (return no target_data), all (for all matched targets)".
6161
6262
Raises:
63+
~vws.exceptions.AuthenticationFailure: The client access key pair
64+
is not correct.
6365
~vws.exceptions.MaxNumResultsOutOfRange: `max_num_results`` is not
6466
within the range (1, 50).
67+
~vws.exceptions.ProjectInactive: The project is inactive.
6568
6669
Returns:
6770
An ordered list of target details of matching targets.

src/vws/vws.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ def add_target(
176176
~vws.exceptions.TargetNameExist: A target with the given ``name``
177177
already exists.
178178
~vws.exceptions.ProjectInactive: The project is inactive.
179+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
180+
time sent to Vuforia.
179181
"""
180182
image_data = image.getvalue()
181183
image_data_encoded = base64.b64encode(image_data).decode('ascii')
@@ -224,6 +226,8 @@ def get_target_record(self, target_id: str) -> Dict[str, Union[str, int]]:
224226
example, the given access key does not match a known database.
225227
~vws.exceptions.UnknownTarget: The given target ID does not match a
226228
target in the database.
229+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
230+
time sent to Vuforia.
227231
"""
228232
response = self._make_request(
229233
method='GET',
@@ -256,6 +260,8 @@ def _wait_for_target_processed(
256260
than five minutes.
257261
~vws.exceptions.UnknownTarget: The given target ID does not match a
258262
target in the database.
263+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
264+
time sent to Vuforia.
259265
"""
260266
while True:
261267
report = self.get_target_summary_report(target_id=target_id)
@@ -294,6 +300,8 @@ def wait_for_target_processed(
294300
processing stage for more than ``timeout_seconds`` seconds.
295301
~vws.exceptions.UnknownTarget: The given target ID does not match a
296302
target in the database.
303+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
304+
time sent to Vuforia.
297305
"""
298306

299307
@timeout(
@@ -323,6 +331,8 @@ def list_targets(self) -> List[str]:
323331
correct.
324332
~vws.exceptions.Fail: There was an error with the request. For
325333
example, the given access key does not match a known database.
334+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
335+
time sent to Vuforia.
326336
"""
327337
response = self._make_request(
328338
method='GET',
@@ -356,6 +366,8 @@ def get_target_summary_report(
356366
example, the given access key does not match a known database.
357367
~vws.exceptions.UnknownTarget: The given target ID does not match a
358368
target in the database.
369+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
370+
time sent to Vuforia.
359371
"""
360372
response = self._make_request(
361373
method='GET',
@@ -381,6 +393,8 @@ def get_database_summary_report(self) -> Dict[str, Union[str, int]]:
381393
correct.
382394
~vws.exceptions.Fail: There was an error with the request. For
383395
example, the given access key does not match a known database.
396+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
397+
time sent to Vuforia.
384398
"""
385399
response = self._make_request(
386400
method='GET',
@@ -410,6 +424,8 @@ def delete_target(self, target_id: str) -> None:
410424
target in the database.
411425
~vws.exceptions.TargetStatusProcessing: The given target is in the
412426
processing state.
427+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
428+
time sent to Vuforia.
413429
"""
414430
self._make_request(
415431
method='DELETE',
@@ -439,6 +455,8 @@ def get_duplicate_targets(self, target_id: str) -> List[str]:
439455
~vws.exceptions.UnknownTarget: The given target ID does not match a
440456
target in the database.
441457
~vws.exceptions.ProjectInactive: The project is inactive.
458+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
459+
time sent to Vuforia.
442460
"""
443461
response = self._make_request(
444462
method='GET',
@@ -489,6 +507,8 @@ def update_target(
489507
~vws.exceptions.TargetNameExist: A target with the given ``name``
490508
already exists.
491509
~vws.exceptions.ProjectInactive: The project is inactive.
510+
~vws.exceptions.RequestTimeTooSkewed: There is an error with the
511+
time sent to Vuforia.
492512
"""
493513
data: Dict[str, Union[str, bool, float, int]] = {}
494514

0 commit comments

Comments
 (0)