lib/sqoot/client.rb in sqoot-0.0.1 vs lib/sqoot/client.rb in sqoot-1.0.0

- old
+ new

@@ -16,30 +16,25 @@ include Provider include Commission include Click include Request - attr_reader :affiliate_token, :authentication_token + attr_reader :affiliate_token, :authentication_token, :api_url def initialize(options={}) @affiliate_token = options[:affiliate_token] || Sqoot.affiliate_token @authentication_token = options[:authentication_token] || Sqoot.authentication_token + @api_url = options[:api_url] || Sqoot.api_url end - # Provides the URL for accessing the API - # - # @return [String] - def api_url - "http://api.sqoot.com" - end - # Raw HTTP connection with Faraday::Connection # # @return [Faraday::Connection] def connection params = {} @connection = Faraday.new(:url => api_url, :params => params, :headers => default_headers) do |builder| builder.use Faraday::Response::ParseGzip + builder.use FaradayMiddleware::FollowRedirects builder.adapter Faraday.default_adapter end end private