zuck 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +5 -13
  2. data/CHANGELOG.markdown +35 -5
  3. data/Gemfile +3 -2
  4. data/Gemfile.lock +13 -10
  5. data/README.markdown +26 -38
  6. data/VERSION +1 -1
  7. data/console +8 -2
  8. data/lib/zuck/facebook/ad_account.rb +22 -5
  9. data/lib/zuck/facebook/ad_campaign.rb +12 -15
  10. data/lib/zuck/facebook/ad_creative.rb +14 -14
  11. data/lib/zuck/facebook/ad_group.rb +12 -12
  12. data/lib/zuck/facebook/ad_interest.rb +12 -15
  13. data/lib/zuck/facebook/ad_set.rb +30 -0
  14. data/lib/zuck/facebook/targeting_spec.rb +4 -4
  15. data/lib/zuck/fb_object/dsl.rb +15 -7
  16. data/lib/zuck/fb_object/hash_delegator.rb +20 -3
  17. data/lib/zuck/fb_object/write.rb +18 -6
  18. data/lib/zuck/fb_object.rb +1 -1
  19. data/lib/zuck/helpers.rb +20 -1
  20. data/spec/fixtures/a_single_account.yml +146 -29
  21. data/spec/fixtures/a_single_campaign.yml +61 -12
  22. data/spec/fixtures/a_single_group.yml +65 -12
  23. data/spec/fixtures/ad_interest_search_disney.yml +16 -14
  24. data/spec/fixtures/ad_interest_search_moviepilot.yml +15 -98
  25. data/spec/fixtures/ad_interest_search_nonexistant.yml +7 -5
  26. data/spec/fixtures/create_ad_campaign.yml +334 -9
  27. data/spec/fixtures/create_ad_group.yml +154 -9
  28. data/spec/fixtures/create_ad_set.yml +95 -0
  29. data/spec/fixtures/delete_ad_group.yml +55 -8
  30. data/spec/fixtures/find_a_single_group_and_update_it.yml +122 -95
  31. data/spec/fixtures/list_of_ad_accounts.yml +77 -58
  32. data/spec/fixtures/list_of_ad_campaigns.yml +77 -55
  33. data/spec/fixtures/list_of_ad_creatives.yml +61 -13
  34. data/spec/fixtures/list_of_ad_groups.yml +77 -60
  35. data/spec/fixtures/list_of_all_ad_creatives_of_account.yml +77 -73
  36. data/spec/fixtures/reach_for_invalid_interest.yml +29 -111
  37. data/spec/fixtures/reach_for_valid_keywords.yml +11 -54
  38. data/spec/fixtures/reach_for_valid_keywords_male_young.yml +11 -60
  39. data/spec/lib/zuck/facebook/ad_account_spec.rb +1 -1
  40. data/spec/lib/zuck/facebook/ad_interest_spec.rb +2 -2
  41. data/spec/lib/zuck/facebook/targeting_spec_spec.rb +13 -21
  42. data/spec/lib/zuck_spec.rb +34 -23
  43. data/spec/spec_helper.rb +2 -5
  44. data/test_access_token +1 -0
  45. data/zuck.gemspec +15 -9
  46. metadata +63 -46
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://graph.facebook.com/6010889169151?access_token=CAAEvJ5vzhl8BAH8aCPOx0Ft9uNB147TF8weJ8hK0g7YVDRWU4eEih7tEKdJgmfk0vABZClZACJbEzyhSMbiShL6RpsfkZASfX1C9nv1AlFvjJajflqkyYZAlpE2edT0FJHjdh4NFg0ZCt0sBgq0kZABtKsjuU18aMURLE7rjKHR4X8NkXBUafg1T4uZARRNqboZD&fields=account_id,adgroup_status,bid_info,bid_type,campaign_id,conversion_specs,created_time,creative_ids,id,disapprove_reason_descriptions,last_updated_by_app_id,name,targeting,tracking_specs,updated_time,view_tags
5
+ uri: https://graph.facebook.com/6021525861551?access_token=CAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD%0A&fields=id,account_id,adgroup_status,bid_type,bid_info,conversion_specs,campaign_id,campaign_group_id,conversion_specs,created_time,creative_ids,failed_delivery_checks,name,targeting,tracking_specs,updated_time,view_tags
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.7
11
+ - Faraday v0.8.9
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
@@ -18,60 +18,75 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
+ Facebook-Api-Version:
22
+ - v1.0
23
+ Etag:
24
+ - ! '"baa6237b818398d2f5f135c8e586d7cb83dcf561"'
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Pragma:
28
+ - no-cache
21
29
  Access-Control-Allow-Origin:
22
30
  - ! '*'
31
+ X-Fb-Rev:
32
+ - '1534884'
23
33
  Cache-Control:
24
34
  - private, no-cache, no-store, must-revalidate
25
- Content-Type:
26
- - application/json; charset=UTF-8
27
- Etag:
28
- - ! '"0ea0b12563db3c86f01ef40a9da03a2db4a32d72"'
29
35
  Expires:
30
36
  - Sat, 01 Jan 2000 00:00:00 GMT
31
- Pragma:
32
- - no-cache
33
- X-Fb-Rev:
34
- - '934677'
35
37
  X-Fb-Debug:
36
- - VCyI9aJoRQx5rWFrVnm7mmaJl+GBZZtcd7LYEMGHZBA=
38
+ - jdavxgYqbzoVhoS2APL67eB0edLNDMVTA/Eo2kw9VUC4LrqwXtPTCKpwVGVLtUrB1cJDYD5oyHCWMT/8wVZS+Q==
37
39
  Date:
