forked from santiazpi/PHP
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathZoomAPI.php
68 lines (51 loc) · 1.1 KB
/
ZoomAPI.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
namespace Zoom;
use Zoom\Endpoint\Users;
class ZoomAPI{
/**
* @var null
*/
private $apiKey = null;
/**
* @var null
*/
private $apiSecret = null;
/**
* @var null
*/
private $users = null;
/**
* Retorna uma instância única de uma classe.
*
* @staticvar Singleton $instance A instância única dessa classe.
*
* @return Singleton A Instância única.
*/
public function getInstance()
{
static $users = null;
if (null === $users) {
$this->users = new Users($this->apiKey, $this->apiSecret);
}
return $users;
}
/**
* Zoom constructor.
* @param $apiKey
* @param $apiSecret
*/
public function __construct( $apiKey, $apiSecret )
{
$this->apiKey = $apiKey;
$this->apiSecret = $apiSecret;
$this->getInstance();
}
/*Functions for management of users*/
public function createUser()
{
$createAUserArray['action'] = 'create';
$createAUserArray['email'] = $_POST['email'];
$createAUserArray['user_info'] = $_POST['user_info'];
return $this->users->create($createAUserArray);
}
}