Skip to content

Commit 34ca261

Browse files
committed
Users endpoint
1 parent 9c74f02 commit 34ca261

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

src/Endpoint/Users.php

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
3+
namespace UDX\Zoom\Endpoint;
4+
5+
use UDX\Zoom\Http\Request;
6+
7+
/**
8+
* Class Users
9+
* @package UDX\Zoom\Endpoint
10+
*/
11+
class Users extends Request {
12+
13+
/**
14+
* Users constructor.
15+
* @param $apiKey
16+
* @param $apiSecret
17+
*/
18+
public function __construct($apiKey, $apiSecret) {
19+
parent::__construct($apiKey, $apiSecret);
20+
}
21+
22+
/**
23+
* List
24+
*
25+
* @param array $query
26+
* @return array|mixed
27+
*/
28+
public function list( array $query = [] ) {
29+
return $this->get( "users", $query );
30+
}
31+
32+
/**
33+
* Create
34+
*
35+
* @param array|null $data
36+
* @return array|mixed
37+
*/
38+
public function create( array $data = null ) {
39+
return $this->post( "users", $data );
40+
}
41+
42+
/**
43+
* Retrieve
44+
*
45+
* @param $userID
46+
* @param array $query
47+
* @return array|mixed
48+
*/
49+
public function retrieve( string $userID, array $query = [] ) {
50+
return $this->get( "users/{$userID}", $query );
51+
}
52+
53+
/**
54+
* Remove
55+
*
56+
* @param $userId
57+
* @return array|mixed
58+
*/
59+
public function remove( string $userId ) {
60+
return $this->delete( "users/{$userId}" );
61+
}
62+
63+
/**
64+
* Update
65+
*
66+
* @param $userId
67+
* @param array $data
68+
* @return array|mixed
69+
*/
70+
public function update( string $userId, array $data = [] ) {
71+
return $this->patch( "users/{$userId}", $data );
72+
}
73+
}

0 commit comments

Comments
 (0)