/bing_bong

Bing Ads API wrapper for Ruby

Primary LanguageRubyMIT LicenseMIT

BingBong

BingBong

Small wrapper for the Bing Ads API. This is work in progress!

Installation

Add this line to your application's Gemfile:

gem 'bing_bong', github: 'voke/bing_bong'

Usage

Sandbox

Digging in the sandbox requires a sandbox account.

Authentication with a OAuth is not supported in sandbox so we fallback to username/password.

bing = BingBong::Client.new do |config|
  config.access_token = nil # Not supported in sandbox
  config.account_id = 12345
  config.customer_id = 1337
  config.developer_token = 'BBD37VB98'
  config.username = 'johndoe_sbx'
  config.password = 'secret'
  config.environment = :sandbox
end

campaign_srv = bing.service(:campaign_management_service)
message = { 'AccountId' => 12345 }
response = campaign_srv.call(:get_campaigns_by_account_id, message: message)

p response.body

License

The gem is available as open source under the terms of the MIT License.