From 8c919117370284c5f65a7d5e4c272f69d6c9790e Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Mon, 1 Oct 2018 08:33:57 -0600 Subject: [PATCH] API key required for ipdata.co. --- README_API_GUIDE.md | 4 ++-- lib/geocoder/lookups/ipdata_co.rb | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README_API_GUIDE.md b/README_API_GUIDE.md index cf1a5ebc..23123f15 100644 --- a/README_API_GUIDE.md +++ b/README_API_GUIDE.md @@ -454,8 +454,8 @@ IP Address Lookups ### Ipdata.co (`:ipdata_co`) -* **API key**: optional, see: https://ipdata.co/pricing.html -* **Quota**: 1500/day (up to 600k with paid API keys) +* **API key**: required, see: https://ipdata.co/pricing.html +* **Quota**: 1500/day for free, up to 600k with paid API keys * **Region**: world * **SSL support**: yes * **Languages**: English diff --git a/lib/geocoder/lookups/ipdata_co.rb b/lib/geocoder/lookups/ipdata_co.rb index d061696b..c4798ea4 100644 --- a/lib/geocoder/lookups/ipdata_co.rb +++ b/lib/geocoder/lookups/ipdata_co.rb @@ -12,6 +12,10 @@ module Geocoder::Lookup [:https] end + def required_api_key_parts + ["api_key"] + end + def query_url(query) # Ipdata.co requires that the API key be sent as a query parameter. # It no longer supports API keys sent as headers. -- GitLab