Skip to content

Commit 8496ebe

Browse files
authored
Remove oauth2client from docs (#738)
* Use google-auth and google-auth-oauthlib in oauth2 docs. * Remove basic server sample
1 parent 778eabe commit 8496ebe

15 files changed

+129
-657
lines changed

docs/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ access to many Google APIs.
77
## Features
88

99
- Call Google APIs simply
10-
- Use the library with Google App Engine
11-
- Handle Auath with fewer lines of code
10+
- Handle Auth with fewer lines of code
1211
- Use standard tooling for installation
1312

1413
## Documentation
@@ -32,8 +31,6 @@ Learn how to use the Google API Python Client with these guides:
3231
- [Use Pagination](pagination.md)
3332
- [Improve Performance](performance.md)
3433
- [Understand Thread Safety](thread_safety.md)
35-
- [Use Google App Engine](google_app_engine.md)
36-
- [Use Django](django.md)
3734

3835
### Reference Documentation
3936

docs/api-keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
When calling APIs that do not access private user data, you can use simple API keys. These keys are used to authenticate your application for accounting purposes. The Google Developers Console documentation also describes [API keys](https://developers.google.com/console/help/using-keys).
44

5-
> Note: If you do need to access private user data, you must use OAuth 2.0. See [Using OAuth 2.0 for Web Server Applications](oauth-web.md) and [Using OAuth 2.0 for Server to Server Applications](oauth-server.md) for more information.
5+
> Note: If you do need to access private user data, you must use OAuth 2.0. See [Using OAuth 2.0 for Installed Applications](oauth-installed.md), [Using OAuth 2.0 for Server to Server Applications](oauth-server.md), and [Using OAuth 2.0 for Web Server Applications](oauth-web.md) for more information.
66
77
## Using API Keys
88

docs/client-secrets.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The Google APIs Client Library for Python uses the `client_secrets.json` file format for storing the `client_id`, `client_secret`, and other OAuth 2.0 parameters.
44

5+
See [Creating authorization credentials](https://developers.google.com/identity/protocols/OAuth2WebServer#creatingcred) for how to obtain a `client_secrets.json` file.
6+
57
The `client_secrets.json` file format is a [JSON](http://www.json.org/) formatted file containing the client ID, client secret, and other OAuth 2.0 parameters. Here is an example client_secrets.json file for a web application:
68

79
```json
@@ -53,7 +55,7 @@ The following examples show how use a `client_secrets.json` file to create a `Fl
5355

5456
### Installed App
5557

56-
```py
58+
```python
5759
from google_auth_oauthlib.flow import InstalledAppFlow
5860
...
5961
flow = InstalledAppFlow.from_client_secrets_file(
@@ -63,7 +65,7 @@ flow = InstalledAppFlow.from_client_secrets_file(
6365

6466
### Web Server App
6567

66-
```py
68+
```python
6769
import google.oauth2.credentials
6870
import google_auth_oauthlib.flow
6971

docs/django.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/google_app_engine.md

Lines changed: 0 additions & 149 deletions
This file was deleted.

docs/logging.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ You can enable logging of key events in this library by configuring Python's sta
1414

1515
In the following code, the logging level is set to `INFO`, and the Google Translate API is called:
1616

17-
```py
17+
```python
1818
import logging
19-
from apiclient.discovery import build
19+
from googleapiclient.discovery import build
2020

2121
logger = logging.getLogger()
2222
logger.setLevel(logging.INFO)
@@ -45,7 +45,7 @@ INFO:root:URL being requested: https://www.googleapis.com/language/translate/v2?
4545

4646
For even more detailed logging you can set the debug level of the [httplib2](https://github.com/httplib2/httplib2) module used by this library. The following code snippet enables logging of all HTTP request and response headers and bodies:
4747

48-
```py
48+
```python
4949
import httplib2
5050
httplib2.debuglevel = 4
5151
```

0 commit comments

Comments
 (0)