zuck 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +8 -8
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.markdown +7 -0
  4. data/VERSION +1 -1
  5. data/lib/zuck.rb +4 -4
  6. data/lib/zuck/facebook/ad_account.rb +0 -1
  7. data/lib/zuck/facebook/ad_creative.rb +0 -2
  8. data/lib/zuck/facebook/ad_group.rb +5 -8
  9. data/lib/zuck/facebook/ad_set.rb +1 -1
  10. data/spec/fixtures/a_single_account.yml +28 -28
  11. data/spec/fixtures/a_single_campaign.yml +14 -12
  12. data/spec/fixtures/a_single_group.yml +13 -11
  13. data/spec/fixtures/ad_interest_search_disney.yml +61 -35
  14. data/spec/fixtures/ad_interest_search_moviepilot.yml +59 -31
  15. data/spec/fixtures/ad_interest_search_nonexistant.yml +10 -8
  16. data/spec/fixtures/create_a_creative.yml +11 -9
  17. data/spec/fixtures/create_ad_campaign.yml +48 -40
  18. data/spec/fixtures/create_ad_group.yml +17 -13
  19. data/spec/fixtures/create_ad_set.yml +14 -12
  20. data/spec/fixtures/delete_ad_group.yml +11 -9
  21. data/spec/fixtures/delete_ad_set.yml +11 -9
  22. data/spec/fixtures/delete_campaign.yml +22 -18
  23. data/spec/fixtures/delete_creative.yml +11 -9
  24. data/spec/fixtures/find_a_single_group_and_update_it.yml +98 -64
  25. data/spec/fixtures/list_of_ad_accounts.yml +13 -11
  26. data/spec/fixtures/list_of_ad_campaigns.yml +13 -11
  27. data/spec/fixtures/list_of_ad_creatives.yml +10 -8
  28. data/spec/fixtures/list_of_ad_groups.yml +13 -11
  29. data/spec/fixtures/list_of_all_ad_creatives_of_account.yml +13 -11
  30. data/spec/fixtures/reach_for_invalid_interest.yml +29 -23
  31. data/spec/fixtures/reach_for_valid_keywords.yml +13 -11
  32. data/spec/fixtures/reach_for_valid_keywords_male_young.yml +13 -11
  33. data/spec/lib/zuck/facebook/ad_interest_spec.rb +1 -1
  34. data/spec/lib/zuck/facebook/targeting_spec_spec.rb +29 -25
  35. data/spec/lib/zuck_spec.rb +11 -6
  36. data/spec/spec_helper.rb +7 -1
  37. data/test_access_token +1 -1
  38. data/zuck.gemspec +4 -4
  39. metadata +3 -3
  40. data/.rvmrc +0 -1
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://graph.facebook.com/v2.2/6024300272266
5
+ uri: https://graph.facebook.com/v2.4/6029725595466
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: access_token=FAKEACCESSTOKEN&method=delete
8
+ string: access_token=DUMMY_TOKEN&method=delete
9
9
  headers:
10
10
  User-Agent:
11
11
  - Faraday v0.8.9
@@ -18,24 +18,26 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Content-Type:
22
- - application/json; charset=UTF-8
23
21
  Access-Control-Allow-Origin:
24
22
  - ! '*'
23
+ Content-Type:
24
+ - application/json; charset=UTF-8
25
+ X-Fb-Trace-Id:
26
+ - GUc4wfIKt+7
25
27
  X-Fb-Rev:
26
- - '1690131'
28
+ - '1928154'
27
29
  Pragma:
28
30
  - no-cache
29
31
  Cache-Control:
30
32
  - private, no-cache, no-store, must-revalidate
31
33
  Facebook-Api-Version:
32
- - v2.2
34
+ - v2.4
33
35
  Expires:
34
36
  - Sat, 01 Jan 2000 00:00:00 GMT
35
37
  X-Fb-Debug:
36
- - Jdx6FZtPUdnTGeXG9vlik/LKprYxhYqCSOq3ba43Ye3zf9gUZgaodHBBlt/ntr2oMp/CZWf2cN87LEYoSk6G9A==
38
+ - EMupQlVyqFTcQIDPwW8OcDemR650ByAA3gvTaL2JwlRqhc3kUosdw9w2PmYxcEPMvko2tBsK1m8Cq2eoP/FKCg==
37
39
  Date:
38
- - Wed, 15 Apr 2015 08:31:58 GMT
40
+ - Thu, 10 Sep 2015 09:47:31 GMT
39
41
  Connection:
40
42
  - keep-alive
41
43
  Content-Length:
@@ -44,5 +46,5 @@ http_interactions:
44
46
  encoding: US-ASCII
45
47
  string: ! '{"success":true}'
46
48
  http_version:
47
- recorded_at: Wed, 15 Apr 2015 08:32:00 GMT
49
+ recorded_at: Thu, 10 Sep 2015 09:47:31 GMT
48
50
  recorded_with: VCR 2.3.0
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://graph.facebook.com/v2.2/6024300271066
5
+ uri: https://graph.facebook.com/v2.4/6029725594066
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: access_token=FAKEACCESSTOKEN&method=delete
8
+ string: access_token=DUMMY_TOKEN&method=delete
9
9
  headers:
10
10
  User-Agent:
11
11
  - Faraday v0.8.9
@@ -18,24 +18,26 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Content-Type:
22
- - application/json; charset=UTF-8
23
21
  Access-Control-Allow-Origin:
24
22
  - ! '*'
23
+ Content-Type:
24
+ - application/json; charset=UTF-8
25
+ X-Fb-Trace-Id:
26
+ - D8ztMjsRUdI
25
27
  X-Fb-Rev:
26
- - '1690131'
28
+ - '1928154'
27
29
  Pragma:
28
30
  - no-cache
29
31
  Cache-Control:
30
32
  - private, no-cache, no-store, must-revalidate
31
33
  Facebook-Api-Version:
32
- - v2.2
34
+ - v2.4
33
35
  Expires:
34
36
  - Sat, 01 Jan 2000 00:00:00 GMT
35
37
  X-Fb-Debug:
36
- - DB9BLFJv1gG9AFgDTbXWgZTrhvMEcB9RCrAQ3516mmUvbnkPYLotatVUBcxgix0CD7Cx1eNhZi3zdw6nTvakUw==
38
+ - Q00TAIi5HDFVZPnUIZkn2bJgeTM/yW/x+4EDvMfEjdd5IeW23IPQq+JbAj0X3FoFNnMa+RTPG/Sr5BnLLH0n9g==
37
39
  Date:
38
- - Wed, 15 Apr 2015 08:32:01 GMT
40
+ - Thu, 10 Sep 2015 09:47:35 GMT
39
41
  Connection:
40
42
  - keep-alive
41
43
  Content-Length:
@@ -44,13 +46,13 @@ http_interactions:
44
46
  encoding: US-ASCII
45
47
  string: ! '{"success":true}'
46
48
  http_version:
47
- recorded_at: Wed, 15 Apr 2015 08:32:03 GMT
49
+ recorded_at: Thu, 10 Sep 2015 09:47:35 GMT
48
50
  - request:
49
51
  method: post
50
- uri: https://graph.facebook.com/v2.2/6024300270466
52
+ uri: https://graph.facebook.com/v2.4/6029725593266
51
53
  body:
52
54
  encoding: US-ASCII
53
- string: access_token=FAKEACCESSTOKEN&method=delete
55
+ string: access_token=DUMMY_TOKEN&method=delete
54
56
  headers:
55
57
  User-Agent:
56
58
  - Faraday v0.8.9
@@ -63,24 +65,26 @@ http_interactions:
63
65
  code: 200
64
66
  message: OK
65
67
  headers:
66
- Content-Type:
67
- - application/json; charset=UTF-8
68
68
  Access-Control-Allow-Origin:
69
69
  - ! '*'
70
+ Content-Type:
71
+ - application/json; charset=UTF-8
72
+ X-Fb-Trace-Id:
73
+ - AvmXZMlUGas
70
74
  X-Fb-Rev:
71
- - '1690131'
75
+ - '1928154'
72
76
  Pragma:
73
77
  - no-cache
74
78
  Cache-Control:
75
79
  - private, no-cache, no-store, must-revalidate
76
80
  Facebook-Api-Version:
77
- - v2.2
81
+ - v2.4
78
82
  Expires:
79
83
  - Sat, 01 Jan 2000 00:00:00 GMT
80
84
  X-Fb-Debug:
81
- - qlN4i0urIkQXJoBrA5CqWPmD/Rtaz8PZtXQrWTcGeety4QEtFwv3+oDt1D5h6BSR1zpYorUUb3LxXYvqWJ1StA==
85
+ - LIVFeXkQeATjcwtRhKftS9kxdDvp5eO3jtrdUwNSi0XzoKl/qwvdSw2FBsgLMwx85UZGt5yTxfIrtew8y2rE3w==
82
86
  Date:
83
- - Wed, 15 Apr 2015 08:32:03 GMT
87
+ - Thu, 10 Sep 2015 09:47:37 GMT
84
88
  Connection:
85
89
  - keep-alive
86
90
  Content-Length:
@@ -89,5 +93,5 @@ http_interactions:
89
93
  encoding: US-ASCII
90
94
  string: ! '{"success":true}'
91
95
  http_version:
92
- recorded_at: Wed, 15 Apr 2015 08:32:05 GMT
96
+ recorded_at: Thu, 10 Sep 2015 09:47:37 GMT
93
97
  recorded_with: VCR 2.3.0
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://graph.facebook.com/v2.2/6024299683866
5
+ uri: https://graph.facebook.com/v2.4/6024299683866
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: access_token=FAKEACCESSTOKEN&method=delete
8
+ string: access_token=DUMMY_TOKEN&method=delete
9
9
  headers:
10
10
  User-Agent:
11
11
  - Faraday v0.8.9
@@ -18,24 +18,26 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Content-Type:
22
- - application/json; charset=UTF-8
23
21
  Access-Control-Allow-Origin:
24
22
  - ! '*'
23
+ Content-Type:
24
+ - application/json; charset=UTF-8
25
+ X-Fb-Trace-Id:
26
+ - Ga3KGAxLzDT
25
27
  X-Fb-Rev:
26
- - '1690131'
28
+ - '1928154'
27
29
  Pragma:
28
30
  - no-cache
29
31
  Cache-Control:
30
32
  - private, no-cache, no-store, must-revalidate
31
33
  Facebook-Api-Version:
32
- - v2.2
34
+ - v2.4
33
35
  Expires:
34
36
  - Sat, 01 Jan 2000 00:00:00 GMT
35
37
  X-Fb-Debug:
36
- - 4O3t4k0uGB6c0/dHfmOOEX2EzhN+dCDDUUsuLDdPdoM5DTGdv0i+BW4u5AdanHv2hvHqr3Y/R7QgEPaLWFbvcQ==
38
+ - cnJ+4IK3G/bQa48Lb3p0a7xqkCklvr6PX04QXCiKuBK/XsGfPxKMKLxxFcMyoH8uPulNYO+lC9JWsGV3KjNdpg==
37
39
  Date:
38
- - Wed, 15 Apr 2015 08:31:59 GMT
40
+ - Thu, 10 Sep 2015 09:47:33 GMT
39
41
  Connection:
40
42
  - keep-alive
41
43
  Content-Length:
@@ -44,5 +46,5 @@ http_interactions:
44
46
  encoding: US-ASCII
45
47
  string: ! '{"success":true}'
46
48
  http_version:
47
- recorded_at: Wed, 15 Apr 2015 08:32:01 GMT
49
+ recorded_at: Thu, 10 Sep 2015 09:47:32 GMT
48
50
  recorded_with: VCR 2.3.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://graph.facebook.com/v2.2/6024300273866?access_token=FAKEACCESSTOKEN&fields=id,account_id,conversion_specs,campaign_id,campaign_group_id,created_time,creative_ids,failed_delivery_checks,name,tracking_specs,updated_time
5
+ uri: https://graph.facebook.com/v2.4/6029725596866?access_token=DUMMY_TOKEN&fields=id,account_id,adgroup_review_feedback,adgroup_status,bid_amount,campaign_id,campaign_group_id,created_time,creative,failed_delivery_checks,name,targeting,tracking_specs,updated_time
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -18,62 +18,75 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Content-Type:
22
- - application/json; charset=UTF-8
23
21
  Access-Control-Allow-Origin:
24
22
  - ! '*'
23
+ Content-Type:
24
+ - application/json; charset=UTF-8
25
+ X-Fb-Trace-Id:
26
+ - Cmwbtad2qph
25
27
  X-Fb-Rev:
26
- - '1690131'
28
+ - '1928154'
27
29
  Etag:
28
- - ! '"e74aef48c9b1a713ff6d6421dae6886d9276f2f5"'
30
+ - ! '"46a9a514223940bf6c4fd4511f0c4bfecccee01f"'
29
31
  Pragma:
30
32
  - no-cache
31
33
  Cache-Control:
32
34
  - private, no-cache, no-store, must-revalidate
33
35
  Facebook-Api-Version:
34
- - v2.2
36
+ - v2.4
35
37
  Expires:
36
38
  - Sat, 01 Jan 2000 00:00:00 GMT
37
39
  X-Fb-Debug:
38
- - GwLel9wR7XkUzod/I5YJdbWZvFlwIUH6j6m3b18roR7/ITTUOfmpNqgEioM5QsOsd51xvZ4BKz81hSbglzCVSQ==
40
+ - uOQT10uMpU3mHN3LX5kbPkh+/4rn/bmhx4w3R2LMCJvjtxHTYyIYimedEIfvZHUSfZlIW8wMMBhyqiz875iSAw==
39
41
  Date:
40
- - Wed, 15 Apr 2015 08:31:55 GMT
42
+ - Thu, 10 Sep 2015 09:47:29 GMT
41
43
  Connection:
42
44
  - keep-alive
43
45
  Content-Length:
44
- - '384'
46
+ - '626'
45
47
  body:
46
48
  encoding: US-ASCII
47
- string: ! '{"id":"6024300273866","account_id":"367106653","campaign_id":"6024300272266","campaign_group_id":"6024300271066","created_time":"2015-04-15T01:31:52-0700","creative_ids":["6024299683866"],"name":"Rap
48
- like me","tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["like"],"page":["158352134203230"]}],"updated_time":"2015-04-15T01:31:52-0700"}'
49
+ string: ! '{"id":"6029725596866","account_id":"367106653","adgroup_status":"PENDING_REVIEW","bid_amount":5,"campaign_id":"6029725595466","campaign_group_id":"6029725594066","created_time":"2015-09-10T02:47:25-0700","creative":{"id":"6024299683866"},"name":"Rap
50
+ like me","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US","GB"],"location_types":["home"]},"page_types":["desktopfeed","mobileexternal","mobilefeed","rightcolumn"]},"tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["page_engagement"],"page":["158352134203230"]}],"updated_time":"2015-09-10T02:47:25-0700"}'
49
51
  http_version:
50
- recorded_at: Wed, 15 Apr 2015 08:31:57 GMT
52
+ recorded_at: Thu, 10 Sep 2015 09:47:29 GMT
51
53
  - request:
52
54
  method: post
53
- uri: https://graph.facebook.com/v2.2/6024300273866
55
+ uri: https://graph.facebook.com/v2.4/6029725596866
54
56
  body:
55
57
  encoding: US-ASCII
56
58
  string: ! "-------------RubyMultipartPost\r\nContent-Disposition: form-data;
57
59
  name=\"account_id\"\r\n\r\n367106653\r\n-------------RubyMultipartPost\r\nContent-Disposition:
58
- form-data; name=\"campaign_id\"\r\n\r\n6024300272266\r\n-------------RubyMultipartPost\r\nContent-Disposition:
59
- form-data; name=\"campaign_group_id\"\r\n\r\n6024300271066\r\n-------------RubyMultipartPost\r\nContent-Disposition:
60
- form-data; name=\"created_time\"\r\n\r\n2015-04-15T01:31:52-0700\r\n-------------RubyMultipartPost\r\nContent-Disposition:
61
- form-data; name=\"creative_ids\"\r\n\r\n6024299683866\r\n-------------RubyMultipartPost\r\nContent-Disposition:
60
+ form-data; name=\"adgroup_status\"\r\n\r\nPENDING_REVIEW\r\n-------------RubyMultipartPost\r\nContent-Disposition:
61
+ form-data; name=\"bid_amount\"\r\n\r\n5\r\n-------------RubyMultipartPost\r\nContent-Disposition:
62
+ form-data; name=\"campaign_id\"\r\n\r\n6029725595466\r\n-------------RubyMultipartPost\r\nContent-Disposition:
63
+ form-data; name=\"campaign_group_id\"\r\n\r\n6029725594066\r\n-------------RubyMultipartPost\r\nContent-Disposition:
64
+ form-data; name=\"created_time\"\r\n\r\n2015-09-10T02:47:25-0700\r\n-------------RubyMultipartPost\r\nContent-Disposition:
65
+ form-data; name=\"creative%5Bid%5D\"\r\n\r\n6024299683866\r\n-------------RubyMultipartPost\r\nContent-Disposition:
62
66
  form-data; name=\"name\"\r\n\r\nMy old name\r\n-------------RubyMultipartPost\r\nContent-Disposition:
67
+ form-data; name=\"targeting%5Bage_max%5D\"\r\n\r\n65\r\n-------------RubyMultipartPost\r\nContent-Disposition:
68
+ form-data; name=\"targeting%5Bage_min%5D\"\r\n\r\n18\r\n-------------RubyMultipartPost\r\nContent-Disposition:
69
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Bcountries%5D%5B%5D\"\r\n\r\nUS\r\n-------------RubyMultipartPost\r\nContent-Disposition:
70
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Bcountries%5D%5B%5D\"\r\n\r\nGB\r\n-------------RubyMultipartPost\r\nContent-Disposition:
71
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Blocation_types%5D%5B%5D\"\r\n\r\nhome\r\n-------------RubyMultipartPost\r\nContent-Disposition:
72
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\ndesktopfeed\r\n-------------RubyMultipartPost\r\nContent-Disposition:
73
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\nmobileexternal\r\n-------------RubyMultipartPost\r\nContent-Disposition:
74
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\nmobilefeed\r\n-------------RubyMultipartPost\r\nContent-Disposition:
75
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\nrightcolumn\r\n-------------RubyMultipartPost\r\nContent-Disposition:
63
76
  form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\nlink_click\r\n-------------RubyMultipartPost\r\nContent-Disposition:
64
77
  form-data; name=\"tracking_specs%5B%5D%5Bobject%5D%5B%5D\"\r\n\r\n10150219314478408\r\n-------------RubyMultipartPost\r\nContent-Disposition:
65
- form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\nlike\r\n-------------RubyMultipartPost\r\nContent-Disposition:
78
+ form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\npage_engagement\r\n-------------RubyMultipartPost\r\nContent-Disposition:
66
79
  form-data; name=\"tracking_specs%5B%5D%5Bpage%5D%5B%5D\"\r\n\r\n158352134203230\r\n-------------RubyMultipartPost\r\nContent-Disposition:
67
- form-data; name=\"updated_time\"\r\n\r\n2015-04-15T01:31:52-0700\r\n-------------RubyMultipartPost\r\nContent-Disposition:
80
+ form-data; name=\"updated_time\"\r\n\r\n2015-09-10T02:47:25-0700\r\n-------------RubyMultipartPost\r\nContent-Disposition:
68
81
  form-data; name=\"redownload\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
69
- form-data; name=\"access_token\"\r\n\r\nFAKEACCESSTOKEN\r\n-------------RubyMultipartPost--\r\n\r\n"
82
+ form-data; name=\"access_token\"\r\n\r\nDUMMY_TOKEN\r\n-------------RubyMultipartPost--\r\n\r\n"
70
83
  headers:
71
84
  User-Agent:
72
85
  - Faraday v0.8.9
73
86
  Content-Type:
74
87
  - multipart/form-data; boundary=-----------RubyMultipartPost
75
88
  Content-Length:
76
- - '1680'
89
+ - '2943'
77
90
  Accept:
78
91
  - ! '*/*'
79
92
  response:
@@ -81,62 +94,77 @@ http_interactions:
81
94
  code: 200
82
95
  message: OK
83
96
  headers:
84
- Content-Type:
85
- - application/json; charset=UTF-8
86
97
  Access-Control-Allow-Origin:
87
98
  - ! '*'
99
+ Content-Type:
100
+ - application/json; charset=UTF-8
101
+ X-Fb-Trace-Id:
102
+ - DzgbhgGVzf2
88
103
  X-Fb-Rev:
89
- - '1690131'
104
+ - '1928154'
90
105
  Pragma:
91
106
  - no-cache
92
107
  Cache-Control:
93
108
  - private, no-cache, no-store, must-revalidate
94
109
  Facebook-Api-Version:
95
- - v2.2
110
+ - v2.4
96
111
  Expires:
97
112
  - Sat, 01 Jan 2000 00:00:00 GMT
113
+ Vary:
114
+ - Accept-Encoding
98
115
  X-Fb-Debug:
99
- - ksW0cpllZdN+3QovP/nB/z8DLjtYyCUQ1Y8KQy1N92lKPgknwpJuy2daiRjWMMW40R+RNcb23EEM03D5Xq6DMg==
116
+ - mIn5NrQxuAO6NVGr1nnsHmz7QAvCtJCr89kFcw/6z3VEpB7h8G8ge47lG6ib7NrNKZ1JQm27OUWms/bVAIGwOA==
100
117
  Date:
101
- - Wed, 15 Apr 2015 08:31:56 GMT
118
+ - Thu, 10 Sep 2015 09:47:29 GMT
119
+ Transfer-Encoding:
120
+ - chunked
102
121
  Connection:
103
122
  - keep-alive
104
- Content-Length:
105
- - '961'
106
123
  body:
107
124
  encoding: US-ASCII