38
- - Thu, 12 Sep 2013 13:21:41 GMT
40
+ - Wed, 17 Dec 2014 13:22:08 GMT
39
41
  Connection:
40
42
  - keep-alive
41
43
  Content-Length:
42
- - '386'
44
+ - '786'
43
45
  body:
44
46
  encoding: US-ASCII
45
- string: ! '{"account_id":"10150585630710217","adgroup_status":3,"bid_info":{"1":1},"bid_type":1,"campaign_id":6010889111951,"conversion_specs":[],"created_time":"2013-09-12T12:20:54+0200","creative_ids":[6010888561951],"id":"6010889169151","last_updated_by_app_id":333322143368799,"name":"My
46
- new name","targeting":{"countries":["US"]},"tracking_specs":[],"updated_time":"2013-09-12T14:10:20+0200"}'
47
+ string: ! '{"id":"6021525861551","account_id":"10150585630710217","adgroup_status":"ACTIVE","bid_type":"CPC","bid_info":{"CLICKS":1},"campaign_id":"6021525283751","campaign_group_id":"6021499361751","created_time":"2014-12-17T13:29:58+0100","creative_ids":["6021396606151"],"failed_delivery_checks":[{"check_name":"spending_limit_reached","description":"Your
48
+ ads aren''t running because you''ve reached the spending limit you set for
49
+ your ad account. To get your ads up and running please edit your spending
50
+ limit.","summary":"Spending limit reached."}],"name":"My new name","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US"]}},"tracking_specs":[{"action.type":["post_engagement"],"page":[250413944992062],"post":[882760995090684]}],"updated_time":"2014-12-17T14:21:59+0100"}'
47
51
  http_version:
48
- recorded_at: Thu, 12 Sep 2013 13:21:41 GMT
52
+ recorded_at: Wed, 17 Dec 2014 13:22:08 GMT
49
53
  - request:
50
54
  method: post
51
- uri: https://graph.facebook.com/6010889169151
55
+ uri: https://graph.facebook.com/6021525861551
52
56
  body:
53
57
  encoding: US-ASCII
54
58
  string: ! "-------------RubyMultipartPost\r\nContent-Disposition: form-data;
55
59
  name=\"account_id\"\r\n\r\n10150585630710217\r\n-------------RubyMultipartPost\r\nContent-Disposition:
56
- form-data; name=\"adgroup_status\"\r\n\r\n3\r\n-------------RubyMultipartPost\r\nContent-Disposition:
57
- form-data; name=\"bid_info%5B1%5D\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
58
- form-data; name=\"bid_type\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
59
- form-data; name=\"campaign_id\"\r\n\r\n6010889111951\r\n-------------RubyMultipartPost\r\nContent-Disposition:
60
- form-data; name=\"created_time\"\r\n\r\n2013-09-12T12:20:54+0200\r\n-------------RubyMultipartPost\r\nContent-Disposition:
61
- form-data; name=\"creative_ids%5B%5D\"\r\n\r\n6010888561951\r\n-------------RubyMultipartPost\r\nContent-Disposition:
62
- form-data; name=\"last_updated_by_app_id\"\r\n\r\n333322143368799\r\n-------------RubyMultipartPost\r\nContent-Disposition:
63
- form-data; name=\"name\"\r\n\r\nMy old name\r\n-------------RubyMultipartPost\r\nContent-Disposition:
64
- form-data; name=\"targeting%5Bcountries%5D%5B%5D\"\r\n\r\nUS\r\n-------------RubyMultipartPost\r\nContent-Disposition:
65
- form-data; name=\"updated_time\"\r\n\r\n2013-09-12T14:10:20+0200\r\n-------------RubyMultipartPost\r\nContent-Disposition:
60
+ form-data; name=\"adgroup_status\"\r\n\r\nACTIVE\r\n-------------RubyMultipartPost\r\nContent-Disposition:
61
+ form-data; name=\"bid_type\"\r\n\r\nCPC\r\n-------------RubyMultipartPost\r\nContent-Disposition:
62
+ form-data; name=\"bid_info%5BCLICKS%5D\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
63
+ form-data; name=\"campaign_id\"\r\n\r\n6021525283751\r\n-------------RubyMultipartPost\r\nContent-Disposition:
64
+ form-data; name=\"campaign_group_id\"\r\n\r\n6021499361751\r\n-------------RubyMultipartPost\r\nContent-Disposition:
65
+ form-data; name=\"created_time\"\r\n\r\n2014-12-17T13:29:58+0100\r\n-------------RubyMultipartPost\r\nContent-Disposition:
66
+ form-data; name=\"creative_ids\"\r\n\r\n6021396606151\r\n-------------RubyMultipartPost\r\nContent-Disposition:
67
+ form-data; name=\"failed_delivery_checks%5B%5D%5Bcheck_name%5D\"\r\n\r\nspending_limit_reached\r\n-------------RubyMultipartPost\r\nContent-Disposition:
68
+ form-data; name=\"failed_delivery_checks%5B%5D%5Bdescription%5D\"\r\n\r\nYour
69
+ ads aren't running because you've reached the spending limit you set for your
70
+ ad account. To get your ads up and running please edit your spending limit.\r\n-------------RubyMultipartPost\r\nContent-Disposition:
71
+ form-data; name=\"failed_delivery_checks%5B%5D%5Bsummary%5D\"\r\n\r\nSpending
72
+ limit reached.\r\n-------------RubyMultipartPost\r\nContent-Disposition: form-data;
73
+ name=\"name\"\r\n\r\nMy old name\r\n-------------RubyMultipartPost\r\nContent-Disposition:
74
+ form-data; name=\"targeting%5Bage_max%5D\"\r\n\r\n65\r\n-------------RubyMultipartPost\r\nContent-Disposition:
75
+ form-data; name=\"targeting%5Bage_min%5D\"\r\n\r\n18\r\n-------------RubyMultipartPost\r\nContent-Disposition:
76
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Bcountries%5D%5B%5D\"\r\n\r\nUS\r\n-------------RubyMultipartPost\r\nContent-Disposition:
77
+ form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\npost_engagement\r\n-------------RubyMultipartPost\r\nContent-Disposition:
78
+ form-data; name=\"tracking_specs%5B%5D%5Bpage%5D%5B%5D\"\r\n\r\n250413944992062\r\n-------------RubyMultipartPost\r\nContent-Disposition:
79
+ form-data; name=\"tracking_specs%5B%5D%5Bpost%5D%5B%5D\"\r\n\r\n882760995090684\r\n-------------RubyMultipartPost\r\nContent-Disposition:
80
+ form-data; name=\"updated_time\"\r\n\r\n2014-12-17T14:21:59+0100\r\n-------------RubyMultipartPost\r\nContent-Disposition:
66
81
  form-data; name=\"redownload\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
