From 40bbb47144d1b7d84929afa50dcff5279dfd167c Mon Sep 17 00:00:00 2001 From: Justin Poehnelt Date: Thu, 30 Jan 2020 12:26:28 -0800 Subject: [PATCH] docs: minimize mention of client id --- README.md | 29 ----------------------------- googlemaps/client.py | 5 +++-- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index fdc7d9b2..cb222b68 100644 --- a/README.md +++ b/README.md @@ -86,31 +86,6 @@ directions_result = gmaps.directions("Sydney Town Hall", departure_time=now) ``` -Below is the same example, using client ID and client secret (digital signature) -for authentication. This code assumes you have previously loaded the `client_id` -and `client_secret` variables with appropriate values. - -For a guide on how to generate the `client_secret` (digital signature), see the -documentation for the API you're using. For example, see the guide for the -[Directions API](https://developers.google.com/maps/documentation/directions/get-api-key#client-id). - -```python -gmaps = googlemaps.Client(client_id=client_id, client_secret=client_secret) - -# Geocoding and address -geocode_result = gmaps.geocode('1600 Amphitheatre Parkway, Mountain View, CA') - -# Look up an address with reverse geocoding -reverse_geocode_result = gmaps.reverse_geocode((40.714224, -73.961452)) - -# Request directions via public transit -now = datetime.now() -directions_result = gmaps.directions("Sydney Town Hall", - "Parramatta, NSW", - mode="transit", - departure_time=now) -``` - For more usage examples, check out [the tests](https://github.com/googlemaps/google-maps-services-python/tree/master/googlemaps/test). ## Features @@ -120,10 +95,6 @@ For more usage examples, check out [the tests](https://github.com/googlemaps/goo Automatically retry when intermittent failures occur. That is, when any of the retriable 5xx errors are returned from the API. -### Client IDs - -Google Maps APIs Premium Plan customers can use their client ID and secret to authenticate, -instead of an API key. ## Building the Project diff --git a/googlemaps/client.py b/googlemaps/client.py index ac054917..d1136ce4 100644 --- a/googlemaps/client.py +++ b/googlemaps/client.py @@ -56,14 +56,15 @@ def __init__(self, key=None, client_id=None, client_secret=None, retry_over_query_limit=True, experience_id=None): """ :param key: Maps API key. Required, unless "client_id" and - "client_secret" are set. + "client_secret" are set. Most users should use an API key. :type key: string :param client_id: (for Maps API for Work customers) Your client ID. + Most users should use an API key instead. :type client_id: string :param client_secret: (for Maps API for Work customers) Your client - secret (base64 encoded). + secret (base64 encoded). Most users should use an API key instead. :type client_secret: string :param channel: (for Maps API for Work customers) When set, a channel