Skip to content

Commit

Permalink
Merge pull request #296 from nyejon/master
Browse files Browse the repository at this point in the history
Add the 'rate' for opencage API as in #295
  • Loading branch information
ebreton committed Sep 18, 2017
2 parents ac1a967 + 12a88db commit 0b31a8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions geocoder/opencage.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ def _catch_errors(self, json_response):
def _adapt_results(self, json_response):
# special license attribute
self.license = json_response['licenses']
# self.rate['remaining'] returns the number of API queries available on
# your API Key
self.rate = json_response['rate']
# return geo results
return json_response['results']

Expand Down

0 comments on commit 0b31a8d

Please sign in to comment.