Skip to content

Commit edd6f91

Browse files
committed
Separate API reference from main index and document result codes which are not handled
1 parent cd57204 commit edd6f91

3 files changed

Lines changed: 28 additions & 16 deletions

File tree

‎docs/source/api-reference.rst‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
API Reference
2+
=============
3+
4+
.. autoclass:: mock_vws.MockVWS
5+
6+
.. autoclass:: mock_vws.target.Target
7+
8+
.. autoclass:: mock_vws.states.States
9+
:members:
10+
:undoc-members:
11+
12+
.. autoclass:: mock_vws.database.VuforiaDatabase

‎docs/source/differences-to-vws.rst‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,18 @@ NGINX Error cases
8585
Vuforia uses NGINX.
8686
This has error handling which is not duplicated in the mock.
8787
For example, Vuforia returns a 400 (``BAD REQUEST``) response if a header or cookie is given which is larger than 8 KiB.
88+
89+
Result codes
90+
------------
91+
92+
Result codes are returned by requests to Vuforia to help with debugging.
93+
See `How To Interpret VWS API Result Codes <https://library.vuforia.com/articles/Solution/How-To-Use-the-Vuforia-Web-Services-API#How-To-Interperete-VWS-API-Result-Codes>`_ for details of the available result codes.
94+
There are some result codes which the mock cannot return.
95+
96+
These are:
97+
98+
* ``RequestQuotaReached``
99+
* ``DateRangeError``
100+
* ``TargetQuotaReached``
101+
* ``ProjectSuspended``
102+
* ``ProjectHasNoAPIAccess``

‎docs/source/index.rst‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,13 @@ Using the mock redirects requests to Vuforia made with `requests <https://pypi.o
1818
# This will use the Vuforia mock.
1919
requests.get('https://vws.vuforia.com/summary')
2020
21-
By default, an exception will be raised if any requests to unmocked addresses are made.
22-
23-
24-
Reference
25-
---------
26-
27-
.. autoclass:: mock_vws.target.Target
28-
29-
.. autoclass:: mock_vws.states.States
30-
:members:
31-
:undoc-members:
32-
33-
.. autoclass:: mock_vws.MockVWS
34-
35-
.. autoclass:: mock_vws.database.VuforiaDatabase
36-
3721
Reference
3822
---------
3923

4024
.. toctree::
4125
:maxdepth:3
4226

27+
api-reference
4328
installation
4429
differences-to-vws
4530
versioning-and-api-stability

0 commit comments

Comments
 (0)