Closed robrechtdr closed 7 years ago
LGTM!
Resolves #132
For people who don't want to use changes from commit https://github.com/MediaMath/t1-python/commit/4703da8b4e32ac028a68caa1fa05ea9e51159e7c yet (as currently failing), you can use this branch for the moment: https://github.com/robrechtdr/t1-python/tree/fix_update_on_error.
Hmm, weird.
No worries, we added a case for ‘now’ to the datetime parser in t1types.
From: thomas91310 Reply-To: MediaMath/t1-python Date: Thursday, 23 February 2017 at 16:58 To: MediaMath/t1-python Cc: Fotios Tzellos, State change Subject: Re: [MediaMath/t1-python] Fix 'update_on' error (#134)
This is the response back from a /strategies/:id/deals call: ttheissier@2017-02-23` 11:55:21 ~ $ curl -H "Cookie:adama_session=*" -H "Accept: application/vnd.kafka.avro.v1+json" -XPOST 'https://api.mediamath.com/api/v2.0/strategies/955787/deals' -d "deal.1.id=138802" { "etag" : "040f63538ddf2d558c1c0784c7219b980ecf2aa0", "entity" : { "prop" : [ { "value" : "211337", "name" : "campaign_id" }, { "local_time" : { "value" : "2015-09-04T14:08:51", "zone_name" : "Etc/GMT" }, "value" : "2015-09-04T14:08:51", "name" : "start_date" }, { "value" : "0", "name" : "use_campaign_start" }, { "value" : "1", "name" : "use_campaign_end" }, { "value" : "1", "name" : "use_optimization" }, { "value" : "even", "name" : "pacing_type" }, { "value" : "day", "name" : "pacing_interval" }, { "value" : "reach", "name" : "goal_type" }, { "value" : "100.00", "name" : "bid_aggressiveness" }, { "value" : "asap", "name" : "frequency_type" }, { "value" : "hour", "name" : "frequency_interval" }, { "value" : "0", "name" : "run_on_all_exchanges" }, { "local_time" : { "value" : "2015-09-04T14:08:51", "zone_name" : "Etc/GMT" }, "value" : "2015-09-04T14:08:51", "name" : "created_on" }, { "local_time" : { "value" : "2017-02-23T16:55:22", "zone_name" : "Etc/GMT" }, "value" : "2017-02-23T16:55:22", "name" : "updated_on" }, { "value" : "0", "name" : "status" }, { "amount" : [ { "currency_code" : "USD", "value" : "1.00" } ], "currency_code" : "USD", "value" : "1.00", "name" : "budget" }, { "amount" : [ { "currency_code" : "USD", "value" : "50.00" } ], "currency_code" : "USD", "value" : "50.00", "name" : "pacing_amount" }, { "amount" : [ { "currency_code" : "USD", "value" : "1.0000" } ], "currency_code" : "USD", "value" : "1.0000", "name" : "goal_value" }, { "amount" : [ { "currency_code" : "USD", "value" : "20.00" } ], "currency_code" : "USD", "value" : "20.00", "name" : "max_bid" }, { "amount" : [ { "currency_code" : "USD", "value" : "0.00" } ], "currency_code" : "USD", "value" : "0.00", "name" : "min_bid" }, { "value" : "2", "name" : "frequency_amount" }, { "value" : "Test Sujit 1", "name" : "name" }, { "value" : "REDUCED", "name" : "site_selectiveness" }, { "value" : "REM", "name" : "type" }, { "value" : "##PIXEL_763221_0-3## ##PIXEL_763223_0-168##", "name" : "description" }, { "value" : "0", "name" : "use_mm_freq" }, { "value" : "0", "name" : "site_restriction_transparent_urls" }, { "value" : "RTB", "name" : "supply_type" }, { "value" : "OR", "name" : "audience_segment_include_op" }, { "value" : "OR", "name" : "audience_segment_exclude_op" }, { "value" : "0", "name" : "run_on_all_pmp" }, { "value" : "1", "name" : "bid_price_is_media_only" }, { "value" : "DISPLAY", "name" : "media_type" }, { "value" : "1", "name" : "run_on_display" }, { "value" : "1", "name" : "run_on_mobile" }, { "value" : "0", "name" : "run_on_streaming" }, { "value" : "USD", "name" : "currency_code" }, { "value" : "Etc/GMT", "name" : "zone_name" }, { "value" : "OR", "name" : "targeting_segment_include_op" }, { "value" : "OR", "name" : "targeting_segment_exclude_op" }, { "value" : "0", "name" : "frequency_optimization" }, { "value" : "no-limit", "name" : "impression_pacing_type" }, { "value" : "day", "name" : "impression_pacing_interval" }, { "amount" : [ { "currency_code" : "USD", "value" : "1.0000" } ], "currency_code" : "USD", "value" : "1.0000", "name" : "effective_goal_value" }, { "value" : "( [786044] ) AND NOT ( [786043] )", "name" : "pixel_target_expr" } ], "entity" : [ { "id" : 138802, "type" : "deal" } ], "version" : 4, "name" : "Test Sujit 1", "id" : 955787, "type" : "strategy" }, "called_on" : "2017-02-23 16:55:22.556387+00", "status" : { "code" : "ok" } } Not entirely sure why datetime is now and not the actual datetime when parsing this out
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/MediaMath/t1-python/pull/134#issuecomment-282052591, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFnb3Z2QrI1ZphtZOEcM2nejGNBO_n9Fks5rfbqngaJpZM4MKMLk.
sorry I meant:
ttheissier@2017-02-23` 11:59:08 ~ $ curl -H "Cookie:adama_session=*" -H "Accept: application/vnd.mediamath.v1+json" -XPOST 'https://api.mediamath.com/api/v2.0/strategies/955787/deals' -d "deal.1.id=138802"
{
"data" : {
"run_on_streaming" : false,
"use_mm_freq" : false,
"run_on_display" : true,
"zone_name" : "Etc/GMT",
"updated_on" : "2017-02-23T16:59:09+0000",
"frequency_interval" : "hour",
"campaign_id" : 211337,
"targeting_segment_exclude_op" : "OR",
"created_on" : "2015-09-04T14:08:51+0000",
"targeting_segment_include_op" : "OR",
"run_on_all_pmp" : false,
"id" : 955787,
"impression_pacing_interval" : "day",
"currency_code" : "USD",
"use_campaign_start" : false,
"name" : "Test Sujit 1",
"frequency_amount" : 2,
"description" : "##PIXEL_763221_0-3## ##PIXEL_763223_0-168##",
"type" : "REM",
"pixel_target_expr" : "( [786044] ) AND NOT ( [786043] )",
"impression_pacing_type" : "no-limit",
"bid_price_is_media_only" : true,
"frequency_optimization" : false,
"supply_type" : "RTB",
"pacing_type" : "even",
"goal_type" : "reach",
"frequency_type" : "asap",
"status" : false,
"budget" : [
{
"currency_code" : "USD",
"value" : 1
}
],
"effective_goal_value" : [
{
"currency_code" : "USD",
"value" : "1.0000"
}
],
"goal_value" : [
{
"currency_code" : "USD",
"value" : 1
}
],
"pacing_amount" : [
{
"currency_code" : "USD",
"value" : 50
}
],
"site_restriction_transparent_urls" : false,
"media_type" : "DISPLAY",
"entity_type" : "strategy",
"start_date" : "2015-09-04T14:08:51+0000",
"run_on_mobile" : true,
"deals" : [
{
"entity_type" : "deal",
"id" : 138802
}
],
"use_optimization" : true,
"max_bid" : [
{
"currency_code" : "USD",
"value" : 20
}
],
"audience_segment_include_op" : "OR",
"bid_aggressiveness" : 100,
"version" : 5,
"run_on_all_exchanges" : false,
"audience_segment_exclude_op" : "OR",
"site_selectiveness" : "REDUCED",
"use_campaign_end" : true,
"min_bid" : [
{
"currency_code" : "USD",
"value" : 0
}
],
"pacing_interval" : "day"
},
"meta" : {
"etag" : "0155e1f130698d3b56df8f1a62b86c51f4ecedc3",
"called_on" : "2017-02-23T16:59:09+0000",
"status" : "ok"
}
}
but ok cool!
Fix for problem reported here.