Ruby Management SDK

Ruby Software Development Kit for Kevel Management APIs

Installation

Requires Ruby 2.5.7 or higher.

gem install adzerk

Acquiring API Credentials

Go to API Keys page find active API keys.

Examples

The Management API documentation has a complete set of code samples for each object and endpoint, but these examples give you a brief introduction to the SDK.

List Sites

require 'adzerk'
client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])

sites = client.sites.list
pp sites

Creating an Advertiser

require 'adzerk'
client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])

advertiser = client.advertisers.create(title: "Advertiser Name", is_active: true)
pp advertiser

List Flights in a Campaign

require 'adzerk'
client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])

campaign_id = 12345
flights = client.flights.list_for_campaign(campaign_id)
pp flights

Instant Counts

require 'adzerk'
client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])

counts = client.instant_counts.bulk(advertisers: [1234, 5678], campaigns: [8765, 9876])
pp counts