class Barometer::WeatherBug::OauthApi

Public Class Methods

new(api_client_id, api_client_secret) click to toggle source
# File lib/barometer/weather_bug/oauth_api.rb, line 6
def initialize(api_client_id, api_client_secret)
  @api_client_id = api_client_id
  @api_client_secret = api_client_secret
end

Public Instance Methods

params() click to toggle source
# File lib/barometer/weather_bug/oauth_api.rb, line 15
def params
  {
    grant_type: 'client_credentials',
    client_id: @api_client_id,
    client_secret: @api_client_secret
  }
end
unwrap_nodes() click to toggle source
# File lib/barometer/weather_bug/oauth_api.rb, line 23
def unwrap_nodes
  ['OAuth20', 'access_token']
end
url() click to toggle source
# File lib/barometer/weather_bug/oauth_api.rb, line 11
def url
  'https://thepulseapi.earthnetworks.com/oauth20/token'
end