PHP code example of daycry / zoom

1. Go to this page and download the library: Download daycry/zoom library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

daycry / zoom example snippets


$psr4 = [
    'Config'      => APPPATH . 'Config',
    APP_NAMESPACE => APPPATH,
    'App'         => APPPATH,
    'Daycry\Zoom' => APPPATH .'ThirdParty/zoom/src',
];

$zoom = new \Daycry\Zoom\Zoom();


$zoom = \Config\Services::zoom();


protected $helpers = [ 'zoom_helper' ];



$zoom = zoom_instance();



/**
 *
 * @return AccessTokenInterface
 */

$zoom = new \Daycry\Zoom\Zoom();
$token = $zoom->authentication();

echo "<pre>";
echo json_encode( $token );
echo "</pre>";


/**
 * Returns an authenticated PSR-7 request instance.
 *
 * @param  string $method
 * @param  string $url
 * @return RequestInterface
 */

$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$reponse = $zoom->request( 'GET', 'users' );

echo "<pre>";
var_dump( $reponse );
echo "</pre>";


/**
 * Returns an authenticated PSR-7 request instance.
 *
 * @param  string $method
 * @param  string $url
 * @param  array $options Any of "headers", "body", and "protocolVersion".
 * @param  AccessTokenInterface|string $token
 * @return RequestInterface
 */

$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$reponse = $zoom->request( 'GET', 'users', [], $token );

echo "<pre>";
var_dump( $reponse );
echo "</pre>";


/**
 *
 * @return AccessTokenInterface
 */

$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );

$reponse = $zoom->refreshAccessToken();

echo "<pre>";
var_dump( $reponse );
echo "</pre>";



{"token_type":"bearer","scope":"dashboard_crc:read:admin","access_token":"xxxxx","refresh_token":"xxxxxx","expires":1586716974}