zuck 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +13 -5
  2. data/CHANGELOG.markdown +9 -0
  3. data/README.markdown +7 -1
  4. data/VERSION +1 -1
  5. data/lib/zuck/facebook/ad_creative.rb +0 -3
  6. data/lib/zuck/facebook/ad_group.rb +7 -7
  7. data/lib/zuck/facebook/targeting_spec.rb +0 -1
  8. data/lib/zuck.rb +6 -0
  9. data/spec/fixtures/a_single_account.yml +31 -111
  10. data/spec/fixtures/a_single_campaign.yml +11 -57
  11. data/spec/fixtures/a_single_group.yml +13 -62
  12. data/spec/fixtures/ad_interest_search_disney.yml +19 -19
  13. data/spec/fixtures/ad_interest_search_moviepilot.yml +15 -18
  14. data/spec/fixtures/ad_interest_search_nonexistant.yml +11 -11
  15. data/spec/fixtures/create_a_creative.yml +48 -0
  16. data/spec/fixtures/create_ad_campaign.yml +44 -226
  17. data/spec/fixtures/create_ad_group.yml +13 -155
  18. data/spec/fixtures/create_ad_set.yml +11 -57
  19. data/spec/fixtures/delete_ad_group.yml +10 -55
  20. data/spec/fixtures/delete_ad_set.yml +48 -0
  21. data/spec/fixtures/delete_campaign.yml +93 -0
  22. data/spec/fixtures/delete_creative.yml +48 -0
  23. data/spec/fixtures/find_a_single_group_and_update_it.yml +84 -110
  24. data/spec/fixtures/list_of_ad_accounts.yml +10 -57
  25. data/spec/fixtures/list_of_ad_campaigns.yml +10 -57
  26. data/spec/fixtures/list_of_ad_creatives.yml +9 -56
  27. data/spec/fixtures/list_of_ad_groups.yml +10 -57
  28. data/spec/fixtures/list_of_all_ad_creatives_of_account.yml +10 -57
  29. data/spec/fixtures/reach_for_invalid_interest.yml +28 -31
  30. data/spec/fixtures/reach_for_valid_keywords.yml +13 -13
  31. data/spec/fixtures/reach_for_valid_keywords_male_young.yml +13 -13
  32. data/spec/lib/zuck/facebook/ad_interest_spec.rb +1 -1
  33. data/spec/lib/zuck/facebook/targeting_spec_spec.rb +3 -3
  34. data/spec/lib/zuck_spec.rb +125 -86
  35. data/spec/spec_helper.rb +14 -0
  36. data/test_access_token +1 -1
  37. data/zuck.gemspec +7 -3
  38. metadata +49 -45
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 40becd6a7fffa32053f38e6e550c76ba84480044
4
- data.tar.gz: 9ad567305d626e899c9b3bc1563297df9f49164b
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDMyMWE1YTM4YTQzODYyMWQ3NDFlYzc5MGI3MDE5Y2ZhZTBlODUwZA==
5
+ data.tar.gz: !binary |-
6
+ MjRlOTA3ZjY0NDFmODY0MDA1NGUzMjljMWQzMGUxYmRjNjJmNWE1ZA==
5
7
  SHA512:
6
- metadata.gz: 5fc4c51ef900b5b8d4084500aa339ee2d0e3320d2c89baa9ccf1ce044ee965eb379e91c22010d79e68c47281c7f1988d0622f42ca1d296d6d0b3904def9fe5e0
7
- data.tar.gz: 42e866685f4fefc664e59871b98db3428a0407144a7b4ce015fc68fc358fbc4e313318b8f27a73fd8ec187292555be917ce9152ac849591e2ecbd05a42b7f592
8
+ metadata.gz: !binary |-
9
+ YWQyYTkzMDhmNmU4ZjQ0MzU2Yzk4YzNlMGY2ZWEyMGE1MmU1YTNiOGU1OGEx
10
+ ZjBiZGFhNWYyMzNhZjA3NDE5NGY4NTIxYWEwZTE1NjA0YTI2ZGE1MmM3ODM3
11
+ OTViMmM0OTJmNDFjNjRiMDNmYWU4MmRmMzZhZmM2MGVhODNmZTg=
12
+ data.tar.gz: !binary |-
13
+ YWEzYzg0MDJhYjA5YWY5MTM3ZjhmNGE0YThhZTE0YWNmNjY1Mjk4Y2IxYjg4
14
+ ZTc1N2M3NWYyYTU3M2YwNGUzZjZiZTU5NzFiMzIxOTlhMDcxZDJiZGFiNWFk
15
+ OTZkMDBlZGY3YmMzZTdmZjdiMDA0NzZiY2YzMjNjNjBjODhhODg=
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,12 @@
1
+ 2.1.0
2
+ =====
3
+
4
+ - added creating and saving ad-creatives
5
+ - disabled view_tags in AdGroup (needs App whitelisting to work)
6
+ - fixed invalid attributes due to deprecation in Facebook Ad API version 2.2
7
+ - updated specs and tapes
8
+ - implemented automatic setup and removal of test data (creative, ad set, campaign)
9
+
1
10
  2.0.0
2
11
  =====
3
12
 
data/README.markdown CHANGED
@@ -137,7 +137,7 @@ Here's a support chart:
137
137
  <tr><td style="text-align: right">Ad account</td> <td>✔</td><td>-</td><td>✔</td><td>✔</td><td>-</td></tr>
138
138
  <tr><td style="text-align: right">Ad account group</td> <td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
139
139
  <tr><td style="text-align: right">Ad campaign</td> <td>✔</td><td>✔</td><td>✔</td><td>✔</td><td>✔</td></tr>
140
- <tr><td style="text-align: right">Ad creative</td> <td>✔</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
140
+ <tr><td style="text-align: right">Ad creative</td> <td>✔</td><td>✔</td><td>✔</td><td>✔</td><td>-</td></tr>
141
141
  <tr><td style="text-align: right">Ad group</td> <td>✔</td><td>✔</td><td>✔</td><td>✔</td><td>✔</td></tr>
142
142
  <tr><td style="text-align: right">Ad set</td> <td>✔</td><td>✔</td><td>✔</td><td>✔</td><td>✔</td></tr>
143
143
  <tr><td style="text-align: right">Ad user</td> <td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
@@ -149,6 +149,12 @@ Here's a support chart:
149
149
  Users don't exist as objects yet, but you can list all ad users of
150
150
  an account via `my_ad_account.users` and you will get an array of hashes.
151
151
 
152
+ Running tests with your account
153
+ -------------------------------
154
+
155
+ Ensure you have an ad account and a billing method set (you get an error without). Then you are ready to
156
+ run the tests and make sure you check your account manager that nothing has been left over.
157
+
152
158
  To-Do
153
159
  -----
154
160
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -1,9 +1,6 @@
1
1
  module Zuck
2
2
  class AdCreative < RawFbObject
3
3
 
4
- # Can't create this directly (yet)
5
- read_only
6
-
7
4
  # Known keys as per
8
5
  # [fb docs](https://developers.facebook.com/docs/reference/ads-api/adaccount/)
9
6
  known_keys :actor_id,
@@ -7,21 +7,21 @@ module Zuck
7
7
  # [fb docs](https://developers.facebook.com/docs/reference/ads-api/adgroup/v2.2)
8
8
  known_keys :id,
9
9
  :account_id,
10
- :adgroup_status,
11
- :bid_type,
12
- :bid_info,
10
+ # not available anymore to send, but still there in a response
11
+ # :adgroup_status,
12
+ # :bid_type,
13
+ # :bid_info,
13
14
  :conversion_specs,
14
15
  :campaign_id,
15
16
  :campaign_group_id,
16
- :conversion_specs,
17
17
  :created_time,
18
18
  :creative_ids,
19
19
  :failed_delivery_checks,
20
20
  :name,
21
- :targeting,
22
21
  :tracking_specs,
23
- :updated_time,
24
- :view_tags
22
+ :updated_time
23
+ # app must be whitelisted to use view_tags
24
+ # :view_tags
25
25
 
26
26
  parent_object :ad_campaign
27
27
  list_path :adgroups
@@ -154,7 +154,6 @@ module Zuck
154
154
 
155
155
  def validate_spec
156
156
  @spec[:interests] = @spec[:interests]
157
- @spec[:broad_age] ||= false
158
157
  validate_countries
159
158
  unless @spec[:interests].present? or @spec[:connections].present?
160
159
  raise(ParamsMissingError, "Need to set :interests or :connections")
data/lib/zuck.rb CHANGED
@@ -5,6 +5,12 @@ require 'zuck/fb_object'
5
5
  require 'zuck/helpers'
6
6
  Dir[File.expand_path("../zuck/facebook/**/*.rb", __FILE__)].each{ |f| require f}
7
7
 
8
+ Koala.config.api_version = "v2.2" if Koala.config.api_version == nil
9
+ if Koala.config.api_version != "v2.2"
10
+ warn("!!! Zuck was written for Facebook API version v2.2 and may not work!")
11
+ warn(" The current Koala.config.api_version='#{Koala.config.api_version}' does not match 'v2.2'!")
12
+ end
13
+
8
14
  module Zuck
9
15
  extend KoalaMethods
10
16
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://graph.facebook.com/act_10150585630710217?access_token=CAAEvJ5vzhl8BANgaZCvjMZCRsIbNZCSPswoDM0MTx8g30ojs53HUp43aVBVdqHnu9kIFytWIR5oRfp1Sy8DZBtJ9p5Rw2kY93ZAu6EwzHqZCrjmeBxXBWWlMCty1Bg4zKc3abdbjgoX4fWP4NWCEyWZCFJBKXWR0WV3ZC63bSqw7ojzYJm4teOarRc1GaesGIlIKlZB6s7EwZA1qUZCCKsdZCSsq%0A&fields=account_groups,account_id,account_status,age,agency_client_declaration,amount_spent,balance,business_city,business_country_code,business_name,business_state,business_street2,business_street,business_zip,capabilities,created_time,currency,daily_spend_limit,end_advertiser,funding_source,funding_source_details,id,is_personal,media_agency,name,offsite_pixels_tos_accepted,partner,spend_cap,timezone_id,timezone_name,timezone_offset_hours_utc,tos_accepted,users,tax_id_status
5
+ uri: https://graph.facebook.com/v2.2/act_367106653?access_token=FAKEACCESSTOKEN&fields=account_groups,account_id,account_status,age,agency_client_declaration,amount_spent,balance,business_city,business_country_code,business_name,business_state,business_street2,business_street,business_zip,capabilities,created_time,currency,daily_spend_limit,end_advertiser,funding_source,funding_source_details,id,is_personal,media_agency,name,offsite_pixels_tos_accepted,partner,spend_cap,timezone_id,timezone_name,timezone_offset_hours_utc,tos_accepted,users,tax_id_status
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,149 +19,69 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
- !binary "RmFjZWJvb2stQXBpLVZlcnNpb24=":
23
- - !binary |-
24
- djEuMA==
25
- !binary "RXRhZw==":
26
- - !binary |-
27
- Ijg5NTEyYmVhYWU5YjU3MmVlOWJmYzc2NWUyMmFmNDE5N2JlMzhiNGQi
28
22
  !binary "Q29udGVudC1UeXBl":
29
23
  - !binary |-
30
24
  YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD1VVEYtOA==
31
- !binary "UHJhZ21h":
32
- - !binary |-
33
- bm8tY2FjaGU=
34
25
  !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
35
26
  - !binary |-
36
27
  Kg==
37
28
  !binary "WC1GYi1SZXY=":
38
29
  - !binary |-
39
- MTUzNDg4NA==
40
- !binary "Q2FjaGUtQ29udHJvbA==":
41
- - !binary |-
42
- cHJpdmF0ZSwgbm8tY2FjaGUsIG5vLXN0b3JlLCBtdXN0LXJldmFsaWRhdGU=
43
- !binary "RXhwaXJlcw==":
44
- - !binary |-
45
- U2F0LCAwMSBKYW4gMjAwMCAwMDowMDowMCBHTVQ=
46
- !binary "Q29udGVudC1FbmNvZGluZw==":
47
- - !binary |-
48
- Z3ppcA==
49
- !binary "WC1GYi1EZWJ1Zw==":
50
- - !binary |-
51
- cnlkUVZZRmpTdzZVdHpaY1ArMFJwc2ZtR1hwZTR0aHJSQnpRTkY2eHB1eElk
52
- SHZKUThvUlI4eUUrT0F5MWFNSHZsVHcrNmpBdnpQaHkyS09LM0F6ZlE9PQ==
53
- !binary "RGF0ZQ==":
54
- - !binary |-
55
- V2VkLCAxNyBEZWMgMjAxNCAxMjozNjozNiBHTVQ=
56
- !binary "Q29ubmVjdGlvbg==":
57
- - !binary |-
58
- a2VlcC1hbGl2ZQ==
59
- !binary "Q29udGVudC1MZW5ndGg=":
60
- - !binary |-
61
- Nzky
62
- body:
63
- encoding: ASCII-8BIT
64
- string: !binary |-
65
- H4sIAAAAAAAAA6VUwW6bQBD9FYtTq5J0wWAS37DZEGobEGCnaROtNrC2V8GA
66
- 2EWKE+XfO4udyG0q9dATaObNzOMxb140mud1V0nCC22sGciwkX1hj4bIMZBp
67
- OJr+DhCSyk5oYwNCGwZPZBvnFyPHcOxL076E6O6Aa1gltbGNENK1B1rSKge0
68
- eu8Er5gQJOdyD8MmrC15pZ0mVIN2D88CSjQPnyYrulPBCd8MFvyRDdyy5Zut
69
- HCz9wactXcuu2ogHJvJte9chxKzqUX4+rVf8+wYfxgrZMiZNyH07lG5YWxV1
70
- u2bt4AfjJRuMjI/4/+HyzBultmmiSwjntKEPvOSSM9D3pxYneBEsF5AJ8Q2Z
71
- uovYDfyQpFmynGbLRKmyiCbBHBPXW+EkC1KckMAjy3geuR5k51E0c+fBrAe4
72
- 4RR7ZBqFV4EPuTiJEjeDyGTp+TiDSHR1lQYZVhDolgZRSK4D/5pMAtXrbVIc
73
- kwTj0Hd9vMBhBp3TnuAsIh5OZ1kUA9Nw5aY99JA9qV0FHo6OYcCRZYpJsAAy
74
- K6Di4wjC16p25QZzdwJFsXvbz1ng7Dr6rezYFX/PcBK6c0D6mGS3sdLlnxhy
75
- FSVkHscn2GjuAbE+q8b0NDyS4oxkbgISBaHS7Q19+BBglQTTlEwS7M686CbU
76
- 7uE/tgxWrCCS95tqIsM4Q9aZaWcmGpvG2HK+IBMh9ce7tmVVrlywTJXKBeXl
77
- vrdOQUq+47BdhnIQ2GbdVQWvNkTUXaucpA2dC2SZQ8MeWbbpWNqfEFIwCe1g
78
- lV603tUfCwoumpLu1SZDHUBiuo9pOTh6HZaYlWWtdtdCm/1uy9qaNs15Xu/U
79
- Gst9o/w/fNUP/Wkuyd8uBxekYa2oK1r2B+DoYMjU67XgkpGGP7FSEFkLAqNZ
80
- A+pp4zUtBdO1gxjgjbdbomR9rivWnyrLOQkcG+OurRt29/Xd4e8ANY9JsgV9
81
- BOlk3l+xTgA5JVJBJQXfHdWykeEM4QtG0ADo77gQvK6UMQ3d1Ie6pdu6A3+7
82
- rcv+CiLj9R6UkPQJiL1fyeHrL2ctojhbBQAA
83
- http_version:
84
- recorded_at: Wed, 17 Dec 2014 12:36:36 GMT
85
- - request:
86
- method: get
87
- uri: https://graph.facebook.com/act_10150585630710217?access_token=CAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD%0A&fields=account_groups,account_id,account_status,age,agency_client_declaration,amount_spent,balance,business_city,business_country_code,business_name,business_state,business_street2,business_street,business_zip,capabilities,created_time,currency,daily_spend_limit,end_advertiser,funding_source,funding_source_details,id,is_personal,media_agency,name,offsite_pixels_tos_accepted,partner,spend_cap,timezone_id,timezone_name,timezone_offset_hours_utc,tos_accepted,users,tax_id_status
88
- body:
89
- encoding: US-ASCII
90
- string: ''
91
- headers:
92
- User-Agent:
93
- - Faraday v0.8.9
94
- Accept-Encoding:
95
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
96
- Accept:
97
- - ! '*/*'
98
- response:
99
- status:
100
- code: 200
101
- message: !binary |-
102
- T0s=
103
- headers:
104
- !binary "RmFjZWJvb2stQXBpLVZlcnNpb24=":
105
- - !binary |-
106
- djEuMA==
30
+ MTY5MDEzMQ==
107
31
  !binary "RXRhZw==":
108
32
  - !binary |-
109
- IjY5ZTQxZmViMzM1Y2FkYmUxN2Q0ZGQwZDg1YmZkZmNlNDBmZDhlNTAi
110
- !binary "Q29udGVudC1UeXBl":
111
- - !binary |-
112
- YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD1VVEYtOA==
33
+ ImE2MDdkNDIyNTU3MGQxOTNkMTI1YThhZTA0NTJiYjAwNDZlZjM5ZDci
113
34
  !binary "UHJhZ21h":
114
35
  - !binary |-
115
36
  bm8tY2FjaGU=
116
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
117
- - !binary |-
118
- Kg==
119
- !binary "WC1GYi1SZXY=":
120
- - !binary |-
121
- MTUzNDg4NA==
122
37
  !binary "Q2FjaGUtQ29udHJvbA==":
123
38
  - !binary |-
124
39
  cHJpdmF0ZSwgbm8tY2FjaGUsIG5vLXN0b3JlLCBtdXN0LXJldmFsaWRhdGU=
40
+ !binary "RmFjZWJvb2stQXBpLVZlcnNpb24=":
41
+ - !binary |-
42
+ djIuMg==
125
43
  !binary "RXhwaXJlcw==":
126
44
  - !binary |-
127
45
  U2F0LCAwMSBKYW4gMjAwMCAwMDowMDowMCBHTVQ=
46
+ !binary "VmFyeQ==":
47
+ - !binary |-
48
+ QWNjZXB0LUVuY29kaW5n
128
49
  !binary "Q29udGVudC1FbmNvZGluZw==":
129
50
  - !binary |-
130
51
  Z3ppcA==
131
52
  !binary "WC1GYi1EZWJ1Zw==":
132
53
  - !binary |-
133
- b2IyZnY1VlhIQnFIcWc3QTRLWXN5L3J4TkIya1k5YXFPNFR0OVZPdEU2Z3N2
134
- N0p0clYzQXIraEhKYzRKOFE3Q3h3SWxEdDI0UjNDU0U5U0NnQVRNWHc9PQ==
54
+ Mit1bml5VGxBZDQrUi9rNEl5WlkxYk1LZTNZWXcybjhFYXloTDZIZ0tEM2t1
55
+ aVdxS1VaMER1ZFg4VC9zVWdoTTZZZWFNK3h6Y0JjMktjYjRROTRHd2c9PQ==
135
56
  !binary "RGF0ZQ==":
136
57
  - !binary |-
137
- V2VkLCAxNyBEZWMgMjAxNCAxMzoyMjowNyBHTVQ=
58
+ V2VkLCAxNSBBcHIgMjAxNSAwODozMTo1NSBHTVQ=
138
59
  !binary "Q29ubmVjdGlvbg==":
139
60
  - !binary |-
140
61
  a2VlcC1hbGl2ZQ==
141
62
  !binary "Q29udGVudC1MZW5ndGg=":
142
63
  - !binary |-
143
- Nzky
64
+ NzYx
144
65
  body:
145
66
  encoding: ASCII-8BIT
146
67
  string: !binary |-
147
- H4sIAAAAAAAAA6VUwW6bQBD9FYtTq5J0wRAc37DZEGobEGCnaROtNrC2V8GA
148
- 2EWKE+XfO4udyG0q9dATaObNzOMxb140mud1V0nCC22sGciwkT2yL4bIMZBp
149
- OJr+DhCSyk5oYwNCGwZPZBvno8uRM7Ic0zQhujvgGlZJbWwjhHTtgZa0ygGt
150
- 3jvBKyYEybncw7AJa0teaacJ1aDdw7OAEs3Dp8mK7lRwwjeDBX9kA7ds+WYr
151
- B0t/8GlL17KrNuKBiXzb3nUIMat6lJ9P6xX/vsGHsUK2jEkTct8OpRvWVkXd
152
- rlk7+MF4yQYXxkf8/3B55o1S2zTRJYRz2tAHXnLJGej7U4sTvAiWC8iE+IZM
153
- 3UXsBn5I0ixZTrNlolRZRJNgjonrrXCSBSlOSOCRZTyPXA+y8yiaufNg1gPc
154
- cIo9Mo3Cq8CHXJxEiZtBZLL0fJxBJLq6SoMMKwh0S4MoJNeBf00mger1NimO
155
- SYJx6Ls+XuAwg85pT3AWEQ+nsyyKgWm4ctMeesie1K4CD0fHMODIMsUkWACZ
156
- FVDxcQTha1W7coO5O4Gi2L3t5yxwdh39Vnbsir9nOAndOSB9TLLbWOnyTwy5
157
- ihIyj+MTbDT3gFifVWN6Gh5JcUYyNwGJglDp9oY+fAiwSoJpSiYJdmdedBNq
158
- 9/AfWwYrVhDJ+001kWGcIevMtDMTjU1jbDlfkImQ+uNd27IqVy5YpkrlgvJy
159
- 31unICXfcdguQzkIbLPuqoJXGyLqrlVO0obOCFnm0LAvLNt0LO1PCCmYhHaw
160
- Si9a7+qPBQUXTUn3apOhDiAx3ce0HBy9DkvMyrJWu2uhzX63ZW1Nm+Y8r3dq
161
- jeW+Uf4fvuqH/jSX5G+XgwvSsFbUFS37A3B0MGTq9VpwyUjDn1gpiKwFgdGs
162
- AfW08ZqWgunaQQzwxtstUbI+1xXrT5XlnASOjXHX1g27+/ru8HeAmsck2YI+
163
- gnQy769YJ4CcEqmgkoLvjmrZyHCG8AUX0ADo77gQvK6UMQ3d1Ie6pdu6A3+7
164
- rcv+CiLj9R6UkPQJiL1fyeHrL5WJX+JbBQAA
68
+ H4sIAAAAAAAAA4VUXW/bOBD8KwGfroCSo+TIdvwmW4yjRhYFfTgNrsWClZiU
69
+ gCwZIgXELfLfu7R9qdC73PlF1s7scne0wx9EVFU3tAZUTRZkMp25dDr1J8R5
70
+ A7QRZtBk4WLoWeLTv5pOp7Pr2XTuu3Mfo7sTby9bQxbUIV9FI9pKnv4PWrVS
71
+ a6iUOeAJZByyef0BnzWSSZmPwVbsbHAc0qaX0nj/Gj0FK7EXX1WjjJLY8V8k
72
+ zdgmKjeIJOwBVsEmDaJ1AnmRlauizBgCG76MYgZBuGVZEeUsgyiEMo15ECKa
73
+ ZjwLChbCsgzXrMAIv73No4LBiieYkUc8gbtofQfLyPL/rpamkDGWrIM127Ck
74
+ wPJ2uITdcwhZfl/wFLtJtkF+pJ7QUe42Chk/h+8saRtEcbBENA0ejwU3rLjj
75
+ RxzrQJkzOKezTwXLkiBG5ppB8ZjaIf+XA7c8gzhNR1weh9jBEX1rI4ScFVAE
76
+ GWoRJesR+9QxdpVFqxyWGQvuQ/6QIAOngNUtREle8IxBiJM8/pLzXBJ13nCr
77
+ M19+ZKvCivA+iJ+AZe/Ddqj/QKNPLLaN8yTBd/x+OZQRbD3yBfenl8LIGow6
78
+ Lp9HXfeSepeuX7h04d8s6PSSzinF9Groe9lWdqXL3H75WqjmcDRBDY3aKWOd
79
+ QvHnkKehrVX7DLobemsLMpl7rnc98+c+Gsnzye8UqKXBcrjCP8jJl/9IqJXe
80
+ N+Jgtx/zkJKKQyqai7NrL/5oZPd5oPSa7ob6qpYfMMcc9ta/k1fnVFVUBsaO
81
+ Vxr2stddK5qjd39ZsHt60spI2KsX2WgwnQY8SO5RK7J4Eo2WDjmNjg7EI+zU
82
+ VsPvXSuPN4s7ej+XDXayV5X4/GeM1YL2WTbo2RHNnikNfENFNAymIovLmUMG
83
+ jR1aXWphBFr8LJBrlfbofOZ7N3R2Q96a3whjvimhL+Kri48DHoIQDrlTWquu
84
+ tZeE63jOxLl2fGeGG9B3jdWIUvf1C+pkxAv2/3YH0tefLLpiHTEFAAA=
165
85
  http_version:
166
- recorded_at: Wed, 17 Dec 2014 13:22:08 GMT
86
+ recorded_at: Wed, 15 Apr 2015 08:31:57 GMT
167
87
  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/6021496142951?access_token=CAAEvJ5vzhl8BANgaZCvjMZCRsIbNZCSPswoDM0MTx8g30ojs53HUp43aVBVdqHnu9kIFytWIR5oRfp1Sy8DZBtJ9p5Rw2kY93ZAu6EwzHqZCrjmeBxXBWWlMCty1Bg4zKc3abdbjgoX4fWP4NWCEyWZCFJBKXWR0WV3ZC63bSqw7ojzYJm4teOarRc1GaesGIlIKlZB6s7EwZA1qUZCCKsdZCSsq%0A&fields=id,account_id,objective,name,adgroups,campaign_group_status,buying_type
5
+ uri: https://graph.facebook.com/v2.2/6024300271066?access_token=FAKEACCESSTOKEN&fields=id,account_id,objective,name,adgroups,campaign_group_status,buying_type
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -18,80 +18,34 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Facebook-Api-Version:
22
- - v1.0
23
- Etag:
24
- - ! '"55cae945ccdefc5bf670f4608a5f0e8a07da3ca5"'
25
21
  Content-Type:
26
22
  - application/json; charset=UTF-8
27
- Pragma:
28
- - no-cache
29
23
  Access-Control-Allow-Origin:
30
24
  - ! '*'
31
25
  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
- - TDmzWPYxzb7kY+T65g0Yuj8tnEqPT6SMSVC2qFAxRCOPtIxJtfhAgJdP5QABBj1Aem1IpCLvwdEt1u6EeRMPrg==
39
- Date:
40
- - Wed, 17 Dec 2014 12:36:36 GMT
41
- Connection:
42
- - keep-alive
43
- Content-Length:
44
- - '149'
45
- body:
46
- encoding: US-ASCII
47
- string: ! '{"id":"6021496142951","account_id":"10150585630710217","objective":"NONE","name":"bloody","campaign_group_status":"ARCHIVED","buying_type":"AUCTION"}'
48
- http_version:
49
- recorded_at: Wed, 17 Dec 2014 12:36:36 GMT
50
- - request:
51
- method: get
52
- uri: https://graph.facebook.com/6021496142951?access_token=CAAEvJ5vzhl8BAICOwypV5nYnYWXhBq1eskHA7rKyrz9fXcAvKRXDWVZAaG7FpQ21qTXeCtGZCR7iu1dtZCqZCZBZCQbefKrMOnZAibDZAiQKiX0s22PgtKuCoQK4LDVimREnqkGdoLMyB4zgT3A6ZAU7pn6wc2mTzZBWVbkr71bZBJKjhyeb4V58TkMsUbN9SQer3ZCRRtWTxqNFTUwHuv51RoVsI7LNw0mCr5gZD%0A&fields=id,account_id,objective,name,adgroups,campaign_group_status,buying_type
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
26
+ - '1690131'
70
27
  Etag:
71
- - ! '"55cae945ccdefc5bf670f4608a5f0e8a07da3ca5"'
72
- Content-Type:
73
- - application/json; charset=UTF-8
28
+ - ! '"9801ec532ea2dc636715160659a83fef119221fe"'
74
29
  Pragma:
75
30
  - no-cache
76
- Access-Control-Allow-Origin:
77
- - ! '*'
78
- X-Fb-Rev:
79
- - '1534884'
80
31
  Cache-Control:
81
32
  - private, no-cache, no-store, must-revalidate
33
+ Facebook-Api-Version:
34
+ - v2.2
82
35
  Expires:
83
36
  - Sat, 01 Jan 2000 00:00:00 GMT
84
37
  X-Fb-Debug:
85
- - V86//b5y3DAluaqXAobUriiP/KE10U4Nf0XSwmy5Hwx3EgiB0lyYvZUm43VbNdkJKJfVxXZVnGG7piKEw6WRRg==
38
+ - 5UCLtJvh95hsVRibQlf68HLk/6Bb20B+ztOQUpnjvi6sdS85JANtgXmMLs4fVU048KjMjkll0juYssyDrg94cw==
86
39
  Date:
87
- - Wed, 17 Dec 2014 13:22:06 GMT
40
+ - Wed, 15 Apr 2015 08:31:54 GMT
88
41
  Connection:
89
42
  - keep-alive
90
43
  Content-Length:
91
- - '149'
44
+ - '279'
92
45
  body:
93
46
  encoding: US-ASCII
94
- string: ! '{"id":"6021496142951","account_id":"10150585630710217","objective":"NONE","name":"bloody","campaign_group_status":"ARCHIVED","buying_type":"AUCTION"}'
47
+ string: ! '{"id":"6024300271066","account_id":"367106653","objective":"NONE","name":"bloody
48
+ campaign","adgroups":{"data":[{"id":"6024300273866"}],"paging":{"cursors":{"before":"NjAyNDMwMDI3Mzg2Ng==","after":"NjAyNDMwMDI3Mzg2Ng=="}}},"campaign_group_status":"PAUSED","buying_type":"AUCTION"}'
95
49
  http_version:
96
- recorded_at: Wed, 17 Dec 2014 13:22:06 GMT
50
+ recorded_at: Wed, 15 Apr 2015 08:31:56 GMT
97
51
  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/6010889111951?access_token=CAAEvJ5vzhl8BANgaZCvjMZCRsIbNZCSPswoDM0MTx8g30ojs53HUp43aVBVdqHnu9kIFytWIR5oRfp1Sy8DZBtJ9p5Rw2kY93ZAu6EwzHqZCrjmeBxXBWWlMCty1Bg4zKc3abdbjgoX4fWP4NWCEyWZCFJBKXWR0WV3ZC63bSqw7ojzYJm4teOarRc1GaesGIlIKlZB6s7EwZA1qUZCCKsdZCSsq%0A&fields=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
5
+ uri: https://graph.facebook.com/v2.2/6024300271066?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
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -18,84 +18,35 @@ http_interactions:
18
18
  code: 400
19
19
  message: Bad Request
20
20
  headers:
21
- Www-Authenticate:
22
- - OAuth "Facebook Platform" "invalid_request" "(#100) Tried accessing nonexisting
23
- field (adgroup_status) on node type (AdCampaign)"
24
- Facebook-Api-Version:
25
- - v1.0
26
21
  Content-Type:
27
22
  - application/json; charset=UTF-8
28
- Pragma:
29
- - no-cache
30
- Access-Control-Allow-Origin:
31
- - ! '*'
32
- X-Fb-Rev:
33
- - '1534884'
34
- Cache-Control:
35
- - no-store
36
- Expires:
37
- - Sat, 01 Jan 2000 00:00:00 GMT
38
- X-Fb-Debug:
39
- - hrNs+NUgfjltB+Mcigsj4m9nyfgFWa18yMJTzHaHxr0Q8LIamdF9T8BUNk1WiOwPEjirHLwVTAZQ574vvaKhOQ==
40
- Date:
41
- - Wed, 17 Dec 2014 12:36:36 GMT
42
- Connection:
43
- - keep-alive
44
- Content-Length:
45
- - '142'
46
- body:
47
- encoding: US-ASCII
48
- string: ! '{"error":{"message":"(#100) Tried accessing nonexisting field (adgroup_status)
49
- on node type (AdCampaign)","type":"OAuthException","code":100}}'
50
- http_version:
51
- recorded_at: Wed, 17 Dec 2014 12:36:36 GMT
52
- - request:
53
- method: get
54
- uri: https://graph.facebook.com/6010889111951?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
55
- body:
56
- encoding: US-ASCII
57
- string: ''
58
- headers:
59
- User-Agent:
60
- - Faraday v0.8.9
61
- Accept-Encoding:
62
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
- Accept:
64
- - ! '*/*'
65
- response:
66
- status:
67
- code: 400
68
- message: Bad Request
69
- headers:
70
23
  Www-Authenticate:
71
24
  - OAuth "Facebook Platform" "invalid_request" "(#100) Tried accessing nonexisting
72
- field (adgroup_status) on node type (AdCampaign)"
73
- Facebook-Api-Version:
74
- - v1.0
75
- Content-Type:
76
- - application/json; charset=UTF-8
77
- Pragma:
78
- - no-cache
25
+ field (conversion_specs) on node type (AdCampaignGroup)"
79
26
  Access-Control-Allow-Origin:
80
27
  - ! '*'
81
28
  X-Fb-Rev:
82
- - '1534884'
29
+ - '1690131'
30
+ Pragma:
31
+ - no-cache
83
32
  Cache-Control:
84
33
  - no-store
34
+ Facebook-Api-Version:
35
+ - v2.2
85
36
  Expires:
86
37
  - Sat, 01 Jan 2000 00:00:00 GMT
87
38
  X-Fb-Debug:
88
- - ZmwXEClzqPL6Geuc4uXD1l1e16OiLJcKYrPfkA7s9KAyECHHfiK/FFwDDnPpICTbziM09AAZxF0vIsYToh98fA==
39
+ - uxSjnwxJCE0Dju5khX6qboeaKCGJk6NIOMYECOgZN3IPt6B2/24plTKArWF7j4ucMu/+9zh3P6ia/1tQX0WjnA==
89
40
  Date:
90
- - Wed, 17 Dec 2014 13:22:08 GMT
41
+ - Wed, 15 Apr 2015 08:31:55 GMT
91
42
  Connection:
92
43
  - keep-alive
93
44
  Content-Length:
94
- - '142'
45
+ - '149'
95
46
  body:
96
47
  encoding: US-ASCII
