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\AdAccountFields; |
32
|
|
|
use FacebookAds\Object\Values\AdAccountAccessTypeValues; |
33
|
|
|
use FacebookAds\Object\Values\AdAccountPermittedRolesValues; |
34
|
|
|
use FacebookAds\Object\Values\AdAccountRoasFieldsValues; |
35
|
|
|
use FacebookAds\Object\Values\AdAccountTargetingInsightsModeValues; |
36
|
|
|
use FacebookAds\Object\Values\AdAccountTargetingInsightsObjectiveValues; |
37
|
|
|
use FacebookAds\Object\Values\AdAccountTargetingInsightsRankModeValues; |
38
|
|
|
use FacebookAds\Object\Values\AdActivityCategoryValues; |
39
|
|
|
use FacebookAds\Object\Values\AdCreativeApplinkTreatmentValues; |
40
|
|
|
use FacebookAds\Object\Values\AdCreativeDynamicAdVoiceValues; |
41
|
|
|
use FacebookAds\Object\Values\AdCreativeOperatorValues; |
42
|
|
|
use FacebookAds\Object\Values\AdDatePresetValues; |
43
|
|
|
use FacebookAds\Object\Values\AdExecutionOptionsValues; |
44
|
|
|
use FacebookAds\Object\Values\AdOperatorValues; |
45
|
|
|
use FacebookAds\Object\Values\AdPreviewAdFormatValues; |
46
|
|
|
use FacebookAds\Object\Values\AdSetBillingEventValues; |
47
|
|
|
use FacebookAds\Object\Values\AdSetDatePresetValues; |
48
|
|
|
use FacebookAds\Object\Values\AdSetEffectiveStatusValues; |
49
|
|
|
use FacebookAds\Object\Values\AdSetExecutionOptionsValues; |
50
|
|
|
use FacebookAds\Object\Values\AdSetOperatorValues; |
51
|
|
|
use FacebookAds\Object\Values\AdSetOptimizationGoalValues; |
52
|
|
|
use FacebookAds\Object\Values\AdSetStatusValues; |
53
|
|
|
use FacebookAds\Object\Values\AdStatusValues; |
54
|
|
|
use FacebookAds\Object\Values\AdsInsightsActionAttributionWindowsValues; |
55
|
|
|
use FacebookAds\Object\Values\AdsInsightsActionBreakdownsValues; |
56
|
|
|
use FacebookAds\Object\Values\AdsInsightsActionReportTimeValues; |
57
|
|
|
use FacebookAds\Object\Values\AdsInsightsBreakdownsValues; |
58
|
|
|
use FacebookAds\Object\Values\AdsInsightsDatePresetValues; |
59
|
|
|
use FacebookAds\Object\Values\AdsInsightsLevelValues; |
60
|
|
|
use FacebookAds\Object\Values\AdsInsightsSummaryActionBreakdownsValues; |
61
|
|
|
use FacebookAds\Object\Values\AdsInsightsSummaryValues; |
62
|
|
|
use FacebookAds\Object\Values\CampaignDatePresetValues; |
63
|
|
|
use FacebookAds\Object\Values\CampaignDeleteStrategyValues; |
64
|
|
|
use FacebookAds\Object\Values\CampaignEffectiveStatusValues; |
65
|
|
|
use FacebookAds\Object\Values\CampaignExecutionOptionsValues; |
66
|
|
|
use FacebookAds\Object\Values\CampaignObjectiveValues; |
67
|
|
|
use FacebookAds\Object\Values\CampaignOperatorValues; |
68
|
|
|
use FacebookAds\Object\Values\CampaignStatusValues; |
69
|
|
|
use FacebookAds\Object\Values\CustomAudienceContentTypeValues; |
70
|
|
|
use FacebookAds\Object\Values\CustomAudienceFieldsValues; |
71
|
|
|
use FacebookAds\Object\Values\CustomAudienceSubtypeValues; |
72
|
|
|
use FacebookAds\Object\Values\CustomConversionCustomEventTypeValues; |
73
|
|
|
use FacebookAds\Object\Values\OffsitePixelTagValues; |
74
|
|
|
use FacebookAds\Object\Values\ReachEstimateOptimizeForValues; |
75
|
|
|
use FacebookAds\Object\Values\VideoUnpublishedContentTypeValues; |
76
|
|
|
use FacebookAds\Object\Values\VideoUploadPhaseValues; |
77
|
|
|
use FacebookAds\Object\Values\undefinedContentTypeValues; |
78
|
|
|
use FacebookAds\Object\Values\undefinedNotificationModeValues; |
79
|
|
|
use FacebookAds\Object\Values\undefinedSubtypeValues; |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* This class is auto-genereated. |
83
|
|
|
* |
84
|
|
|
* For any issues or feature requests related to this class, please let us know |
85
|
|
|
* on github and we'll fix in our codegen framework. We'll not be able to accept |
86
|
|
|
* pull request for this class. |
87
|
|
|
* |
88
|
|
|
*/ |
89
|
|
|
|
90
|
|
|
class AdAccount extends AbstractCrudObject { |
91
|
|
|
|
92
|
|
|
protected function getEndpoint() { |
93
|
|
|
return 'adaccounts'; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return AdAccountFields |
98
|
|
|
*/ |
99
|
|
|
public static function getFieldsEnum() { |
100
|
|
|
return AdAccountFields::getInstance(); |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
protected static function getReferencedEnums() { |
104
|
|
|
$ref_enums = array(); |
105
|
|
|
$ref_enums['AccessType'] = AdAccountAccessTypeValues::getInstance()->getValues(); |
106
|
|
|
$ref_enums['PermittedRoles'] = AdAccountPermittedRolesValues::getInstance()->getValues(); |
107
|
|
|
return $ref_enums; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
|
111
|
|
|
public function getActivities(array $fields = array(), array $params = array(), $pending = false) { |
112
|
|
|
$this->assureId(); |
113
|
|
|
|
114
|
|
|
$param_types = array( |
115
|
|
|
'add_children' => 'bool', |
116
|
|
|
'after' => 'string', |
117
|
|
|
'business_id' => 'string', |
118
|
|
|
'category' => 'category_enum', |
119
|
|
|
'extra_oids' => 'list<string>', |
120
|
|
|
'limit' => 'int', |
121
|
|
|
'oid' => 'string', |
122
|
|
|
'since' => 'datetime', |
123
|
|
|
'uid' => 'int', |
124
|
|
|
'until' => 'datetime', |
125
|
|
|
); |
126
|
|
|
$enums = array( |
127
|
|
|
'category_enum' => AdActivityCategoryValues::getInstance()->getValues(), |
128
|
|
|
); |
129
|
|
|
|
130
|
|
|
$request = new ApiRequest( |
131
|
|
|
$this->api, |
132
|
|
|
$this->data['id'], |
133
|
|
|
RequestInterface::METHOD_GET, |
134
|
|
|
'/activities', |
135
|
|
|
new AdActivity(), |
136
|
|
|
'EDGE', |
137
|
|
|
AdActivity::getFieldsEnum()->getValues(), |
138
|
|
|
new TypeChecker($param_types, $enums) |
139
|
|
|
); |
140
|
|
|
$request->addParams($params); |
141
|
|
|
$request->addFields($fields); |
142
|
|
|
return $pending ? $request : $request->execute(); |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
public function getAdPlacePageSets(array $fields = array(), array $params = array(), $pending = false) { |
146
|
|
|
$this->assureId(); |
147
|
|
|
|
148
|
|
|
$param_types = array( |
149
|
|
|
); |
150
|
|
|
$enums = array( |
151
|
|
|
); |
152
|
|
|
|
153
|
|
|
$request = new ApiRequest( |
154
|
|
|
$this->api, |
155
|
|
|
$this->data['id'], |
156
|
|
|
RequestInterface::METHOD_GET, |
157
|
|
|
'/ad_place_page_sets', |
158
|
|
|
new AdPlacePageSet(), |
159
|
|
|
'EDGE', |
160
|
|
|
AdPlacePageSet::getFieldsEnum()->getValues(), |
161
|
|
|
new TypeChecker($param_types, $enums) |
162
|
|
|
); |
163
|
|
|
$request->addParams($params); |
164
|
|
|
$request->addFields($fields); |
165
|
|
|
return $pending ? $request : $request->execute(); |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
public function createAdPlacePageSet(array $fields = array(), array $params = array(), $pending = false) { |
169
|
|
|
$this->assureId(); |
170
|
|
|
|
171
|
|
|
$param_types = array( |
172
|
|
|
'id' => 'string', |
173
|
|
|
'name' => 'string', |
174
|
|
|
'parent_page' => 'string', |
175
|
|
|
); |
176
|
|
|
$enums = array( |
177
|
|
|
); |
178
|
|
|
|
179
|
|
|
$request = new ApiRequest( |
180
|
|
|
$this->api, |
181
|
|
|
$this->data['id'], |
182
|
|
|
RequestInterface::METHOD_POST, |
183
|
|
|
'/ad_place_page_sets', |
184
|
|
|
new AdPlacePageSet(), |
185
|
|
|
'EDGE', |
186
|
|
|
AdPlacePageSet::getFieldsEnum()->getValues(), |
187
|
|
|
new TypeChecker($param_types, $enums) |
188
|
|
|
); |
189
|
|
|
$request->addParams($params); |
190
|
|
|
$request->addFields($fields); |
191
|
|
|
return $pending ? $request : $request->execute(); |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
public function getAdCreatives(array $fields = array(), array $params = array(), $pending = false) { |
195
|
|
|
$this->assureId(); |
196
|
|
|
|
197
|
|
|
$param_types = array( |
198
|
|
|
); |
199
|
|
|
$enums = array( |
200
|
|
|
); |
201
|
|
|
|
202
|
|
|
$request = new ApiRequest( |
203
|
|
|
$this->api, |
204
|
|
|
$this->data['id'], |
205
|
|
|
RequestInterface::METHOD_GET, |
206
|
|
|
'/adcreatives', |
207
|
|
|
new AdCreative(), |
208
|
|
|
'EDGE', |
209
|
|
|
AdCreative::getFieldsEnum()->getValues(), |
210
|
|
|
new TypeChecker($param_types, $enums) |
211
|
|
|
); |
212
|
|
|
$request->addParams($params); |
213
|
|
|
$request->addFields($fields); |
214
|
|
|
return $pending ? $request : $request->execute(); |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
public function createAdCreative(array $fields = array(), array $params = array(), $pending = false) { |
218
|
|
|
$this->assureId(); |
219
|
|
|
|
220
|
|
|
$param_types = array( |
221
|
|
|
'action_spec' => 'list<unsigned int>', |
222
|
|
|
'actor_id' => 'unsigned int', |
223
|
|
|
'actor_image_hash' => 'string', |
224
|
|
|
'actor_image_url' => 'string', |
225
|
|
|
'actor_name' => 'string', |
226
|
|
|
'adlabels' => 'list<Object>', |
227
|
|
|
'applink_treatment' => 'applink_treatment_enum', |
228
|
|
|
'body' => 'string', |
229
|
|
|
'call_to_action' => 'Object', |
230
|
|
|
'dynamic_ad_voice' => 'dynamic_ad_voice_enum', |
231
|
|
|
'follow_redirect' => 'bool', |
232
|
|
|
'id' => 'string', |
233
|
|
|
'image_crops' => 'map', |
234
|
|
|
'image_file' => 'string', |
235
|
|
|
'image_hash' => 'string', |
236
|
|
|
'image_url' => 'string', |
237
|
|
|
'instagram_actor_id' => 'string', |
238
|
|
|
'instagram_permalink_url' => 'string', |
239
|
|
|
'link_og_id' => 'string', |
240
|
|
|
'link_url' => 'string', |
241
|
|
|
'name' => 'string', |
242
|
|
|
'object_id' => 'unsigned int', |
243
|
|
|
'object_instagram_id' => 'unsigned int', |
244
|
|
|
'object_story_id' => 'string', |
245
|
|
|
'object_story_spec' => 'AdCreativeObjectStorySpec', |
246
|
|
|
'object_type' => 'string', |
247
|
|
|
'object_url' => 'string', |
248
|
|
|
'place_page_set_id' => 'string', |
249
|
|
|
'platform_customizations' => 'Object', |
250
|
|
|
'product_set_id' => 'string', |
251
|
|
|
'template_url' => 'string', |
252
|
|
|
'thumbnail_url' => 'string', |
253
|
|
|
'title' => 'string', |
254
|
|
|
'url_tags' => 'string', |
255
|
|
|
'video_id' => 'unsigned int', |
256
|
|
|
); |
257
|
|
|
$enums = array( |
258
|
|
|
'applink_treatment_enum' => AdCreativeApplinkTreatmentValues::getInstance()->getValues(), |
259
|
|
|
'dynamic_ad_voice_enum' => AdCreativeDynamicAdVoiceValues::getInstance()->getValues(), |
260
|
|
|
); |
261
|
|
|
|
262
|
|
|
$request = new ApiRequest( |
263
|
|
|
$this->api, |
264
|
|
|
$this->data['id'], |
265
|
|
|
RequestInterface::METHOD_POST, |
266
|
|
|
'/adcreatives', |
267
|
|
|
new AdCreative(), |
268
|
|
|
'EDGE', |
269
|
|
|
AdCreative::getFieldsEnum()->getValues(), |
270
|
|
|
new TypeChecker($param_types, $enums) |
271
|
|
|
); |
272
|
|
|
$request->addParams($params); |
273
|
|
|
$request->addFields($fields); |
274
|
|
|
return $pending ? $request : $request->execute(); |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
public function getAdCreativesByLabels(array $fields = array(), array $params = array(), $pending = false) { |
278
|
|
|
$this->assureId(); |
279
|
|
|
|
280
|
|
|
$param_types = array( |
281
|
|
|
'ad_label_ids' => 'list<string>', |
282
|
|
|
'operator' => 'operator_enum', |
283
|
|
|
); |
284
|
|
|
$enums = array( |
285
|
|
|
'operator_enum' => AdCreativeOperatorValues::getInstance()->getValues(), |
286
|
|
|
); |
287
|
|
|
|
288
|
|
|
$request = new ApiRequest( |
289
|
|
|
$this->api, |
290
|
|
|
$this->data['id'], |
291
|
|
|
RequestInterface::METHOD_GET, |
292
|
|
|
'/adcreativesbylabels', |
293
|
|
|
new AdCreative(), |
294
|
|
|
'EDGE', |
295
|
|
|
AdCreative::getFieldsEnum()->getValues(), |
296
|
|
|
new TypeChecker($param_types, $enums) |
297
|
|
|
); |
298
|
|
|
$request->addParams($params); |
299
|
|
|
$request->addFields($fields); |
300
|
|
|
return $pending ? $request : $request->execute(); |
301
|
|
|
} |
302
|
|
|
|
303
|
|
|
public function deleteAdImages(array $fields = array(), array $params = array(), $pending = false) { |
304
|
|
|
$this->assureId(); |
305
|
|
|
|
306
|
|
|
$param_types = array( |
307
|
|
|
'hash' => 'string', |
308
|
|
|
); |
309
|
|
|
$enums = array( |
310
|
|
|
); |
311
|
|
|
|
312
|
|
|
$request = new ApiRequest( |
313
|
|
|
$this->api, |
314
|
|
|
$this->data['id'], |
315
|
|
|
RequestInterface::METHOD_DELETE, |
316
|
|
|
'/adimages', |
317
|
|
|
new AdImage(), |
318
|
|
|
'EDGE', |
319
|
|
|
AdImage::getFieldsEnum()->getValues(), |
320
|
|
|
new TypeChecker($param_types, $enums) |
321
|
|
|
); |
322
|
|
|
$request->addParams($params); |
323
|
|
|
$request->addFields($fields); |
324
|
|
|
return $pending ? $request : $request->execute(); |
325
|
|
|
} |
326
|
|
|
|
327
|
|
|
public function getAdImages(array $fields = array(), array $params = array(), $pending = false) { |
328
|
|
|
$this->assureId(); |
329
|
|
|
|
330
|
|
|
$param_types = array( |
331
|
|
|
'hashes' => 'list<string>', |
332
|
|
|
'minheight' => 'unsigned int', |
333
|
|
|
'minwidth' => 'unsigned int', |
334
|
|
|
'name' => 'string', |
335
|
|
|
); |
336
|
|
|
$enums = array( |
337
|
|
|
); |
338
|
|
|
|
339
|
|
|
$request = new ApiRequest( |
340
|
|
|
$this->api, |
341
|
|
|
$this->data['id'], |
342
|
|
|
RequestInterface::METHOD_GET, |
343
|
|
|
'/adimages', |
344
|
|
|
new AdImage(), |
345
|
|
|
'EDGE', |
346
|
|
|
AdImage::getFieldsEnum()->getValues(), |
347
|
|
|
new TypeChecker($param_types, $enums) |
348
|
|
|
); |
349
|
|
|
$request->addParams($params); |
350
|
|
|
$request->addFields($fields); |
351
|
|
|
return $pending ? $request : $request->execute(); |
352
|
|
|
} |
353
|
|
|
|
354
|
|
|
public function createAdImage(array $fields = array(), array $params = array(), $pending = false) { |
355
|
|
|
$this->assureId(); |
356
|
|
|
|
357
|
|
|
$param_types = array( |
358
|
|
|
'bytes' => 'string', |
359
|
|
|
'copy_from' => 'Object', |
360
|
|
|
'zipbytes' => 'string', |
361
|
|
|
); |
362
|
|
|
$enums = array( |
363
|
|
|
); |
364
|
|
|
|
365
|
|
|
$request = new ApiRequest( |
366
|
|
|
$this->api, |
367
|
|
|
$this->data['id'], |
368
|
|
|
RequestInterface::METHOD_POST, |
369
|
|
|
'/adimages', |
370
|
|
|
new AdImage(), |
371
|
|
|
'EDGE', |
372
|
|
|
AdImage::getFieldsEnum()->getValues(), |
373
|
|
|
new TypeChecker($param_types, $enums), |
374
|
|
|
true |
375
|
|
|
); |
376
|
|
|
$request->addParams($params); |
377
|
|
|
$request->addFields($fields); |
378
|
|
|
return $pending ? $request : $request->execute(); |
379
|
|
|
} |
380
|
|
|
|
381
|
|
|
public function getAdLabels(array $fields = array(), array $params = array(), $pending = false) { |
382
|
|
|
$this->assureId(); |
383
|
|
|
|
384
|
|
|
$param_types = array( |
385
|
|
|
); |
386
|
|
|
$enums = array( |
387
|
|
|
); |
388
|
|
|
|
389
|
|
|
$request = new ApiRequest( |
390
|
|
|
$this->api, |
391
|
|
|
$this->data['id'], |
392
|
|
|
RequestInterface::METHOD_GET, |
393
|
|
|
'/adlabels', |
394
|
|
|
new AdLabel(), |
395
|
|
|
'EDGE', |
396
|
|
|
AdLabel::getFieldsEnum()->getValues(), |
397
|
|
|
new TypeChecker($param_types, $enums) |
398
|
|
|
); |
399
|
|
|
$request->addParams($params); |
400
|
|
|
$request->addFields($fields); |
401
|
|
|
return $pending ? $request : $request->execute(); |
402
|
|
|
} |
403
|
|
|
|
404
|
|
|
public function createAdLabel(array $fields = array(), array $params = array(), $pending = false) { |
405
|
|
|
$this->assureId(); |
406
|
|
|
|
407
|
|
|
$param_types = array( |
408
|
|
|
'id' => 'string', |
409
|
|
|
'name' => 'string', |
410
|
|
|
); |
411
|
|
|
$enums = array( |
412
|
|
|
); |
413
|
|
|
|
414
|
|
|
$request = new ApiRequest( |
415
|
|
|
$this->api, |
416
|
|
|
$this->data['id'], |
417
|
|
|
RequestInterface::METHOD_POST, |
418
|
|
|
'/adlabels', |
419
|
|
|
new AdLabel(), |
420
|
|
|
'EDGE', |
421
|
|
|
AdLabel::getFieldsEnum()->getValues(), |
422
|
|
|
new TypeChecker($param_types, $enums) |
423
|
|
|
); |
424
|
|
|
$request->addParams($params); |
425
|
|
|
$request->addFields($fields); |
426
|
|
|
return $pending ? $request : $request->execute(); |
427
|
|
|
} |
428
|
|
|
|
429
|
|
|
public function getAdReportRuns(array $fields = array(), array $params = array(), $pending = false) { |
430
|
|
|
$this->assureId(); |
431
|
|
|
|
432
|
|
|
$param_types = array( |
433
|
|
|
); |
434
|
|
|
$enums = array( |
435
|
|
|
); |
436
|
|
|
|
437
|
|
|
$request = new ApiRequest( |
438
|
|
|
$this->api, |
439
|
|
|
$this->data['id'], |
440
|
|
|
RequestInterface::METHOD_GET, |
441
|
|
|
'/adreportruns', |
442
|
|
|
new AdReportRun(), |
443
|
|
|
'EDGE', |
444
|
|
|
AdReportRun::getFieldsEnum()->getValues(), |
445
|
|
|
new TypeChecker($param_types, $enums) |
446
|
|
|
); |
447
|
|
|
$request->addParams($params); |
448
|
|
|
$request->addFields($fields); |
449
|
|
|
return $pending ? $request : $request->execute(); |
450
|
|
|
} |
451
|
|
|
|
452
|
|
|
public function getAdReportSchedules(array $fields = array(), array $params = array(), $pending = false) { |
453
|
|
|
$this->assureId(); |
454
|
|
|
|
455
|
|
|
$param_types = array( |
456
|
|
|
); |
457
|
|
|
$enums = array( |
458
|
|
|
); |
459
|
|
|
|
460
|
|
|
$request = new ApiRequest( |
461
|
|
|
$this->api, |
462
|
|
|
$this->data['id'], |
463
|
|
|
RequestInterface::METHOD_GET, |
464
|
|
|
'/adreportschedules', |
465
|
|
|
new AbstractCrudObject(), |
466
|
|
|
'EDGE', |
467
|
|
|
array(), |
468
|
|
|
new TypeChecker($param_types, $enums) |
469
|
|
|
); |
470
|
|
|
$request->addParams($params); |
471
|
|
|
$request->addFields($fields); |
472
|
|
|
return $pending ? $request : $request->execute(); |
473
|
|
|
} |
474
|
|
|
|
475
|
|
|
public function getAds(array $fields = array(), array $params = array(), $pending = false) { |
476
|
|
|
$this->assureId(); |
477
|
|
|
|
478
|
|
|
$param_types = array( |
479
|
|
|
'ad_draft_id' => 'string', |
480
|
|
|
'date_preset' => 'date_preset_enum', |
481
|
|
|
'effective_status' => 'list<string>', |
482
|
|
|
'include_deleted' => 'bool', |
483
|
|
|
'time_range' => 'map', |
484
|
|
|
'updated_since' => 'int', |
485
|
|
|
); |
486
|
|
|
$enums = array( |
487
|
|
|
'date_preset_enum' => AdDatePresetValues::getInstance()->getValues(), |
488
|
|
|
); |
489
|
|
|
|
490
|
|
|
$request = new ApiRequest( |
491
|
|
|
$this->api, |
492
|
|
|
$this->data['id'], |
493
|
|
|
RequestInterface::METHOD_GET, |
494
|
|
|
'/ads', |
495
|
|
|
new Ad(), |
496
|
|
|
'EDGE', |
497
|
|
|
Ad::getFieldsEnum()->getValues(), |
498
|
|
|
new TypeChecker($param_types, $enums) |
499
|
|
|
); |
500
|
|
|
$request->addParams($params); |
501
|
|
|
$request->addFields($fields); |
502
|
|
|
return $pending ? $request : $request->execute(); |
503
|
|
|
} |
504
|
|
|
|
505
|
|
|
public function createAd(array $fields = array(), array $params = array(), $pending = false) { |
506
|
|
|
$this->assureId(); |
507
|
|
|
|
508
|
|
|
$param_types = array( |
509
|
|
|
'adlabels' => 'list<Object>', |
510
|
|
|
'adset_id' => 'unsigned int', |
511
|
|
|
'bid_amount' => 'int', |
512
|
|
|
'creative' => 'AdCreative', |
513
|
|
|
'date_format' => 'string', |
514
|
|
|
'display_sequence' => 'unsigned int', |
515
|
|
|
'execution_options' => 'list<execution_options_enum>', |
516
|
|
|
'name' => 'string', |
517
|
|
|
'redownload' => 'bool', |
518
|
|
|
'status' => 'status_enum', |
519
|
|
|
'tracking_specs' => 'Object', |
520
|
|
|
); |
521
|
|
|
$enums = array( |
522
|
|
|
'execution_options_enum' => AdExecutionOptionsValues::getInstance()->getValues(), |
523
|
|
|
'status_enum' => AdStatusValues::getInstance()->getValues(), |
524
|
|
|
); |
525
|
|
|
|
526
|
|
|
$request = new ApiRequest( |
527
|
|
|
$this->api, |
528
|
|
|
$this->data['id'], |
529
|
|
|
RequestInterface::METHOD_POST, |
530
|
|
|
'/ads', |
531
|
|
|
new Ad(), |
532
|
|
|
'EDGE', |
533
|
|
|
Ad::getFieldsEnum()->getValues(), |
534
|
|
|
new TypeChecker($param_types, $enums), |
535
|
|
|
true |
536
|
|
|
); |
537
|
|
|
$request->addParams($params); |
538
|
|
|
$request->addFields($fields); |
539
|
|
|
return $pending ? $request : $request->execute(); |
540
|
|
|
} |
541
|
|
|
|
542
|
|
|
public function getAdsByLabels(array $fields = array(), array $params = array(), $pending = false) { |
543
|
|
|
$this->assureId(); |
544
|
|
|
|
545
|
|
|
$param_types = array( |
546
|
|
|
'ad_label_ids' => 'list<string>', |
547
|
|
|
'operator' => 'operator_enum', |
548
|
|
|
); |
549
|
|
|
$enums = array( |
550
|
|
|
'operator_enum' => AdOperatorValues::getInstance()->getValues(), |
551
|
|
|
); |
552
|
|
|
|
553
|
|
|
$request = new ApiRequest( |
554
|
|
|
$this->api, |
555
|
|
|
$this->data['id'], |
556
|
|
|
RequestInterface::METHOD_GET, |
557
|
|
|
'/adsbylabels', |
558
|
|
|
new Ad(), |
559
|
|
|
'EDGE', |
560
|
|
|
Ad::getFieldsEnum()->getValues(), |
561
|
|
|
new TypeChecker($param_types, $enums) |
562
|
|
|
); |
563
|
|
|
$request->addParams($params); |
564
|
|
|
$request->addFields($fields); |
565
|
|
|
return $pending ? $request : $request->execute(); |
566
|
|
|
} |
567
|
|
|
|
568
|
|
|
public function getAdSets(array $fields = array(), array $params = array(), $pending = false) { |
569
|
|
|
$this->assureId(); |
570
|
|
|
|
571
|
|
|
$param_types = array( |
572
|
|
|
'ad_draft_id' => 'string', |
573
|
|
|
'date_preset' => 'date_preset_enum', |
574
|
|
|
'effective_status' => 'list<effective_status_enum>', |
575
|
|
|
'include_deleted' => 'bool', |
576
|
|
|
'is_completed' => 'bool', |
577
|
|
|
'time_range' => 'map', |
578
|
|
|
); |
579
|
|
|
$enums = array( |
580
|
|
|
'date_preset_enum' => AdSetDatePresetValues::getInstance()->getValues(), |
581
|
|
|
'effective_status_enum' => AdSetEffectiveStatusValues::getInstance()->getValues(), |
582
|
|
|
); |
583
|
|
|
|
584
|
|
|
$request = new ApiRequest( |
585
|
|
|
$this->api, |
586
|
|
|
$this->data['id'], |
587
|
|
|
RequestInterface::METHOD_GET, |
588
|
|
|
'/adsets', |
589
|
|
|
new AdSet(), |
590
|
|
|
'EDGE', |
591
|
|
|
AdSet::getFieldsEnum()->getValues(), |
592
|
|
|
new TypeChecker($param_types, $enums) |
593
|
|
|
); |
594
|
|
|
$request->addParams($params); |
595
|
|
|
$request->addFields($fields); |
596
|
|
|
return $pending ? $request : $request->execute(); |
597
|
|
|
} |
598
|
|
|
|
599
|
|
|
public function createAdSet(array $fields = array(), array $params = array(), $pending = false) { |
600
|
|
|
$this->assureId(); |
601
|
|
|
|
602
|
|
|
$param_types = array( |
603
|
|
|
'adlabels' => 'list<Object>', |
604
|
|
|
'adset_schedule' => 'list<Object>', |
605
|
|
|
'bid_amount' => 'int', |
606
|
|
|
'billing_event' => 'billing_event_enum', |
607
|
|
|
'campaign_id' => 'string', |
608
|
|
|
'creative_sequence' => 'list<string>', |
609
|
|
|
'daily_budget' => 'unsigned int', |
610
|
|
|
'daily_imps' => 'unsigned int', |
611
|
|
|
'end_time' => 'datetime', |
612
|
|
|
'execution_options' => 'list<execution_options_enum>', |
613
|
|
|
'frequency_control_specs' => 'list<Object>', |
614
|
|
|
'is_autobid' => 'bool', |
615
|
|
|
'lifetime_budget' => 'unsigned int', |
616
|
|
|
'lifetime_imps' => 'unsigned int', |
617
|
|
|
'name' => 'string', |
618
|
|
|
'optimization_goal' => 'optimization_goal_enum', |
619
|
|
|
'pacing_type' => 'list<string>', |
620
|
|
|
'promoted_object' => 'Object', |
621
|
|
|
'redownload' => 'bool', |
622
|
|
|
'rf_prediction_id' => 'string', |
623
|
|
|
'rtb_flag' => 'bool', |
624
|
|
|
'start_time' => 'datetime', |
625
|
|
|
'status' => 'status_enum', |
626
|
|
|
'targeting' => 'Targeting', |
627
|
|
|
); |
628
|
|
|
$enums = array( |
629
|
|
|
'billing_event_enum' => AdSetBillingEventValues::getInstance()->getValues(), |
630
|
|
|
'execution_options_enum' => AdSetExecutionOptionsValues::getInstance()->getValues(), |
631
|
|
|
'optimization_goal_enum' => AdSetOptimizationGoalValues::getInstance()->getValues(), |
632
|
|
|
'status_enum' => AdSetStatusValues::getInstance()->getValues(), |
633
|
|
|
); |
634
|
|
|
|
635
|
|
|
$request = new ApiRequest( |
636
|
|
|
$this->api, |
637
|
|
|
$this->data['id'], |
638
|
|
|
RequestInterface::METHOD_POST, |
639
|
|
|
'/adsets', |
640
|
|
|
new AdSet(), |
641
|
|
|
'EDGE', |
642
|
|
|
AdSet::getFieldsEnum()->getValues(), |
643
|
|
|
new TypeChecker($param_types, $enums) |
644
|
|
|
); |
645
|
|
|
$request->addParams($params); |
646
|
|
|
$request->addFields($fields); |
647
|
|
|
return $pending ? $request : $request->execute(); |
648
|
|
|
} |
649
|
|
|
|
650
|
|
|
public function getAdSetsByLabels(array $fields = array(), array $params = array(), $pending = false) { |
651
|
|
|
$this->assureId(); |
652
|
|
|
|
653
|
|
|
$param_types = array( |
654
|
|
|
'ad_label_ids' => 'list<string>', |
655
|
|
|
'operator' => 'operator_enum', |
656
|
|
|
); |
657
|
|
|
$enums = array( |
658
|
|
|
'operator_enum' => AdSetOperatorValues::getInstance()->getValues(), |
659
|
|
|
); |
660
|
|
|
|
661
|
|
|
$request = new ApiRequest( |
662
|
|
|
$this->api, |
663
|
|
|
$this->data['id'], |
664
|
|
|
RequestInterface::METHOD_GET, |
665
|
|
|
'/adsetsbylabels', |
666
|
|
|
new AdSet(), |
667
|
|
|
'EDGE', |
668
|
|
|
AdSet::getFieldsEnum()->getValues(), |
669
|
|
|
new TypeChecker($param_types, $enums) |
670
|
|
|
); |
671
|
|
|
$request->addParams($params); |
672
|
|
|
$request->addFields($fields); |
673
|
|
|
return $pending ? $request : $request->execute(); |
674
|
|
|
} |
675
|
|
|
|
676
|
|
|
public function getAdsPixels(array $fields = array(), array $params = array(), $pending = false) { |
677
|
|
|
$this->assureId(); |
678
|
|
|
|
679
|
|
|
$param_types = array( |
680
|
|
|
); |
681
|
|
|
$enums = array( |
682
|
|
|
); |
683
|
|
|
|
684
|
|
|
$request = new ApiRequest( |
685
|
|
|
$this->api, |
686
|
|
|
$this->data['id'], |
687
|
|
|
RequestInterface::METHOD_GET, |
688
|
|
|
'/adspixels', |
689
|
|
|
new AdsPixel(), |
690
|
|
|
'EDGE', |
691
|
|
|
AdsPixel::getFieldsEnum()->getValues(), |
692
|
|
|
new TypeChecker($param_types, $enums) |
693
|
|
|
); |
694
|
|
|
$request->addParams($params); |
695
|
|
|
$request->addFields($fields); |
696
|
|
|
return $pending ? $request : $request->execute(); |
697
|
|
|
} |
698
|
|
|
|
699
|
|
|
public function createAdsPixel(array $fields = array(), array $params = array(), $pending = false) { |
700
|
|
|
$this->assureId(); |
701
|
|
|
|
702
|
|
|
$param_types = array( |
703
|
|
|
'name' => 'string', |
704
|
|
|
); |
705
|
|
|
$enums = array( |
706
|
|
|
); |
707
|
|
|
|
708
|
|
|
$request = new ApiRequest( |
709
|
|
|
$this->api, |
710
|
|
|
$this->data['id'], |
711
|
|
|
RequestInterface::METHOD_POST, |
712
|
|
|
'/adspixels', |
713
|
|
|
new AdsPixel(), |
714
|
|
|
'EDGE', |
715
|
|
|
AdsPixel::getFieldsEnum()->getValues(), |
716
|
|
|
new TypeChecker($param_types, $enums) |
717
|
|
|
); |
718
|
|
|
$request->addParams($params); |
719
|
|
|
$request->addFields($fields); |
720
|
|
|
return $pending ? $request : $request->execute(); |
721
|
|
|
} |
722
|
|
|
|
723
|
|
|
public function getAdvertisableApplications(array $fields = array(), array $params = array(), $pending = false) { |
724
|
|
|
$this->assureId(); |
725
|
|
|
|
726
|
|
|
$param_types = array( |
727
|
|
|
'app_id' => 'string', |
728
|
|
|
'business_id' => 'string', |
729
|
|
|
); |
730
|
|
|
$enums = array( |
731
|
|
|
); |
732
|
|
|
|
733
|
|
|
$request = new ApiRequest( |
734
|
|
|
$this->api, |
735
|
|
|
$this->data['id'], |
736
|
|
|
RequestInterface::METHOD_GET, |
737
|
|
|
'/advertisable_applications', |
738
|
|
|
new AbstractCrudObject(), |
739
|
|
|
'EDGE', |
740
|
|
|
array(), |
741
|
|
|
new TypeChecker($param_types, $enums) |
742
|
|
|
); |
743
|
|
|
$request->addParams($params); |
744
|
|
|
$request->addFields($fields); |
745
|
|
|
return $pending ? $request : $request->execute(); |
746
|
|
|
} |
747
|
|
|
|
748
|
|
|
public function getAdVideos(array $fields = array(), array $params = array(), $pending = false) { |
749
|
|
|
$this->assureId(); |
750
|
|
|
|
751
|
|
|
$param_types = array( |
752
|
|
|
); |
753
|
|
|
$enums = array( |
754
|
|
|
); |
755
|
|
|
|
756
|
|
|
$request = new ApiRequest( |
757
|
|
|
$this->api, |
758
|
|
|
$this->data['id'], |
759
|
|
|
RequestInterface::METHOD_GET, |
760
|
|
|
'/advideos', |
761
|
|
|
new AbstractCrudObject(), |
762
|
|
|
'EDGE', |
763
|
|
|
array(), |
764
|
|
|
new TypeChecker($param_types, $enums) |
765
|
|
|
); |
766
|
|
|
$request->addParams($params); |
767
|
|
|
$request->addFields($fields); |
768
|
|
|
return $pending ? $request : $request->execute(); |
769
|
|
|
} |
770
|
|
|
|
771
|
|
|
public function createAdVideo(array $fields = array(), array $params = array(), $pending = false) { |
772
|
|
|
$this->assureId(); |
773
|
|
|
|
774
|
|
|
$param_types = array( |
775
|
|
|
'composer_session_id' => 'string', |
776
|
|
|
'description' => 'string', |
777
|
|
|
'file_size' => 'unsigned int', |
778
|
|
|
'file_url' => 'string', |
779
|
|
|
'id' => 'string', |
780
|
|
|
'is_explicit_share' => 'bool', |
781
|
|
|
'manual_privacy' => 'bool', |
782
|
|
|
'name' => 'string', |
783
|
|
|
'og_action_type_id' => 'string', |
784
|
|
|
'og_icon_id' => 'string', |
785
|
|
|
'og_object_id' => 'string', |
786
|
|
|
'og_phrase' => 'string', |
787
|
|
|
'og_suggestion_mechanism' => 'string', |
788
|
|
|
'overwrite_id' => 'string', |
789
|
|
|
'slideshow_spec' => 'map', |
790
|
|
|
'start_offset' => 'unsigned int', |
791
|
|
|
'time_since_original_post' => 'unsigned int', |
792
|
|
|
'title' => 'string', |
793
|
|
|
'unpublished_content_type' => 'unpublished_content_type_enum', |
794
|
|
|
'upload_phase' => 'upload_phase_enum', |
795
|
|
|
'upload_session_id' => 'string', |
796
|
|
|
'video_file_chunk' => 'string', |
797
|
|
|
); |
798
|
|
|
$enums = array( |
799
|
|
|
'unpublished_content_type_enum' => array( |
800
|
|
|
'SCHEDULED', |
801
|
|
|
'DRAFT', |
802
|
|
|
'ADS_POST', |
803
|
|
|
), |
804
|
|
|
'upload_phase_enum' => array( |
805
|
|
|
'start', |
806
|
|
|
'transfer', |
807
|
|
|
'finish', |
808
|
|
|
'cancel', |
809
|
|
|
), |
810
|
|
|
); |
811
|
|
|
|
812
|
|
|
$request = new ApiRequest( |
813
|
|
|
$this->api, |
814
|
|
|
$this->data['id'], |
815
|
|
|
RequestInterface::METHOD_POST, |
816
|
|
|
'/advideos', |
817
|
|
|
new AbstractCrudObject(), |
818
|
|
|
'EDGE', |
819
|
|
|
array(), |
820
|
|
|
new TypeChecker($param_types, $enums), |
821
|
|
|
true, |
822
|
|
|
true |
823
|
|
|
); |
824
|
|
|
$request->addParams($params); |
825
|
|
|
$request->addFields($fields); |
826
|
|
|
return $pending ? $request : $request->execute(); |
827
|
|
|
} |
828
|
|
|
|
829
|
|
|
public function getApplications(array $fields = array(), array $params = array(), $pending = false) { |
830
|
|
|
$this->assureId(); |
831
|
|
|
|
832
|
|
|
$param_types = array( |
833
|
|
|
); |
834
|
|
|
$enums = array( |
835
|
|
|
); |
836
|
|
|
|
837
|
|
|
$request = new ApiRequest( |
838
|
|
|
$this->api, |
839
|
|
|
$this->data['id'], |
840
|
|
|
RequestInterface::METHOD_GET, |
841
|
|
|
'/applications', |
842
|
|
|
new AbstractCrudObject(), |
843
|
|
|
'EDGE', |
844
|
|
|
array(), |
845
|
|
|
new TypeChecker($param_types, $enums) |
846
|
|
|
); |
847
|
|
|
$request->addParams($params); |
848
|
|
|
$request->addFields($fields); |
849
|
|
|
return $pending ? $request : $request->execute(); |
850
|
|
|
} |
851
|
|
|
|
852
|
|
|
public function getAsyncAdRequestSets(array $fields = array(), array $params = array(), $pending = false) { |
853
|
|
|
$this->assureId(); |
854
|
|
|
|
855
|
|
|
$param_types = array( |
856
|
|
|
'is_completed' => 'bool', |
857
|
|
|
); |
858
|
|
|
$enums = array( |
859
|
|
|
); |
860
|
|
|
|
861
|
|
|
$request = new ApiRequest( |
862
|
|
|
$this->api, |
863
|
|
|
$this->data['id'], |
864
|
|
|
RequestInterface::METHOD_GET, |
865
|
|
|
'/asyncadrequestsets', |
866
|
|
|
new AdAsyncRequestSet(), |
867
|
|
|
'EDGE', |
868
|
|
|
AdAsyncRequestSet::getFieldsEnum()->getValues(), |
869
|
|
|
new TypeChecker($param_types, $enums) |
870
|
|
|
); |
871
|
|
|
$request->addParams($params); |
872
|
|
|
$request->addFields($fields); |
873
|
|
|
return $pending ? $request : $request->execute(); |
874
|
|
|
} |
875
|
|
|
|
876
|
|
|
public function createAsyncAdRequestSet(array $fields = array(), array $params = array(), $pending = false) { |
877
|
|
|
$this->assureId(); |
878
|
|
|
|
879
|
|
|
$param_types = array( |
880
|
|
|
'ad_specs' => 'list<map>', |
881
|
|
|
'id' => 'string', |
882
|
|
|
'name' => 'string', |
883
|
|
|
'notification_mode' => 'notification_mode_enum', |
884
|
|
|
'notification_uri' => 'string', |
885
|
|
|
); |
886
|
|
|
$enums = array( |
887
|
|
|
'notification_mode_enum' => array( |
888
|
|
|
'OFF', |
889
|
|
|
'ON_COMPLETE', |
890
|
|
|
), |
891
|
|
|
); |
892
|
|
|
|
893
|
|
|
$request = new ApiRequest( |
894
|
|
|
$this->api, |
895
|
|
|
$this->data['id'], |
896
|
|
|
RequestInterface::METHOD_POST, |
897
|
|
|
'/asyncadrequestsets', |
898
|
|
|
new AdAsyncRequestSet(), |
899
|
|
|
'EDGE', |
900
|
|
|
AdAsyncRequestSet::getFieldsEnum()->getValues(), |
901
|
|
|
new TypeChecker($param_types, $enums) |
902
|
|
|
); |
903
|
|
|
$request->addParams($params); |
904
|
|
|
$request->addFields($fields); |
905
|
|
|
return $pending ? $request : $request->execute(); |
906
|
|
|
} |
907
|
|
|
|
908
|
|
|
public function getBroadTargetingCategories(array $fields = array(), array $params = array(), $pending = false) { |
909
|
|
|
$this->assureId(); |
910
|
|
|
|
911
|
|
|
$param_types = array( |
912
|
|
|
'custom_categories_only' => 'bool', |
913
|
|
|
); |
914
|
|
|
$enums = array( |
915
|
|
|
); |
916
|
|
|
|
917
|
|
|
$request = new ApiRequest( |
918
|
|
|
$this->api, |
919
|
|
|
$this->data['id'], |
920
|
|
|
RequestInterface::METHOD_GET, |
921
|
|
|
'/broadtargetingcategories', |
922
|
|
|
new BroadTargetingCategories(), |
923
|
|
|
'EDGE', |
924
|
|
|
BroadTargetingCategories::getFieldsEnum()->getValues(), |
925
|
|
|
new TypeChecker($param_types, $enums) |
926
|
|
|
); |
927
|
|
|
$request->addParams($params); |
928
|
|
|
$request->addFields($fields); |
929
|
|
|
return $pending ? $request : $request->execute(); |
930
|
|
|
} |
931
|
|
|
|
932
|
|
|
public function deleteCampaigns(array $fields = array(), array $params = array(), $pending = false) { |
933
|
|
|
$this->assureId(); |
934
|
|
|
|
935
|
|
|
$param_types = array( |
936
|
|
|
'before_date' => 'datetime', |
937
|
|
|
'delete_strategy' => 'delete_strategy_enum', |
938
|
|
|
'id' => 'string', |
939
|
|
|
'object_count' => 'int', |
940
|
|
|
); |
941
|
|
|
$enums = array( |
942
|
|
|
'delete_strategy_enum' => CampaignDeleteStrategyValues::getInstance()->getValues(), |
943
|
|
|
); |
944
|
|
|
|
945
|
|
|
$request = new ApiRequest( |
946
|
|
|
$this->api, |
947
|
|
|
$this->data['id'], |
948
|
|
|
RequestInterface::METHOD_DELETE, |
949
|
|
|
'/campaigns', |
950
|
|
|
new Campaign(), |
951
|
|
|
'EDGE', |
952
|
|
|
Campaign::getFieldsEnum()->getValues(), |
953
|
|
|
new TypeChecker($param_types, $enums) |
954
|
|
|
); |
955
|
|
|
$request->addParams($params); |
956
|
|
|
$request->addFields($fields); |
957
|
|
|
return $pending ? $request : $request->execute(); |
958
|
|
|
} |
959
|
|
|
|
960
|
|
|
public function getCampaigns(array $fields = array(), array $params = array(), $pending = false) { |
961
|
|
|
$this->assureId(); |
962
|
|
|
|
963
|
|
|
$param_types = array( |
964
|
|
|
'ad_draft_id' => 'string', |
965
|
|
|
'date_preset' => 'date_preset_enum', |
966
|
|
|
'effective_status' => 'list<effective_status_enum>', |
967
|
|
|
'is_completed' => 'bool', |
968
|
|
|
'time_range' => 'map', |
969
|
|
|
); |
970
|
|
|
$enums = array( |
971
|
|
|
'date_preset_enum' => CampaignDatePresetValues::getInstance()->getValues(), |
972
|
|
|
'effective_status_enum' => CampaignEffectiveStatusValues::getInstance()->getValues(), |
973
|
|
|
); |
974
|
|
|
|
975
|
|
|
$request = new ApiRequest( |
976
|
|
|
$this->api, |
977
|
|
|
$this->data['id'], |
978
|
|
|
RequestInterface::METHOD_GET, |
979
|
|
|
'/campaigns', |
980
|
|
|
new Campaign(), |
981
|
|
|
'EDGE', |
982
|
|
|
Campaign::getFieldsEnum()->getValues(), |
983
|
|
|
new TypeChecker($param_types, $enums) |
984
|
|
|
); |
985
|
|
|
$request->addParams($params); |
986
|
|
|
$request->addFields($fields); |
987
|
|
|
return $pending ? $request : $request->execute(); |
988
|
|
|
} |
989
|
|
|
|
990
|
|
|
public function createCampaign(array $fields = array(), array $params = array(), $pending = false) { |
991
|
|
|
$this->assureId(); |
992
|
|
|
|
993
|
|
|
$param_types = array( |
994
|
|
|
'adlabels' => 'list<Object>', |
995
|
|
|
'buying_type' => 'string', |
996
|
|
|
'execution_options' => 'list<execution_options_enum>', |
997
|
|
|
'name' => 'string', |
998
|
|
|
'objective' => 'objective_enum', |
999
|
|
|
'promoted_object' => 'Object', |
1000
|
|
|
'spend_cap' => 'unsigned int', |
1001
|
|
|
'status' => 'status_enum', |
1002
|
|
|
); |
1003
|
|
|
$enums = array( |
1004
|
|
|
'execution_options_enum' => CampaignExecutionOptionsValues::getInstance()->getValues(), |
1005
|
|
|
'objective_enum' => CampaignObjectiveValues::getInstance()->getValues(), |
1006
|
|
|
'status_enum' => CampaignStatusValues::getInstance()->getValues(), |
1007
|
|
|
); |
1008
|
|
|
|
1009
|
|
|
$request = new ApiRequest( |
1010
|
|
|
$this->api, |
1011
|
|
|
$this->data['id'], |
1012
|
|
|
RequestInterface::METHOD_POST, |
1013
|
|
|
'/campaigns', |
1014
|
|
|
new Campaign(), |
1015
|
|
|
'EDGE', |
1016
|
|
|
Campaign::getFieldsEnum()->getValues(), |
1017
|
|
|
new TypeChecker($param_types, $enums) |
1018
|
|
|
); |
1019
|
|
|
$request->addParams($params); |
1020
|
|
|
$request->addFields($fields); |
1021
|
|
|
return $pending ? $request : $request->execute(); |
1022
|
|
|
} |
1023
|
|
|
|
1024
|
|
|
public function getCampaignsByLabels(array $fields = array(), array $params = array(), $pending = false) { |
1025
|
|
|
$this->assureId(); |
1026
|
|
|
|
1027
|
|
|
$param_types = array( |
1028
|
|
|
'ad_label_ids' => 'list<string>', |
1029
|
|
|
'operator' => 'operator_enum', |
1030
|
|
|
); |
1031
|
|
|
$enums = array( |
1032
|
|
|
'operator_enum' => CampaignOperatorValues::getInstance()->getValues(), |
1033
|
|
|
); |
1034
|
|
|
|
1035
|
|
|
$request = new ApiRequest( |
1036
|
|
|
$this->api, |
1037
|
|
|
$this->data['id'], |
1038
|
|
|
RequestInterface::METHOD_GET, |
1039
|
|
|
'/campaignsbylabels', |
1040
|
|
|
new Campaign(), |
1041
|
|
|
'EDGE', |
1042
|
|
|
Campaign::getFieldsEnum()->getValues(), |
1043
|
|
|
new TypeChecker($param_types, $enums) |
1044
|
|
|
); |
1045
|
|
|
$request->addParams($params); |
1046
|
|
|
$request->addFields($fields); |
1047
|
|
|
return $pending ? $request : $request->execute(); |
1048
|
|
|
} |
1049
|
|
|
|
1050
|
|
|
public function getCustomAudiences(array $fields = array(), array $params = array(), $pending = false) { |
1051
|
|
|
$this->assureId(); |
1052
|
|
|
|
1053
|
|
|
$param_types = array( |
1054
|
|
|
'fields' => 'list<fields_enum>', |
1055
|
|
|
'filtering' => 'list<Object>', |
1056
|
|
|
'pixel_id' => 'string', |
1057
|
|
|
); |
1058
|
|
|
$enums = array( |
1059
|
|
|
'fields_enum' => CustomAudienceFieldsValues::getInstance()->getValues(), |
1060
|
|
|
); |
1061
|
|
|
|
1062
|
|
|
$request = new ApiRequest( |
1063
|
|
|
$this->api, |
1064
|
|
|
$this->data['id'], |
1065
|
|
|
RequestInterface::METHOD_GET, |
1066
|
|
|
'/customaudiences', |
1067
|
|
|
new CustomAudience(), |
1068
|
|
|
'EDGE', |
1069
|
|
|
CustomAudience::getFieldsEnum()->getValues(), |
1070
|
|
|
new TypeChecker($param_types, $enums) |
1071
|
|
|
); |
1072
|
|
|
$request->addParams($params); |
1073
|
|
|
$request->addFields($fields); |
1074
|
|
|
return $pending ? $request : $request->execute(); |
1075
|
|
|
} |
1076
|
|
|
|
1077
|
|
|
public function createCustomAudience(array $fields = array(), array $params = array(), $pending = false) { |
1078
|
|
|
$this->assureId(); |
1079
|
|
|
|
1080
|
|
|
$param_types = array( |
1081
|
|
|
'content_type' => 'content_type_enum', |
1082
|
|
|
'description' => 'string', |
1083
|
|
|
'exclusions' => 'list<Object>', |
1084
|
|
|
'id' => 'string', |
1085
|
|
|
'inclusions' => 'list<Object>', |
1086
|
|
|
'list_of_accounts' => 'list<unsigned int>', |
1087
|
|
|
'lookalike_spec' => 'string', |
1088
|
|
|
'name' => 'string', |
1089
|
|
|
'opt_out_link' => 'string', |
1090
|
|
|
'origin_audience_id' => 'string', |
1091
|
|
|
'pixel_id' => 'unsigned int', |
1092
|
|
|
'prefill' => 'bool', |
1093
|
|
|
'product_set_id' => 'string', |
1094
|
|
|
'retention_days' => 'unsigned int', |
1095
|
|
|
'rule' => 'string', |
1096
|
|
|
'subtype' => 'subtype_enum', |
1097
|
|
|
); |
1098
|
|
|
$enums = array( |
1099
|
|
|
'content_type_enum' => CustomAudienceContentTypeValues::getInstance()->getValues(), |
1100
|
|
|
'subtype_enum' => CustomAudienceSubtypeValues::getInstance()->getValues(), |
1101
|
|
|
); |
1102
|
|
|
|
1103
|
|
|
$request = new ApiRequest( |
1104
|
|
|
$this->api, |
1105
|
|
|
$this->data['id'], |
1106
|
|
|
RequestInterface::METHOD_POST, |
1107
|
|
|
'/customaudiences', |
1108
|
|
|
new CustomAudience(), |
1109
|
|
|
'EDGE', |
1110
|
|
|
CustomAudience::getFieldsEnum()->getValues(), |
1111
|
|
|
new TypeChecker($param_types, $enums) |
1112
|
|
|
); |
1113
|
|
|
$request->addParams($params); |
1114
|
|
|
$request->addFields($fields); |
1115
|
|
|
return $pending ? $request : $request->execute(); |
1116
|
|
|
} |
1117
|
|
|
|
1118
|
|
|
public function getCustomAudiencesTos(array $fields = array(), array $params = array(), $pending = false) { |
1119
|
|
|
$this->assureId(); |
1120
|
|
|
|
1121
|
|
|
$param_types = array( |
1122
|
|
|
); |
1123
|
|
|
$enums = array( |
1124
|
|
|
); |
1125
|
|
|
|
1126
|
|
|
$request = new ApiRequest( |
1127
|
|
|
$this->api, |
1128
|
|
|
$this->data['id'], |
1129
|
|
|
RequestInterface::METHOD_GET, |
1130
|
|
|
'/customaudiencestos', |
1131
|
|
|
new CustomAudiencesTOS(), |
1132
|
|
|
'EDGE', |
1133
|
|
|
CustomAudiencesTOS::getFieldsEnum()->getValues(), |
1134
|
|
|
new TypeChecker($param_types, $enums) |
1135
|
|
|
); |
1136
|
|
|
$request->addParams($params); |
1137
|
|
|
$request->addFields($fields); |
1138
|
|
|
return $pending ? $request : $request->execute(); |
1139
|
|
|
} |
1140
|
|
|
|
1141
|
|
|
public function createCustomConversion(array $fields = array(), array $params = array(), $pending = false) { |
1142
|
|
|
$this->assureId(); |
1143
|
|
|
|
1144
|
|
|
$param_types = array( |
1145
|
|
|
'custom_event_type' => 'custom_event_type_enum', |
1146
|
|
|
'default_conversion_value' => 'float', |
1147
|
|
|
'description' => 'string', |
1148
|
|
|
'id' => 'string', |
1149
|
|
|
'name' => 'string', |
1150
|
|
|
'pixel_id' => 'string', |
1151
|
|
|
'pixel_rule' => 'string', |
1152
|
|
|
); |
1153
|
|
|
$enums = array( |
1154
|
|
|
'custom_event_type_enum' => CustomConversionCustomEventTypeValues::getInstance()->getValues(), |
1155
|
|
|
); |
1156
|
|
|
|
1157
|
|
|
$request = new ApiRequest( |
1158
|
|
|
$this->api, |
1159
|
|
|
$this->data['id'], |
1160
|
|
|
RequestInterface::METHOD_POST, |
1161
|
|
|
'/customconversions', |
1162
|
|
|
new AbstractCrudObject(), |
1163
|
|
|
'EDGE', |
1164
|
|
|
array(), |
1165
|
|
|
new TypeChecker($param_types, $enums) |
1166
|
|
|
); |
1167
|
|
|
$request->addParams($params); |
1168
|
|
|
$request->addFields($fields); |
1169
|
|
|
return $pending ? $request : $request->execute(); |
1170
|
|
|
} |
1171
|
|
|
|
1172
|
|
|
public function getGeneratePreviews(array $fields = array(), array $params = array(), $pending = false) { |
1173
|
|
|
$this->assureId(); |
1174
|
|
|
|
1175
|
|
|
$param_types = array( |
1176
|
|
|
'ad_format' => 'ad_format_enum', |
1177
|
|
|
'creative' => 'AdCreative', |
1178
|
|
|
'height' => 'unsigned int', |
1179
|
|
|
'locale' => 'string', |
1180
|
|
|
'post' => 'Object', |
1181
|
|
|
'product_item_ids' => 'list<int>', |
1182
|
|
|
'width' => 'unsigned int', |
1183
|
|
|
); |
1184
|
|
|
$enums = array( |
1185
|
|
|
'ad_format_enum' => AdPreviewAdFormatValues::getInstance()->getValues(), |
1186
|
|
|
); |
1187
|
|
|
|
1188
|
|
|
$request = new ApiRequest( |
1189
|
|
|
$this->api, |
1190
|
|
|
$this->data['id'], |
1191
|
|
|
RequestInterface::METHOD_GET, |
1192
|
|
|
'/generatepreviews', |
1193
|
|
|
new AdPreview(), |
1194
|
|
|
'EDGE', |
1195
|
|
|
AdPreview::getFieldsEnum()->getValues(), |
1196
|
|
|
new TypeChecker($param_types, $enums) |
1197
|
|
|
); |
1198
|
|
|
$request->addParams($params); |
1199
|
|
|
$request->addFields($fields); |
1200
|
|
|
return $pending ? $request : $request->execute(); |
1201
|
|
|
} |
1202
|
|
|
|
1203
|
|
|
public function getInsights(array $fields = array(), array $params = array(), $pending = false) { |
1204
|
|
|
$this->assureId(); |
1205
|
|
|
|
1206
|
|
|
$param_types = array( |
1207
|
|
|
'action_attribution_windows' => 'list<action_attribution_windows_enum>', |
1208
|
|
|
'action_breakdowns' => 'list<action_breakdowns_enum>', |
1209
|
|
|
'action_report_time' => 'action_report_time_enum', |
1210
|
|
|
'breakdowns' => 'list<breakdowns_enum>', |
1211
|
|
|
'date_preset' => 'date_preset_enum', |
1212
|
|
|
'default_summary' => 'bool', |
1213
|
|
|
'fields' => 'list<fields_enum>', |
1214
|
|
|
'filtering' => 'list<Object>', |
1215
|
|
|
'level' => 'level_enum', |
1216
|
|
|
'product_id_limit' => 'int', |
1217
|
|
|
'sort' => 'list<string>', |
1218
|
|
|
'summary' => 'list<summary_enum>', |
1219
|
|
|
'summary_action_breakdowns' => 'list<summary_action_breakdowns_enum>', |
1220
|
|
|
'time_increment' => 'string', |
1221
|
|
|
'time_range' => 'map', |
1222
|
|
|
'time_ranges' => 'list<map>', |
1223
|
|
|
); |
1224
|
|
|
$enums = array( |
1225
|
|
|
'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(), |
1226
|
|
|
'action_breakdowns_enum' => AdsInsightsActionBreakdownsValues::getInstance()->getValues(), |
1227
|
|
|
'action_report_time_enum' => AdsInsightsActionReportTimeValues::getInstance()->getValues(), |
1228
|
|
|
'breakdowns_enum' => AdsInsightsBreakdownsValues::getInstance()->getValues(), |
1229
|
|
|
'date_preset_enum' => AdsInsightsDatePresetValues::getInstance()->getValues(), |
1230
|
|
|
'summary_enum' => AdsInsightsSummaryValues::getInstance()->getValues(), |
1231
|
|
|
'level_enum' => AdsInsightsLevelValues::getInstance()->getValues(), |
1232
|
|
|
'summary_action_breakdowns_enum' => AdsInsightsSummaryActionBreakdownsValues::getInstance()->getValues(), |
1233
|
|
|
); |
1234
|
|
|
|
1235
|
|
|
$request = new ApiRequest( |
1236
|
|
|
$this->api, |
1237
|
|
|
$this->data['id'], |
1238
|
|
|
RequestInterface::METHOD_GET, |
1239
|
|
|
'/insights', |
1240
|
|
|
new AdsInsights(), |
1241
|
|
|
'EDGE', |
1242
|
|
|
AdsInsights::getFieldsEnum()->getValues(), |
1243
|
|
|
new TypeChecker($param_types, $enums) |
1244
|
|
|
); |
1245
|
|
|
$request->addParams($params); |
1246
|
|
|
$request->addFields($fields); |
1247
|
|
|
return $pending ? $request : $request->execute(); |
1248
|
|
|
} |
1249
|
|
|
|
1250
|
|
|
public function getInsightsAsync(array $fields = array(), array $params = array(), $pending = false) { |
1251
|
|
|
$this->assureId(); |
1252
|
|
|
|
1253
|
|
|
$param_types = array( |
1254
|
|
|
'action_attribution_windows' => 'list<action_attribution_windows_enum>', |
1255
|
|
|
'action_breakdowns' => 'list<action_breakdowns_enum>', |
1256
|
|
|
'action_report_time' => 'action_report_time_enum', |
1257
|
|
|
'breakdowns' => 'list<breakdowns_enum>', |
1258
|
|
|
'date_preset' => 'date_preset_enum', |
1259
|
|
|
'default_summary' => 'bool', |
1260
|
|
|
'fields' => 'list<fields_enum>', |
1261
|
|
|
'filtering' => 'list<Object>', |
1262
|
|
|
'level' => 'level_enum', |
1263
|
|
|
'product_id_limit' => 'int', |
1264
|
|
|
'sort' => 'list<string>', |
1265
|
|
|
'summary' => 'list<summary_enum>', |
1266
|
|
|
'summary_action_breakdowns' => 'list<summary_action_breakdowns_enum>', |
1267
|
|
|
'time_increment' => 'string', |
1268
|
|
|
'time_range' => 'map', |
1269
|
|
|
'time_ranges' => 'list<map>', |
1270
|
|
|
); |
1271
|
|
|
$enums = array( |
1272
|
|
|
'action_attribution_windows_enum' => AdsInsightsActionAttributionWindowsValues::getInstance()->getValues(), |
1273
|
|
|
'action_breakdowns_enum' => AdsInsightsActionBreakdownsValues::getInstance()->getValues(), |
1274
|
|
|
'action_report_time_enum' => AdsInsightsActionReportTimeValues::getInstance()->getValues(), |
1275
|
|
|
'breakdowns_enum' => AdsInsightsBreakdownsValues::getInstance()->getValues(), |
1276
|
|
|
'date_preset_enum' => AdsInsightsDatePresetValues::getInstance()->getValues(), |
1277
|
|
|
'summary_enum' => AdsInsightsSummaryValues::getInstance()->getValues(), |
1278
|
|
|
'level_enum' => AdsInsightsLevelValues::getInstance()->getValues(), |
1279
|
|
|
'summary_action_breakdowns_enum' => AdsInsightsSummaryActionBreakdownsValues::getInstance()->getValues(), |
1280
|
|
|
); |
1281
|
|
|
|
1282
|
|
|
$request = new ApiRequest( |
1283
|
|
|
$this->api, |
1284
|
|
|
$this->data['id'], |
1285
|
|
|
RequestInterface::METHOD_POST, |
1286
|
|
|
'/insights', |
1287
|
|
|
new AdReportRun(), |
1288
|
|
|
'EDGE', |
1289
|
|
|
AdReportRun::getFieldsEnum()->getValues(), |
1290
|
|
|
new TypeChecker($param_types, $enums) |
1291
|
|
|
); |
1292
|
|
|
$request->addParams($params); |
1293
|
|
|
$request->addFields($fields); |
1294
|
|
|
return $pending ? $request : $request->execute(); |
1295
|
|
|
} |
1296
|
|
|
|
1297
|
|
|
public function getInstagramAccounts(array $fields = array(), array $params = array(), $pending = false) { |
1298
|
|
|
$this->assureId(); |
1299
|
|
|
|
1300
|
|
|
$param_types = array( |
1301
|
|
|
); |
1302
|
|
|
$enums = array( |
1303
|
|
|
); |
1304
|
|
|
|
1305
|
|
|
$request = new ApiRequest( |
1306
|
|
|
$this->api, |
1307
|
|
|
$this->data['id'], |
1308
|
|
|
RequestInterface::METHOD_GET, |
1309
|
|
|
'/instagram_accounts', |
1310
|
|
|
new AbstractCrudObject(), |
1311
|
|
|
'EDGE', |
1312
|
|
|
array(), |
1313
|
|
|
new TypeChecker($param_types, $enums) |
1314
|
|
|
); |
1315
|
|
|
$request->addParams($params); |
1316
|
|
|
$request->addFields($fields); |
1317
|
|
|
return $pending ? $request : $request->execute(); |
1318
|
|
|
} |
1319
|
|
|
|
1320
|
|
|
public function getLeadGenForms(array $fields = array(), array $params = array(), $pending = false) { |
1321
|
|
|
$this->assureId(); |
1322
|
|
|
|
1323
|
|
|
$param_types = array( |
1324
|
|
|
'query' => 'string', |
1325
|
|
|
); |
1326
|
|
|
$enums = array( |
1327
|
|
|
); |
1328
|
|
|
|
1329
|
|
|
$request = new ApiRequest( |
1330
|
|
|
$this->api, |
1331
|
|
|
$this->data['id'], |
1332
|
|
|
RequestInterface::METHOD_GET, |
1333
|
|
|
'/leadgen_forms', |
1334
|
|
|
new LeadgenForm(), |
1335
|
|
|
'EDGE', |
1336
|
|
|
LeadgenForm::getFieldsEnum()->getValues(), |
1337
|
|
|
new TypeChecker($param_types, $enums) |
1338
|
|
|
); |
1339
|
|
|
$request->addParams($params); |
1340
|
|
|
$request->addFields($fields); |
1341
|
|
|
return $pending ? $request : $request->execute(); |
1342
|
|
|
} |
1343
|
|
|
|
1344
|
|
|
public function getMinimumBudgets(array $fields = array(), array $params = array(), $pending = false) { |
1345
|
|
|
$this->assureId(); |
1346
|
|
|
|
1347
|
|
|
$param_types = array( |
1348
|
|
|
'bid_amount' => 'int', |
1349
|
|
|
); |
1350
|
|
|
$enums = array( |
1351
|
|
|
); |
1352
|
|
|
|
1353
|
|
|
$request = new ApiRequest( |
1354
|
|
|
$this->api, |
1355
|
|
|
$this->data['id'], |
1356
|
|
|
RequestInterface::METHOD_GET, |
1357
|
|
|
'/minimum_budgets', |
1358
|
|
|
new MinimumBudget(), |
1359
|
|
|
'EDGE', |
1360
|
|
|
MinimumBudget::getFieldsEnum()->getValues(), |
1361
|
|
|
new TypeChecker($param_types, $enums) |
1362
|
|
|
); |
1363
|
|
|
$request->addParams($params); |
1364
|
|
|
$request->addFields($fields); |
1365
|
|
|
return $pending ? $request : $request->execute(); |
1366
|
|
|
} |
1367
|
|
|
|
1368
|
|
|
public function getOfflineConversionDataSets(array $fields = array(), array $params = array(), $pending = false) { |
1369
|
|
|
$this->assureId(); |
1370
|
|
|
|
1371
|
|
|
$param_types = array( |
1372
|
|
|
); |
1373
|
|
|
$enums = array( |
1374
|
|
|
); |
1375
|
|
|
|
1376
|
|
|
$request = new ApiRequest( |
1377
|
|
|
$this->api, |
1378
|
|
|
$this->data['id'], |
1379
|
|
|
RequestInterface::METHOD_GET, |
1380
|
|
|
'/offline_conversion_data_sets', |
1381
|
|
|
new AbstractCrudObject(), |
1382
|
|
|
'EDGE', |
1383
|
|
|
array(), |
1384
|
|
|
new TypeChecker($param_types, $enums) |
1385
|
|
|
); |
1386
|
|
|
$request->addParams($params); |
1387
|
|
|
$request->addFields($fields); |
1388
|
|
|
return $pending ? $request : $request->execute(); |
1389
|
|
|
} |
1390
|
|
|
|
1391
|
|
|
public function createOfflineConversion(array $fields = array(), array $params = array(), $pending = false) { |
1392
|
|
|
$this->assureId(); |
1393
|
|
|
|
1394
|
|
|
$param_types = array( |
1395
|
|
|
'event' => 'string', |
1396
|
|
|
'id' => 'string', |
1397
|
|
|
'payload' => 'list<Object>', |
1398
|
|
|
'pixel_id' => 'string', |
1399
|
|
|
); |
1400
|
|
|
$enums = array( |
1401
|
|
|
); |
1402
|
|
|
|
1403
|
|
|
$request = new ApiRequest( |
1404
|
|
|
$this->api, |
1405
|
|
|
$this->data['id'], |
1406
|
|
|
RequestInterface::METHOD_POST, |
1407
|
|
|
'/offlineconversions', |
1408
|
|
|
new AbstractCrudObject(), |
1409
|
|
|
'EDGE', |
1410
|
|
|
array(), |
1411
|
|
|
new TypeChecker($param_types, $enums) |
1412
|
|
|
); |
1413
|
|
|
$request->addParams($params); |
1414
|
|
|
$request->addFields($fields); |
1415
|
|
|
return $pending ? $request : $request->execute(); |
1416
|
|
|
} |
1417
|
|
|
|
1418
|
|
|
public function getOffsitePixels(array $fields = array(), array $params = array(), $pending = false) { |
1419
|
|
|
$this->assureId(); |
1420
|
|
|
|
1421
|
|
|
$param_types = array( |
1422
|
|
|
); |
1423
|
|
|
$enums = array( |
1424
|
|
|
); |
1425
|
|
|
|
1426
|
|
|
$request = new ApiRequest( |
1427
|
|
|
$this->api, |
1428
|
|
|
$this->data['id'], |
1429
|
|
|
RequestInterface::METHOD_GET, |
1430
|
|
|
'/offsitepixels', |
1431
|
|
|
new OffsitePixel(), |
1432
|
|
|
'EDGE', |
1433
|
|
|
OffsitePixel::getFieldsEnum()->getValues(), |
1434
|
|
|
new TypeChecker($param_types, $enums) |
1435
|
|
|
); |
1436
|
|
|
$request->addParams($params); |
1437
|
|
|
$request->addFields($fields); |
1438
|
|
|
return $pending ? $request : $request->execute(); |
1439
|
|
|
} |
1440
|
|
|
|
1441
|
|
|
public function createOffsitePixel(array $fields = array(), array $params = array(), $pending = false) { |
1442
|
|
|
$this->assureId(); |
1443
|
|
|
|
1444
|
|
|
$param_types = array( |
1445
|
|
|
'id' => 'string', |
1446
|
|
|
'name' => 'string', |
1447
|
|
|
'tag' => 'tag_enum', |
1448
|
|
|
); |
1449
|
|
|
$enums = array( |
1450
|
|
|
'tag_enum' => OffsitePixelTagValues::getInstance()->getValues(), |
1451
|
|
|
); |
1452
|
|
|
|
1453
|
|
|
$request = new ApiRequest( |
1454
|
|
|
$this->api, |
1455
|
|
|
$this->data['id'], |
1456
|
|
|
RequestInterface::METHOD_POST, |
1457
|
|
|
'/offsitepixels', |
1458
|
|
|
new OffsitePixel(), |
1459
|
|
|
'EDGE', |
1460
|
|
|
OffsitePixel::getFieldsEnum()->getValues(), |
1461
|
|
|
new TypeChecker($param_types, $enums) |
1462
|
|
|
); |
1463
|
|
|
$request->addParams($params); |
1464
|
|
|
$request->addFields($fields); |
1465
|
|
|
return $pending ? $request : $request->execute(); |
1466
|
|
|
} |
1467
|
|
|
|
1468
|
|
|
public function getPartnerCategories(array $fields = array(), array $params = array(), $pending = false) { |
1469
|
|
|
$this->assureId(); |
1470
|
|
|
|
1471
|
|
|
$param_types = array( |
1472
|
|
|
'hide_pc' => 'bool', |
1473
|
|
|
'private_or_public' => 'string', |
1474
|
|
|
'targeting_type' => 'string', |
1475
|
|
|
); |
1476
|
|
|
$enums = array( |
1477
|
|
|
); |
1478
|
|
|
|
1479
|
|
|
$request = new ApiRequest( |
1480
|
|
|
$this->api, |
1481
|
|
|
$this->data['id'], |
1482
|
|
|
RequestInterface::METHOD_GET, |
1483
|
|
|
'/partnercategories', |
1484
|
|
|
new PartnerCategory(), |
1485
|
|
|
'EDGE', |
1486
|
|
|
PartnerCategory::getFieldsEnum()->getValues(), |
1487
|
|
|
new TypeChecker($param_types, $enums) |
1488
|
|
|
); |
1489
|
|
|
$request->addParams($params); |
1490
|
|
|
$request->addFields($fields); |
1491
|
|
|
return $pending ? $request : $request->execute(); |
1492
|
|
|
} |
1493
|
|
|
|
1494
|
|
|
public function getPartners(array $fields = array(), array $params = array(), $pending = false) { |
1495
|
|
|
$this->assureId(); |
1496
|
|
|
|
1497
|
|
|
$param_types = array( |
1498
|
|
|
); |
1499
|
|
|
$enums = array( |
1500
|
|
|
); |
1501
|
|
|
|
1502
|
|
|
$request = new ApiRequest( |
1503
|
|
|
$this->api, |
1504
|
|
|
$this->data['id'], |
1505
|
|
|
RequestInterface::METHOD_GET, |
1506
|
|
|
'/partners', |
1507
|
|
|
new AdsDataPartner(), |
1508
|
|
|
'EDGE', |
1509
|
|
|
AdsDataPartner::getFieldsEnum()->getValues(), |
1510
|
|
|
new TypeChecker($param_types, $enums) |
1511
|
|
|
); |
1512
|
|
|
$request->addParams($params); |
1513
|
|
|
$request->addFields($fields); |
1514
|
|
|
return $pending ? $request : $request->execute(); |
1515
|
|
|
} |
1516
|
|
|
|
1517
|
|
|
public function createProductAudience(array $fields = array(), array $params = array(), $pending = false) { |
1518
|
|
|
$this->assureId(); |
1519
|
|
|
|
1520
|
|
|
$param_types = array( |
1521
|
|
|
'associated_audience_id' => 'unsigned int', |
1522
|
|
|
'content_type' => 'content_type_enum', |
1523
|
|
|
'creation_params' => 'map', |
1524
|
|
|
'description' => 'string', |
1525
|
|
|
'exclusions' => 'list<Object>', |
1526
|
|
|
'id' => 'string', |
1527
|
|
|
'inclusions' => 'list<Object>', |
1528
|
|
|
'name' => 'string', |
1529
|
|
|
'opt_out_link' => 'string', |
1530
|
|
|
'parent_audience_id' => 'unsigned int', |
1531
|
|
|
'product_set_id' => 'string', |
1532
|
|
|
'subtype' => 'subtype_enum', |
1533
|
|
|
'tags' => 'list<string>', |
1534
|
|
|
); |
1535
|
|
|
$enums = array( |
1536
|
|
|
'content_type_enum' => array( |
1537
|
|
|
'HOTEL', |
1538
|
|
|
'FLIGHT', |
1539
|
|
|
), |
1540
|
|
|
'subtype_enum' => array( |
1541
|
|
|
'CUSTOM', |
1542
|
|
|
'WEBSITE', |
1543
|
|
|
'APP', |
1544
|
|
|
'CLAIM', |
1545
|
|
|
'PARTNER', |
1546
|
|
|
'MANAGED', |
1547
|
|
|
'VIDEO', |
1548
|
|
|
'LOOKALIKE', |
1549
|
|
|
'ENGAGEMENT', |
1550
|
|
|
'DATA_SET', |
1551
|
|
|
'BAG_OF_ACCOUNTS', |
1552
|
|
|
), |
1553
|
|
|
); |
1554
|
|
|
|
1555
|
|
|
$request = new ApiRequest( |
1556
|
|
|
$this->api, |
1557
|
|
|
$this->data['id'], |
1558
|
|
|
RequestInterface::METHOD_POST, |
1559
|
|
|
'/product_audiences', |
1560
|
|
|
new AbstractCrudObject(), |
1561
|
|
|
'EDGE', |
1562
|
|
|
array(), |
1563
|
|
|
new TypeChecker($param_types, $enums) |
1564
|
|
|
); |
1565
|
|
|
$request->addParams($params); |
1566
|
|
|
$request->addFields($fields); |
1567
|
|
|
return $pending ? $request : $request->execute(); |
1568
|
|
|
} |
1569
|
|
|
|
1570
|
|
|
public function getPublisherBlockLists(array $fields = array(), array $params = array(), $pending = false) { |
1571
|
|
|
$this->assureId(); |
1572
|
|
|
|
1573
|
|
|
$param_types = array( |
1574
|
|
|
); |
1575
|
|
|
$enums = array( |
1576
|
|
|
); |
1577
|
|
|
|
1578
|
|
|
$request = new ApiRequest( |
1579
|
|
|
$this->api, |
1580
|
|
|
$this->data['id'], |
1581
|
|
|
RequestInterface::METHOD_GET, |
1582
|
|
|
'/publisher_block_lists', |
1583
|
|
|
new AbstractCrudObject(), |
1584
|
|
|
'EDGE', |
1585
|
|
|
array(), |
1586
|
|
|
new TypeChecker($param_types, $enums) |
1587
|
|
|
); |
1588
|
|
|
$request->addParams($params); |
1589
|
|
|
$request->addFields($fields); |
1590
|
|
|
return $pending ? $request : $request->execute(); |
1591
|
|
|
} |
1592
|
|
|
|
1593
|
|
|
public function createPublisherBlockList(array $fields = array(), array $params = array(), $pending = false) { |
1594
|
|
|
$this->assureId(); |
1595
|
|
|
|
1596
|
|
|
$param_types = array( |
1597
|
|
|
'name' => 'string', |
1598
|
|
|
); |
1599
|
|
|
$enums = array( |
1600
|
|
|
); |
1601
|
|
|
|
1602
|
|
|
$request = new ApiRequest( |
1603
|
|
|
$this->api, |
1604
|
|
|
$this->data['id'], |
1605
|
|
|
RequestInterface::METHOD_POST, |
1606
|
|
|
'/publisher_block_lists', |
1607
|
|
|
new AbstractCrudObject(), |
1608
|
|
|
'EDGE', |
1609
|
|
|
array(), |
1610
|
|
|
new TypeChecker($param_types, $enums) |
1611
|
|
|
); |
1612
|
|
|
$request->addParams($params); |
1613
|
|
|
$request->addFields($fields); |
1614
|
|
|
return $pending ? $request : $request->execute(); |
1615
|
|
|
} |
1616
|
|
|
|
1617
|
|
|
public function getRateCard(array $fields = array(), array $params = array(), $pending = false) { |
1618
|
|
|
$this->assureId(); |
1619
|
|
|
|
1620
|
|
|
$param_types = array( |
1621
|
|
|
); |
1622
|
|
|
$enums = array( |
1623
|
|
|
); |
1624
|
|
|
|
1625
|
|
|
$request = new ApiRequest( |
1626
|
|
|
$this->api, |
1627
|
|
|
$this->data['id'], |
1628
|
|
|
RequestInterface::METHOD_GET, |
1629
|
|
|
'/ratecard', |
1630
|
|
|
new RateCard(), |
1631
|
|
|
'EDGE', |
1632
|
|
|
RateCard::getFieldsEnum()->getValues(), |
1633
|
|
|
new TypeChecker($param_types, $enums) |
1634
|
|
|
); |
1635
|
|
|
$request->addParams($params); |
1636
|
|
|
$request->addFields($fields); |
1637
|
|
|
return $pending ? $request : $request->execute(); |
1638
|
|
|
} |
1639
|
|
|
|
1640
|
|
|
public function getReachEstimate(array $fields = array(), array $params = array(), $pending = false) { |
1641
|
|
|
$this->assureId(); |
1642
|
|
|
|
1643
|
|
|
$param_types = array( |
1644
|
|
|
'currency' => 'string', |
1645
|
|
|
'daily_budget' => 'float', |
1646
|
|
|
'object_store_url' => 'string', |
1647
|
|
|
'optimize_for' => 'optimize_for_enum', |
1648
|
|
|
'targeting_spec' => 'Targeting', |
1649
|
|
|
); |
1650
|
|
|
$enums = array( |
1651
|
|
|
'optimize_for_enum' => ReachEstimateOptimizeForValues::getInstance()->getValues(), |
1652
|
|
|
); |
1653
|
|
|
|
1654
|
|
|
$request = new ApiRequest( |
1655
|
|
|
$this->api, |
1656
|
|
|
$this->data['id'], |
1657
|
|
|
RequestInterface::METHOD_GET, |
1658
|
|
|
'/reachestimate', |
1659
|
|
|
new ReachEstimate(), |
1660
|
|
|
'EDGE', |
1661
|
|
|
ReachEstimate::getFieldsEnum()->getValues(), |
1662
|
|
|
new TypeChecker($param_types, $enums) |
1663
|
|
|
); |
1664
|
|
|
$request->addParams($params); |
1665
|
|
|
$request->addFields($fields); |
1666
|
|
|
return $pending ? $request : $request->execute(); |
1667
|
|
|
} |
1668
|
|
|
|
1669
|
|
|
public function getReachFrequencyPredictions(array $fields = array(), array $params = array(), $pending = false) { |
1670
|
|
|
$this->assureId(); |
1671
|
|
|
|
1672
|
|
|
$param_types = array( |
1673
|
|
|
); |
1674
|
|
|
$enums = array( |
1675
|
|
|
); |
1676
|
|
|
|
1677
|
|
|
$request = new ApiRequest( |
1678
|
|
|
$this->api, |
1679
|
|
|
$this->data['id'], |
1680
|
|
|
RequestInterface::METHOD_GET, |
1681
|
|
|
'/reachfrequencypredictions', |
1682
|
|
|
new ReachFrequencyPrediction(), |
1683
|
|
|
'EDGE', |
1684
|
|
|
ReachFrequencyPrediction::getFieldsEnum()->getValues(), |
1685
|
|
|
new TypeChecker($param_types, $enums) |
1686
|
|
|
); |
1687
|
|
|
$request->addParams($params); |
1688
|
|
|
$request->addFields($fields); |
1689
|
|
|
return $pending ? $request : $request->execute(); |
1690
|
|
|
} |
1691
|
|
|
|
1692
|
|
|
public function createReachFrequencyPrediction(array $fields = array(), array $params = array(), $pending = false) { |
1693
|
|
|
$this->assureId(); |
1694
|
|
|
|
1695
|
|
|
$param_types = array( |
1696
|
|
|
'budget' => 'unsigned int', |
1697
|
|
|
'campaign_group_id' => 'string', |
1698
|
|
|
'destination_id' => 'unsigned int', |
1699
|
|
|
'destination_ids' => 'list<string>', |
1700
|
|
|
'end_time' => 'unsigned int', |
1701
|
|
|
'frequency_cap' => 'unsigned int', |
1702
|
|
|
'interval_frequency_cap_reset_period' => 'unsigned int', |
1703
|
|
|
'num_curve_points' => 'unsigned int', |
1704
|
|
|
'objective' => 'string', |
1705
|
|
|
'prediction_mode' => 'unsigned int', |
1706
|
|
|
'reach' => 'unsigned int', |
1707
|
|
|
'rf_prediction_id_to_share' => 'string', |
1708
|
|
|
'start_time' => 'unsigned int', |
1709
|
|
|
'stop_time' => 'unsigned int', |
1710
|
|
|
'story_event_type' => 'unsigned int', |
1711
|
|
|
'target_spec' => 'Targeting', |
1712
|
|
|
); |
1713
|
|
|
$enums = array( |
1714
|
|
|
); |
1715
|
|
|
|
1716
|
|
|
$request = new ApiRequest( |
1717
|
|
|
$this->api, |
1718
|
|
|
$this->data['id'], |
1719
|
|
|
RequestInterface::METHOD_POST, |
1720
|
|
|
'/reachfrequencypredictions', |
1721
|
|
|
new ReachFrequencyPrediction(), |
1722
|
|
|
'EDGE', |
1723
|
|
|
ReachFrequencyPrediction::getFieldsEnum()->getValues(), |
1724
|
|
|
new TypeChecker($param_types, $enums) |
1725
|
|
|
); |
1726
|
|
|
$request->addParams($params); |
1727
|
|
|
$request->addFields($fields); |
1728
|
|
|
return $pending ? $request : $request->execute(); |
1729
|
|
|
} |
1730
|
|
|
|
1731
|
|
|
public function getRoas(array $fields = array(), array $params = array(), $pending = false) { |
1732
|
|
|
$this->assureId(); |
1733
|
|
|
|
1734
|
|
|
$param_types = array( |
1735
|
|
|
'fields' => 'list<fields_enum>', |
1736
|
|
|
'filtering' => 'list<Object>', |
1737
|
|
|
'time_increment' => 'string', |
1738
|
|
|
'time_range' => 'Object', |
1739
|
|
|
); |
1740
|
|
|
$enums = array( |
1741
|
|
|
'fields_enum' => AdAccountRoasFieldsValues::getInstance()->getValues(), |
1742
|
|
|
); |
1743
|
|
|
|
1744
|
|
|
$request = new ApiRequest( |
1745
|
|
|
$this->api, |
1746
|
|
|
$this->data['id'], |
1747
|
|
|
RequestInterface::METHOD_GET, |
1748
|
|
|
'/roas', |
1749
|
|
|
new AdAccountRoas(), |
1750
|
|
|
'EDGE', |
1751
|
|
|
AdAccountRoas::getFieldsEnum()->getValues(), |
1752
|
|
|
new TypeChecker($param_types, $enums) |
1753
|
|
|
); |
1754
|
|
|
$request->addParams($params); |
1755
|
|
|
$request->addFields($fields); |
1756
|
|
|
return $pending ? $request : $request->execute(); |
1757
|
|
|
} |
1758
|
|
|
|
1759
|
|
|
public function getTargetingInsights(array $fields = array(), array $params = array(), $pending = false) { |
1760
|
|
|
$this->assureId(); |
1761
|
|
|
|
1762
|
|
|
$param_types = array( |
1763
|
|
|
'mode' => 'mode_enum', |
1764
|
|
|
'objective' => 'objective_enum', |
1765
|
|
|
'rank_mode' => 'rank_mode_enum', |
1766
|
|
|
); |
1767
|
|
|
$enums = array( |
1768
|
|
|
'mode_enum' => AdAccountTargetingInsightsModeValues::getInstance()->getValues(), |
1769
|
|
|
'objective_enum' => AdAccountTargetingInsightsObjectiveValues::getInstance()->getValues(), |
1770
|
|
|
'rank_mode_enum' => AdAccountTargetingInsightsRankModeValues::getInstance()->getValues(), |
1771
|
|
|
); |
1772
|
|
|
|
1773
|
|
|
$request = new ApiRequest( |
1774
|
|
|
$this->api, |
1775
|
|
|
$this->data['id'], |
1776
|
|
|
RequestInterface::METHOD_GET, |
1777
|
|
|
'/targetinginsights', |
1778
|
|
|
new AdAccountTargetingInsights(), |
1779
|
|
|
'EDGE', |
1780
|
|
|
AdAccountTargetingInsights::getFieldsEnum()->getValues(), |
1781
|
|
|
new TypeChecker($param_types, $enums) |
1782
|
|
|
); |
1783
|
|
|
$request->addParams($params); |
1784
|
|
|
$request->addFields($fields); |
1785
|
|
|
return $pending ? $request : $request->execute(); |
1786
|
|
|
} |
1787
|
|
|
|
1788
|
|
|
public function getTargetingSentenceLines(array $fields = array(), array $params = array(), $pending = false) { |
1789
|
|
|
$this->assureId(); |
1790
|
|
|
|
1791
|
|
|
$param_types = array( |
1792
|
|
|
'discard_ages' => 'bool', |
1793
|
|
|
'discard_placements' => 'bool', |
1794
|
|
|
'targeting_spec' => 'Targeting', |
1795
|
|
|
); |
1796
|
|
|
$enums = array( |
1797
|
|
|
); |
1798
|
|
|
|
1799
|
|
|
$request = new ApiRequest( |
1800
|
|
|
$this->api, |
1801
|
|
|
$this->data['id'], |
1802
|
|
|
RequestInterface::METHOD_GET, |
1803
|
|
|
'/targetingsentencelines', |
1804
|
|
|
new TargetingSentenceLine(), |
1805
|
|
|
'EDGE', |
1806
|
|
|
TargetingSentenceLine::getFieldsEnum()->getValues(), |
1807
|
|
|
new TypeChecker($param_types, $enums) |
1808
|
|
|
); |
1809
|
|
|
$request->addParams($params); |
1810
|
|
|
$request->addFields($fields); |
1811
|
|
|
return $pending ? $request : $request->execute(); |
1812
|
|
|
} |
1813
|
|
|
|
1814
|
|
|
public function getTransactions(array $fields = array(), array $params = array(), $pending = false) { |
1815
|
|
|
$this->assureId(); |
1816
|
|
|
|
1817
|
|
|
$param_types = array( |
1818
|
|
|
'time_start' => 'int', |
1819
|
|
|
'time_stop' => 'int', |
1820
|
|
|
); |
1821
|
|
|
$enums = array( |
1822
|
|
|
); |
1823
|
|
|
|
1824
|
|
|
$request = new ApiRequest( |
1825
|
|
|
$this->api, |
1826
|
|
|
$this->data['id'], |
1827
|
|
|
RequestInterface::METHOD_GET, |
1828
|
|
|
'/transactions', |
1829
|
|
|
new Transaction(), |
1830
|
|
|
'EDGE', |
1831
|
|
|
Transaction::getFieldsEnum()->getValues(), |
1832
|
|
|
new TypeChecker($param_types, $enums) |
1833
|
|
|
); |
1834
|
|
|
$request->addParams($params); |
1835
|
|
|
$request->addFields($fields); |
1836
|
|
|
return $pending ? $request : $request->execute(); |
1837
|
|
|
} |
1838
|
|
|
|
1839
|
|
|
public function getUsers(array $fields = array(), array $params = array(), $pending = false) { |
1840
|
|
|
$this->assureId(); |
1841
|
|
|
|
1842
|
|
|
$param_types = array( |
1843
|
|
|
); |
1844
|
|
|
$enums = array( |
1845
|
|
|
); |
1846
|
|
|
|
1847
|
|
|
$request = new ApiRequest( |
1848
|
|
|
$this->api, |
1849
|
|
|
$this->data['id'], |
1850
|
|
|
RequestInterface::METHOD_GET, |
1851
|
|
|
'/users', |
1852
|
|
|
new AdAccountUser(), |
1853
|
|
|
'EDGE', |
1854
|
|
|
AdAccountUser::getFieldsEnum()->getValues(), |
1855
|
|
|
new TypeChecker($param_types, $enums) |
1856
|
|
|
); |
1857
|
|
|
$request->addParams($params); |
1858
|
|
|
$request->addFields($fields); |
1859
|
|
|
return $pending ? $request : $request->execute(); |
1860
|
|
|
} |
1861
|
|
|
|
1862
|
|
|
public function getSelf(array $fields = array(), array $params = array(), $pending = false) { |
1863
|
|
|
$this->assureId(); |
1864
|
|
|
|
1865
|
|
|
$param_types = array( |
1866
|
|
|
); |
1867
|
|
|
$enums = array( |
1868
|
|
|
); |
1869
|
|
|
|
1870
|
|
|
$request = new ApiRequest( |
1871
|
|
|
$this->api, |
1872
|
|
|
$this->data['id'], |
1873
|
|
|
RequestInterface::METHOD_GET, |
1874
|
|
|
'/', |
1875
|
|
|
new AdAccount(), |
1876
|
|
|
'NODE', |
1877
|
|
|
AdAccount::getFieldsEnum()->getValues(), |
1878
|
|
|
new TypeChecker($param_types, $enums) |
1879
|
|
|
); |
1880
|
|
|
$request->addParams($params); |
1881
|
|
|
$request->addFields($fields); |
1882
|
|
|
return $pending ? $request : $request->execute(); |
1883
|
|
|
} |
1884
|
|
|
|
1885
|
|
|
public function updateSelf(array $fields = array(), array $params = array(), $pending = false) { |
1886
|
|
|
$this->assureId(); |
1887
|
|
|
|
1888
|
|
|
$param_types = array( |
1889
|
|
|
'agency_client_declaration' => 'map', |
1890
|
|
|
'business_info' => 'map', |
1891
|
|
|
'default_dataset' => 'Object', |
1892
|
|
|
'end_advertiser' => 'string', |
1893
|
|
|
'id' => 'string', |
1894
|
|
|
'is_notifications_enabled' => 'bool', |
1895
|
|
|
'media_agency' => 'string', |
1896
|
|
|
'name' => 'string', |
1897
|
|
|
'partner' => 'string', |
1898
|
|
|
'redownload' => 'bool', |
1899
|
|
|
'spend_cap' => 'float', |
1900
|
|
|
'spend_cap_action' => 'string', |
1901
|
|
|
); |
1902
|
|
|
$enums = array( |
1903
|
|
|
); |
1904
|
|
|
|
1905
|
|
|
$request = new ApiRequest( |
1906
|
|
|
$this->api, |
1907
|
|
|
$this->data['id'], |
1908
|
|
|
RequestInterface::METHOD_POST, |
1909
|
|
|
'/', |
1910
|
|
|
new AbstractCrudObject(), |
1911
|
|
|
'NODE', |
1912
|
|
|
array(), |
1913
|
|
|
new TypeChecker($param_types, $enums) |
1914
|
|
|
); |
1915
|
|
|
$request->addParams($params); |
1916
|
|
|
$request->addFields($fields); |
1917
|
|
|
return $pending ? $request : $request->execute(); |
1918
|
|
|
} |
1919
|
|
|
|
1920
|
|
|
/** |
1921
|
|
|
* @deprecated use getCampaignsByLabels instead |
1922
|
|
|
*/ |
1923
|
|
|
public function getCampaignsByLabel( |
1924
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1925
|
|
|
return $this->getCampaignsByLabels($fields, $params, $pending); |
1926
|
|
|
} |
1927
|
|
|
|
1928
|
|
|
/** |
1929
|
|
|
* @deprecated use getAdSetsByLabels instead |
1930
|
|
|
*/ |
1931
|
|
|
public function getAdSetsByLabel( |
1932
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1933
|
|
|
return $this->getAdSetsByLabels($fields, $params, $pending); |
1934
|
|
|
} |
1935
|
|
|
|
1936
|
|
|
/** |
1937
|
|
|
* @deprecated use getAdsByLabels instead |
1938
|
|
|
*/ |
1939
|
|
|
public function getAdsByLabel( |
1940
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1941
|
|
|
return $this->getAdsByLabels($fields, $params, $pending); |
1942
|
|
|
} |
1943
|
|
|
|
1944
|
|
|
/** |
1945
|
|
|
* @deprecated use getAdCreativesByLabels instead |
1946
|
|
|
*/ |
1947
|
|
|
public function getAdCreativesByLabel( |
1948
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1949
|
|
|
return $this->getAdCreativesByLabels($fields, $params, $pending); |
1950
|
|
|
} |
1951
|
|
|
|
1952
|
|
|
/** |
1953
|
|
|
* @deprecated use getUsers instead |
1954
|
|
|
*/ |
1955
|
|
|
public function getAdUsers( |
1956
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1957
|
|
|
return $this->getUsers($fields, $params, $pending); |
1958
|
|
|
} |
1959
|
|
|
|
1960
|
|
|
/** |
1961
|
|
|
* @deprecated use getGeneratePreviews instead |
1962
|
|
|
*/ |
1963
|
|
|
public function getAdPreviews( |
1964
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1965
|
|
|
return $this->getGeneratePreviews($fields, $params, $pending); |
1966
|
|
|
} |
1967
|
|
|
|
1968
|
|
|
/** |
1969
|
|
|
* @deprecated use getRateCard instead |
1970
|
|
|
*/ |
1971
|
|
|
public function getRateCards( |
1972
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1973
|
|
|
return $this->getRateCard($fields, $params, $pending); |
1974
|
|
|
} |
1975
|
|
|
|
1976
|
|
|
/** |
1977
|
|
|
* @deprecated use getTargetingSentenceLines instead |
1978
|
|
|
*/ |
1979
|
|
|
public function getTargetingDescription( |
1980
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1981
|
|
|
return $this->getTargetingSentenceLines($fields, $params, $pending); |
1982
|
|
|
} |
1983
|
|
|
|
1984
|
|
|
/** |
1985
|
|
|
* @deprecated use getBroadTargetingCategories instead |
1986
|
|
|
*/ |
1987
|
|
|
public function getBroadCategoryTargeting( |
1988
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1989
|
|
|
return $this->getBroadTargetingCategories($fields, $params, $pending); |
1990
|
|
|
} |
1991
|
|
|
|
1992
|
|
|
/** |
1993
|
|
|
* @deprecated use getOffsitePixels instead |
1994
|
|
|
*/ |
1995
|
|
|
public function getConversionPixels( |
1996
|
|
|
array $fields = array(), array $params = array(), $pending = false) { |
1997
|
|
|
return $this->getOffsitePixels($fields, $params, $pending); |
1998
|
|
|
} |
1999
|
|
|
} |
2000
|
|
|
|