67
- form-data; name=\"access_token\"\r\n\r\nCAAEvJ5vzhl8BAH8aCPOx0Ft9uNB147TF8weJ8hK0g7YVDRWU4eEih7tEKdJgmfk0vABZClZACJbEzyhSMbiShL6RpsfkZASfX1C9nv1AlFvjJajflqkyYZAlpE2edT0FJHjdh4NFg0ZCt0sBgq0kZABtKsjuU18aMURLE7rjKHR4X8NkXBUafg1T4uZARRNqboZD\r\n-------------RubyMultipartPost--\r\n\r\n"
82
+ form-data; name=\"access_token\"\r\n\r\nCAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD\n\r\n-------------RubyMultipartPost--\r\n\r\n"
68
83
  headers:
69
84
  User-Agent:
70
- - Faraday v0.8.7
85
+ - Faraday v0.8.9
71
86
  Content-Type:
72
- - multipart/form-data;boundary=-----------RubyMultipartPost
87
+ - multipart/form-data; boundary=-----------RubyMultipartPost
73
88
  Content-Length:
74
- - '1535'
89
+ - '2748'
75
90
  Accept:
76
91
  - ! '*/*'
77
92
  response:
@@ -79,68 +94,73 @@ http_interactions:
79
94
  code: 200
80
95
  message: OK
81
96
  headers:
97
+ Facebook-Api-Version:
98
+ - v1.0
99
+ Content-Type:
100
+ - application/json; charset=UTF-8
101
+ Pragma:
102
+ - no-cache
82
103
  Access-Control-Allow-Origin:
83
104
  - ! '*'
105
+ X-Fb-Rev:
106
+ - '1534884'
84
107
  Cache-Control:
85
108
  - private, no-cache, no-store, must-revalidate
86
- Content-Type:
87
- - application/json; charset=UTF-8
88
109
  Expires:
89
110
  - Sat, 01 Jan 2000 00:00:00 GMT
90
- Pragma:
91
- - no-cache
92
- X-Fb-Rev:
93
- - '934677'
94
111
  X-Fb-Debug:
95
- - axj4l9SLqagkHeGrd1726eOY3vviSQQEl/OqISoYMHQ=
112
+ - GWA1F0WL+zpThGYkDVXtMIDBvVHd/VHgPri7YBx+PM1GVwFeacmwvyVexCqsvt3J9u/lLX2UE/vzMLW1KwOZSA==
96
113
  Date:
97
- - Thu, 12 Sep 2013 13:25:27 GMT
114
+ - Wed, 17 Dec 2014 13:22:09 GMT
98
115
  Transfer-Encoding:
99
116
  - chunked
100
117
  Connection:
101
118
  - keep-alive
102
119
  body:
103
120
  encoding: US-ASCII
104
- string: ! '{"result":true,"data":{"adgroups":{"6010889169151":{"id":"6010889169151","account_id":"10150585630710217","adgroup_status":3,"bid_info":{"1":1},"bid_type":1,"campaign_id":6010889111951,"conversion_specs":[],"creative_ids":[6010888561951],"impression_control_map":[{"location":3,"control":{"impression_control_type":2,"user_impression_limit":6,"user_impression_limit_period":24,"user_impression_limit_period_unit":0}}],"last_updated_by_app_id":333322143368799,"locations":[3],"name":"My
105
- old name","targeting":{"countries":["US"]},"tracking_specs":[],"updated_time":1378992327,"created_time":1378981254,"ad_id":6010889169151,"adgroup_id":6010889169151,"max_bid":1,"tracking_pixel_ids":[]}},"creatives":{"6010888561951":{"id":"6010888561951","action_spec":[{"action.type":["like"],"post":["10150420410887685"]}],"image_url":"","name":"Sponsored
106
- story #6,010,888,561,951","preview_url":"https:\/\/www.facebook.com\/ads\/api\/creative_preview.php?cid=6010888561951","related_fan_page":1,"type":25,"creative_id":6010888561951,"run_status":1,"count_current_adgroups":11}}}}'
121
+ string: ! '{"result":true,"data":{"adgroups":{"6021525861551":{"id":"6021525861551","account_id":"10150585630710217","adgroup_status":"ACTIVE","bid_info":{"CLICKS":1},"bid_type":"CPC","campaign_id":"6021525283751","creative_ids":["6021396606151"],"impression_control_map":[{"location":3,"control":{"impression_control_type":2,"user_impression_limit":6,"user_impression_limit_period":24,"user_impression_limit_period_unit":0}}],"last_updated_by_app_id":333322143368799,"locations":[3],"name":"My
122
+ old name","objective":"WEBSITE_CLICKS","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US"]}},"tracking_specs":[{"action.type":["post_engagement"],"page":[250413944992062],"post":[882760995090684]}],"updated_time":1418822529,"created_time":1418819398}},"creatives":{"6021396606151":{"id":"6021396606151","object_type":"SHARE","object_story_id":"250413944992062_882760995090684","object_story_spec":{"page_id":"250413944992062","link_data":{"link":"http:\/\/moviepilot.com\/","message":"Story
123
+ message","name":"Link Name","caption":"Link Caption","description":"A description","picture":"http:\/\/graph.facebook.com\/moviepilotdotcom\/picture"}},"name":"Link
124
+ Page Post Ad Creative"}}}}'
107
125
  http_version:
