1. Go to this page and download the library: Download coviu/coviu-sdk 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/ */
coviu / coviu-sdk example snippets
use coviu\Api\Coviu;
$api_key = 'my_api_key_from_coviu.com';
$api_key_secret = 'my_api_key_secret';
$coviu = new Coviu('api_key', 'key_secret');
date_default_timezone_set('GMT');
$session = array(
'session_name' => 'A test session with Dr. Who',
'start_time' => (new \DateTime())->format(\DateTime::ATOM),
'end_time' => (new \DateTime())->modify('+1 hour')->format(\DateTime::ATOM),
'picture' => 'http://www.fillmurray.com/200/300'
);
$session = $coviu->sessions->createSession($session);
var_dump($session);
array(8) {
["team_id"]=>
string(36) "bc5f47f1-f990-4d4d-a332-d3aa27ce6b76"
["client_id"]=>
string(36) "440ee0f6-f99a-4515-ad15-da67dc29b0fc"
["participants"]=>
array(0) {
}
["session_id"]=>
string(36) "6a157415-55cd-45a4-a82f-cd78b52e67b3"
["session_name"]=>
string(27) "A test session with Dr. Who"
["start_time"]=>
string(24) "2016-06-18T12:37:59.000Z"
["end_time"]=>
string(24) "2016-06-18T13:37:59.000Z"
["picture"]=>
string(33) "http://www.fillmurray.com/200/300"
}
$client = new Coviu($api_key, $key_secret);
$grant = $client->authorizationCode($code);
// Now create a client that acts on behalf of the user
$client2 = new Coviu($api_key, $key_secret, $grant);
// Get the team the user authorized you to access
$res2 = $client2->user-getAuthorizedTeam();
// Get that user's scheduled sessions
$res = $client2->sessions->getSessions();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.