DenisCarriere / geocoder

:earth_asia: Python Geocoder
http://geocoder.readthedocs.org
MIT License
1.63k stars 288 forks source link

Passing custom `params` and `headers` to the geocoder #247

Closed batisteo closed 7 years ago

batisteo commented 7 years ago

What I tried and wanted to acheive:

geocoder.opencage('budapest', language='eo')

I get <[OK] Opencage - Geocode [Budapest, Hungary]> instead of <[OK] Opencage - Geocode [Budapeŝto, Hungarujo]>

But this may be limited: if I’d like to pass other parameters, there is a lot of options for just Opencage.

I would like to be able to pass any params or headers just like the requests API.

geocoder.opencage('budapest', params={'language':'eo'})

or

geocoder.opencage('budapest', headers={'Accept-Language': 'eo'})
batisteo commented 7 years ago

Thanks!