1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved. |
4
|
|
|
* |
5
|
|
|
* You are hereby granted a non-exclusive, worldwide, royalty-free license to |
6
|
|
|
* use, copy, modify, and distribute this software in source code or binary |
7
|
|
|
* form for use in connection with the web services and APIs provided by |
8
|
|
|
* Facebook. |
9
|
|
|
* |
10
|
|
|
* As with any software that integrates with the Facebook platform, your use |
11
|
|
|
* of this software is subject to the Facebook Developer Principles and |
12
|
|
|
* Policies [http://developers.facebook.com/policy/]. This copyright notice |
13
|
|
|
* shall be included in all copies or substantial portions of the software. |
14
|
|
|
* |
15
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
18
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
20
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21
|
|
|
* DEALINGS IN THE SOFTWARE. |
22
|
|
|
* |
23
|
|
|
*/ |
24
|
|
|
|
25
|
|
|
namespace FacebookAds\Object; |
26
|
|
|
|
27
|
|
|
use FacebookAds\ApiRequest; |
28
|
|
|
use FacebookAds\Cursor; |
29
|
|
|
use FacebookAds\Http\RequestInterface; |
30
|
|
|
use FacebookAds\TypeChecker; |
31
|
|
|
use FacebookAds\Object\Fields\AdFields; |
32
|
|
|
use FacebookAds\Object\Values\AdBidTypeValues; |
33
|
|
|
use FacebookAds\Object\Values\AdConfiguredStatusValues; |
34
|
|
|
use FacebookAds\Object\Values\AdDatePresetValues; |
35
|
|
|
use FacebookAds\Object\Values\AdEffectiveStatusValues; |
36
|
|
|
use FacebookAds\Object\Values\AdExecutionOptionsValues; |
37
|
|
|
use FacebookAds\Object\Values\AdLabelExecutionOptionsValues; |
38
|
|
|
use FacebookAds\Object\Values\AdOperatorValues; |
39
|
|
|
use FacebookAds\Object\Values\AdPreviewAdFormatValues; |
40
|
|
|
use FacebookAds\Object\Values\AdStatusValues; |
41
|
|
|
use FacebookAds\Object\Values\AdsInsightsActionAttributionWindowsValues; |
42
|
|
|
use FacebookAds\Object\Values\AdsInsightsActionBreakdownsValues; |
43
|
|
|
use FacebookAds\Object\Values\AdsInsightsActionReportTimeValues; |
44
|
|
|
use FacebookAds\Object\Values\AdsInsightsBreakdownsValues; |
45
|
|
|
use FacebookAds\Object\Values\AdsInsightsDatePresetValues; |
46
|
|
|
use FacebookAds\Object\Values\AdsInsightsLevelValues; |
47
|
|
|
use FacebookAds\Object\Values\AdsInsightsSummaryActionBreakdownsValues; |
48
|
|
|
use FacebookAds\Object\Values\AdsInsightsSummaryValues; |
49
|
|
|
use FacebookAds\Object\Values\ReachEstimateOptimizeForValues; |
50
|
|
|
use FacebookAds\Object\Traits\AdLabelAwareCrudObjectTrait; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* This class is auto-genereated. |
54
|
|
|
* |
55
|
|
|
* For any issues or feature requests related to this class, please let us know |
56
|
|
|
* on github and we'll fix in our codegen framework. We'll not be able to accept |
57
|
|
|
* pull request for this class. |
58
|
|
|
* |
59
|
|
|
*/ |
60
|
|
|
|
61
|
|
|
class Ad extends AbstractArchivableCrudObject |
|
|
|
|
62
|
|
|
implements CanRedownloadInterface { |
|
|
|
|
63
|
|
|
|
64
|
|
|
use AdLabelAwareCrudObjectTrait; |
65
|
|
|
|
66
|
|
|
protected function getEndpoint() { |
67
|
|
|
return 'ads'; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return AdFields |
72
|
|
|
*/ |
73
|
|
|
public static function getFieldsEnum() { |
74
|
|
|
return AdFields::getInstance(); |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
protected static function getReferencedEnums() { |
78
|
|
|
$ref_enums = array(); |
79
|
|
|
$ref_enums['BidType'] = AdBidTypeValues::getInstance()->getValues(); |
80
|
|
|
$ref_enums['ConfiguredStatus'] = AdConfiguredStatusValues::getInstance()->getValues(); |
81
|
|
|
$ref_enums['EffectiveStatus'] = AdEffectiveStatusValues::getInstance()->getValues(); |
82
|
|
|
$ref_enums['Status'] = AdStatusValues::getInstance()->getValues(); |
83
|
|
|
$ref_enums['DatePreset'] = AdDatePresetValues::getInstance()->getValues(); |
84
|
|
|
$ref_enums['ExecutionOptions'] = AdExecutionOptionsValues::getInstance()->getValues(); |
85
|
|
|
$ref_enums['Operator'] = AdOperatorValues::getInstance()->getValues(); |
86
|
|
|
return $ref_enums; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
|
90
|
|
|
public function getAdCreatives(array $fields = array(), array $params = array(), $pending = false) { |
91
|
|
|
$this->assureId(); |
92
|
|
|
|
93
|
|
|
$param_types = array( |
94
|
|
|
); |
95
|
|
|
$enums = array( |
96
|
|
|
); |
97
|
|
|
|
98
|
|
|
$request = new ApiRequest( |
99
|
|
|
$this->api, |
100
|
|
|
$this->data['id'], |
101
|
|
|
RequestInterface::METHOD_GET, |
102
|
|
|
'/adcreatives', |
103
|
|
|
new AdCreative(), |
104
|
|
|
'EDGE', |
105
|
|
|
AdCreative::getFieldsEnum()->getValues(), |
106
|
|
|
new TypeChecker($param_types, $enums) |
107
|
|
|
); |
108
|
|
|
$request->addParams($params); |
109
|
|
|
$request->addFields($fields); |
110
|
|
|
return $pending ? $request : $request->execute(); |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
public function deleteAdLabels(array $fields = array(), array $params = array(), $pending = false) { |
114
|
|
|
$this->assureId(); |
115
|
|
|
|
116
|
|
|
$param_types = array( |
117
|
|
|
'adlabels' => 'list<Object>', |
118
|
|
|
'execution_options' => 'list<execution_options_enum>', |
119
|
|
|
'id' => 'string', |
120
|
|
|
); |
121
|
|
|
$enums = array( |
122
|
|
|
'execution_options_enum' => AdLabelExecutionOptionsValues::getInstance()->getValues(), |
123
|
|
|
); |
124
|
|
|
|
125
|
|
|
$request = new ApiRequest( |
126
|
|
|
$this->api, |
127
|
|
|
$this->data['id'], |
128
|
|
|
RequestInterface::METHOD_DELETE, |
129
|
|
|
'/adlabels', |
130
|
|
|
new AbstractCrudObject(), |
131
|
|
|
'EDGE', |
132
|
|
|
array(), |
133
|
|
|
new TypeChecker($param_types, $enums) |
134
|
|
|
); |
135
|
|
|
$request->addParams($params); |
136
|
|
|
$request->addFields($fields); |
137
|
|
|
return $pending ? $request : $request->execute(); |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
public function createAdLabel(array $fields = array(), array $params = array(), $pending = false) { |
141
|
|
|
$this->assureId(); |
142
|
|
|
|
143
|
|
|
$param_types = array( |
144
|
|
|
'adlabels' => 'list<Object>', |
145
|
|
|
'execution_options' => 'list<execution_options_enum>', |
146
|
|
|
'id' => 'string', |
147
|
|
|
); |
148
|
|
|
$enums = array( |
149
|
|
|
'execution_options_enum' => AdLabelExecutionOptionsValues::getInstance()->getValues(), |
150
|
|
|
); |
151
|
|
|
|
152
|
|
|
$request = new ApiRequest( |
153
|
|
|
$this->api, |
154
|
|
|
$this->data['id'], |
155
|
|
|
RequestInterface::METHOD_POST, |
156
|
|
|
'/adlabels', |
157
|
|
|
new AbstractCrudObject(), |
158
|
|
|
'EDGE', |
159
|
|
|
array(), |
160
|
|
|
new TypeChecker($param_types, $enums) |
161
|
|
|
); |
162
|
|
|
$request->addParams($params); |
163
|
|
|
$request->addFields($fields); |
164
|
|
|
return $pending ? $request : $request->execute(); |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
public function getInsights(array $fields = array(), array $params = array(), $pending = false) { |
168
|
|
|
$this->assureId(); |
169
|
|
|
|
170
|
|
|
$param_types = array( |
171
|
|
|
'action_attribution_windows' => 'list<action_attribution_windows_enum>', |
172
|
|
|
'action_breakdowns' => 'list<action_breakdowns_enum>', |
173
|
|
|
'action_report_time' => 'action_report_time_enum', |
174
|
|
|
'breakdowns' => 'list<breakdowns_enum>', |
175
|
|
|
'date_preset' => 'date_preset_enum', |
176
|
|
|
'default_summary' => 'bool', |
177
|
|
|
'fields' => 'list<fields_enum>', |
178
|
|
|
'filtering' => 'list<Object>', |
179
|
|
|
'level' => 'level_enum', |
180
|
|
|
'product_id_limit' => 'int', |
181
|
|
|
'sort' => 'list<string>', |
182
|
|
|
'summary' => 'list<summary_enum>', |
183
|
|
|
'summary_action_breakdowns' => 'list<summary_action_breakdowns_enum>', |
184
|
|
|
'time_increment' => 'string', |
185
|
|
|
'time_range' => 'map', |
186
|
|
|
'time_ranges' => 'list<map>', |
187
|
|
|
); |
188
|
|
|
$enums = array( |
189
|
|
|
'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(), |
190
|
|
|
'action_breakdowns_enum' => AdsInsightsActionBreakdownsValues::getInstance()->getValues(), |
191
|
|
|
'action_report_time_enum' => AdsInsightsActionReportTimeValues::getInstance()->getValues(), |
192
|
|
|
'breakdowns_enum' => AdsInsightsBreakdownsValues::getInstance()->getValues(), |
193
|
|
|
'date_preset_enum' => AdsInsightsDatePresetValues::getInstance()->getValues(), |
194
|
|
|
'summary_enum' => AdsInsightsSummaryValues::getInstance()->getValues(), |
195
|
|
|
'level_enum' => AdsInsightsLevelValues::getInstance()->getValues(), |
196
|
|
|
'summary_action_breakdowns_enum' => AdsInsightsSummaryActionBreakdownsValues::getInstance()->getValues(), |
197
|
|
|
); |
198
|
|
|
|
199
|
|
|
$request = new ApiRequest( |
200
|
|
|
$this->api, |
201
|
|
|
$this->data['id'], |
202
|
|
|
RequestInterface::METHOD_GET, |
203
|
|
|
'/insights', |
204
|
|
|
new AdsInsights(), |
205
|
|
|
'EDGE', |
206
|
|
|
AdsInsights::getFieldsEnum()->getValues(), |
207
|
|
|
new TypeChecker($param_types, $enums) |
208
|
|
|
); |
209
|
|
|
$request->addParams($params); |
210
|
|
|
$request->addFields($fields); |
211
|
|
|
return $pending ? $request : $request->execute(); |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
public function getInsightsAsync(array $fields = array(), array $params = array(), $pending = false) { |
215
|
|
|
$this->assureId(); |
216
|
|
|
|
217
|
|
|
$param_types = array( |
218
|
|
|
'action_attribution_windows' => 'list<action_attribution_windows_enum>', |
219
|
|
|
'action_breakdowns' => 'list<action_breakdowns_enum>', |
220
|
|
|
'action_report_time' => 'action_report_time_enum', |
221
|
|
|
'breakdowns' => 'list<breakdowns_enum>', |
222
|
|
|
'date_preset' => 'date_preset_enum', |
223
|
|
|
'default_summary' => 'bool', |
224
|
|
|
'fields' => 'list<fields_enum>', |
225
|
|
|
'filtering' => 'list<Object>', |
226
|
|
|
'level' => 'level_enum', |
227
|
|
|
'product_id_limit' => 'int', |
228
|
|
|
'sort' => 'list<string>', |
229
|
|
|
'summary' => 'list<summary_enum>', |
230
|
|
|
'summary_action_breakdowns' => 'list<summary_action_breakdowns_enum>', |
231
|
|
|
'time_increment' => 'string', |
232
|
|
|
'time_range' => 'map', |
233
|
|
|
'time_ranges' => 'list<map>', |
234
|
|
|
); |
235
|
|
|
$enums = array( |
236
|
|
|
'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(), |
237
|
|
|
'action_breakdowns_enum' => AdsInsightsActionBreakdownsValues::getInstance()->getValues(), |
238
|
|
|
'action_report_time_enum' => AdsInsightsActionReportTimeValues::getInstance()->getValues(), |
239
|
|
|
'breakdowns_enum' => AdsInsightsBreakdownsValues::getInstance()->getValues(), |
240
|
|
|
'date_preset_enum' => AdsInsightsDatePresetValues::getInstance()->getValues(), |
241
|
|
|
'summary_enum' => AdsInsightsSummaryValues::getInstance()->getValues(), |
242
|
|
|
'level_enum' => AdsInsightsLevelValues::getInstance()->getValues(), |
243
|
|
|
'summary_action_breakdowns_enum' => AdsInsightsSummaryActionBreakdownsValues::getInstance()->getValues(), |
244
|
|
|
); |
245
|
|
|
|
246
|
|
|
$request = new ApiRequest( |
247
|
|
|
$this->api, |
248
|
|
|
$this->data['id'], |
249
|
|
|
RequestInterface::METHOD_POST, |
250
|
|
|
'/insights', |
251
|
|
|
new AdReportRun(), |
252
|
|
|
'EDGE', |
253
|
|
|
AdReportRun::getFieldsEnum()->getValues(), |
254
|
|
|
new TypeChecker($param_types, $enums) |
255
|
|
|
); |
256
|
|
|
$request->addParams($params); |
257
|
|
|
$request->addFields($fields); |
258
|
|
|
return $pending ? $request : $request->execute(); |
259
|
|
|
} |
260
|
|
|
|
261
|
|
|
public function getKeywordStats(array $fields = array(), array $params = array(), $pending = false) { |
262
|
|
|
$this->assureId(); |
263
|
|
|
|
264
|
|
|
$param_types = array( |
265
|
|
|
'date' => 'datetime', |
266
|
|
|
); |
267
|
|
|
$enums = array( |
268
|
|
|
); |
269
|
|
|
|
270
|
|
|
$request = new ApiRequest( |
271
|
|
|
$this->api, |
272
|
|
|
$this->data['id'], |
273
|
|
|
RequestInterface::METHOD_GET, |
274
|
|
|
'/keywordstats', |
275
|
|
|
new AdKeywordStats(), |
276
|
|
|
'EDGE', |
277
|
|
|
AdKeywordStats::getFieldsEnum()->getValues(), |
278
|
|
|
new TypeChecker($param_types, $enums) |
279
|
|
|
); |
280
|
|
|
$request->addParams($params); |
281
|
|
|
$request->addFields($fields); |
282
|
|
|
return $pending ? $request : $request->execute(); |
283
|
|
|
} |
284
|
|
|
|
285
|
|
|
public function getLeads(array $fields = array(), array $params = array(), $pending = false) { |
286
|
|
|
$this->assureId(); |
287
|
|
|
|
288
|
|
|
$param_types = array( |
289
|
|
|
); |
290
|
|
|
$enums = array( |
291
|
|
|
); |
292
|
|
|
|
293
|
|
|
$request = new ApiRequest( |
294
|
|
|
$this->api, |
295
|
|
|
$this->data['id'], |
296
|
|
|
RequestInterface::METHOD_GET, |
297
|
|
|
'/leads', |
298
|
|
|
new Lead(), |
299
|
|
|
'EDGE', |
300
|
|
|
Lead::getFieldsEnum()->getValues(), |
301
|
|
|
new TypeChecker($param_types, $enums) |
302
|
|
|
); |
303
|
|
|
$request->addParams($params); |
304
|
|
|
$request->addFields($fields); |
305
|
|
|
return $pending ? $request : $request->execute(); |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
public function getPreviews(array $fields = array(), array $params = array(), $pending = false) { |
309
|
|
|
$this->assureId(); |
310
|
|
|
|
311
|
|
|
$param_types = array( |
312
|
|
|
'ad_format' => 'ad_format_enum', |
313
|
|
|
'height' => 'unsigned int', |
314
|
|
|
'locale' => 'string', |
315
|
|
|
'post' => 'Object', |
316
|
|
|
'product_item_ids' => 'list<int>', |
317
|
|
|
'width' => 'unsigned int', |
318
|
|
|
); |
319
|
|
|
$enums = array( |
320
|
|
|
'ad_format_enum' => AdPreviewAdFormatValues::getInstance()->getValues(), |
321
|
|
|
); |
322
|
|
|
|
323
|
|
|
$request = new ApiRequest( |
324
|
|
|
$this->api, |
325
|
|
|
$this->data['id'], |
326
|
|
|
RequestInterface::METHOD_GET, |
327
|
|
|
'/previews', |
328
|
|
|
new AdPreview(), |
329
|
|
|
'EDGE', |
330
|
|
|
AdPreview::getFieldsEnum()->getValues(), |
331
|
|
|
new TypeChecker($param_types, $enums) |
332
|
|
|
); |
333
|
|
|
$request->addParams($params); |
334
|
|
|
$request->addFields($fields); |
335
|
|
|
return $pending ? $request : $request->execute(); |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
public function getReachEstimate(array $fields = array(), array $params = array(), $pending = false) { |
339
|
|
|
$this->assureId(); |
340
|
|
|
|
341
|
|
|
$param_types = array( |
342
|
|
|
'currency' => 'string', |
343
|
|
|
'daily_budget' => 'float', |
344
|
|
|
'optimize_for' => 'optimize_for_enum', |
345
|
|
|
); |
346
|
|
|
$enums = array( |
347
|
|
|
'optimize_for_enum' => ReachEstimateOptimizeForValues::getInstance()->getValues(), |
348
|
|
|
); |
349
|
|
|
|
350
|
|
|
$request = new ApiRequest( |
351
|
|
|
$this->api, |
352
|
|
|
$this->data['id'], |
353
|
|
|
RequestInterface::METHOD_GET, |
354
|
|
|
'/reachestimate', |
355
|
|
|
new ReachEstimate(), |
356
|
|
|
'EDGE', |
357
|
|
|
ReachEstimate::getFieldsEnum()->getValues(), |
358
|
|
|
new TypeChecker($param_types, $enums) |
359
|
|
|
); |
360
|
|
|
$request->addParams($params); |
361
|
|
|
$request->addFields($fields); |
362
|
|
|
return $pending ? $request : $request->execute(); |
363
|
|
|
} |
364
|
|
|
|
365
|
|
|
public function getTargetingSentenceLines(array $fields = array(), array $params = array(), $pending = false) { |
366
|
|
|
$this->assureId(); |
367
|
|
|
|
368
|
|
|
$param_types = array( |
369
|
|
|
); |
370
|
|
|
$enums = array( |
371
|
|
|
); |
372
|
|
|
|
373
|
|
|
$request = new ApiRequest( |
374
|
|
|
$this->api, |
375
|
|
|
$this->data['id'], |
376
|
|
|
RequestInterface::METHOD_GET, |
377
|
|
|
'/targetingsentencelines', |
378
|
|
|
new TargetingSentenceLine(), |
379
|
|
|
'EDGE', |
380
|
|
|
TargetingSentenceLine::getFieldsEnum()->getValues(), |
381
|
|
|
new TypeChecker($param_types, $enums) |
382
|
|
|
); |
383
|
|
|
$request->addParams($params); |
384
|
|
|
$request->addFields($fields); |
385
|
|
|
return $pending ? $request : $request->execute(); |
386
|
|
|
} |
387
|
|
|
|
388
|
|
|
public function deleteSelf(array $fields = array(), array $params = array(), $pending = false) { |
389
|
|
|
$this->assureId(); |
390
|
|
|
|
391
|
|
|
$param_types = array( |
392
|
|
|
); |
393
|
|
|
$enums = array( |
394
|
|
|
); |
395
|
|
|
|
396
|
|
|
$request = new ApiRequest( |
397
|
|
|
$this->api, |
398
|
|
|
$this->data['id'], |
399
|
|
|
RequestInterface::METHOD_DELETE, |
400
|
|
|
'/', |
401
|
|
|
new AbstractCrudObject(), |
402
|
|
|
'NODE', |
403
|
|
|
array(), |
404
|
|
|
new TypeChecker($param_types, $enums) |
405
|
|
|
); |
406
|
|
|
$request->addParams($params); |
407
|
|
|
$request->addFields($fields); |
408
|
|
|
return $pending ? $request : $request->execute(); |
409
|
|
|
} |
410
|
|
|
|
411
|
|
|
public function getSelf(array $fields = array(), array $params = array(), $pending = false) { |
412
|
|
|
$this->assureId(); |
413
|
|
|
|
414
|
|
|
$param_types = array( |
415
|
|
|
); |
416
|
|
|
$enums = array( |
417
|
|
|
); |
418
|
|
|
|
419
|
|
|
$request = new ApiRequest( |
420
|
|
|
$this->api, |
421
|
|
|
$this->data['id'], |
422
|
|
|
RequestInterface::METHOD_GET, |
423
|
|
|
'/', |
424
|
|
|
new Ad(), |
425
|
|
|
'NODE', |
426
|
|
|
Ad::getFieldsEnum()->getValues(), |
427
|
|
|
new TypeChecker($param_types, $enums) |
428
|
|
|
); |
429
|
|
|
$request->addParams($params); |
430
|
|
|
$request->addFields($fields); |
431
|
|
|
return $pending ? $request : $request->execute(); |
432
|
|
|
} |
433
|
|
|
|
434
|
|
|
public function updateSelf(array $fields = array(), array $params = array(), $pending = false) { |
435
|
|
|
$this->assureId(); |
436
|
|
|
|
437
|
|
|
$param_types = array( |
438
|
|
|
'adlabels' => 'list<Object>', |
439
|
|
|
'adset_id' => 'unsigned int', |
440
|
|
|
'bid_amount' => 'int', |
441
|
|
|
'creative' => 'AdCreative', |
442
|
|
|
'display_sequence' => 'unsigned int', |
443
|
|
|
'execution_options' => 'list<execution_options_enum>', |
444
|
|
|
'name' => 'string', |
445
|
|
|
'redownload' => 'bool', |
446
|
|
|
'status' => 'status_enum', |
447
|
|
|
'tracking_specs' => 'Object', |
448
|
|
|
); |
449
|
|
|
$enums = array( |
450
|
|
|
'execution_options_enum' => AdExecutionOptionsValues::getInstance()->getValues(), |
451
|
|
|
'status_enum' => AdStatusValues::getInstance()->getValues(), |
452
|
|
|
); |
453
|
|
|
|
454
|
|
|
$request = new ApiRequest( |
455
|
|
|
$this->api, |
456
|
|
|
$this->data['id'], |
457
|
|
|
RequestInterface::METHOD_POST, |
458
|
|
|
'/', |
459
|
|
|
new AbstractCrudObject(), |
460
|
|
|
'NODE', |
461
|
|
|
array(), |
462
|
|
|
new TypeChecker($param_types, $enums) |
463
|
|
|
); |
464
|
|
|
$request->addParams($params); |
465
|
|
|
$request->addFields($fields); |
466
|
|
|
return $pending ? $request : $request->execute(); |
467
|
|
|
} |
468
|
|
|
|
469
|
|
|
/** |
470
|
|
|
* @deprecated use getPreviews instead |
471
|
|
|
*/ |
472
|
|
|
public function getAdPreviews( |
473
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
474
|
|
|
return $this->getPreviews($fields, $params, $pending); |
475
|
|
|
} |
476
|
|
|
|
477
|
|
|
/** |
478
|
|
|
* @deprecated use getTargetingSentenceLines instead |
479
|
|
|
*/ |
480
|
|
|
public function getTargetingDescription( |
481
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
482
|
|
|
return $this->getTargetingSentenceLines($fields, $params, $pending); |
483
|
|
|
} |
484
|
|
|
} |
485
|
|
|
|