Class: Geocoder::Result::AbstractApi
  
  
  
  
  
    - Inherits:
 
    - 
      Base
      
        
          - Object
 
          
            - Base
 
          
            - Geocoder::Result::AbstractApi
 
          
        
        show all
      
     
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/geocoder/results/abstract_api.rb
 
  
  
 
  Instance Attribute Summary
  
  Attributes inherited from Base
  #cache_hit, #data
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  Methods inherited from Base
  #address, #coordinates, #initialize, #latitude, #longitude, #province, #province_code
  
    Instance Method Details
    
      
  
  
    #city  ⇒ Object 
  
  
  
  
    
      
18
19
20 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 18
def city
  @data["city"]
end 
     | 
  
 
    
      
  
  
    #city_geoname_id  ⇒ Object 
  
  
  
  
    
      
22
23
24 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 22
def city_geoname_id
  @data["city_geoname_id"]
end 
     | 
  
 
    
      
  
  
    #connection_autonomous_system_number  ⇒ Object 
  
  
  
  
  
    
      
125
126
127 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 125
def connection_autonomous_system_number
  @data.dig "connection", "autonomous_system_number"
end 
     | 
  
 
    
      
  
  
    #connection_autonomous_system_organization  ⇒ Object 
  
  
  
  
    
      
129
130
131 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 129
def connection_autonomous_system_organization
  @data.dig "connection", "autonomous_system_organization"
end 
     | 
  
 
    
      
  
  
    #connection_connection_type  ⇒ Object 
  
  
  
  
    
      
133
134
135 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 133
def connection_connection_type
  @data.dig "connection", "connection_type"
end 
     | 
  
 
    
      
  
  
    #connection_isp_name  ⇒ Object 
  
  
  
  
    
      
137
138
139 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 137
def connection_isp_name
  @data.dig "connection", "isp_name"
end 
     | 
  
 
    
      
  
  
    #connection_organization_name  ⇒ Object 
  
  
  
  
    
      
141
142
143 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 141
def connection_organization_name
  @data.dig "connection", "organization_name"
end 
     | 
  
 
    
      
  
  
    #continent  ⇒ Object 
  
  
  
  
    
      
50
51
52 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 50
def continent
  @data["continent"]
end 
     | 
  
 
    
      
  
  
    #continent_code  ⇒ Object 
  
  
  
  
    
      
54
55
56 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 54
def continent_code
  @data["continent_code"]
end 
     | 
  
 
    
      
  
  
    #continent_geoname_id  ⇒ Object 
  
  
  
  
    
      
58
59
60 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 58
def continent_geoname_id
  @data["continent_geoname_id"]
end 
     | 
  
 
    
      
  
  
    #country  ⇒ Object 
  
  
  
  
    
      
34
35
36 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 34
def country
  @data["country"]
end 
     | 
  
 
    
      
  
  
    #country_code  ⇒ Object 
  
  
  
  
    
      
38
39
40 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 38
def country_code
  @data["country_code"]
end 
     | 
  
 
    
      
  
  
    #country_geoname_id  ⇒ Object 
  
  
  
  
    
      
42
43
44 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 42
def country_geoname_id
  @data["country_geoname_id"]
end 
     | 
  
 
    
      
  
  
    #country_is_eu  ⇒ Object 
  
  
  
  
    
      
46
47
48 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 46
def country_is_eu
  @data["country_is_eu"]
end 
     | 
  
 
    
      
  
  
    #currency_currency_code  ⇒ Object 
  
  
  
  
    
      
118
119
120 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 118
def currency_currency_code
  @data.dig "currency", "currency_code"
end 
     | 
  
 
    
      
  
  
    #currency_currency_name  ⇒ Object 
  
  
  
  
  
    
      
114
115
116 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 114
def currency_currency_name
  @data.dig "currency", "currency_name"
end 
     | 
  
 
    
      
  
  
    #flag_emoji  ⇒ Object 
  
  
  
  
  
    
      
95
96
97 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 95
def flag_emoji
  @data.dig "flag", "emoji"
end 
     | 
  
 
    
      
  
  
    #flag_png  ⇒ Object 
  
  
  
  
    
      
103
104
105 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 103
def flag_png
  @data.dig "flag", "png"
end 
     | 
  
 
    
      
  
  
    #flag_svg  ⇒ Object 
  
  
  
  
    
      
107
108
109 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 107
def flag_svg
  @data.dig "flag", "svg"
end 
     | 
  
 
    
      
  
  
    #flag_unicode  ⇒ Object 
  
  
  
  
    
      
99
100
101 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 99
def flag_unicode
  @data.dig "flag", "unicode"
end 
     | 
  
 
    
      
  
  
    #is_vpn?  ⇒ Boolean 
  
  
  
  
    
      
65
66
67 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 65
def is_vpn?
  @data.dig "security", "is_vpn"
end 
     | 
  
 
    
      
  
  
    #postal_code  ⇒ Object 
  
  
  
  
    
      
30
31
32 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 30
def postal_code
  @data["postal_code"]
end 
     | 
  
 
    
      
  
  
    #region_geoname_id  ⇒ Object 
  
  
  
  
    
      
26
27
28 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 26
def region_geoname_id
  @data["region_geoname_id"]
end 
     | 
  
 
    
      
  
  
    #state  ⇒ Object 
  
  
  
  
  
    
      
10
11
12 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 10
def state
  @data['region']
end 
     | 
  
 
    
      
  
  
    #state_code  ⇒ Object 
  
  
  
  
    
      
14
15
16 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 14
def state_code
  @data['region_iso_code']
end 
     | 
  
 
    
      
  
  
    #timezone_abbreviation  ⇒ Object 
  
  
  
  
    
      
76
77
78 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 76
def timezone_abbreviation
  @data.dig "timezone", "abbreviation"
end 
     | 
  
 
    
      
  
  
    #timezone_current_time  ⇒ Object 
  
  
  
  
    
      
84
85
86 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 84
def timezone_current_time
  @data.dig "timezone", "current_time"
end 
     | 
  
 
    
      
  
  
    #timezone_gmt_offset  ⇒ Object 
  
  
  
  
    
      
80
81
82 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 80
def timezone_gmt_offset
  @data.dig "timezone", "gmt_offset"
end 
     | 
  
 
    
      
  
  
    #timezone_is_dst  ⇒ Object 
  
  
  
  
    
      
88
89
90 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 88
def timezone_is_dst
  @data.dig "timezone", "is_dst"
end 
     | 
  
 
    
      
  
  
    #timezone_name  ⇒ Object 
  
  
  
  
  
    
      
72
73
74 
     | 
    
      # File 'lib/geocoder/results/abstract_api.rb', line 72
def timezone_name
  @data.dig "timezone", "name"
end 
     |