108
- recorded_at: Thu, 12 Sep 2013 13:25:27 GMT
126
+ recorded_at: Wed, 17 Dec 2014 13:22:09 GMT
109
127
  - request:
110
128
  method: post
111
- uri: https://graph.facebook.com/6010889169151
129
+ uri: https://graph.facebook.com/6021525861551
112
130
  body:
113
131
  encoding: US-ASCII
114
132
  string: ! "-------------RubyMultipartPost\r\nContent-Disposition: form-data;
115
133
  name=\"account_id\"\r\n\r\n10150585630710217\r\n-------------RubyMultipartPost\r\nContent-Disposition:
116
- form-data; name=\"adgroup_status\"\r\n\r\n3\r\n-------------RubyMultipartPost\r\nContent-Disposition:
117
- form-data; name=\"bid_info%5B1%5D\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
118
- form-data; name=\"bid_type\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
119
- form-data; name=\"campaign_id\"\r\n\r\n6010889111951\r\n-------------RubyMultipartPost\r\nContent-Disposition:
120
- form-data; name=\"creative_ids%5B%5D\"\r\n\r\n6010888561951\r\n-------------RubyMultipartPost\r\nContent-Disposition:
121
- form-data; name=\"impression_control_map%5B%5D%5Blocation%5D\"\r\n\r\n3\r\n-------------RubyMultipartPost\r\nContent-Disposition:
122
- form-data; name=\"impression_control_map%5B%5D%5Bcontrol%5D%5Bimpression_control_type%5D\"\r\n\r\n2\r\n-------------RubyMultipartPost\r\nContent-Disposition:
123
- form-data; name=\"impression_control_map%5B%5D%5Bcontrol%5D%5Buser_impression_limit%5D\"\r\n\r\n6\r\n-------------RubyMultipartPost\r\nContent-Disposition:
124
- form-data; name=\"impression_control_map%5B%5D%5Bcontrol%5D%5Buser_impression_limit_period%5D\"\r\n\r\n24\r\n-------------RubyMultipartPost\r\nContent-Disposition:
125
- form-data; name=\"impression_control_map%5B%5D%5Bcontrol%5D%5Buser_impression_limit_period_unit%5D\"\r\n\r\n0\r\n-------------RubyMultipartPost\r\nContent-Disposition:
126
- form-data; name=\"last_updated_by_app_id\"\r\n\r\n333322143368799\r\n-------------RubyMultipartPost\r\nContent-Disposition:
127
- form-data; name=\"locations%5B%5D\"\r\n\r\n3\r\n-------------RubyMultipartPost\r\nContent-Disposition:
128
- form-data; name=\"name\"\r\n\r\nMy new name\r\n-------------RubyMultipartPost\r\nContent-Disposition:
129
- form-data; name=\"targeting%5Bcountries%5D%5B%5D\"\r\n\r\nUS\r\n-------------RubyMultipartPost\r\nContent-Disposition:
130
- form-data; name=\"updated_time\"\r\n\r\n1378992327\r\n-------------RubyMultipartPost\r\nContent-Disposition:
131
- form-data; name=\"created_time\"\r\n\r\n1378981254\r\n-------------RubyMultipartPost\r\nContent-Disposition:
132
- form-data; name=\"ad_id\"\r\n\r\n6010889169151\r\n-------------RubyMultipartPost\r\nContent-Disposition:
133
- form-data; name=\"adgroup_id\"\r\n\r\n6010889169151\r\n-------------RubyMultipartPost\r\nContent-Disposition:
134
- form-data; name=\"max_bid\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
134
+ form-data; name=\"adgroup_status\"\r\n\r\nACTIVE\r\n-------------RubyMultipartPost\r\nContent-Disposition:
135
+ form-data; name=\"bid_type\"\r\n\r\nCPC\r\n-------------RubyMultipartPost\r\nContent-Disposition:
136
+ form-data; name=\"bid_info%5BCLICKS%5D\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
137
+ form-data; name=\"campaign_id\"\r\n\r\n6021525283751\r\n-------------RubyMultipartPost\r\nContent-Disposition:
138
+ form-data; name=\"campaign_group_id\"\r\n\r\n6021499361751\r\n-------------RubyMultipartPost\r\nContent-Disposition:
139
+ form-data; name=\"created_time\"\r\n\r\n1418819398\r\n-------------RubyMultipartPost\r\nContent-Disposition:
140
+ form-data; name=\"creative_ids\"\r\n\r\n6021396606151\r\n-------------RubyMultipartPost\r\nContent-Disposition:
141
+ form-data; name=\"failed_delivery_checks%5B%5D%5Bcheck_name%5D\"\r\n\r\nspending_limit_reached\r\n-------------RubyMultipartPost\r\nContent-Disposition:
142
+ form-data; name=\"failed_delivery_checks%5B%5D%5Bdescription%5D\"\r\n\r\nYour
143
+ ads aren't running because you've reached the spending limit you set for your
144
+ ad account. To get your ads up and running please edit your spending limit.\r\n-------------RubyMultipartPost\r\nContent-Disposition:
145
+ form-data; name=\"failed_delivery_checks%5B%5D%5Bsummary%5D\"\r\n\r\nSpending
146
+ limit reached.\r\n-------------RubyMultipartPost\r\nContent-Disposition: form-data;
147
+ name=\"name\"\r\n\r\nMy new name\r\n-------------RubyMultipartPost\r\nContent-Disposition:
148
+ form-data; name=\"targeting%5Bage_max%5D\"\r\n\r\n65\r\n-------------RubyMultipartPost\r\nContent-Disposition:
149
+ form-data; name=\"targeting%5Bage_min%5D\"\r\n\r\n18\r\n-------------RubyMultipartPost\r\nContent-Disposition:
150
+ form-data; name=\"targeting%5Bgeo_locations%5D%5Bcountries%5D%5B%5D\"\r\n\r\nUS\r\n-------------RubyMultipartPost\r\nContent-Disposition:
151
+ form-data; name=\"tracking_specs%5B%5D%5Baction.type%5D%5B%5D\"\r\n\r\npost_engagement\r\n-------------RubyMultipartPost\r\nContent-Disposition:
152
+ form-data; name=\"tracking_specs%5B%5D%5Bpage%5D%5B%5D\"\r\n\r\n250413944992062\r\n-------------RubyMultipartPost\r\nContent-Disposition:
153
+ form-data; name=\"tracking_specs%5B%5D%5Bpost%5D%5B%5D\"\r\n\r\n882760995090684\r\n-------------RubyMultipartPost\r\nContent-Disposition:
154
+ form-data; name=\"updated_time\"\r\n\r\n1418822529\r\n-------------RubyMultipartPost\r\nContent-Disposition:
135
155
  form-data; name=\"redownload\"\r\n\r\n1\r\n-------------RubyMultipartPost\r\nContent-Disposition:
