1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of GetCake PHP Client. |
5
|
|
|
* |
6
|
|
|
* (c) DraperStudio <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Apivore\GetCake\Api; |
13
|
|
|
|
14
|
|
|
use Apivore\Core\AbstractApi; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class Offers. |
18
|
|
|
* |
19
|
|
|
* @author DraperStudio <[email protected]> |
20
|
|
|
*/ |
21
|
|
|
class Offers extends AbstractApi |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* @param $parameters |
25
|
|
|
* |
26
|
|
|
* @return mixed |
27
|
|
|
*/ |
28
|
|
|
public function addLinkCreative($parameters) |
29
|
|
|
{ |
30
|
|
|
return $this->get('2/offers.asmx/AddLinkCreative', $parameters); |
|
|
|
|
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @param $parameters |
35
|
|
|
* |
36
|
|
|
* @return mixed |
37
|
|
|
*/ |
38
|
|
|
public function applyForOffer($parameters) |
39
|
|
|
{ |
40
|
|
|
return $this->get('2/offers.asmx/ApplyForOffer', $parameters); |
|
|
|
|
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @param $parameters |
45
|
|
|
* |
46
|
|
|
* @return mixed |
47
|
|
|
*/ |
48
|
|
|
public function creativeFeed($parameters) |
49
|
|
|
{ |
50
|
|
|
return $this->get('2/offers.asmx/CreativeFeed', $parameters); |
|
|
|
|
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param $parameters |
55
|
|
|
* |
56
|
|
|
* @return mixed |
57
|
|
|
*/ |
58
|
|
|
public function getCampaign($parameters) |
59
|
|
|
{ |
60
|
|
|
return $this->get('2/offers.asmx/GetCampaign', $parameters); |
|
|
|
|
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @param $parameters |
65
|
|
|
* |
66
|
|
|
* @return mixed |
67
|
|
|
*/ |
68
|
|
|
public function getCreativeCode($parameters) |
69
|
|
|
{ |
70
|
|
|
return $this->get('2/offers.asmx/GetCreativeCode', $parameters); |
|
|
|
|
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @return mixed |
75
|
|
|
*/ |
76
|
|
|
public function getCreativeFeeds() |
77
|
|
|
{ |
78
|
|
|
return $this->get('2/offers.asmx/GetCreativeFeeds'); |
|
|
|
|
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @return mixed |
83
|
|
|
*/ |
84
|
|
|
public function getCreativeTypes() |
85
|
|
|
{ |
86
|
|
|
return $this->get('2/offers.asmx/GetCreativeTypes'); |
|
|
|
|
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @return mixed |
91
|
|
|
*/ |
92
|
|
|
public function getFeaturedOffer() |
93
|
|
|
{ |
94
|
|
|
return $this->get('2/offers.asmx/GetFeaturedOffer'); |
|
|
|
|
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return mixed |
99
|
|
|
*/ |
100
|
|
|
public function getMediaTypeCategories() |
101
|
|
|
{ |
102
|
|
|
return $this->get('2/offers.asmx/GetMediaTypeCategories'); |
|
|
|
|
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @return mixed |
107
|
|
|
*/ |
108
|
|
|
public function getOfferStatuses() |
109
|
|
|
{ |
110
|
|
|
return $this->get('2/offers.asmx/GetOfferStatuses'); |
|
|
|
|
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return mixed |
115
|
|
|
*/ |
116
|
|
|
public function getPixelTokens() |
117
|
|
|
{ |
118
|
|
|
return $this->get('2/offers.asmx/GetPixelTokens'); |
|
|
|
|
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @return mixed |
123
|
|
|
*/ |
124
|
|
|
public function getSuppressionList() |
125
|
|
|
{ |
126
|
|
|
return $this->get('2/offers.asmx/GetSuppressionList'); |
|
|
|
|
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* @return mixed |
131
|
|
|
*/ |
132
|
|
|
public function getTags() |
133
|
|
|
{ |
134
|
|
|
return $this->get('2/offers.asmx/GetTags'); |
|
|
|
|
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* @return mixed |
139
|
|
|
*/ |
140
|
|
|
public function getVerticalCategories() |
141
|
|
|
{ |
142
|
|
|
return $this->get('2/offers.asmx/GetVerticalCategories'); |
|
|
|
|
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @return mixed |
147
|
|
|
*/ |
148
|
|
|
public function getVerticals() |
149
|
|
|
{ |
150
|
|
|
return $this->get('2/offers.asmx/GetVerticals'); |
|
|
|
|
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @param $parameters |
155
|
|
|
* |
156
|
|
|
* @return mixed |
157
|
|
|
*/ |
158
|
|
|
public function getSubAffiliates($parameters) |
159
|
|
|
{ |
160
|
|
|
return $this->get('2/offers.asmx/GetSubAffiliates', $parameters); |
|
|
|
|
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @param $parameters |
165
|
|
|
* |
166
|
|
|
* @return mixed |
167
|
|
|
*/ |
168
|
|
|
public function offerFeed($parameters) |
169
|
|
|
{ |
170
|
|
|
return $this->get('4/offers.asmx/OfferFeed', $parameters); |
|
|
|
|
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* @param $parameters |
175
|
|
|
* |
176
|
|
|
* @return mixed |
177
|
|
|
*/ |
178
|
|
|
public function sendCreativePack($parameters) |
179
|
|
|
{ |
180
|
|
|
return $this->get('2/offers.asmx/SendCreativePack', $parameters); |
|
|
|
|
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* @param $parameters |
185
|
|
|
* |
186
|
|
|
* @return mixed |
187
|
|
|
*/ |
188
|
|
|
public function setPixel($parameters) |
189
|
|
|
{ |
190
|
|
|
return $this->get('2/offers.asmx/SetPixel', $parameters); |
|
|
|
|
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* @param $parameters |
195
|
|
|
* |
196
|
|
|
* @return mixed |
197
|
|
|
*/ |
198
|
|
|
public function setPostbackUrl($parameters) |
199
|
|
|
{ |
200
|
|
|
return $this->get('2/offers.asmx/SetPostbackURL', $parameters); |
|
|
|
|
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @param $parameters |
205
|
|
|
* |
206
|
|
|
* @return mixed |
207
|
|
|
*/ |
208
|
|
|
public function setTestLink($parameters) |
209
|
|
|
{ |
210
|
|
|
return $this->get('2/offers.asmx/SetTestLink', $parameters); |
|
|
|
|
211
|
|
|
} |
212
|
|
|
} |
213
|
|
|
|
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: