Class: AstroInsight::Services::GeoService
- Inherits:
-
Object
- Object
- AstroInsight::Services::GeoService
- Defined in:
- lib/astroinsight/services/geo.rb
Instance Method Summary collapse
- #get_timezone_by_lat_lon(lat, lon) ⇒ Object
- #get_timezone_by_timezone_id(timezone_id) ⇒ Object
-
#initialize(client) ⇒ GeoService
constructor
A new instance of GeoService.
- #search_place(place) ⇒ Object
Constructor Details
#initialize(client) ⇒ GeoService
Returns a new instance of GeoService.
6 7 8 |
# File 'lib/astroinsight/services/geo.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#get_timezone_by_lat_lon(lat, lon) ⇒ Object
18 19 20 |
# File 'lib/astroinsight/services/geo.rb', line 18 def get_timezone_by_lat_lon(lat, lon) @client.post("/geo/timezone-with-lat-lon", { lat: lat, lon: lon }) end |
#get_timezone_by_timezone_id(timezone_id) ⇒ Object
14 15 16 |
# File 'lib/astroinsight/services/geo.rb', line 14 def get_timezone_by_timezone_id(timezone_id) @client.post("/geo/timezone", { timezone_id: timezone_id }) end |
#search_place(place) ⇒ Object
10 11 12 |
# File 'lib/astroinsight/services/geo.rb', line 10 def search_place(place) @client.post("/geo/search", { keyword: place }) end |