You are here

function zoomapi_api_client in Zoom API 7.2

Get ZoomAPI client.

1 call to zoomapi_api_client()
zoomapi_client in ./zoomapi.module
Get ZoomAPI client.

File

./zoomapi.api.inc, line 13
API callbacks for Zoom API module.

Code

function zoomapi_api_client() {
  $api_key = variable_get('zoomapi_key', '');
  $api_secret = variable_get('zoomapi_secret', '');
  try {
    if (empty($api_key) || empty($api_secret)) {
      throw new Exception('Missing Zoom API key or secret.');
    }
    $zoom_client = new ZoomAPIClient($api_key, $api_secret);
    return $zoom_client;
  } catch (\Exception $e) {
    watchdog(__FUNCTION__, 'Unable to load Zoom API client library. Error: @e', [
      '@e' => $e
        ->getMessage(),
    ], WATCHDOG_CRITICAL);
    return FALSE;
  }
}