97
- string: ! '{"error":{"message":"(#100) Tried accessing nonexisting field (adgroup_status)
98
- on node type (AdCampaign)","type":"OAuthException","code":100}}'
48
+ string: ! '{"error":{"message":"(#100) Tried accessing nonexisting field (conversion_specs)
49
+ on node type (AdCampaignGroup)","type":"OAuthException","code":100}}'
99
50
  http_version:
100
- recorded_at: Wed, 17 Dec 2014 13:22:08 GMT
51
+ recorded_at: Wed, 15 Apr 2015 08:31:57 GMT
101
52
  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/search?access_token=CAAEvJ5vzhl8BAPGZCZCPL4FxryEHXGxPCuCGeqe3PEWIjhIvJ00HB8PPpokFmUkemvmEUHirqdNMc7zIDLSTVnX6jTQjAgSlzcYrAYJRQ32fr6RM5ZAnKPdgFEwN5tgvswatXZAI4vu7ZBAQexRl9MU0CpwW7JDDBZAGo5XDrCKrBxkUUWJUvh&q=disney&type=adinterest
5
+ uri: https://graph.facebook.com/v2.2/search?access_token=FAKEACCESSTOKEN&q=disney&type=adinterest
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -18,39 +18,39 @@ http_interactions:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- Facebook-Api-Version:
22
- - v1.0
23
- Etag:
24
- - ! '"b0e223182b3f454da05345a3873cb31706b7cb78"'
25
21
  Content-Type:
26
22
  - application/json; charset=UTF-8
27
- Pragma:
28
- - no-cache
29
23
  Access-Control-Allow-Origin:
30
24
  - ! '*'
31
25
  X-Fb-Rev:
32
- - '1534884'
26
+ - '1690131'
27
+ Etag:
28
+ - ! '"c96808895690b89fe50155bf0d601fe15764b86c"'
29
+ Pragma:
30
+ - no-cache
33
31
  Cache-Control:
34
32
  - private, no-cache, no-store, must-revalidate
33
+ Facebook-Api-Version:
34
+ - v2.2
35
35
  Expires:
36
36
  - Sat, 01 Jan 2000 00:00:00 GMT
37
37
  X-Fb-Debug:
38
- - c5TS3GwP/Tzb2f929NEOK3kHE4cmKjRmmgdE02aqHGw7A/vmcgKszYotYyrb6eINCCOaQi9X4wYN+GOy3PRDnw==
38
+ - Sigzo9NNt4GA+WKHecGWop3xkFbNen/SwLg4G0q5imEVw67BlXjAwgputGXM98evMdn7N+zAKrQe6dJD5GKu1Q==
39
39
  Date:
40
- - Wed, 17 Dec 2014 13:24:51 GMT
40
+ - Wed, 15 Apr 2015 08:31:45 GMT
41
41
  Connection:
42
42
  - keep-alive
43
43
  Content-Length:
44
- - '850'
44
+ - '858'
45
45
  body:
46
46
  encoding: US-ASCII
47
- string: ! '{"data":[{"name":"The Walt Disney Company","id":6003270522085,"audience_size":144930320,"path":[],"description":null},{"name":"Walt
48
- Disney Pictures","id":6003050377616,"audience_size":75083700,"path":[],"description":null},{"name":"Walt
49
- Disney","id":6003284678611,"audience_size":66833180,"path":[],"description":null},{"name":"Walt
50
- Disney Parks and Resorts","id":6003318701218,"audience_size":53996790,"path":[],"description":null},{"name":"Disney.com","id":6003413951089,"audience_size":43788560,"path":[],"description":null},{"name":"Disney
51
- Interactive","id":6003311026888,"audience_size":42316480,"path":[],"description":null},{"name":"The
52
- Walt Disney Studios (division)","id":6007022518262,"audience_size":46006250,"path":[],"description":null},{"name":"Disney
53
- Channel","id":6003327130854,"audience_size":56498220,"path":[],"description":null}]}'
47
+ string: ! '{"data":[{"id":"6003270522085","name":"The Walt Disney Company","audience_size":157850860,"path":[],"description":null},{"id":"6003284678611","name":"Walt
48
+ Disney","audience_size":71107060,"path":[],"description":null},{"id":"6003050377616","name":"Walt
49
+ Disney Pictures","audience_size":73976190,"path":[],"description":null},{"id":"6003212182247","name":"Disney
50
+ Channel (Latin America)","audience_size":51049290,"path":[],"description":null},{"id":"6003663755307","name":"disney","audience_size":42628330,"path":[],"description":null},{"id":"6003327130854","name":"Disney
51
+ Channel","audience_size":59441180,"path":[],"description":null},{"id":"6003235403611","name":"Disney
52
+ on Ice","audience_size":43601380,"path":[],"description":null},{"id":"6007022518262","name":"The
53
+ Walt Disney Studios (division)","audience_size":53979150,"path":[],"description":null}]}'
54
54
  http_version:
55
- recorded_at: Wed, 17 Dec 2014 13:24:51 GMT
55
+ recorded_at: Wed, 15 Apr 2015 08:31:46 GMT
56
56
  recorded_with: VCR 2.3.0