Class: Geocoder::Lookup::Yahoo
- Inherits:
-
Base
- Object
- Base
- Geocoder::Lookup::Yahoo
show all
- Defined in:
- lib/geocoder/lookups/yahoo.rb
Instance Method Summary
collapse
Methods inherited from Base
#cache, #handle, #initialize, #search, #supported_protocols
Instance Method Details
#map_link_url(coordinates) ⇒ Object
12
13
14
|
# File 'lib/geocoder/lookups/yahoo.rb', line 12
def map_link_url(coordinates)
"http://maps.yahoo.com/#lat=#{coordinates[0]}&lon=#{coordinates[1]}"
end
|
#name ⇒ Object
8
9
10
|
# File 'lib/geocoder/lookups/yahoo.rb', line 8
def name
"Yahoo BOSS"
end
|
#query_url(query) ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/geocoder/lookups/yahoo.rb', line 20
def query_url(query)
parsed_url = URI.parse(raw_url(query))
o = OauthUtil.new
o.consumer_key = configuration.api_key[0]
o.consumer_secret = configuration.api_key[1]
base_url + o.sign(parsed_url).query_string
end
|
#required_api_key_parts ⇒ Object
16
17
18
|
# File 'lib/geocoder/lookups/yahoo.rb', line 16
def required_api_key_parts
["consumer key", "consumer secret"]
end
|