136
- form-data; name=\"access_token\"\r\n\r\nCAAEvJ5vzhl8BAH8aCPOx0Ft9uNB147TF8weJ8hK0g7YVDRWU4eEih7tEKdJgmfk0vABZClZACJbEzyhSMbiShL6RpsfkZASfX1C9nv1AlFvjJajflqkyYZAlpE2edT0FJHjdh4NFg0ZCt0sBgq0kZABtKsjuU18aMURLE7rjKHR4X8NkXBUafg1T4uZARRNqboZD\r\n-------------RubyMultipartPost--\r\n\r\n"
156
+ form-data; name=\"access_token\"\r\n\r\nCAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD\n\r\n-------------RubyMultipartPost--\r\n\r\n"
137
157
  headers:
138
158
  User-Agent:
139
- - Faraday v0.8.7
159
+ - Faraday v0.8.9
140
160
  Content-Type:
141
- - multipart/form-data;boundary=-----------RubyMultipartPost
161
+ - multipart/form-data; boundary=-----------RubyMultipartPost
142
162
  Content-Length:
143
- - '2606'
163
+ - '2720'
144
164
  Accept:
145
165
  - ! '*/*'
146
166
  response:
@@ -148,42 +168,45 @@ http_interactions:
148
168
  code: 200
149
169
  message: OK
150
170
  headers:
171
+ Facebook-Api-Version:
172
+ - v1.0
173
+ Content-Type:
174
+ - application/json; charset=UTF-8
175
+ Pragma:
176
+ - no-cache
151
177
  Access-Control-Allow-Origin:
152
178
  - ! '*'
179
+ X-Fb-Rev:
180
+ - '1534884'
153
181
  Cache-Control:
154
182
  - private, no-cache, no-store, must-revalidate
155
- Content-Type:
156
- - application/json; charset=UTF-8
157
183
  Expires:
158
184
  - Sat, 01 Jan 2000 00:00:00 GMT
159
- Pragma:
160
- - no-cache
161
- X-Fb-Rev:
162
- - '934677'
163
185
  X-Fb-Debug:
164
- - v3179FVag9ZBYdJn+mk1OEghnZQ4V/rVusbvbigGqP4=
186
+ - e9VBNYIQXRzzkBrZMvx+LJ8tmWUc7dOO0NeeQxAfvrdOkTnAbyH7xY9TQJ5K5jE6tmc/JdvoDgK9XU+xi3FSyg==
165
187
  Date:
166
- - Thu, 12 Sep 2013 13:25:27 GMT
188
+ - Wed, 17 Dec 2014 13:22:09 GMT
167
189
  Transfer-Encoding:
168
190
  - chunked
169
191
  Connection:
170
192
  - keep-alive
171
193
  body:
172
194
  encoding: US-ASCII
