A simple wrapper around the the GotoWebinar API.
We recommend installing this package with Composer.
Run in your project root:
composer require flipminds/gotowebinar:~1.0.0
use FlipMinds\GotoWebinar\GotoWebinar;
$credentials = [
'username' => ''
'password' => ''
'consumerKey' => ''
];
$gtw = new GotoWebinar($credentials);
$webinars = $gtw->getUpcoming();
$key = ''
foreach($webinars as $webinar) {
if (!$key) $key = $webinar->webinarKey;
}
$result = $gtw->createRegistrant($key, 'firstname','lastname','email);
print_r($result);
See the examples folder for more usages examples.
By default GotoWebinar Authentication Tokens are valid for 356 days. Caching the token result in one less round trip to GotoWebinar servers.
You can use the getAuth()
method call to retrieve an array of data that can be cached. You can use this array as a second argument to the constructor.
You can also set a callback to capture the authentication array after authenticating with GotoWebinar servers.
// $auth = getfromcache()
$gtw = new GotoWebinar($credentials, $auth); // see Above
$gtw->setAuthCallback(function($auth) {
// save $auth to cache
});