Skip to content
This repository
Browse code

Bring datenimperator-add-ovi up to date w/ changes in master.

Ideally, datenimperator-add-ovi would have been rebased to master before
being merged.
  • Loading branch information...
commit b7ea3461eb0706a277d50ab6ca7c3c107426efb8 1 parent 435d038
Alex Reisner authored February 09, 2013
20  lib/geocoder/lookups/ovi.rb
@@ -6,6 +6,18 @@
6 6
 module Geocoder::Lookup
7 7
   class Ovi < Base
8 8
 
  9
+    def name
  10
+      "Ovi"
  11
+    end
  12
+
  13
+    def required_api_key_parts
  14
+      []
  15
+    end
  16
+
  17
+    def query_url(query)
  18
+      "http://lbs.ovi.com/search/6.2/geocode.json?" + url_query_string(query)
  19
+    end
  20
+
9 21
     private # ---------------------------------------------------------------
10 22
 
11 23
     def results(query)
@@ -28,19 +40,15 @@ def query_url_params(query)
28 40
     end
29 41
 
30 42
     def api_key
31  
-      if a=Geocoder::Configuration.api_key
  43
+      if a=configuration.api_key
32 44
         return a.first if a.is_a?(Array)
33 45
       end
34 46
     end
35 47
 
36 48
     def api_code
37  
-      if a=Geocoder::Configuration.api_key
  49
+      if a=configuration.api_key
38 50
         return a.last if a.is_a?(Array)
39 51
       end
40 52
     end
41  
-
42  
-    def query_url(query)
43  
-      "http://lbs.ovi.com/search/6.2/geocode.json?" + url_query_string(query)
44  
-    end
45 53
   end
46 54
 end
0  test/fixtures/ovi_madison_square_garden.json → test/fixtures/ovi_madison_square_garden
File renamed without changes
0  test/fixtures/ovi_no_results.json → test/fixtures/ovi_no_results
File renamed without changes

0 notes on commit b7ea346

Please sign in to comment.
Something went wrong with that request. Please try again.