DaveSeidel

Untitled

Jun 12th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.85 KB | None | 0 0
  1.   template_ad_operation = {
  2.     :operator => 'ADD',
  3.     :operand => {
  4.       :ad_group_id => ad_group_id,
  5.       :ad => {
  6.         :xsi_type => 'TemplateAd',
  7.         :template_id => 13,
  8.         :dimensions => {
  9.           :width => 300,
  10.           :height => 250
  11.         },
  12.         :name => 'Mars cruise video ad #%s' % (Time.new.to_f * 1000).to_i,
  13.         :url => 'http://www.example.com',
  14.         :template_elements => [{
  15.           :unique_name => 'adData',
  16.           :fields => [
  17.             {
  18.               :headline => 'Test Promoted Video',
  19.               :description1 => 'this is a test of video promotion',
  20.               :description2 => 'with a second line of description',
  21.               :video_id => video_id,
  22.               :channel_name => '',
  23.               :image_url => image_url
  24.             }
  25.           ]
  26.         }]
  27.       }
  28.     }
  29.   }
Advertisement
Add Comment
Please, Sign In to add comment