Sha256: 5a2746cffbf8cc0cf5ed77f86b241138662b65021ba9520ced001a2bd94ac54d

Contents?: true

Size: 1.88 KB

Versions: 4

Compression:

Stored size: 1.88 KB

Contents

# Global configuration for Koala.
class Koala::Configuration
  # The default access token to be used if none is otherwise supplied.
  attr_accessor :access_token

  # The default app secret value to be used if none is otherwise supplied.
  attr_accessor :app_secret

  # The default application ID to use if none is otherwise supplied.
  attr_accessor :app_id

  # The default app access token to be used if none is otherwise supplied.
  attr_accessor :app_access_token

  # The default API version to use if none is otherwise specified.
  attr_accessor :api_version

  # The default value to use for the oauth_callback_url if no other is provided.
  attr_accessor :oauth_callback_url

  # Whether to preserve arrays in arguments, which are expected by certain FB APIs (see the ads API
  # in particular, https://developers.facebook.com/docs/marketing-api/adgroup/v2.4)
  attr_accessor :preserve_form_arguments

  # The server to use for Graph API requests
  attr_accessor :graph_server

  # The server to use when constructing dialog URLs.
  attr_accessor :dialog_host

  # Certain Facebook services (beta, video) require you to access different
  # servers. If you're using your own servers, for instance, for a proxy,
  # you can change both the matcher (what value to change when updating the URL) and the
  # replacement values (what to add).
  #
  # So, for instance, to use the beta stack, we match on .facebook and change it to .beta.facebook.
  # If you're talking to fbproxy.mycompany.com, you could set up beta.fbproxy.mycompany.com for
  # FB's beta tier, and set the matcher to /\.fbproxy/ and the beta_replace to '.beta.fbproxy'.
  attr_accessor :host_path_matcher
  attr_accessor :video_replace
  attr_accessor :beta_replace

  def initialize
    # Default to our default values.
    Koala::HTTPService::DEFAULT_SERVERS.each_pair do |key, value|
      self.public_send("#{key}=", value)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
koala-3.0.0 lib/koala/configuration.rb
koala-3.0.0.rc2 lib/koala/configuration.rb
koala-3.0.0.rc lib/koala/configuration.rb
koala-3.0.0.beta3 lib/koala/configuration.rb