Skip to content

Instantly share code, notes, and snippets.

@superCap3
Created February 10, 2014 21:39
Show Gist options
  • Save superCap3/8924722 to your computer and use it in GitHub Desktop.
Save superCap3/8924722 to your computer and use it in GitHub Desktop.
71: # create an ad
72: # create_ad(oid, cid, n, mpid, sd, ed, d, vinit, vaud, vlang, pltyp, ct, pdev, arc, params = {})
73: gmt_start = DateTime.parse("2014-1-26").to_time.to_i #+ offset_in_seconds
74: gmt_end = DateTime.parse("2014-1-31" + 'T23:59:00').to_time.to_i
75: new_add = mash(@adap.create_ad("6482","44810", "Best Test Ad Ever!", "33", gmt_start, gmt_end, "15", "AUTO", "YES", "ENGLISH", "GAME_PLAYER", "PRO", "ANY", "VIDEO"))
=> 76: binding.pry
77: end
78: end
[1] pry(#<AdapMiddleware::App>)> gmt_start
=> 1390694400
[2] pry(#<AdapMiddleware::App>)> gmt_end
=> 1391212740
[3] pry(#<AdapMiddleware::App>)> new_add
=> {"result"=>{"code"=>"OK", "msg"=>""}, "id"=>198348}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment