1 | <?php |
||
6 | class Campaign extends Base |
||
7 | { |
||
8 | /** |
||
9 | * Private constructor so only the client can create this |
||
10 | * @param Client $client |
||
11 | */ |
||
12 | 20 | public function __construct(Client $client) |
|
17 | |||
18 | /** |
||
19 | * Get one or multiple campaigns |
||
20 | * @param string campaign id, leave null for list of campaigns |
||
21 | * @param object Containing query arguments |
||
22 | * @return object Result of the request |
||
23 | */ |
||
24 | public function Get($campaignId = null, $args = array("limit" => 50)) |
||
31 | |||
32 | /** |
||
33 | * Get one or multiple lanes |
||
34 | * @param string campaign id |
||
35 | * @param string lane id, leave null for list of lanes |
||
36 | * @param object Containing query arguments |
||
37 | * @return object Result of the request |
||
38 | */ |
||
39 | public function GetLane($campaignId, $laneId = null, $args = array("limit" => 50)) |
||
46 | |||
47 | /** |
||
48 | * Create new campaign |
||
49 | * @param object Containing all the information of a lane |
||
50 | * @return object Result of the request |
||
51 | */ |
||
52 | public function Create($campaign) |
||
56 | |||
57 | /** |
||
58 | * Create new lane |
||
59 | * @param string campaign id |
||
60 | * @param object Containing all the information of a lane |
||
61 | * @return object Result of the request |
||
62 | */ |
||
63 | public function CreateLane($campaignId, $lane) |
||
67 | |||
68 | /** |
||
69 | * Update a campaign |
||
70 | * @param object campaign containing the campaign id and fields that need to be updated |
||
71 | * @throws \Exception When boxid is not present |
||
72 | * @return object Result of the request |
||
73 | */ |
||
74 | public function Update($campaign) |
||
81 | |||
82 | /** |
||
83 | * Update a lane |
||
84 | * @param string Id of the campaign |
||
85 | * @param object lane containing the laneid and fields that need to be updated |
||
86 | * @throws \Exception When boxid is not present |
||
87 | * @return object Result of the request |
||
88 | */ |
||
89 | public function UpdateLane($campaignId, $lane) |
||
96 | |||
97 | /** |
||
98 | * Delete a campaign object by campaign id |
||
99 | * @param string Id of the campaign |
||
100 | * @return object Result of the request |
||
101 | */ |
||
102 | public function Delete($campaignId) |
||
106 | |||
107 | /** |
||
108 | * Delete a campaign object by campaign id |
||
109 | * @param string Id of the campaign |
||
110 | * @return object Result of the request |
||
111 | */ |
||
112 | public function DeleteLane($campaignId, $laneId) |
||
116 | |||
117 | /** |
||
118 | * Retrieve stats of a lane by campaign |
||
119 | * @param string Id of the campaign |
||
120 | * @return object Result of the request |
||
121 | */ |
||
122 | public function Stats($campaignId) |
||
126 | |||
127 | /** |
||
128 | * Retrieve stats of a lane by campaign and lane id |
||
129 | * @param string Id of the campaign |
||
130 | * @param string Id of the lane to be deleted |
||
131 | * @return object Result of the request |
||
132 | */ |
||
133 | public function StatsLane($campaignId, $laneId) |
||
137 | } |
||
138 |