module BingAdsApi::ApiConfig

Contains helper methods for loading and managing the available services.

Constants

API_NAME

Set other constants

CLIENT_LIB_VERSION
DEFAULT_CONFIG_FILENAME
DEFAULT_ENVIRONMENT
DEFAULT_VERSION

Set defaults

LATEST_VERSION

Public Class Methods

address_config() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 127
def self.address_config
  @@address_config
end
adhoc_report_download_url(environment, version) click to toggle source

Get the download URL for Ad Hoc reports.

Args:

  • environment: the service environment to be used

  • version: the API version (as a symbol)

Returns:

  • The endpoint URL (as a string)

# File lib/bing_ads_api/api_config.rb, line 156
def self.adhoc_report_download_url(environment, version)
  base = get_wsdl_base(environment, version)
  if base
    base += 'reportdownload/%s' % version.to_s
  end
  return base
end
api_name() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 114
def self.api_name
  API_NAME
end
client_login_config(key) click to toggle source
# File lib/bing_ads_api/api_config.rb, line 135
def self.client_login_config(key)
  return @@client_login_config[key]
end
default_config_filename() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 139
def self.default_config_filename
  DEFAULT_CONFIG_FILENAME
end
default_environment() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 106
def self.default_environment
  DEFAULT_ENVIRONMENT
end
default_version() click to toggle source

Getters for constants and module variables.

# File lib/bing_ads_api/api_config.rb, line 102
def self.default_version
  DEFAULT_VERSION
end
environment_config(environment, key) click to toggle source
# File lib/bing_ads_api/api_config.rb, line 122
def self.environment_config(environment, key)
  return @@environment_config.include?(environment) ?
      @@environment_config[environment][key] : nil
end
headers_config() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 143
def self.headers_config
  @@headers_config
end
latest_version() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 110
def self.latest_version
  LATEST_VERSION
end
service_config() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 118
def self.service_config
  @@service_config
end
subdir_config() click to toggle source
# File lib/bing_ads_api/api_config.rb, line 131
def self.subdir_config
  @@subdir_config
end