1 | <?php |
||
4 | class Campaign extends Base |
||
5 | { |
||
6 | /** |
||
7 | * Private constructor so only the client can create this |
||
8 | * @param string $apikey |
||
9 | * @param string $projectid |
||
10 | */ |
||
11 | public function __construct($apikey, $projectid) |
||
15 | |||
16 | /** |
||
17 | * Get one or multiple campaigns |
||
18 | * @param string campaign id, leave null for list of campaigns |
||
19 | * @param object Containing query arguments |
||
20 | * @return object Result of the request |
||
21 | */ |
||
22 | public function Get($campaignId = null, $args = array("limit" => 50)) |
||
26 | |||
27 | /** |
||
28 | * Get one or multiple lanes |
||
29 | * @param string campaign id |
||
30 | * @param string lane id, leave null for list of lanes |
||
31 | * @param object Containing query arguments |
||
32 | * @return object Result of the request |
||
33 | */ |
||
34 | public function GetLane($campaignId, $laneId = null, $args = array("limit" => 50)) |
||
38 | |||
39 | /** |
||
40 | * Create new campaign |
||
41 | * @param object Containing all the information of a lane |
||
42 | * @return object Result of the request |
||
43 | */ |
||
44 | public function Create($campaign) |
||
48 | |||
49 | /** |
||
50 | * Create new lane |
||
51 | * @param string campaign id |
||
52 | * @param object Containing all the information of a lane |
||
53 | * @return object Result of the request |
||
54 | */ |
||
55 | public function CreateLane($campaignId, $lane) |
||
59 | |||
60 | /** |
||
61 | * Update a campaign |
||
62 | * @param object campaign containing the campaign id and fields that need to be updated |
||
63 | * @throws \Exception When boxid is not present |
||
64 | * @return object Result of the request |
||
65 | */ |
||
66 | public function Update($campaign) |
||
74 | |||
75 | /** |
||
76 | * Update a lane |
||
77 | * @param string Id of the campaign |
||
78 | * @param object lane containing the laneid and fields that need to be updated |
||
79 | * @throws \Exception When boxid is not present |
||
80 | * @return object Result of the request |
||
81 | */ |
||
82 | public function UpdateLane($campaignId, $lane) |
||
90 | |||
91 | /** |
||
92 | * Delete a campaign object by campaign id |
||
93 | * @param string Id of the campaign |
||
94 | * @return object Result of the request |
||
95 | */ |
||
96 | public function Delete($campaignId) |
||
100 | |||
101 | /** |
||
102 | * Retrieve stats of a lane by campaign |
||
103 | * @param string Id of the campaign |
||
104 | * @return object Result of the request |
||
105 | */ |
||
106 | public function Stats($campaignId) |
||
110 | |||
111 | /** |
||
112 | * Retrieve stats of a lane by campaign and lane id |
||
113 | * @param string Id of the campaign |
||
114 | * @param string Id of the lane to be deleted |
||
115 | * @return object Result of the request |
||
116 | */ |
||
117 | public function StatsLane($campaignId, $laneId) |
||
121 | } |
||
122 |