diff --git a/doc/source/client.rst b/doc/source/client.rst index fbff6dd1..08f64d50 100644 --- a/doc/source/client.rst +++ b/doc/source/client.rst @@ -10,9 +10,14 @@ Client Client Object Reference ----------------------- -This is the reference documentation for the latest, recommended, API version. +This is the reference documentation for all API version. -.. Link here older API versions, if any. +API v1 and v1.1: .. autoclass:: zaqarclient.queues.v1.client.Client :members: + +API v2.0: + +.. autoclass:: zaqarclient.queues.v2.client.Client + :members: diff --git a/zaqarclient/queues/client.py b/zaqarclient/queues/client.py index 63abc805..0b8890a1 100644 --- a/zaqarclient/queues/client.py +++ b/zaqarclient/queues/client.py @@ -24,7 +24,7 @@ server and a version number:: from zaqarclient.queues import client - cli = client.Client(\'http://zaqar.example.com:8888/\', version=1.1) + cli = client.Client(\'http://zaqar.example.com:8888/\', version=2) which will load the appropriate client based on the specified version. Optionally, you can also supply a config dictionary:: @@ -32,7 +32,7 @@ version. Optionally, you can also supply a config dictionary:: from zaqarclient.queues import client cli = client.Client(\'http://zaqar.example.com:8888/\', - version=1.1, conf={}) + version=2, conf={}) The arguments passed to this function will be passed to the client instances as well. @@ -42,11 +42,11 @@ lower level API as it has been designed to ease the interaction with the server and it gives enough control for the most common cases. A simple example for accessing an existing queue through a client -instance - based on the API v1.1 - would look like:: +instance - based on the API v2 - would look like:: from zaqarclient.queues import client - cli = client.Client(\'http://zaqar.example.com:8888/\', version=1.1) + cli = client.Client(\'http://zaqar.example.com:8888/\', version=2) queue = cli.queue(\'my_queue\') Through the queue instance will be then possible to access all the @@ -58,7 +58,7 @@ allows you to also access admin endpoints, for example:: from zaqarclient.queues import client - cli = client.Client(\'http://zaqar.example.com:8888/\', version=1.1) + cli = client.Client(\'http://zaqar.example.com:8888/\', version=2) flavor = cli.flavor(\'tasty\', pool=\'my-pool-group\', auto_create=True)