class PopulationGrowth::Client
Constants
- POPULATION_GROWTH_API
Attributes
access_token[R]
Public Class Methods
new(access_token = nil)
click to toggle source
access_token
currently not used
# File lib/population_growth/client.rb, line 8 def initialize(access_token = nil) @access_token = access_token end
Public Instance Methods
locations()
click to toggle source
# File lib/population_growth/client.rb, line 12 def locations LocationsConnection.new(connection: connection) end
Private Instance Methods
connection()
click to toggle source
# File lib/population_growth/client.rb, line 18 def connection @connection ||= Faraday.new(connection_options) end
connection_options()
click to toggle source
# File lib/population_growth/client.rb, line 22 def connection_options { url: POPULATION_GROWTH_API, headers: { content_type: 'application/json', authorization: "Bearer #{access_token}" } } end