facebookbusiness 0.3.0.6 → 0.3.1.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.
- checksums.yaml +4 -4
- data/lib/facebook_ads/ad_objects/ad_account.rb +11 -28
- data/lib/facebook_ads/ad_objects/ad_account_creation_request.rb +8 -0
- data/lib/facebook_ads/ad_objects/ad_account_user.rb +1 -2
- data/lib/facebook_ads/ad_objects/ad_activity.rb +1 -0
- data/lib/facebook_ads/ad_objects/ads_insights.rb +0 -7
- data/lib/facebook_ads/ad_objects/business.rb +1 -1
- data/lib/facebook_ads/ad_objects/custom_audience.rb +2 -2
- data/lib/facebook_ads/ad_objects/lead_gen_data_draft.rb +1 -0
- data/lib/facebook_ads/ad_objects/leadgen_form.rb +1 -0
- data/lib/facebook_ads/ad_objects/live_video.rb +5 -5
- data/lib/facebook_ads/ad_objects/page.rb +17 -44
- data/lib/facebook_ads/ad_objects/product_catalog.rb +1 -1
- data/lib/facebook_ads/ad_objects/user.rb +1 -3
- data/lib/facebook_ads/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b7ea1b7c4aba75ae4673a37f6cea42db70506c3a7ee51b00bf9b45faf7a4d55
|
4
|
+
data.tar.gz: 54c2e5dbdc2859100611f9d776601d3e7025463e1a039e18ded47286ae3795ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91690c40b28630d8f593154632ea249ce5ea157dae9f9cf7c7fc885ba48bb117f98f8bc59e58613b45d6a06dc088d06fd881cbfa001ea9328cfafca9f2cfff1b
|
7
|
+
data.tar.gz: 6bdcb5e258250f4686e24d37ba033ce79a3fdf973bbffb8362a2828386931b47b58a60866d6487c64a84cda1e9bf274b1343c67752dcfd5989b4d8453113f166
|
@@ -26,24 +26,16 @@ module FacebookAds
|
|
26
26
|
# pull request for this class.
|
27
27
|
|
28
28
|
class AdAccount < AdObject
|
29
|
-
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"INSTAGRAM_ADVERTISER",
|
34
|
-
"INSTAGRAM_MANAGER",
|
35
|
-
"CREATIVE",
|
36
|
-
"FB_EMPLOYEE_DSO_ADVERTISER",
|
29
|
+
PERMITTED_TASKS = [
|
30
|
+
"MANAGE",
|
31
|
+
"ADVERTISE",
|
32
|
+
"ANALYZE",
|
37
33
|
]
|
38
34
|
|
39
|
-
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"INSTAGRAM_ADVERTISER",
|
44
|
-
"INSTAGRAM_MANAGER",
|
45
|
-
"CREATIVE",
|
46
|
-
"FB_EMPLOYEE_DSO_ADVERTISER",
|
35
|
+
TASKS = [
|
36
|
+
"MANAGE",
|
37
|
+
"ADVERTISE",
|
38
|
+
"ANALYZE",
|
47
39
|
]
|
48
40
|
|
49
41
|
SUBTYPE = [
|
@@ -109,6 +101,7 @@ module FacebookAds
|
|
109
101
|
field :offsite_pixels_tos_accepted, 'bool'
|
110
102
|
field :owner, 'string'
|
111
103
|
field :partner, 'string'
|
104
|
+
field :rate_limit_reset_time, 'string'
|
112
105
|
field :rf_spec, 'ReachFrequencySpec'
|
113
106
|
field :show_checkout_experience, 'bool'
|
114
107
|
field :spend_cap, 'string'
|
@@ -402,7 +395,7 @@ module FacebookAds
|
|
402
395
|
end
|
403
396
|
edge.post 'AdAccount' do |api|
|
404
397
|
api.has_param :business, 'string'
|
405
|
-
api.has_param :
|
398
|
+
api.has_param :permitted_tasks, { list: { enum: -> { AdAccount::PERMITTED_TASKS }} }
|
406
399
|
end
|
407
400
|
end
|
408
401
|
|
@@ -418,7 +411,7 @@ module FacebookAds
|
|
418
411
|
api.has_param :business, 'string'
|
419
412
|
end
|
420
413
|
edge.post 'AdAccount' do |api|
|
421
|
-
api.has_param :
|
414
|
+
api.has_param :tasks, { list: { enum: -> { AdAccount::TASKS }} }
|
422
415
|
api.has_param :user, 'int'
|
423
416
|
end
|
424
417
|
end
|
@@ -645,16 +638,6 @@ module FacebookAds
|
|
645
638
|
edge.get 'AdsDataPartner'
|
646
639
|
end
|
647
640
|
|
648
|
-
has_edge :pending_users do |edge|
|
649
|
-
edge.delete do |api|
|
650
|
-
api.has_param :request_id, 'int'
|
651
|
-
end
|
652
|
-
edge.post 'AdAccount' do |api|
|
653
|
-
api.has_param :request_id, 'int'
|
654
|
-
api.has_param :role, { enum: -> { AdAccount::ROLE }}
|
655
|
-
end
|
656
|
-
end
|
657
|
-
|
658
641
|
has_edge :product_audiences do |edge|
|
659
642
|
edge.post 'CustomAudience' do |api|
|
660
643
|
api.has_param :associated_audience_id, 'int'
|
@@ -35,7 +35,9 @@ module FacebookAds
|
|
35
35
|
"APPAREL_AND_ACCESSORIES",
|
36
36
|
"ARTS",
|
37
37
|
"AUCTIONS",
|
38
|
+
"AUTO_AGENCY",
|
38
39
|
"AUTO_RENTAL",
|
40
|
+
"AUTOMOTIVE_MANUFACTURER",
|
39
41
|
"B2B",
|
40
42
|
"B2B_MANUFACTURING",
|
41
43
|
"BEAUTY_AND_PERSONAL_CARE",
|
@@ -57,6 +59,7 @@ module FacebookAds
|
|
57
59
|
"CVB_CONVENTION_AND_VISITORS_BUREAU",
|
58
60
|
"DAILYDEALS",
|
59
61
|
"DATING",
|
62
|
+
"DEALERSHIP",
|
60
63
|
"DEPARTMENT_STORE",
|
61
64
|
"DESKTOP_SOFTWARE",
|
62
65
|
"DIGITAL_ADVERTISING_AND_MARKETING_OR_UNTAGGED_AGENCIES",
|
@@ -80,11 +83,13 @@ module FacebookAds
|
|
80
83
|
"HOME_SERVICE",
|
81
84
|
"HOTEL_AND_ACCOMODATION",
|
82
85
|
"HOUSEHOLD_GOODS",
|
86
|
+
"INDUSTRIAL_AND_FARM_VEHICLE",
|
83
87
|
"INSURANCE",
|
84
88
|
"INVESTMENT_BANK_AND_BROKERAGE",
|
85
89
|
"MEDIA",
|
86
90
|
"MOBILE_AND_SOCIAL",
|
87
91
|
"MOBILE_APPS",
|
92
|
+
"MOTORCYCLES",
|
88
93
|
"MOVIES",
|
89
94
|
"MUSEUMS_AND_PARKS_AND_LIBRARIES",
|
90
95
|
"MUSIC_AND_RADIO",
|
@@ -93,6 +98,7 @@ module FacebookAds
|
|
93
98
|
"OFFICE",
|
94
99
|
"OIL_AND_GAS_AND_CONSUMABLE_FUEL",
|
95
100
|
"ONLINE_OR_SOFTWARE",
|
101
|
+
"PARTS_AND_SERVICE",
|
96
102
|
"PET",
|
97
103
|
"PET_RETAIL",
|
98
104
|
"PHARMACEUTICAL_OR_HEALTH",
|
@@ -101,6 +107,7 @@ module FacebookAds
|
|
101
107
|
"PR",
|
102
108
|
"PUBLISHING_INTERNET",
|
103
109
|
"RAILROADS",
|
110
|
+
"RECREATIONAL",
|
104
111
|
"REAL_ESTATE",
|
105
112
|
"REAL_MONEY_OR_SKILLED_GAMING",
|
106
113
|
"RELIGIOUS",
|
@@ -145,6 +152,7 @@ module FacebookAds
|
|
145
152
|
VERTICAL = [
|
146
153
|
"ADVERTISING_AND_MARKETING",
|
147
154
|
"AUTO_AGENCY",
|
155
|
+
"AUTOMOTIVE",
|
148
156
|
"CONSUMER_PACKAGED_GOODS",
|
149
157
|
"CPG_AND_BEVERAGE",
|
150
158
|
"ECOMMERCE",
|
@@ -150,7 +150,6 @@ module FacebookAds
|
|
150
150
|
field :adset_id, 'string'
|
151
151
|
field :adset_name, 'string'
|
152
152
|
field :buying_type, 'string'
|
153
|
-
field :call_to_action_clicks, 'string'
|
154
153
|
field :campaign_id, 'string'
|
155
154
|
field :campaign_name, 'string'
|
156
155
|
field :canvas_avg_view_percent, 'string'
|
@@ -162,7 +161,6 @@ module FacebookAds
|
|
162
161
|
field :cost_per_inline_link_click, 'string'
|
163
162
|
field :cost_per_inline_post_engagement, 'string'
|
164
163
|
field :cost_per_outbound_click, { list: 'AdsActionStats' }
|
165
|
-
field :cost_per_total_action, 'string'
|
166
164
|
field :cost_per_unique_action_type, { list: 'AdsActionStats' }
|
167
165
|
field :cost_per_unique_click, 'string'
|
168
166
|
field :cost_per_unique_inline_link_click, 'string'
|
@@ -187,14 +185,10 @@ module FacebookAds
|
|
187
185
|
field :place_page_name, 'string'
|
188
186
|
field :reach, 'string'
|
189
187
|
field :relevance_score, 'AdgroupRelevanceScore'
|
190
|
-
field :social_clicks, 'string'
|
191
188
|
field :social_impressions, 'string'
|
192
|
-
field :social_reach, 'string'
|
193
189
|
field :social_spend, 'string'
|
194
190
|
field :spend, 'string'
|
195
191
|
field :total_action_value, 'string'
|
196
|
-
field :total_actions, 'string'
|
197
|
-
field :total_unique_actions, 'string'
|
198
192
|
field :unique_actions, { list: 'AdsActionStats' }
|
199
193
|
field :unique_clicks, 'string'
|
200
194
|
field :unique_ctr, 'string'
|
@@ -203,7 +197,6 @@ module FacebookAds
|
|
203
197
|
field :unique_link_clicks_ctr, 'string'
|
204
198
|
field :unique_outbound_clicks, { list: 'AdsActionStats' }
|
205
199
|
field :unique_outbound_clicks_ctr, { list: 'AdsActionStats' }
|
206
|
-
field :unique_social_clicks, 'string'
|
207
200
|
field :video_10_sec_watched_actions, { list: 'AdsActionStats' }
|
208
201
|
field :video_30_sec_watched_actions, { list: 'AdsActionStats' }
|
209
202
|
field :video_avg_percent_watched_actions, { list: 'AdsActionStats' }
|
@@ -273,7 +273,7 @@ module FacebookAds
|
|
273
273
|
edge.get 'AdAccount'
|
274
274
|
edge.post 'AdAccount' do |api|
|
275
275
|
api.has_param :adaccount_id, 'string'
|
276
|
-
api.has_param :
|
276
|
+
api.has_param :permitted_tasks, { list: { enum: -> { AdAccount::PERMITTED_TASKS }} }
|
277
277
|
end
|
278
278
|
end
|
279
279
|
|
@@ -36,12 +36,12 @@ module FacebookAds
|
|
36
36
|
]
|
37
37
|
|
38
38
|
CONTENT_TYPE = [
|
39
|
-
"AUTO_OFFER",
|
40
39
|
"DESTINATION",
|
41
40
|
"FLIGHT",
|
42
41
|
"HOME_LISTING",
|
43
42
|
"HOTEL",
|
44
43
|
"MEDIA_TITLE",
|
44
|
+
"PRODUCT",
|
45
45
|
"VEHICLE",
|
46
46
|
"VEHICLE_OFFER",
|
47
47
|
]
|
@@ -70,7 +70,6 @@ module FacebookAds
|
|
70
70
|
]
|
71
71
|
|
72
72
|
FIELDS = [
|
73
|
-
"id",
|
74
73
|
"account_id",
|
75
74
|
"approximate_count",
|
76
75
|
"customer_file_source",
|
@@ -78,6 +77,7 @@ module FacebookAds
|
|
78
77
|
"delivery_status",
|
79
78
|
"description",
|
80
79
|
"external_event_source",
|
80
|
+
"id",
|
81
81
|
"is_value_based",
|
82
82
|
"lookalike_audience_ids",
|
83
83
|
"lookalike_spec",
|
@@ -63,6 +63,11 @@ module FacebookAds
|
|
63
63
|
"CUBEMAP",
|
64
64
|
]
|
65
65
|
|
66
|
+
SOURCE = [
|
67
|
+
"target",
|
68
|
+
"owner",
|
69
|
+
]
|
70
|
+
|
66
71
|
SPATIAL_AUDIO_FORMAT = [
|
67
72
|
"ambiX_4",
|
68
73
|
]
|
@@ -73,11 +78,6 @@ module FacebookAds
|
|
73
78
|
"TOP_BOTTOM",
|
74
79
|
]
|
75
80
|
|
76
|
-
TYPE = [
|
77
|
-
"tagged",
|
78
|
-
"uploaded",
|
79
|
-
]
|
80
|
-
|
81
81
|
|
82
82
|
field :ad_break_config, 'object'
|
83
83
|
field :ad_break_failure_reason, 'string'
|
@@ -92,12 +92,14 @@ module FacebookAds
|
|
92
92
|
"Vietnamese",
|
93
93
|
]
|
94
94
|
|
95
|
-
|
96
|
-
"
|
97
|
-
"
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"
|
95
|
+
TASKS = [
|
96
|
+
"MANAGE",
|
97
|
+
"CREATE_CONTENT",
|
98
|
+
"MODERATE",
|
99
|
+
"MODERATE_COMMUNITY",
|
100
|
+
"ADVERTISE",
|
101
|
+
"ANALYZE",
|
102
|
+
"CREATE_LIVE_CONTENT",
|
101
103
|
]
|
102
104
|
|
103
105
|
LOCALE = [
|
@@ -311,7 +313,7 @@ module FacebookAds
|
|
311
313
|
api.has_param :business, 'string'
|
312
314
|
end
|
313
315
|
edge.post 'Page' do |api|
|
314
|
-
api.has_param :
|
316
|
+
api.has_param :tasks, { list: { enum: -> { Page::TASKS }} }
|
315
317
|
api.has_param :user, 'int'
|
316
318
|
end
|
317
319
|
end
|
@@ -638,10 +640,11 @@ module FacebookAds
|
|
638
640
|
api.has_param :legal_content_id, 'string'
|
639
641
|
api.has_param :locale, { enum: -> { Page::LOCALE }}
|
640
642
|
api.has_param :name, 'string'
|
641
|
-
api.has_param :privacy_policy, '
|
643
|
+
api.has_param :privacy_policy, 'hash'
|
642
644
|
api.has_param :question_page_custom_headline, 'string'
|
643
645
|
api.has_param :questions, { list: 'object' }
|
644
|
-
api.has_param :thank_you_page, '
|
646
|
+
api.has_param :thank_you_page, 'hash'
|
647
|
+
api.has_param :tracking_parameters, 'object'
|
645
648
|
end
|
646
649
|
end
|
647
650
|
|
@@ -650,19 +653,19 @@ module FacebookAds
|
|
650
653
|
api.has_param :allow_organic_lead_retrieval, 'bool'
|
651
654
|
api.has_param :block_display_for_non_targeted_viewer, 'bool'
|
652
655
|
api.has_param :context_card, 'object'
|
653
|
-
api.has_param :context_card_id, '
|
656
|
+
api.has_param :context_card_id, 'object'
|
654
657
|
api.has_param :cover_photo, 'file'
|
655
658
|
api.has_param :custom_disclaimer, 'object'
|
656
|
-
api.has_param :follow_up_action_url, '
|
659
|
+
api.has_param :follow_up_action_url, 'object'
|
657
660
|
api.has_param :is_optimized_for_quality, 'bool'
|
658
|
-
api.has_param :legal_content_id, '
|
661
|
+
api.has_param :legal_content_id, 'object'
|
659
662
|
api.has_param :locale, { enum: -> { Page::LOCALE }}
|
660
663
|
api.has_param :name, 'string'
|
661
664
|
api.has_param :privacy_policy, 'object'
|
662
665
|
api.has_param :question_page_custom_headline, 'string'
|
663
666
|
api.has_param :questions, { list: 'object' }
|
664
667
|
api.has_param :thank_you_page, 'object'
|
665
|
-
api.has_param :thank_you_page_id, '
|
668
|
+
api.has_param :thank_you_page_id, 'object'
|
666
669
|
end
|
667
670
|
end
|
668
671
|
|
@@ -702,7 +705,7 @@ module FacebookAds
|
|
702
705
|
has_edge :live_videos do |edge|
|
703
706
|
edge.get 'LiveVideo' do |api|
|
704
707
|
api.has_param :broadcast_status, { list: { enum: -> { LiveVideo::BROADCAST_STATUS }} }
|
705
|
-
api.has_param :
|
708
|
+
api.has_param :source, { enum: -> { LiveVideo::SOURCE }}
|
706
709
|
end
|
707
710
|
edge.post 'LiveVideo' do |api|
|
708
711
|
api.has_param :attribution_app_id, 'string'
|
@@ -853,23 +856,6 @@ module FacebookAds
|
|
853
856
|
end
|
854
857
|
end
|
855
858
|
|
856
|
-
has_edge :offers_v3 do |edge|
|
857
|
-
edge.post do |api|
|
858
|
-
api.has_param :availability_location, { enum: %w{both offline online }}
|
859
|
-
api.has_param :description, 'string'
|
860
|
-
api.has_param :destination_uri, 'string'
|
861
|
-
api.has_param :discount_code, 'string'
|
862
|
-
api.has_param :expiration_time, 'datetime'
|
863
|
-
api.has_param :hidden, 'bool'
|
864
|
-
api.has_param :photo_uris, { list: 'string' }
|
865
|
-
api.has_param :referrer, 'string'
|
866
|
-
api.has_param :schedule_time, 'datetime'
|
867
|
-
api.has_param :start_time, 'datetime'
|
868
|
-
api.has_param :terms_and_conditions, 'string'
|
869
|
-
api.has_param :video_ids, { list: 'string' }
|
870
|
-
end
|
871
|
-
end
|
872
|
-
|
873
859
|
has_edge :page_backed_instagram_accounts do |edge|
|
874
860
|
edge.post
|
875
861
|
end
|
@@ -882,19 +868,6 @@ module FacebookAds
|
|
882
868
|
end
|
883
869
|
end
|
884
870
|
|
885
|
-
has_edge :pending_users do |edge|
|
886
|
-
edge.delete do |api|
|
887
|
-
api.has_param :request_id, 'int'
|
888
|
-
end
|
889
|
-
edge.get 'BusinessRoleRequest' do |api|
|
890
|
-
api.has_param :business, 'int'
|
891
|
-
end
|
892
|
-
edge.post 'Page' do |api|
|
893
|
-
api.has_param :request_id, 'int'
|
894
|
-
api.has_param :role, { enum: -> { Page::ROLE }}
|
895
|
-
end
|
896
|
-
end
|
897
|
-
|
898
871
|
has_edge :photos do |edge|
|
899
872
|
edge.get 'Photo' do |api|
|
900
873
|
api.has_param :biz_tag_id, 'int'
|
@@ -223,7 +223,7 @@ module FacebookAds
|
|
223
223
|
has_edge :products do |edge|
|
224
224
|
edge.get 'ProductItem' do |api|
|
225
225
|
api.has_param :bulk_pagination, 'bool'
|
226
|
-
api.has_param :
|
226
|
+
api.has_param :filter, 'object'
|
227
227
|
end
|
228
228
|
edge.post 'ProductItem' do |api|
|
229
229
|
api.has_param :additional_image_urls, { list: 'string' }
|
@@ -51,12 +51,10 @@ module FacebookAds
|
|
51
51
|
field :installed, 'bool'
|
52
52
|
field :interested_in, { list: 'string' }
|
53
53
|
field :is_famedeeplinkinguser, 'bool'
|
54
|
-
field :is_payment_enabled, 'bool'
|
55
54
|
field :is_shared_login, 'bool'
|
56
55
|
field :is_verified, 'bool'
|
57
56
|
field :labels, { list: 'PageLabel' }
|
58
57
|
field :languages, { list: 'object' }
|
59
|
-
field :last_ad_referral, 'object'
|
60
58
|
field :last_name, 'string'
|
61
59
|
field :link, 'string'
|
62
60
|
field :local_news_megaphone_dismiss_status, 'bool'
|
@@ -165,7 +163,7 @@ module FacebookAds
|
|
165
163
|
has_edge :live_videos do |edge|
|
166
164
|
edge.get 'LiveVideo' do |api|
|
167
165
|
api.has_param :broadcast_status, { list: { enum: -> { LiveVideo::BROADCAST_STATUS }} }
|
168
|
-
api.has_param :
|
166
|
+
api.has_param :source, { enum: -> { LiveVideo::SOURCE }}
|
169
167
|
end
|
170
168
|
edge.post 'LiveVideo' do |api|
|
171
169
|
api.has_param :attribution_app_id, 'string'
|
data/lib/facebook_ads/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facebookbusiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
4
|
+
version: 0.3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Facebook
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|