-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Melissa Data to API Options #1521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thanks very much. It's really close to merge-able, I've just made a few comments about minor issues. Let me know if you have any questions.
test/unit/lookups/melissa_test.rb
Outdated
end | ||
|
||
def test_raises_api_key_exception | ||
Geocoder.configure Geocoder.configure(:always_raise => [Geocoder::InvalidApiKey]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a possible typo (two Geocoder.configure
s).
lib/geocoder/results/melissa.rb
Outdated
def latitude | ||
@data['Latitude'].to_f | ||
end | ||
|
||
def longitude | ||
@data['Longitude'].to_f | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention for Geocoder lookups is to implement a coordinates
method that returns [lat, lon]
rather than latitude
and longitude
methods (which are implemented in the base lookup).
README_API_GUIDE.md
Outdated
@@ -165,6 +165,17 @@ The [Google Places Search API](https://developers.google.com/maps/documentation/ | |||
* **Limitations**: ? | |||
* **Notes**: You can use the open (non-licensed) API by setting: `Geocoder.configure(mapquest: {open: true})` (defaults to licensed version) | |||
|
|||
### Melissa Data (`:melissa`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Melissa also offers IP address geocoding, so maybe we want to call this lookup :melissa_street
, in case we want to add :melissa_ip
later?
Perfect! Thanks very much. |
No description provided.