1 | <?php |
||
4 | class Profile 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 profiles |
||
18 | * @param string profile id, leave null for list of profiles |
||
19 | * @param object Containing query arguments |
||
20 | * @return object Result of the request |
||
21 | */ |
||
22 | public function Get($profileId = null, $args = array("limit" => 50)) |
||
26 | |||
27 | /** |
||
28 | * Create new profile |
||
29 | * @param object Containing all the information of a profile |
||
30 | * @return object Result of the request |
||
31 | */ |
||
32 | public function Create($profile) |
||
36 | |||
37 | /** |
||
38 | * Delete a profile by profileid |
||
39 | * @param string Id of the profile to be deleted |
||
40 | * @return object Result of the request |
||
41 | */ |
||
42 | public function Delete($profileid) |
||
46 | |||
47 | /** |
||
48 | * Update a profile |
||
49 | * @param object Profile containing the profileid and fields that need to be updated |
||
50 | * @throws \Exception When profileid is not present |
||
51 | * @return object Result of the request |
||
52 | */ |
||
53 | public function Update($profile) |
||
61 | |||
62 | /** |
||
63 | * Updates a maximum of 50 profiles at a time. |
||
64 | * @param array Containing profiles with a maximum of 50 |
||
65 | * @throws \Exception When more that 50 profiles are provided |
||
66 | * @return object Result of the request |
||
67 | */ |
||
68 | public function UpdateBulk($profiles) |
||
76 | } |
||
77 |