Skip to content
Snippets Groups Projects
Commit 6cae2500 authored by aleem uddin's avatar aleem uddin
Browse files

Files are renamed

LocationIq # for classes
location_iq # for config
parent d9419f07
No related branches found
No related tags found
No related merge requests found
......@@ -457,7 +457,7 @@ The [Google Places Details API](https://developers.google.com/places/documentati
* **Terms of Service**: http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy
* **Limitations**: Please limit request rate to 1 per second and include your contact information in User-Agent headers (eg: `Geocoder.configure(:http_headers => { "User-Agent" => "your contact info" })`). [Data licensed under Open Database License (ODbL) (you must provide attribution).](http://www.openstreetmap.org/copyright)
#### LocationIQ (`:locationiq`)
#### LocationIQ (`:location_iq`)
* **API key**: required
* **Quota**: 6 request/second (30k req/day), then ability to purchase more
......
......@@ -23,7 +23,7 @@ module Geocoder
#
def street_services
@street_services ||= [
:locationiq,
:location_iq,
:dstk,
:esri,
:google,
......
require 'geocoder/lookups/nominatim'
require "geocoder/results/locationiq"
require "geocoder/results/location_iq"
module Geocoder::Lookup
class Locationiq < Nominatim
class LocationIq < Nominatim
def name
"Locationiq"
"LocationIq"
end
def required_api_key_parts
......
require 'geocoder/results/nominatim'
module Geocoder::Result
class Locationiq < Nominatim
class LocationIq < Nominatim
end
end
\ No newline at end of file
......@@ -176,11 +176,11 @@ module Geocoder
end
end
require 'geocoder/lookups/locationiq'
class Locationiq
require 'geocoder/lookups/location_iq'
class LocationIq
private
def fixture_prefix
"locationiq"
"location_iq"
end
end
......
......@@ -5,12 +5,12 @@ require 'test_helper'
class LocationIq < NominatimTest
def setup
Geocoder.configure(lookup: :locationiq)
set_api_key!(:locationiq)
Geocoder.configure(lookup: :location_iq)
set_api_key!(:location_iq)
end
def test_url_contains_api_key
Geocoder.configure(locationiq: {api_key: "abc123"})
Geocoder.configure(location_iq: {api_key: "abc123"})
query = Geocoder::Query.new("Leadville, CO")
assert_equal "http://locationiq.org/v1/search.php?key=abc123&accept-language=en&addressdetails=1&format=json&q=Leadville%2C+CO", query.url
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment