Class: GoogleMapsJuice::Endpoint::Response
- Inherits:
-
Hash
- Object
- Hash
- GoogleMapsJuice::Endpoint::Response
show all
- Defined in:
- lib/google_maps_juice/endpoint.rb
Instance Method Summary
collapse
Instance Method Details
#error? ⇒ Boolean
63
64
65
|
# File 'lib/google_maps_juice/endpoint.rb', line 63
def error?
status.upcase != 'OK'
end
|
#error_message ⇒ Object
75
76
77
|
# File 'lib/google_maps_juice/endpoint.rb', line 75
def error_message
self['error_message']
end
|
#limit_error? ⇒ Boolean
71
72
73
|
# File 'lib/google_maps_juice/endpoint.rb', line 71
def limit_error?
%w( OVER_DAILY_LIMIT OVER_QUERY_LIMIT ).include?(status.upcase)
end
|
#results ⇒ Object
79
80
81
|
# File 'lib/google_maps_juice/endpoint.rb', line 79
def results
self['results']
end
|
#status ⇒ Object
59
60
61
|
# File 'lib/google_maps_juice/endpoint.rb', line 59
def status
self['status']
end
|
#zero_results? ⇒ Boolean
67
68
69
|
# File 'lib/google_maps_juice/endpoint.rb', line 67
def zero_results?
status.upcase == 'ZERO_RESULTS'
end
|