@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | class ZoomApi{ |
| 8 | 8 | |
| 9 | 9 | private $apiKey; |
| 10 | - private $apiSecret; |
|
| 11 | - private $apiUrl; |
|
| 10 | + private $apiSecret; |
|
| 11 | + private $apiUrl; |
|
| 12 | 12 | private $apiClient; |
| 13 | 13 | |
| 14 | 14 | public function __construct($apiKey, $apiSecret, $apiUrl = 'https://api.zoom.us/v1/') |
@@ -43,13 +43,13 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * |
|
| 47 | - * List Users |
|
| 48 | - * |
|
| 49 | - * @param integer $pageSize The amount of records returns within a single API call. Max of 300 users. |
|
| 50 | - * @param integer $pageNumber Current page number of returned records. Default to 1. |
|
| 51 | - * @return array |
|
| 52 | - */ |
|
| 46 | + * |
|
| 47 | + * List Users |
|
| 48 | + * |
|
| 49 | + * @param integer $pageSize The amount of records returns within a single API call. Max of 300 users. |
|
| 50 | + * @param integer $pageNumber Current page number of returned records. Default to 1. |
|
| 51 | + * @return array |
|
| 52 | + */ |
|
| 53 | 53 | public function listUsers($pageSize = 30, $pageNumber = 1) |
| 54 | 54 | { |
| 55 | 55 | $data['page_size'] = $pageSize; |
@@ -59,15 +59,15 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * |
|
| 63 | - * Create A Meeting |
|
| 64 | - * |
|
| 65 | - * @param string $hostId Meeting host user ID. Can be any user under this account |
|
| 66 | - * @param integer $type Meeting type |
|
| 67 | - * @param string $topic Meeting topic. Max of 300 characters |
|
| 68 | - * @param array $data Additional Data |
|
| 69 | - * @return array |
|
| 70 | - */ |
|
| 62 | + * |
|
| 63 | + * Create A Meeting |
|
| 64 | + * |
|
| 65 | + * @param string $hostId Meeting host user ID. Can be any user under this account |
|
| 66 | + * @param integer $type Meeting type |
|
| 67 | + * @param string $topic Meeting topic. Max of 300 characters |
|
| 68 | + * @param array $data Additional Data |
|
| 69 | + * @return array |
|
| 70 | + */ |
|
| 71 | 71 | public function createMeeting($hostId, $type, $topic, $data = []) |
| 72 | 72 | { |
| 73 | 73 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use GuzzleHttp\Client; |
| 6 | 6 | |
| 7 | -class ZoomApi{ |
|
| 7 | +class ZoomApi { |
|
| 8 | 8 | |
| 9 | 9 | private $apiKey; |
| 10 | 10 | private $apiSecret; |
@@ -28,14 +28,14 @@ discard block |
||
| 28 | 28 | $data['api_key'] = $this->apiKey; |
| 29 | 29 | $data['api_secret'] = $this->apiSecret; |
| 30 | 30 | |
| 31 | - try{ |
|
| 32 | - $response = $this->apiClient->post($uri, [ |
|
| 31 | + try { |
|
| 32 | + $response = $this->apiClient->post($uri, [ |
|
| 33 | 33 | 'form_params' => $data |
| 34 | 34 | ]); |
| 35 | 35 | |
| 36 | 36 | // $body = $response->getBody()->getContents(); |
| 37 | 37 | $result = json_decode($response->getBody(), true); |
| 38 | - }catch(GuzzleHttp\Exception\ClientException $ex){ |
|
| 38 | + }catch (GuzzleHttp\Exception\ClientException $ex) { |
|
| 39 | 39 | throw $ex; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $validTypes = [1, 2, 3, 8]; |
| 75 | 75 | |
| 76 | - if(!in_array($type, $validTypes)){ |
|
| 76 | + if (!in_array($type, $validTypes)) { |
|
| 77 | 77 | throw new \InvalidArgumentException('Invalid `type` passed. Possible values for `type` are ' . implode(", ", $validTypes)); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | $invalidDataKeys = array_diff(array_keys($data), $optionalFields); |
| 104 | 104 | |
| 105 | - if(!empty($invalidDataKeys)){ |
|
| 105 | + if (!empty($invalidDataKeys)) { |
|
| 106 | 106 | throw new \InvalidArgumentException('Invalid data passed. `' . implode(", ", $invalidDataKeys) . '` are not allowed.'); |
| 107 | 107 | } |
| 108 | 108 | |