module Particle::Default

Default configuration options for {Client}

Constants

API_ENDPOINT
USER_AGENT

Public Class Methods

access_token() click to toggle source
# File lib/particle/default.rb, line 23
def access_token
  ENV['PARTICLE_ACCESS_TOKEN']
end
api_endpoint() click to toggle source
# File lib/particle/default.rb, line 19
def api_endpoint
  ENV['PARTICLE_API_ENDPOINT'] || API_ENDPOINT
end
connection_options() click to toggle source

Default options for Faraday::Connection @return [Hash]

# File lib/particle/default.rb, line 29
def connection_options
  {
    :headers => {
      :user_agent => user_agent
    }
  }
end
options() click to toggle source

Configuration options @return [Hash]

# File lib/particle/default.rb, line 15
def options
  Hash[Particle::Configurable.keys.map { |key| [key, send(key)] }]
end
user_agent() click to toggle source

Default User-Agent header string from {USER_AGENT} @return [String]

# File lib/particle/default.rb, line 39
def user_agent
  USER_AGENT
end