Skip to content

Commit

Permalink
Revert changes from Geocodefarm
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 31, 2016
1 parent 55b4018 commit 26bfe69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions geocoder/geocodefarm.py
Expand Up @@ -36,10 +36,11 @@ class GeocodeFarm(Base):

def __init__(self, location, **kwargs):
self.url = 'https://www.geocode.farm/v3/json/forward/'
self.key = kwargs.get('key', geocodefarm_key)
key = kwargs.get('key', geocodefarm_key)

self.params = {
'addr': location,
'key': self.key if self.key else None,
'key': key if key else None,
'lang': kwargs.get('lang', ''),
'country': kwargs.get('country', ''),
}
Expand Down
5 changes: 2 additions & 3 deletions geocoder/geocodefarm_reverse.py
Expand Up @@ -41,16 +41,15 @@ def __init__(self, location, **kwargs):
self.url = 'https://www.geocode.farm/v3/json/reverse/'
self.location = location
location = Location(location)
self.key = kwargs.get('key', geocodefarm_key)
key = kwargs.get('key', geocodefarm_key)
self.params = {
'lat': location.latitude,
'lon': location.longitude,
'key': self.key if self.key else None,
'key': key if key else None,
'lang': kwargs.get('lang', ''),
'country': kwargs.get('country', ''),
}
self._initialize(**kwargs)

if __name__ == '__main__':
g = GeocodeFarm([45.3, -75.4])
g.debug()

0 comments on commit 26bfe69

Please sign in to comment.