Class: ApiBrasil::Services::Data::GeolocationService

Inherits:
ApiBrasil::Services::DeviceProxyService show all
Defined in:
lib/api_brasil/services/data/proxies.rb

Overview

Geolocalizacao (device-based): /geolocation/{action}.

Instance Attribute Summary

Attributes inherited from ApiBrasil::Services::DeviceProxyService

#service

Attributes inherited from BaseService

#http

Instance Method Summary collapse

Methods inherited from ApiBrasil::Services::DeviceProxyService

#queue, #request

Methods inherited from BaseService

#delete, #download, #get, #patch, #post, #put

Constructor Details

#initialize(http) ⇒ GeolocationService

Returns a new instance of GeolocationService.



11
12
13
# File 'lib/api_brasil/services/data/proxies.rb', line 11

def initialize(http)
  super(http, "geolocation")
end

Instance Method Details

#forward_geocoding(body, options = {}) ⇒ Object

Geocoding direto: POST /geolocation/forward-geocoding.

Returns:

  • (Object)


25
26
27
# File 'lib/api_brasil/services/data/proxies.rb', line 25

def forward_geocoding(body, options = {})
  request("forward-geocoding", body, options)
end

#geocode(body, options = {}) ⇒ Object

Converte endereco em coordenadas: POST /geolocation/geocode.

Returns:

  • (Object)


18
19
20
# File 'lib/api_brasil/services/data/proxies.rb', line 18

def geocode(body, options = {})
  request("geocode", body, options)
end