Class: AstroInsight::Services::GeoService

Inherits:
Object
  • Object
show all
Defined in:
lib/astroinsight/services/geo.rb

Instance Method Summary collapse

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