108
- string: ! '{"result":{"success":true},"data":{"adgroups":{"6024300273866":{"id":"6024300273866","account_id":"367106653","adgroup_status":"PENDING_REVIEW","bid_info":{"CLICKS":1},"bid_type":"CPC","campaign_id":"6024300272266","creative_ids":["6024299683866"],"name":"My
109
- old name","objective":"WEBSITE_CLICKS","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US","GB"],"location_types":["home"]}},"tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["like"],"page":["158352134203230"]}],"updated_time":1429086716,"created_time":1429086712}},"creatives":{"6024299683866":{"id":"6024299683866","body":"bloody
125
+ string: ! '{"result":{"success":true},"data":{"adgroups":{"6029725596866":{"id":"6029725596866","account_id":"367106653","adgroup_status":"PENDING_REVIEW","bid_info":{"REACH":5},"bid_type":"ABSOLUTE_OCPM","campaign_id":"6029725595466","campaign_group_id":"6029725594066","name":"My
126
+ old name","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US","GB"],"location_types":["home"]},"page_types":["desktopfeed","mobileexternal","mobilefeed","rightcolumn"]},"tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["page_engagement"],"page":["158352134203230"]}],"updated_time":1441878449,"created_time":1441878445,"bid_amount":5}},"creatives":{"6024299683866":{"id":"6024299683866","body":"bloody
110
127
  body","image_hash":"1040d95f6a3505d0da0c8502cc87376a","image_url":"https:\/\/fbcdn-creative-a.akamaihd.net\/hads-ak-xaf1\/t45.1600-4\/s110x80\/10736784_6024299683266_385998835_n.png","actor_id":"158352134203230","object_type":"DOMAIN","object_url":"http:\/\/moviepilot.com\/","title":"bloody
111
128
  title"}}}}'
112
129
  http_version:
113
- recorded_at: Wed, 15 Apr 2015 08:31:58 GMT
130
+ recorded_at: Thu, 10 Sep 2015 09:47:29 GMT
114
131
  - request:
115
132
  method: post
116
- uri: https://graph.facebook.com/v2.2/6024300273866
133
+ uri: https://graph.facebook.com/v2.4/6029725596866
117
134
  body:
118
135
  encoding: US-ASCII
119
136
  string: ! "-------------RubyMultipartPost\r\nContent-Disposition: form-data;
120
137
  name=\"account_id\"\r\n\r\n367106653\r\n-------------RubyMultipartPost\r\nContent-Disposition:
121
- form-data; name=\"campaign_id\"\r\n\r\n6024300272266\r\n-------------RubyMultipartPost\r\nContent-Disposition:
122
- form-data; name=\"campaign_group_id\"\r\n\r\n6024300271066\r\n-------------RubyMultipartPost\r\nContent-Disposition:
123
- form-data; name=\"created_time\"\r\n\r\n1429086712\r\n-------------RubyMultipartPost\r\nContent-Disposition:
124
- form-data; name=\"creative_ids\"\r\n\r\n6024299683866\r\n-------------RubyMultipartPost\r\nContent-Disposition:
138
+ form-data; name=\"adgroup_status\"\r\n\r\nPENDING_REVIEW\r\n-------------RubyMultipartPost\r\nContent-Disposition:
139
+ form-data; name=\"bid_amount\"\r\n\r\n5\r\n-------------RubyMultipartPost\r\nContent-Disposition:
140
+ form-data; name=\"campaign_id\"\r\n\r\n6029725595466\r\n-------------RubyMultipartPost\r\nContent-Disposition:
141
+ form-data; name=\"campaign_group_id\"\r\n\r\n6029725594066\r\n-------------RubyMultipartPost\r\nContent-Disposition:
142
+ form-data; name=\"created_time\"\r\n\r\n1441878445\r\n-------------RubyMultipartPost\r\nContent-Disposition:
143
+ form-data; name=\"creative%5Bid%5D\"\r\n\r\n6024299683866\r\n-------------RubyMultipartPost\r\nContent-Disposition:
125
144
  form-data; name=\"name\"\r\n\r\nMy new name\r\n-------------RubyMultipartPost\r\nContent-Disposition:
145
+ form-data; name=\"targeting%5Bage_max%5D\"\r\n\r\n65\r\n-------------RubyMultipartPost\r\nContent-Disposition:
146
+ form-data; name=\"targeting%5Bage_min%5D\"\r\n\r\n18\r\n-------------RubyMultipartPost\r\nContent-Disposition:
147
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Bcountries%5D%5B%5D\"\r\n\r\nUS\r\n-------------RubyMultipartPost\r\nContent-Disposition:
148
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Bcountries%5D%5B%5D\"\r\n\r\nGB\r\n-------------RubyMultipartPost\r\nContent-Disposition:
149
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Blocation_types%5D%5B%5D\"\r\n\r\nhome\r\n-------------RubyMultipartPost\r\nContent-Disposition:
150
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\ndesktopfeed\r\n-------------RubyMultipartPost\r\nContent-Disposition:
151
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\nmobileexternal\r\n-------------RubyMultipartPost\r\nContent-Disposition:
152
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\nmobilefeed\r\n-------------RubyMultipartPost\r\nContent-Disposition:
153
+ form-data; name=\"targeting%5Bpage_types%5D%5B%5D\"\r\n\r\nrightcolumn\r\n-------------RubyMultipartPost\r\nContent-Disposition:
126
154
  form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\nlink_click\r\n-------------RubyMultipartPost\r\nContent-Disposition:
127
155
  form-data; name=\"tracking_specs%5B%5D%5Bobject%5D%5B%5D\"\r\n\r\n10150219314478408\r\n-------------RubyMultipartPost\r\nContent-Disposition:
128
- form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\nlike\r\n-------------RubyMultipartPost\r\nContent-Disposition:
156
+ form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\npage_engagement\r\n-------------RubyMultipartPost\r\nContent-Disposition:
129
157
  form-data; name=\"tracking_specs%5B%5D%5Bpage%5D%5B%5D\"\r\n\r\n158352134203230\r\n-------------RubyMultipartPost\r\nContent-Disposition:
130
- form-data; name=\"updated_time\"\r\n\r\n1429086716\r\n-------------RubyMultipartPost\r\nContent-Disposition:
158
+ form-data; name=\"updated_time\"\r\n\r\n1441878449\r\n-------------RubyMultipartPost\r\nContent-Disposition:
131
159
  form-data; name=\"redownload\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
132
- form-data; name=\"access_token\"\r\n\r\nFAKEACCESSTOKEN\r\n-------------RubyMultipartPost--\r\n\r\n"
160
+ form-data; name=\"access_token\"\r\n\r\nDUMMY_TOKEN\r\n-------------RubyMultipartPost--\r\n\r\n"
133
161
  headers:
134
162
  User-Agent:
135
163
  - Faraday v0.8.9
136
164
  Content-Type:
137
165
  - multipart/form-data; boundary=-----------RubyMultipartPost
138
166
  Content-Length:
139
- - '1652'
167
+ - '2915'
140
168
  Accept:
141
169
  - ! '*/*'
142
170
  response:
@@ -144,39 +172,43 @@ http_interactions:
144
172
  code: 200
145
173
  message: OK
146
174
  headers:
147
- Content-Type:
148
- - application/json; charset=UTF-8
149
175
  Access-Control-Allow-Origin:
150
176
  - ! '*'
177
+ Content-Type:
178
+ - application/json; charset=UTF-8
179
+ X-Fb-Trace-Id:
180
+ - BNS3X8myZdv
151
181
  X-Fb-Rev:
152
- - '1690131'
182
+ - '1928154'
153
183
  Pragma:
154
184
  - no-cache
155
185
  Cache-Control:
156
186
  - private, no-cache, no-store, must-revalidate
157
187
  Facebook-Api-Version:
158
- - v2.2
188
+ - v2.4
159
189
  Expires:
160
190
  - Sat, 01 Jan 2000 00:00:00 GMT
191
+ Vary:
192
+ - Accept-Encoding
161
193
  X-Fb-Debug:
162
- - 8KAMcBHqO9vio4zKIg/XGhxhjbMAeYkweVwnsHscu77WtNgFsbl0EedN9A/FY0xbFL7q0VCD10DEu1ZM6mpN1w==
194
+ - qrMFloeFMDqhjF/WSrr0XuHrIiz4FmGhgNVhXyOULeXP0eRygDSATN9Zz4SQPxCZzjnnXqsoSPPdXYEamyRlpA==
163
195
  Date:
164
- - Wed, 15 Apr 2015 08:31:56 GMT
196
+ - Thu, 10 Sep 2015 09:47:30 GMT
197
+ Transfer-Encoding:
198
+ - chunked
165
199
  Connection:
166
200
  - keep-alive
167
- Content-Length:
168
- - '961'
169
201
  body:
170
202
  encoding: US-ASCII
171
- string: ! '{"result":{"success":true},"data":{"adgroups":{"6024300273866":{"id":"6024300273866","account_id":"367106653","adgroup_status":"PENDING_REVIEW","bid_info":{"CLICKS":1},"bid_type":"CPC","campaign_id":"6024300272266","creative_ids":["6024299683866"],"name":"My
172
- new name","objective":"WEBSITE_CLICKS","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US","GB"],"location_types":["home"]}},"tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["like"],"page":["158352134203230"]}],"updated_time":1429086716,"created_time":1429086712}},"creatives":{"6024299683866":{"id":"6024299683866","body":"bloody
203
+ string: ! '{"result":{"success":true},"data":{"adgroups":{"6029725596866":{"id":"6029725596866","account_id":"367106653","adgroup_status":"PENDING_REVIEW","bid_info":{"REACH":5},"bid_type":"ABSOLUTE_OCPM","campaign_id":"6029725595466","campaign_group_id":"6029725594066","name":"My
204
+ new name","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US","GB"],"location_types":["home"]},"page_types":["desktopfeed","mobileexternal","mobilefeed","rightcolumn"]},"tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["page_engagement"],"page":["158352134203230"]}],"updated_time":1441878450,"created_time":1441878445,"bid_amount":5}},"creatives":{"6024299683866":{"id":"6024299683866","body":"bloody
173
205
  body","image_hash":"1040d95f6a3505d0da0c8502cc87376a","image_url":"https:\/\/fbcdn-creative-a.akamaihd.net\/hads-ak-xaf1\/t45.1600-4\/s110x80\/10736784_6024299683266_385998835_n.png","actor_id":"158352134203230","object_type":"DOMAIN","object_url":"http:\/\/moviepilot.com\/","title":"bloody
174
206
  title"}}}}'
175
207
  http_version:
176
- recorded_at: Wed, 15 Apr 2015 08:31:58 GMT
208
+ recorded_at: Thu, 10 Sep 2015 09:47:30 GMT
177
209
  - request:
178
210
  method: get
179
- uri: https://graph.facebook.com/v2.2/6024300273866?access_token=FAKEACCESSTOKEN&fields=id,account_id,conversion_specs,campaign_id,campaign_group_id,created_time,creative_ids,failed_delivery_checks,name,tracking_specs,updated_time
211
+ uri: https://graph.facebook.com/v2.4/6029725596866?access_token=DUMMY_TOKEN&fields=id,account_id,adgroup_review_feedback,adgroup_status,bid_amount,campaign_id,campaign_group_id,created_time,creative,failed_delivery_checks,name,targeting,tracking_specs,updated_time
180
212
  body:
181
213
  encoding: US-ASCII
182
214
  string: ''
@@ -192,34 +224,36 @@ http_interactions:
192
224
  code: 200
193
225
  message: OK
194
226
  headers:
195
- Content-Type:
196
- - application/json; charset=UTF-8
197
227
  Access-Control-Allow-Origin:
198
228
  - ! '*'
229
+ Content-Type:
230
+ - application/json; charset=UTF-8
231
+ X-Fb-Trace-Id:
232
+ - AY80RLpaHGX
199
233
  X-Fb-Rev:
200
- - '1690131'
234
+ - '1928154'
201
235
  Etag:
202
- - ! '"fe55127ce103452457a6ccab694fd209f3a7b0d0"'
236
+ - ! '"504368edf5babbe5584dcaad914fa8c7fa3b1c2a"'
203
237
  Pragma:
204
238
  - no-cache
205
239
  Cache-Control:
206
240
  - private, no-cache, no-store, must-revalidate
207
241
  Facebook-Api-Version:
208
- - v2.2
242
+ - v2.4
209
243
  Expires:
210
244
  - Sat, 01 Jan 2000 00:00:00 GMT
211
245
  X-Fb-Debug:
212
- - tozkzbCDGh8xmZcL8nCk5F1dh+M5acP2zfI65+MG7o2G0KhjS0kMP4dygHc315X6MqRTuBrX1wP2UrJuyFhcsA==
246
+ - GFfoPPCMISfGa1ED7yJqm14LvJFvdA6BDRLmpJRTLAZPQmH8yFWqRaUCFXFVu53opZu4C/qWZqywyJJXopIfrw==
213
247
  Date:
214
- - Wed, 15 Apr 2015 08:31:57 GMT
248
+ - Thu, 10 Sep 2015 09:47:30 GMT
215
249
  Connection:
216
250
  - keep-alive
217
251
  Content-Length:
218
- - '384'
252
+ - '626'
219
253
  body:
220
254
  encoding: US-ASCII
221
- string: ! '{"id":"6024300273866","account_id":"367106653","campaign_id":"6024300272266","campaign_group_id":"6024300271066","created_time":"2015-04-15T01:31:52-0700","creative_ids":["6024299683866"],"name":"My
222
- new name","tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["like"],"page":["158352134203230"]}],"updated_time":"2015-04-15T01:31:56-0700"}'
255
+ string: ! '{"id":"6029725596866","account_id":"367106653","adgroup_status":"PENDING_REVIEW","bid_amount":5,"campaign_id":"6029725595466","campaign_group_id":"6029725594066","created_time":"2015-09-10T02:47:25-0700","creative":{"id":"6024299683866"},"name":"My
256
+ new name","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US","GB"],"location_types":["home"]},"page_types":["desktopfeed","mobileexternal","mobilefeed","rightcolumn"]},"tracking_specs":[{"action.type":["link_click"],"object":["10150219314478408"]},{"action.type":["page_engagement"],"page":["158352134203230"]}],"updated_time":"2015-09-10T02:47:30-0700"}'
223
257
  http_version:
224
- recorded_at: Wed, 15 Apr 2015 08:31:58 GMT
258
+ recorded_at: Thu, 10 Sep 2015 09:47:30 GMT
225
259
  recorded_with: VCR 2.3.0