require 'transistor/version' require 'transistor/client' module Transistor class << self attr_accessor :config end class Config attr_accessor :id, :secret, :host, :secure def initialize @host = 'api.transistor.fm' @secure = true end def base_url if self.secure "https://#{self.host}" else "http://#{self.host}" end end def credentials { id: self.id, key: self.secret, algorithm: 'sha256' } end def user_agent "Transistor Ruby Client, Version #{Transistor::Version}" end end def self.setup self.config ||= Config.new yield(config) end end