Skip to content

Example of uploading creatives in Ruby with the Adzerk API gem

Notifications You must be signed in to change notification settings

adzerk-oss/example-upload-creative

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upload-creative-example

This is an example of uploading a new image to an existing creative using the Adzerk API Ruby gem

upload_creative.rb is a command line program that accepts a file and a creative id, and uploads the file to Adzerk.

The creative must already exist. For an example of creating a creative from scratch, and getting back a creative id, see the tests.

Running

You'll need to install Ruby 2.0 or higher for your platform if you don't already have it. This project has been tested with Ruby 2.3.1.

Once you have Ruby, you'll need to install bundler with gem i bundler or similar.

Then, install dependencies:

bundle install

Run the program to see its help output:

bundle exec upload_creative.rb -h

Set the ADZERK_API_KEY environment variable (your API key will differ):

export ADZERK_API_KEY=f00b4r1234f00b4r1234f00b4r1234

With a creative id of 1234 and a creative file called 250x300.png, you could upload with:

bundle exec upload_creative.rb -c 1234 -f 250x300.png

About

Example of uploading creatives in Ruby with the Adzerk API gem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages