facebookbusiness 0.4.0.9 → 0.5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6474560ec877bc5bbe870a3790f8de73bb4104e9109e8df7a96f01de5b02f089
4
- data.tar.gz: b83d2aef46ccb52e59c28e2db4da982d13051002546450e8463ec79f8a664cea
3
+ metadata.gz: 0ad7322969397c26892772dbd2033900d1ae9b73795b621e8d925bcc2f36fcca
4
+ data.tar.gz: 2c5723885a43abe8b17bd46b883a16278f68e1fc3c3fc7fd16811d9c006db4e9
5
5
  SHA512:
6
- metadata.gz: 21e4180f20489861a503a43c1dffb5294ff9de0ec6f6c69e31c8903e0898e3930c47874b35ad1048de721359fbd417d1e6be40db11ea619d07a3376818a9305f
7
- data.tar.gz: d9248ca74f27ecb1fbb70a882bef75fa42a77efb153ad7bb8de4bfcdc4ca8bdab8b863677e37ef6ce8705cded718ca545e46c961ece3d5b58a594f696a594fb1
6
+ metadata.gz: b045038ee0349ad331a0f6ddf2964135138fb7f4cbaeda0354a19cd65899bed271fe7a61000549409f404bb08b0bea669f02b593493f5a2a9893e2408d6fd3d3
7
+ data.tar.gz: 140b49c6c8eec6c0e20ae411938f7354a3da972292f731ff7e3ed4d8f849e05d584b87c995dc3b0d0e3515431d2284c86bcb4dbec1fb9b6fc880d0964bbc0df9
@@ -227,12 +227,6 @@ module FacebookAds
227
227
  end
228
228
  end
229
229
 
230
- has_edge :keywordstats do |edge|
231
- edge.get 'AdKeywordStats' do |api|
232
- api.has_param :date, 'datetime'
233
- end
234
- end
235
-
236
230
  has_edge :leads do |edge|
237
231
  edge.get 'Lead'
238
232
  end
@@ -202,7 +202,6 @@ module FacebookAds
202
202
  field :timezone_name, 'string'
203
203
  field :timezone_offset_hours_utc, 'double'
204
204
  field :tos_accepted, 'hash'
205
- field :user_role, 'string'
206
205
  field :user_tasks, { list: 'string' }
207
206
  field :user_tos_accepted, 'hash'
208
207
  has_no_delete
@@ -956,12 +955,6 @@ module FacebookAds
956
955
  edge.get 'InstagramUser'
957
956
  end
958
957
 
959
- has_edge :leadgen_forms do |edge|
960
- edge.get 'LeadgenForm' do |api|
961
- api.has_param :query, 'string'
962
- end
963
- end
964
-
965
958
  has_edge :matched_search_applications do |edge|
966
959
  edge.get 'AdAccountMatchedSearchApplicationsEdgeData' do |api|
967
960
  api.has_param :allow_incomplete_app, 'bool'
@@ -184,7 +184,6 @@ module FacebookAds
184
184
  field :conversion_rate_ranking, 'string'
185
185
  field :conversion_values, { list: 'AdsActionStats' }
186
186
  field :conversions, { list: 'AdsActionStats' }
187
- field :cost_per_10_sec_video_view, { list: 'AdsActionStats' }
188
187
  field :cost_per_15_sec_video_view, { list: 'AdsActionStats' }
189
188
  field :cost_per_2_sec_continuous_video_view, { list: 'AdsActionStats' }
190
189
  field :cost_per_action_result, 'AdsActionStats'
@@ -301,7 +300,6 @@ module FacebookAds
301
300
  field :reach, 'string'
302
301
  field :recurring_subscription_payment_actions, { list: 'AdsActionStats' }
303
302
  field :region, 'string'
304
- field :relevance_score, 'AdgroupRelevanceScore'
305
303
  field :rule_asset, 'object'
306
304
  field :schedule_actions, { list: 'AdsActionStats' }
307
305
  field :schedule_value, { list: 'AdsActionStats' }
@@ -330,10 +328,8 @@ module FacebookAds
330
328
  field :unique_outbound_clicks, { list: 'AdsActionStats' }
331
329
  field :unique_outbound_clicks_ctr, { list: 'AdsActionStats' }
332
330
  field :unique_video_continuous_2_sec_watched_actions, { list: 'AdsActionStats' }
333
- field :unique_video_view_10_sec, { list: 'AdsActionStats' }
334
331
  field :unique_video_view_15_sec, { list: 'AdsActionStats' }
335
332
  field :updated_time, 'string'
336
- field :video_10_sec_watched_actions, { list: 'AdsActionStats' }
337
333
  field :video_15_sec_watched_actions, { list: 'AdsActionStats' }
338
334
  field :video_30_sec_watched_actions, { list: 'AdsActionStats' }
339
335
  field :video_asset, 'object'
@@ -505,16 +505,6 @@ module FacebookAds
505
505
  end
506
506
  end
507
507
 
508
- has_edge :objects do |edge|
509
- edge.get 'OpenGraphObject' do |api|
510
- api.has_param :type, 'object'
511
- end
512
- edge.post 'OpenGraphObject' do |api|
513
- api.has_param :object, 'object'
514
- api.has_param :type, 'string'
515
- end
516
- end
517
-
518
508
  has_edge :occludespopups do |edge|
519
509
  edge.post do |api|
520
510
  api.has_param :flash, 'bool'
@@ -0,0 +1,185 @@
1
+ # Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
2
+ #
3
+ # You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
4
+ # copy, modify, and distribute this software in source code or binary form for use
5
+ # in connection with the web services and APIs provided by Facebook.
6
+ #
7
+ # As with any software that integrates with the Facebook platform, your use of
8
+ # this software is subject to the Facebook Platform Policy
9
+ # [http://developers.facebook.com/policy/]. This copyright notice shall be
10
+ # included in all copies or substantial portions of the software.
11
+ #
12
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
14
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
16
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
17
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18
+
19
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-generated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AtlasCampaign < AdObject
29
+
30
+ field :ad_platform, 'object'
31
+ field :alias, 'string'
32
+ field :clicks, 'int'
33
+ field :cost_per_1k_impressions, 'double'
34
+ field :cost_per_click, 'double'
35
+ field :cost_per_visit, 'double'
36
+ field :created_by, 'object'
37
+ field :created_date, 'datetime'
38
+ field :data_driven_convs, 'double'
39
+ field :data_driven_convs_per_100_clicks, 'double'
40
+ field :data_driven_convs_per_1k_impress, 'double'
41
+ field :data_driven_convs_per_click, 'double'
42
+ field :data_driven_convs_per_visit, 'double'
43
+ field :data_driven_cpa, 'double'
44
+ field :data_driven_nullable_convs, 'double'
45
+ field :data_driven_nullable_unattributed, 'double'
46
+ field :data_driven_revenue, 'double'
47
+ field :data_driven_roas, 'double'
48
+ field :data_driven_unattributed, 'double'
49
+ field :even_credit_convs, 'double'
50
+ field :even_credit_convs_per_100_clicks, 'double'
51
+ field :even_credit_convs_per_1k_impress, 'double'
52
+ field :even_credit_convs_per_click, 'double'
53
+ field :even_credit_convs_per_visit, 'double'
54
+ field :even_credit_cpa, 'double'
55
+ field :even_credit_revenue, 'double'
56
+ field :even_credit_roas, 'double'
57
+ field :even_credit_unattributed, 'double'
58
+ field :first_click_convs, 'double'
59
+ field :first_click_convs_per_100_clicks, 'double'
60
+ field :first_click_convs_per_1k_impress, 'double'
61
+ field :first_click_convs_per_click, 'double'
62
+ field :first_click_convs_per_visit, 'double'
63
+ field :first_click_cpa, 'double'
64
+ field :first_click_revenue, 'double'
65
+ field :first_click_roas, 'double'
66
+ field :first_click_unattributed, 'double'
67
+ field :first_touch_convs, 'double'
68
+ field :first_touch_convs_per_100_clicks, 'double'
69
+ field :first_touch_convs_per_1k_impress, 'double'
70
+ field :first_touch_convs_per_click, 'double'
71
+ field :first_touch_convs_per_visit, 'double'
72
+ field :first_touch_cpa, 'double'
73
+ field :first_touch_revenue, 'double'
74
+ field :first_touch_roas, 'double'
75
+ field :first_touch_unattributed, 'double'
76
+ field :id, 'string'
77
+ field :is_archived, 'bool'
78
+ field :last_click_convs, 'double'
79
+ field :last_click_convs_per_100_clicks, 'double'
80
+ field :last_click_convs_per_1k_impress, 'double'
81
+ field :last_click_convs_per_click, 'double'
82
+ field :last_click_convs_per_visit, 'double'
83
+ field :last_click_cpa, 'double'
84
+ field :last_click_revenue, 'double'
85
+ field :last_click_roas, 'double'
86
+ field :last_click_unattributed, 'double'
87
+ field :last_click_with_extrapolation_convs, 'double'
88
+ field :last_click_with_extrapolation_convs_per_100_clicks, 'double'
89
+ field :last_click_with_extrapolation_convs_per_1k_impress, 'double'
90
+ field :last_click_with_extrapolation_convs_per_click, 'double'
91
+ field :last_click_with_extrapolation_convs_per_visit, 'double'
92
+ field :last_click_with_extrapolation_cpa, 'double'
93
+ field :last_click_with_extrapolation_revenue, 'double'
94
+ field :last_click_with_extrapolation_roas, 'double'
95
+ field :last_click_with_extrapolation_unattributed, 'double'
96
+ field :last_modified_by, 'object'
97
+ field :last_modified_date, 'datetime'
98
+ field :last_touch_convs, 'double'
99
+ field :last_touch_convs_per_100_clicks, 'double'
100
+ field :last_touch_convs_per_1k_impress, 'double'
101
+ field :last_touch_convs_per_click, 'double'
102
+ field :last_touch_convs_per_visit, 'double'
103
+ field :last_touch_cpa, 'double'
104
+ field :last_touch_revenue, 'double'
105
+ field :last_touch_roas, 'double'
106
+ field :last_touch_unattributed, 'double'
107
+ field :name, 'string'
108
+ field :net_media_cost, 'double'
109
+ field :positional_30fl_convs, 'double'
110
+ field :positional_30fl_convs_per_100_clicks, 'double'
111
+ field :positional_30fl_convs_per_1k_impress, 'double'
112
+ field :positional_30fl_convs_per_click, 'double'
113
+ field :positional_30fl_convs_per_visit, 'double'
114
+ field :positional_30fl_cpa, 'double'
115
+ field :positional_30fl_revenue, 'double'
116
+ field :positional_30fl_roas, 'double'
117
+ field :positional_30fl_unattributed, 'double'
118
+ field :positional_40fl_convs, 'double'
119
+ field :positional_40fl_convs_per_100_clicks, 'double'
120
+ field :positional_40fl_convs_per_1k_impress, 'double'
121
+ field :positional_40fl_convs_per_click, 'double'
122
+ field :positional_40fl_convs_per_visit, 'double'
123
+ field :positional_40fl_cpa, 'double'
124
+ field :positional_40fl_revenue, 'double'
125
+ field :positional_40fl_roas, 'double'
126
+ field :positional_40fl_unattributed, 'double'
127
+ field :report_click_through_rate, 'double'
128
+ field :report_clicks, 'int'
129
+ field :report_impressions, 'int'
130
+ field :report_visits, 'int'
131
+ field :search_clicks, 'int'
132
+ field :time_decay_1day_convs, 'double'
133
+ field :time_decay_1day_convs_per_100_clicks, 'double'
134
+ field :time_decay_1day_convs_per_1k_impress, 'double'
135
+ field :time_decay_1day_convs_per_click, 'double'
136
+ field :time_decay_1day_convs_per_visit, 'double'
137
+ field :time_decay_1day_cpa, 'double'
138
+ field :time_decay_1day_revenue, 'double'
139
+ field :time_decay_1day_roas, 'double'
140
+ field :time_decay_1day_unattributed, 'double'
141
+ field :time_decay_7day_convs, 'double'
142
+ field :time_decay_7day_convs_per_100_clicks, 'double'
143
+ field :time_decay_7day_convs_per_1k_impress, 'double'
144
+ field :time_decay_7day_convs_per_click, 'double'
145
+ field :time_decay_7day_convs_per_visit, 'double'
146
+ field :time_decay_7day_cpa, 'double'
147
+ field :time_decay_7day_revenue, 'double'
148
+ field :time_decay_7day_roas, 'double'
149
+ field :time_decay_7day_unattributed, 'double'
150
+ field :type, 'string'
151
+ has_no_post
152
+ has_no_delete
153
+
154
+ has_edge :ad_sets do |edge|
155
+ edge.get do |api|
156
+ api.has_param :filter_by, 'string'
157
+ api.has_param :metric_scope, 'hash'
158
+ api.has_param :order_by, 'string'
159
+ end
160
+ end
161
+
162
+ has_edge :business_unit do |edge|
163
+ edge.get 'BusinessUnit'
164
+ end
165
+
166
+ has_edge :importtemplate do |edge|
167
+ edge.post 'AtlasCampaign' do |api|
168
+ api.has_param :export, 'string'
169
+ api.has_param :filename, 'string'
170
+ api.has_param :format, 'string'
171
+ api.has_param :template, 'string'
172
+ end
173
+ end
174
+
175
+ has_edge :metrics_breakdown do |edge|
176
+ edge.get do |api|
177
+ api.has_param :dimensions, { list: { enum: %w{DEVICE_TYPE SOURCE_CHANNEL }} }
178
+ api.has_param :granularity, { enum: %w{DAY HOUR MONTH WEEK YEAR }}
179
+ api.has_param :metric_scope, 'hash'
180
+ api.has_param :order_by, { list: 'string' }
181
+ end
182
+ end
183
+
184
+ end
185
+ end
@@ -463,12 +463,6 @@ module FacebookAds
463
463
  end
464
464
  end
465
465
 
466
- has_edge :owned_domains do |edge|
467
- edge.post do |api|
468
- api.has_param :domain_name, 'string'
469
- end
470
- end
471
-
472
466
  has_edge :owned_instagram_accounts do |edge|
473
467
  edge.get 'InstagramUser'
474
468
  end
@@ -550,6 +544,10 @@ module FacebookAds
550
544
  end
551
545
  end
552
546
 
547
+ has_edge :pixel_tos do |edge|
548
+ edge.get 'BusinessPixelTos'
549
+ end
550
+
553
551
  has_edge :received_audience_permissions do |edge|
554
552
  edge.get 'AudiencePermission' do |api|
555
553
  api.has_param :partner_id, 'string'
@@ -25,29 +25,10 @@ module FacebookAds
25
25
  # on github and we'll fix in our codegen framework. We'll not be able to accept
26
26
  # pull request for this class.
27
27
 
28
- class AdKeywordStats < AdObject
28
+ class BusinessPixelTos < AdObject
29
29
 
30
- field :actions, { list: 'AdsActionStats' }
31
- field :clicks, 'int'
32
- field :cost_per_total_action, 'double'
33
- field :cost_per_unique_click, 'double'
34
- field :cpc, 'double'
35
- field :cpm, 'double'
36
- field :cpp, 'double'
37
- field :ctr, 'double'
38
- field :frequency, 'double'
30
+ field :accept_time, 'int'
39
31
  field :id, 'string'
40
- field :impressions, 'int'
41
- field :name, 'string'
42
- field :reach, 'int'
43
- field :spend, 'double'
44
- field :total_actions, 'int'
45
- field :total_unique_actions, 'int'
46
- field :unique_actions, { list: 'AdsActionStats' }
47
- field :unique_clicks, 'int'
48
- field :unique_ctr, 'double'
49
- field :unique_impressions, 'int'
50
- has_no_get
51
32
  has_no_post
52
33
  has_no_delete
53
34
 
@@ -39,6 +39,14 @@ module FacebookAds
39
39
  has_no_post
40
40
  has_no_delete
41
41
 
42
+ has_edge :ad_platforms do |edge|
43
+ edge.get do |api|
44
+ api.has_param :filter_by, 'string'
45
+ api.has_param :metric_scope, 'hash'
46
+ api.has_param :order_by, 'string'
47
+ end
48
+ end
49
+
42
50
  has_edge :atlas_sales_accesses do |edge|
43
51
  edge.get
44
52
  edge.post do |api|
@@ -47,5 +55,26 @@ module FacebookAds
47
55
  end
48
56
  end
49
57
 
58
+ has_edge :custom_breakdowns do |edge|
59
+ edge.get do |api|
60
+ api.has_param :filter_by, 'string'
61
+ api.has_param :order_by, 'string'
62
+ end
63
+ end
64
+
65
+ has_edge :diagnostics do |edge|
66
+ edge.get do |api|
67
+ api.has_param :filter_by, 'string'
68
+ api.has_param :order_by, 'string'
69
+ end
70
+ end
71
+
72
+ has_edge :external_import_file do |edge|
73
+ edge.get do |api|
74
+ api.has_param :filter_by, 'string'
75
+ api.has_param :order_by, 'string'
76
+ end
77
+ end
78
+
50
79
  end
51
80
  end
@@ -114,12 +114,6 @@ module FacebookAds
114
114
  end
115
115
  end
116
116
 
117
- has_edge :private_replies do |edge|
118
- edge.post do |api|
119
- api.has_param :message, 'string'
120
- end
121
- end
122
-
123
117
  has_edge :reactions do |edge|
124
118
  edge.get 'Profile' do |api|
125
119
  api.has_param :type, { enum: -> { Profile::TYPE }}
@@ -42,7 +42,6 @@ module FacebookAds
42
42
  field :is_organic, 'bool'
43
43
  field :partner_name, 'string'
44
44
  field :platform, 'string'
45
- field :post, 'Link'
46
45
  field :retailer_item_id, 'string'
47
46
  field :vehicle, 'Vehicle'
48
47
  has_no_post
@@ -72,30 +72,22 @@ module FacebookAds
72
72
  field :block_display_for_non_targeted_viewer, 'bool'
73
73
  field :context_card, 'object'
74
74
  field :created_time, 'datetime'
75
- field :creator, 'User'
76
- field :creator_id, 'int'
77
- field :cusomized_tcpa_content, 'string'
78
75
  field :expired_leads_count, 'int'
79
- field :extra_details, { list: 'string' }
80
76
  field :follow_up_action_text, 'string'
81
77
  field :follow_up_action_url, 'string'
82
78
  field :id, 'string'
83
79
  field :is_optimized_for_quality, 'bool'
84
- field :leadgen_export_csv_url, 'string'
85
80
  field :leads_count, 'int'
86
81
  field :legal_content, 'object'
87
82
  field :locale, 'string'
88
- field :messenger_welcome_message, 'string'
89
83
  field :name, 'string'
90
84
  field :organic_leads_count, 'int'
91
85
  field :page, 'Page'
92
86
  field :page_id, 'string'
93
87
  field :privacy_policy_url, 'string'
94
- field :qualifiers, { list: 'object' }
95
88
  field :question_page_custom_headline, 'string'
96
89
  field :questions, { list: 'LeadGenQuestion' }
97
90
  field :status, 'string'
98
- field :tcpa_compliance, 'bool'
99
91
  field :thank_you_page, 'object'
100
92
  field :tracking_parameters, 'hash'
101
93
  has_no_delete
@@ -37,6 +37,7 @@ module FacebookAds
37
37
  field :amount_due, 'CurrencyAmount'
38
38
  field :billed_amount_details, 'BilledAmountDetails'
39
39
  field :billing_period, 'string'
40
+ field :campaign, 'AtlasCampaign'
40
41
  field :cdn_download_uri, 'string'
41
42
  field :currency, 'string'
42
43
  field :download_uri, 'string'
@@ -215,6 +215,7 @@ module FacebookAds
215
215
  "message_deliveries",
216
216
  "message_echoes",
217
217
  "message_mention",
218
+ "message_reactions",
218
219
  "message_reads",
219
220
  "messages",
220
221
  "messaging_account_linking",
@@ -350,8 +351,6 @@ module FacebookAds
350
351
  field :is_webhooks_subscribed, 'bool'
351
352
  field :keywords, 'object'
352
353
  field :leadgen_form_preview_details, 'LeadGenFormPreviewDetails'
353
- field :leadgen_has_crm_integration, 'bool'
354
- field :leadgen_has_fat_ping_crm_integration, 'bool'
355
354
  field :leadgen_tos_acceptance_time, 'datetime'
356
355
  field :leadgen_tos_accepted, 'bool'
357
356
  field :leadgen_tos_accepting_user, 'User'
@@ -906,12 +905,6 @@ module FacebookAds
906
905
  end
907
906
  end
908
907
 
909
- has_edge :message_creatives do |edge|
910
- edge.post 'Page' do |api|
911
- api.has_param :messages, { list: 'object' }
912
- end
913
- end
914
-
915
908
  has_edge :messages do |edge|
916
909
  edge.post 'Page' do |api|
917
910
  api.has_param :message, 'object'
@@ -208,12 +208,6 @@ module FacebookAds
208
208
  end
209
209
  end
210
210
 
211
- has_edge :private_replies do |edge|
212
- edge.post 'PagePost' do |api|
213
- api.has_param :message, 'string'
214
- end
215
- end
216
-
217
211
  has_edge :reactions do |edge|
218
212
  edge.get 'Profile' do |api|
219
213
  api.has_param :type, { enum: -> { Profile::TYPE }}
@@ -26,26 +26,6 @@ module FacebookAds
26
26
  # pull request for this class.
27
27
 
28
28
  class Post < AdObject
29
- BACKDATED_TIME_GRANULARITY = [
30
- "day",
31
- "hour",
32
- "min",
33
- "month",
34
- "none",
35
- "year",
36
- ]
37
-
38
- FEED_STORY_VISIBILITY = [
39
- "hidden",
40
- "visible",
41
- ]
42
-
43
- TIMELINE_VISIBILITY = [
44
- "forced_allow",
45
- "hidden",
46
- "normal",
47
- ]
48
-
49
29
  WITH = [
50
30
  "LOCATION",
51
31
  ]
@@ -112,103 +92,9 @@ module FacebookAds
112
92
  field :via, 'object'
113
93
  field :video_buying_eligibility, { list: 'string' }
114
94
  field :width, 'int'
115
-
116
- has_edge :attachments do |edge|
117
- edge.get
118
- end
119
-
120
- has_edge :comments do |edge|
121
- edge.get 'Comment' do |api|
122
- api.has_param :filter, { enum: -> { Comment::FILTER }}
123
- api.has_param :live_filter, { enum: -> { Comment::LIVE_FILTER }}
124
- api.has_param :order, { enum: -> { Comment::ORDER }}
125
- api.has_param :since, 'datetime'
126
- end
127
- edge.post 'Comment' do |api|
128
- api.has_param :attachment_id, 'string'
129
- api.has_param :attachment_share_url, 'string'
130
- api.has_param :attachment_url, 'string'
131
- api.has_param :comment, 'string'
132
- api.has_param :comment_privacy_value, { enum: -> { Comment::COMMENT_PRIVACY_VALUE }}
133
- api.has_param :feedback_source, 'string'
134
- api.has_param :message, 'string'
135
- api.has_param :nectar_module, 'string'
136
- api.has_param :parent_comment_id, 'object'
137
- api.has_param :post_id, 'string'
138
- api.has_param :tracking, 'string'
139
- end
140
- end
141
-
142
- has_edge :dynamic_posts do |edge|
143
- edge.get 'RtbDynamicPost'
144
- end
145
-
146
- has_edge :edit_actions do |edge|
147
- edge.get
148
- end
149
-
150
- has_edge :insights do |edge|
151
- edge.get 'InsightsResult' do |api|
152
- api.has_param :date_preset, { enum: -> { InsightsResult::DATE_PRESET }}
153
- api.has_param :metric, { list: 'object' }
154
- api.has_param :period, { enum: -> { InsightsResult::PERIOD }}
155
- api.has_param :since, 'datetime'
156
- api.has_param :until, 'datetime'
157
- end
158
- end
159
-
160
- has_edge :likes do |edge|
161
- edge.delete do |api|
162
- api.has_param :nectar_module, 'string'
163
- api.has_param :tracking, 'string'
164
- end
165
- edge.get 'Profile'
166
- edge.post 'Post' do |api|
167
- api.has_param :feedback_source, 'string'
168
- api.has_param :nectar_module, 'string'
169
- api.has_param :tracking, 'string'
170
- end
171
- end
172
-
173
- has_edge :promotions do |edge|
174
- edge.post do |api|
175
- api.has_param :ad_account_id, 'string'
176
- api.has_param :ad_conversion_pixel_id, 'int'
177
- api.has_param :audience, { enum: %w{AUTO_LOOKALIKE AUTO_PAGE_LOOKALIKE AUTO_TARGETING CREATE_NEW CUSTOM_AUDIENCE DISTRICT EVENT_CUSTOM_AUDIENCES EVENT_ENGAGEMENT FANS GROUPER HEC_AUDIENCE IG_PROMOTED_POST_AUTO LOCAL LOOKALIKE MULT_CUSTOM_AUDIENCES NCPP SAVED_AUDIENCE SMART_AUDIENCE }}
178
- api.has_param :audience_id, 'string'
179
- api.has_param :bid_amount, 'int'
180
- api.has_param :budget, 'int'
181
- api.has_param :cta_type, { enum: %w{ADD_TO_CART APPLY_NOW BOOK_TRAVEL BUY BUY_NOW BUY_TICKETS CALL CALL_ME CONTACT CONTACT_US DONATE DONATE_NOW DOWNLOAD EVENT_RSVP FIND_A_GROUP FIND_YOUR_GROUPS FOLLOW_NEWS_STORYLINE GET_DIRECTIONS GET_OFFER GET_OFFER_VIEW GET_QUOTE GET_SHOWTIMES INSTALL_APP INSTALL_MOBILE_APP LEARN_MORE LIKE_PAGE LISTEN_MUSIC LISTEN_NOW MESSAGE_PAGE MOBILE_DOWNLOAD MOMENTS NO_BUTTON OPEN_LINK ORDER_NOW PLAY_GAME RECORD_NOW SAY_THANKS SEE_MORE SELL_NOW SHARE SHOP_NOW SIGN_UP SOTTO_SUBSCRIBE SUBSCRIBE UPDATE_APP USE_APP USE_MOBILE_APP VIDEO_ANNOTATION VISIT_PAGES_FEED WATCH_MORE WATCH_VIDEO WHATSAPP_MESSAGE WOODHENGE_SUPPORT }}
182
- api.has_param :currency, 'string'
183
- api.has_param :flow_id, 'string'
184
- api.has_param :placement, 'string'
185
- api.has_param :start_time, 'int'
186
- api.has_param :stop_time, 'int'
187
- api.has_param :targeting, 'Targeting'
188
- end
189
- end
190
-
191
- has_edge :reactions do |edge|
192
- edge.get 'Profile' do |api|
193
- api.has_param :type, { enum: -> { Profile::TYPE }}
194
- end
195
- end
196
-
197
- has_edge :sharedposts do |edge|
198
- edge.get 'Post'
199
- end
200
-
201
- has_edge :sponsor_tags do |edge|
202
- edge.get 'Page'
203
- end
204
-
205
- has_edge :to do |edge|
206
- edge.get 'Profile'
207
- end
208
-
209
- has_edge :with_tags do |edge|
210
- edge.get 'Profile'
211
- end
95
+ has_no_get
96
+ has_no_post
97
+ has_no_delete
212
98
 
213
99
  end
214
100
  end
@@ -47,7 +47,7 @@ module FacebookAds
47
47
 
48
48
  has_edge :messages do |edge|
49
49
  edge.get do |api|
50
- api.has_param :source, { enum: %w{ALL USER }}
50
+ api.has_param :source, { enum: %w{ALL PARTICIPANTS }}
51
51
  api.has_param :user, 'int'
52
52
  end
53
53
  edge.post do |api|
@@ -1,3 +1,21 @@
1
+ # Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
2
+ #
3
+ # You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
4
+ # copy, modify, and distribute this software in source code or binary form for use
5
+ # in connection with the web services and APIs provided by Facebook.
6
+ #
7
+ # As with any software that integrates with the Facebook platform, your use of
8
+ # this software is subject to the Facebook Platform Policy
9
+ # [http://developers.facebook.com/policy/]. This copyright notice shall be
10
+ # included in all copies or substantial portions of the software.
11
+ #
12
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
14
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
16
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
17
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18
+
1
19
  require 'facebook_ads/api_request'
2
20
  require 'facebook_ads/api_response'
3
21
 
@@ -12,7 +30,6 @@ module FacebookAds
12
30
  error = $!
13
31
  if is_facebook_error(error)
14
32
  app_id = get_app_id
15
- # TODO: Determine what platform information should be logged
16
33
  if app_id.nil?
17
34
  puts "Unable to log the crash: We're missing an app id."
18
35
  return
@@ -24,14 +41,22 @@ module FacebookAds
24
41
  'callstack': error.backtrace
25
42
  }
26
43
  }
27
- APIRequest.new(
28
- :post,
29
- "#{app_id}/instruments",
30
- session: Session.anonymous_session,
31
- params: params,
32
- options: {} # batch options, not necessary for now
33
- ).execute do |response|
34
- puts response
44
+ begin
45
+ APIRequest.new(
46
+ :post,
47
+ "#{app_id}/instruments",
48
+ session: Session.anonymous_session,
49
+ params: params,
50
+ options: {} # batch options, not necessary for now
51
+ ).execute do |response|
52
+ if response.result.has_key?('success') && response.result['success'] == true
53
+ puts 'Successfully sent report'
54
+ return
55
+ end
56
+ puts 'Failed to send report'
57
+ end
58
+ rescue
59
+ puts 'Failed to send report'
35
60
  end
36
61
  end
37
62
  end
@@ -19,6 +19,6 @@
19
19
  # FB:AUTOGEN
20
20
 
21
21
  module FacebookAds
22
- VERSION = '0.4.0.9'
23
- API_VERSION = '4.0'
22
+ VERSION = '0.5.0.0'
23
+ API_VERSION = '5.0'
24
24
  end
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.4.0.9
4
+ version: 0.5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facebook
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -265,7 +265,6 @@ files:
265
265
  - lib/facebook_ads/ad_objects/ad_dynamic_creative.rb
266
266
  - lib/facebook_ads/ad_objects/ad_entity_target_spend.rb
267
267
  - lib/facebook_ads/ad_objects/ad_image.rb
268
- - lib/facebook_ads/ad_objects/ad_keyword_stats.rb
269
268
  - lib/facebook_ads/ad_objects/ad_keywords.rb
270
269
  - lib/facebook_ads/ad_objects/ad_label.rb
271
270
  - lib/facebook_ads/ad_objects/ad_monetization_property.rb
@@ -321,6 +320,7 @@ files:
321
320
  - lib/facebook_ads/ad_objects/assigned_user.rb
322
321
  - lib/facebook_ads/ad_objects/async_request.rb
323
322
  - lib/facebook_ads/ad_objects/async_session.rb
323
+ - lib/facebook_ads/ad_objects/atlas_campaign.rb
324
324
  - lib/facebook_ads/ad_objects/atlas_url.rb
325
325
  - lib/facebook_ads/ad_objects/attribution_spec.rb
326
326
  - lib/facebook_ads/ad_objects/audience_insights_study_spec.rb
@@ -343,6 +343,7 @@ files:
343
343
  - lib/facebook_ads/ad_objects/business_image.rb
344
344
  - lib/facebook_ads/ad_objects/business_owned_object_on_behalf_of_request.rb
345
345
  - lib/facebook_ads/ad_objects/business_page_request.rb
346
+ - lib/facebook_ads/ad_objects/business_pixel_tos.rb
346
347
  - lib/facebook_ads/ad_objects/business_project.rb
347
348
  - lib/facebook_ads/ad_objects/business_role_request.rb
348
349
  - lib/facebook_ads/ad_objects/business_unit.rb