lib/blurb.rb in blurb-0.2.3 vs lib/blurb.rb in blurb-0.3.0

- old
+ new

@@ -8,36 +8,20 @@ require "blurb/campaign" require "blurb/profile" require "blurb/report" require "blurb/snapshot" require "blurb/suggested_keyword" -require "blurb/token" module Blurb - TOKEN_URL = "https://api.amazon.com" - API_URL = "https://advertising-api.amazon.com" - TEST_API_URL = "https://advertising-api-test.amazon.com" - EU_API_URL = "https://advertising-api-eu.amazon.com" - def self.client - return OAuth2::Client.new( - "", - "", - :site => TOKEN_URL - ) - end - - # By default this gem will use the production API url unless the test_env module - # variable is set to true. Then the test API url will be used - def self.active_api_url - if test_env - return TEST_API_URL - end - if eu_env - return EU_API_URL - end - - return API_URL + def self.default_account + { + client_secret: self.client_secret, + client_id: self.client_id, + refresh_token: self.refresh_token, + profile_id: self.profile_id, + eu_env: self.eu_env + } end class << self attr_accessor :client_secret, :client_id, :refresh_token, :profile_id, :test_env, :eu_env end