Skip to content

Commit 1847126

Browse files
committed
Rework/retitle section to link common authn doc, indicate usage.
Addresses: googleapis#1137 (comment).
1 parent 8c52477 commit 1847126

1 file changed

Lines changed: 13 additions & 19 deletions

File tree

docs/dns-usage.rst

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,34 @@
11
Using the API
22
=============
33

4-
Authorization / Configuration
5-
-----------------------------
4+
Client
5+
------
66

7-
- Use :class:`Client <gcloud.dns.client.Client>` objects to configure
8-
your applications.
7+
:class:`Client <gcloud.dns.client.Client>` objects provide a means
8+
configure your DNS applications. Eash instance holds both a ``project``
9+
and an authenticated connection to the DNS service.
910

10-
- :class:`Client <gcloud.dns.client.Client>` objects hold both a ``project``
11-
and an authenticated connection to the PubSub service.
11+
For an overview of authentication in ``gcloud-python``, see:
12+
http://gcloud-python.readthedocs.org/en/latest/gcloud-auth.html
1213

13-
- The authentication credentials can be implicitly determined from the
14-
environment or directly via
15-
:meth:`from_service_account_json <gcloud.dns.client.Client.from_service_account_json>`
16-
and
17-
:meth:`from_service_account_p12 <gcloud.dns.client.Client.from_service_account_p12>`.
18-
19-
- After setting ``GOOGLE_APPLICATION_CREDENTIALS`` and ``GCLOUD_PROJECT``
20-
environment variables, create an instance of
21-
:class:`Client <gcloud.dns.client.Client>`.
14+
Assuming your environment is set up as described in that document,
15+
create an instance of :class:`Client <gcloud.dns.client.Client>`.
2216

2317
.. doctest::
2418

2519
>>> from gcloud import dns
2620
>>> client = dns.Client()
2721

28-
- Override the credentials inferred from the environment by passing explicit
29-
``credentials`` to one of the alternative ``classmethod`` factories,
30-
`:meth:gcloud.dns.client.Client.from_service_account_json`:
22+
Override the credentials inferred from the environment by passing explicit
23+
``credentials`` to one of the alternative ``classmethod`` factories,
24+
`:meth:gcloud.dns.client.Client.from_service_account_json`:
3125

3226
.. doctest::
3327

3428
>>> from gcloud import dns
3529
>>> client = dns.Client.from_service_account_json('/path/to/creds.json')
3630

37-
or `:meth:gcloud.dns.client.Client.from_service_account_p12`:
31+
or `:meth:gcloud.dns.client.Client.from_service_account_p12`:
3832

3933
.. doctest::
4034

0 commit comments

Comments
 (0)