173
- string: ! '{"result":true,"data":{"adgroups":{"6010889169151":{"id":"6010889169151","account_id":"10150585630710217","adgroup_status":3,"bid_info":{"1":1},"bid_type":1,"campaign_id":6010889111951,"conversion_specs":[],"creative_ids":[6010888561951],"impression_control_map":[{"location":3,"control":{"impression_control_type":2,"user_impression_limit":6,"user_impression_limit_period":24,"user_impression_limit_period_unit":0}}],"last_updated_by_app_id":333322143368799,"locations":[3],"name":"My
174
- new name","targeting":{"countries":["US"]},"tracking_specs":[],"updated_time":1378992327,"created_time":1378981254,"ad_id":6010889169151,"adgroup_id":6010889169151,"max_bid":1,"tracking_pixel_ids":[]}},"creatives":{"6010888561951":{"id":"6010888561951","action_spec":[{"action.type":["like"],"post":["10150420410887685"]}],"image_url":"","name":"Sponsored
175
- story #6,010,888,561,951","preview_url":"https:\/\/www.facebook.com\/ads\/api\/creative_preview.php?cid=6010888561951","related_fan_page":1,"type":25,"creative_id":6010888561951,"run_status":1,"count_current_adgroups":11}}}}'
195
+ string: ! '{"result":true,"data":{"adgroups":{"6021525861551":{"id":"6021525861551","account_id":"10150585630710217","adgroup_status":"ACTIVE","bid_info":{"CLICKS":1},"bid_type":"CPC","campaign_id":"6021525283751","creative_ids":["6021396606151"],"impression_control_map":[{"location":3,"control":{"impression_control_type":2,"user_impression_limit":6,"user_impression_limit_period":24,"user_impression_limit_period_unit":0}}],"last_updated_by_app_id":333322143368799,"locations":[3],"name":"My
196
+ new name","objective":"WEBSITE_CLICKS","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US"]}},"tracking_specs":[{"action.type":["post_engagement"],"page":[250413944992062],"post":[882760995090684]}],"updated_time":1418822529,"created_time":1418819398}},"creatives":{"6021396606151":{"id":"6021396606151","object_type":"SHARE","object_story_id":"250413944992062_882760995090684","object_story_spec":{"page_id":"250413944992062","link_data":{"link":"http:\/\/moviepilot.com\/","message":"Story
197
+ message","name":"Link Name","caption":"Link Caption","description":"A description","picture":"http:\/\/graph.facebook.com\/moviepilotdotcom\/picture"}},"name":"Link
198
+ Page Post Ad Creative"}}}}'
176
199
  http_version:
177
- recorded_at: Thu, 12 Sep 2013 13:25:27 GMT
200
+ recorded_at: Wed, 17 Dec 2014 13:22:09 GMT
178
201
  - request:
179
202
  method: get
180
- uri: https://graph.facebook.com/6010889169151?access_token=CAAEvJ5vzhl8BAH8aCPOx0Ft9uNB147TF8weJ8hK0g7YVDRWU4eEih7tEKdJgmfk0vABZClZACJbEzyhSMbiShL6RpsfkZASfX1C9nv1AlFvjJajflqkyYZAlpE2edT0FJHjdh4NFg0ZCt0sBgq0kZABtKsjuU18aMURLE7rjKHR4X8NkXBUafg1T4uZARRNqboZD&fields=account_id,adgroup_status,bid_info,bid_type,campaign_id,conversion_specs,created_time,creative_ids,id,disapprove_reason_descriptions,last_updated_by_app_id,name,targeting,tracking_specs,updated_time,view_tags
203
+ uri: https://graph.facebook.com/6021525861551?access_token=CAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD%0A&fields=id,account_id,adgroup_status,bid_type,bid_info,conversion_specs,campaign_id,campaign_group_id,conversion_specs,created_time,creative_ids,failed_delivery_checks,name,targeting,tracking_specs,updated_time,view_tags
181
204
  body:
182
205
  encoding: US-ASCII
183
206
  string: ''
184
207
  headers:
185
208
  User-Agent:
186
- - Faraday v0.8.7
209
+ - Faraday v0.8.9
187
210
  Accept-Encoding:
188
211
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
189
212
  Accept:
@@ -193,32 +216,36 @@ http_interactions:
193
216
  code: 200
194
217
  message: OK
195
218
  headers:
219
+ Facebook-Api-Version:
220
+ - v1.0
221
+ Etag:
222
+ - ! '"5423f9fadc4ef58a12502c9488d10c46cf68bbc2"'
223
+ Content-Type:
224
+ - application/json; charset=UTF-8
225
+ Pragma:
226
+ - no-cache
196
227
  Access-Control-Allow-Origin:
197
228
  - ! '*'
229
+ X-Fb-Rev:
230
+ - '1534884'
198
231
  Cache-Control:
199
232
  - private, no-cache, no-store, must-revalidate
200
- Content-Type:
201
- - application/json; charset=UTF-8
202
- Etag:
203
- - ! '"e966b528ad01aab8f098d620581efe748fec290b"'
204
233
  Expires:
205
234
  - Sat, 01 Jan 2000 00:00:00 GMT
206
- Pragma:
207
- - no-cache
208
- X-Fb-Rev:
209
- - '934677'
210
235
  X-Fb-Debug:
211
- - 4DyERtTVBt0cmNdrH5WnvTU3KMVM0vf2zqmf8pmW59Q=
236
+ - 7NeKo0i9ZyLfFr6jSXbBIdm62OVKsIoLREg80Z2VAq713FZ5Z8/Y+Y2uDY7S+uuwedaagO/lm9HHnKZ6lS5wiw==
212
237
  Date:
213
- - Thu, 12 Sep 2013 13:25:27 GMT
238
+ - Wed, 17 Dec 2014 13:28:46 GMT
214
239
  Connection:
215
240
  - keep-alive
216
241
  Content-Length:
217
- - '386'
242
+ - '786'
218
243
  body:
219
244
  encoding: US-ASCII
220
- string: ! '{"account_id":"10150585630710217","adgroup_status":3,"bid_info":{"1":1},"bid_type":1,"campaign_id":6010889111951,"conversion_specs":[],"created_time":"2013-09-12T12:20:54+0200","creative_ids":[6010888561951],"id":"6010889169151","last_updated_by_app_id":333322143368799,"name":"My
221
- new name","targeting":{"countries":["US"]},"tracking_specs":[],"updated_time":"2013-09-12T15:25:27+0200"}'
245
+ string: ! '{"id":"6021525861551","account_id":"10150585630710217","adgroup_status":"ACTIVE","bid_type":"CPC","bid_info":{"CLICKS":1},"campaign_id":"6021525283751","campaign_group_id":"6021499361751","created_time":"2014-12-17T13:29:58+0100","creative_ids":["6021396606151"],"failed_delivery_checks":[{"check_name":"spending_limit_reached","description":"Your
246
+ ads aren''t running because you''ve reached the spending limit you set for
247
+ your ad account. To get your ads up and running please edit your spending
248
+ limit.","summary":"Spending limit reached."}],"name":"My new name","targeting":{"age_max":65,"age_min":18,"geo_locations":{"countries":["US"]}},"tracking_specs":[{"action.type":["post_engagement"],"page":[250413944992062],"post":[882760995090684]}],"updated_time":"2014-12-17T14:22:09+0100"}'
222
249
  http_version:
223
- recorded_at: Thu, 12 Sep 2013 13:25:28 GMT
250
+ recorded_at: Wed, 17 Dec 2014 13:28:46 GMT
224
251
  recorded_with: VCR 2.3.0
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://graph.facebook.com/me/adaccounts?access_token=CAAEvJ5vzhl8BAH8aCPOx0Ft9uNB147TF8weJ8hK0g7YVDRWU4eEih7tEKdJgmfk0vABZClZACJbEzyhSMbiShL6RpsfkZASfX1C9nv1AlFvjJajflqkyYZAlpE2edT0FJHjdh4NFg0ZCt0sBgq0kZABtKsjuU18aMURLE7rjKHR4X8NkXBUafg1T4uZARRNqboZD&fields=
5
+ uri: https://graph.facebook.com/me/adaccounts?access_token=CAAEvJ5vzhl8BANgaZCvjMZCRsIbNZCSPswoDM0MTx8g30ojs53HUp43aVBVdqHnu9kIFytWIR5oRfp1Sy8DZBtJ9p5Rw2kY93ZAu6EwzHqZCrjmeBxXBWWlMCty1Bg4zKc3abdbjgoX4fWP4NWCEyWZCFJBKXWR0WV3ZC63bSqw7ojzYJm4teOarRc1GaesGIlIKlZB6s7EwZA1qUZCCKsdZCSsq%0A&fields=
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.8.7
11
+ - Faraday v0.8.9
12
12
  Accept-Encoding:
13
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
14
  Accept:
@@ -16,63 +16,82 @@ http_interactions:
16
16
  response:
17
17
  status:
18
18
  code: 200
19
- message: !binary |-
20
- T0s=
19
+ message: OK
21
20
  headers:
22
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
23
- - !binary |-
24
- Kg==
25
- !binary "Q2FjaGUtQ29udHJvbA==":
26
- - !binary |-
27
- cHJpdmF0ZSwgbm8tY2FjaGUsIG5vLXN0b3JlLCBtdXN0LXJldmFsaWRhdGU=
28
- !binary "Q29udGVudC1UeXBl":
29
- - !binary |-
30
- YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD1VVEYtOA==
31
- !binary "RXRhZw==":
32
- - !binary |-
33
- IjAyNDNhZTgyOTA5NzJmZTNjZDA1MTRjY2M5OWVhYWM0YjIzOWQ0ZGYi
34
- !binary "RXhwaXJlcw==":
35
- - !binary |-
36
- U2F0LCAwMSBKYW4gMjAwMCAwMDowMDowMCBHTVQ=
37
- !binary "UHJhZ21h":
38
- - !binary |-
39
- bm8tY2FjaGU=
40
- !binary "WC1GYi1SZXY=":
41
- - !binary |-
42
- OTM0Njc3
43
- !binary "Q29udGVudC1FbmNvZGluZw==":
44
- - !binary |-
45
- Z3ppcA==
46
- !binary "WC1GYi1EZWJ1Zw==":
47
- - !binary |-
48
- UmtpbGo1YmhxYnR5VGhOeVNDc0poVVkvQVM5SkdmS29oZXBwbU1kQnVLND0=
49
- !binary "RGF0ZQ==":
50
- - !binary |-
51
- VGh1LCAxMiBTZXAgMjAxMyAxMzoyMTozOCBHTVQ=
52
- !binary "Q29ubmVjdGlvbg==":
53
- - !binary |-
54
- a2VlcC1hbGl2ZQ==
55
- !binary "Q29udGVudC1MZW5ndGg=":
56
- - !binary |-
57
- Njcx
21
+ Facebook-Api-Version:
22
+ - v1.0
23
+ Etag:
24
+ - ! '"9e0e52e054900bf35ae80d9e1371ce7830cbfa3b"'
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Pragma:
28
+ - no-cache
29
+ Access-Control-Allow-Origin:
30
+ - ! '*'
31
+ X-Fb-Rev:
32
+ - '1534884'
33
+ Cache-Control:
34
+ - private, no-cache, no-store, must-revalidate
35
+ Expires:
36
+ - Sat, 01 Jan 2000 00:00:00 GMT
37
+ X-Fb-Debug:
38
+ - cs1pRt8I8f0pkHFljENvAuETGJ0uqSPMlypx7FL+Met0zrsx0zgFBzexwTCiD8vqBW9Vl57uzxkVf8bSdGXUVg==
39
+ Date:
40
+ - Wed, 17 Dec 2014 12:36:34 GMT
41
+ Connection:
42
+ - keep-alive
43
+ Content-Length:
44
+ - '224'
58
45
  body:
59
- encoding: ASCII-8BIT
60
- string: !binary |-
61
- H4sIAAAAAAAAA6VU0U7bMBT9lcpPm2RtdpqkTSUeQEWTJoE0TbwMUOQmTuqR
62
- 2JXtwAri33fcQkgge1pfmnt9fc65957kiZTCC7K6fiKiKEynfa5KsiKc8YQl
63
- yySdswVnEV8QSg4HovD51KEWrcQxyl5xnBe+c2TFKSk6a6Uu9ii4+rlGjVet
64
- fDRaHsjixSDxgnPeWbOTN1/PpG2UHt4wVeWkz7emsy7vfEFWEThrkCcZ+7LM
65
- lnGcsUXMAFqIndioRnkloeM6oinlCeWc8vQW7bh8J60zWjRkxSgGoZp97nZS
66
- l3mjWuUhPWH4UbLpnNLSufxF3ZmqZxfqTs5OG6vqrZ9dfZt92orKd7p2G+mK
67
- rb3pGJOxvvOfIb6/77yVEsDkPxEiQHw/UtTS6tLYStrZL6kaOUv5kLFQPoy9
68
- n+NAivBhYx9PHtUuOCCKWDZCCu6w+7wwZbi3PsfhvfD5657nlByHh7FjGcfB
69
- iUboAuV4Fu3BXqEGE4hZhgutMXkpK9E1Hrj6HvtQRuebYAt+QPh3RS7/YH8w
70
- kvZhgyCkZCtc3qraorUybLdVLgBi+5VonKSkc6A42L0LHAnjiznsnVIyqr7m
71
- NKJzGtOELmAVaxr0AEH8GZE2XlWqED5IhRe9wtbJ6on0aCEI8g//uPhMQ4in
72
- YYgdHkNK8JiyY9F8MhuPryajkPdIR4h0XJyNi8ei+FBUNJD8JgrZvmiUPdC+
73
- SkfVhHRke+mju30Hb9n5JDuyE+zIjtgRT7AHDw6aTz+Ew+azSfrlZDbsdjTH
74
- 4eTCEoa9hDh+V/9OWfjOjNyBeLRUxH1/z/jBhTtRw3ehPXxdnQmuxje88tLi
75
- 5bz8ffpw8Xi+v1yfPlyur/jFj5OT8C7Lytjw8k6eA/cvBZrbTg8GAAA=
46
+ encoding: US-ASCII
47
+ string: ! '{"data":[{"account_id":"10150285707018400","id":"act_10150285707018400"},{"account_id":"10150585630710217","id":"act_10150585630710217"}],"paging":{"cursors":{"after":"NjAwMzEyNDAwNDU1MQ==","before":"NjAwMzMxMzgxMjc1MA=="}}}'
48
+ http_version:
49
+ recorded_at: Wed, 17 Dec 2014 12:36:34 GMT
50
+ - request:
51
+ method: get
52
+ uri: https://graph.facebook.com/me/adaccounts?access_token=CAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD%0A&fields=
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ User-Agent:
58
+ - Faraday v0.8.9
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ Accept:
62
+ - ! '*/*'
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: OK
67
+ headers:
68
+ Facebook-Api-Version:
69
+ - v1.0
70
+ Etag:
71
+ - ! '"9e0e52e054900bf35ae80d9e1371ce7830cbfa3b"'
72
+ Content-Type:
73
+ - application/json; charset=UTF-8
74
+ Pragma:
75
+ - no-cache
76
+ Access-Control-Allow-Origin:
77
+ - ! '*'
78
+ X-Fb-Rev:
79
+ - '1534884'
80
+ Cache-Control:
81
+ - private, no-cache, no-store, must-revalidate
82
+ Expires:
83
+ - Sat, 01 Jan 2000 00:00:00 GMT
84
+ X-Fb-Debug:
85
+ - LLVog087DMBnQEj4wLR8cdI/g4BesdpBvxWqnzySuXiU83S/Ff+78bP/1M2QavwR4Q61M6YaZR+q55f6g8TCXw==
86
+ Date:
87
+ - Wed, 17 Dec 2014 13:22:05 GMT
88
+ Connection:
89
+ - keep-alive
90
+ Content-Length:
91
+ - '224'
92
+ body:
93
+ encoding: US-ASCII
94
+ string: ! '{"data":[{"account_id":"10150285707018400","id":"act_10150285707018400"},{"account_id":"10150585630710217","id":"act_10150585630710217"}],"paging":{"cursors":{"after":"NjAwMzEyNDAwNDU1MQ==","before":"NjAwMzMxMzgxMjc1MA=="}}}'
76
95
  http_version:
77
- recorded_at: Thu, 12 Sep 2013 13:21:38 GMT
96
+ recorded_at: Wed, 17 Dec 2014 13:22:05 GMT
78
97
  recorded_with: VCR 2.3.0