DenisCarriere / geocoder

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

Opencage provider bug using commandline #180

Closed M0dM closed 8 years ago

M0dM commented 8 years ago

Hi,

I can't specify my api key using command line gecode command. See the picture attached.

opencage_geocoder_bug

M0dM

DenisCarriere commented 8 years ago

@M0dM Thanks for spotting that out, I always store my keys as environment variables.

export OPENCAGE_API_KEY='<API_KEY>'

But using the --key option is also a great way to pass your key using the CLI.

I've added the option --key to the CLI, you should be able to use it exactly like you mentioned.

$ geocode 'San Francisco, CA' --provider opencage --key '<API_KEY>' | jq .
{ ... }