Export (0) Print
Expand All

Ruby Examples for Bing Ads

The Ruby code examples for Bing Ads are developed and run within the environment described in Getting Started Using Ruby with Bing Ads Services. Your custom configuration may vary. You may choose to begin with the getting started section, and the remaining examples are grouped by the core scenarios described in Bing Ads Technical Guides.

Getting Started

This example demonstrates how to get your customer and account identifiers. Customer and account identifiers are required for many Bing Ads service operations. For related information, see Getting Started With the Bing Ads API and Customer Management Service Reference.

Topic

Description

Example Operations

Get SOAP Header Elements in Ruby

This example demonstrates how to get your customer and account identifiers.

GetCustomersInfo

GetAccountsInfo

Managing Campaigns and Ad Groups

These examples demonstrate how to manage core advertising entities including campaigns and ad groups. For related information, see Managing Campaigns and Ad Groups and Campaign Management Service Reference.

Topic

Description

Example Operations

Add Ad Groups in Ruby

Create ad groups within a campaign.

AddAdGroups

Add Campaigns in Ruby

Create campaigns within an account.

AddCampaigns

Get Campaigns in Ruby

Get campaigns within an account.

GetCampaignsByAccountId

Submit an Ad Group for Approval in Ruby

Submit an ad group for editorial approval.

SubmitAdGroupForApproval

Update Ad Groups in Ruby

Update elements of a specified ad group.

UpdateAdGroups

Update Campaigns in Ruby

Update elements of a specified campaign.

UpdateCampaigns

Managing Ads and Keywords

These examples demonstrate how to setup and manage text or mobile ads, and bid on keywords. For related information, see Managing Ads and Keywords and Campaign Management Service Reference.

Topic

Description

Example Operations

Add Ads in Ruby

Create ads within an ad group.

AddAds

Add Keywords in Ruby

Add keywords within an ad group.

AddKeywords

Update Ads in Ruby

Update ads within an ad group.

UpdateAds

Update Keywords in Ruby

Update elements of a specified keyword.

UpdateKeywords

Managing Targets

These examples demonstrate how to target your ads to display to users of a certain age group, display on certain days of the week, or display to users in a particular geographical area. For related information, see Managing Targets and Campaign Management Service Reference.

Topic

Description

Example Operations

Add Targets in Ruby

Add a target to a customer’s library that can be used to incrementally increase bids based on age, day, gender, hour, and location.

AddTargetsToLibrary

Update Targets in Library in Ruby

Update an existing target within a customer’s library.

UpdateTargetsInLibrary

Community Additions

Show:
© 2014 Microsoft