module Flowthings::Connection

Private Instance Methods

connection() click to toggle source
# File lib/flowthings/connection.rb, line 9
def connection
  url = @endpoint
  if @secure
    url = 'https://' + url
  else
    url = 'http://' + url
  end

  @connection = Excon.new(url,
                          headers: {
                            'X-Auth-Token' => @account_token,
                            'Content-Type' => 'application/json',
                            'User-Agent' => @user_agent
                          })
end