Download the PHP package teodortalov/citrix without Composer

On this page you can find all versions of the php package teodortalov/citrix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package citrix

Citrix API - PHP wrapper around GoToWebinar APIs - 2015

Install via Composer

require "teodortalov/citrix: *"

Authenticate and Get Going in 15 seconds

All you need in order to authenticate with Citrix's API is a consumer key, which you can obtain by registering at Citrix Developer Center. After registering and adding your application, you will be given Consumer Key, Consumer Secret, and Callback URL. You need the Consumer Key in order for your application to authenticate with Citrix using this library.

Direct Authentication

In addition to the Consumer Key, for Direct Authentication you need your username and password, which is the one that you use to login into GoToWebinar.com.

You can authenticate to Citrix, and your GoToWebinar account respectively, like so:

$client = new \Citrix\Authentication\Direct('CONSUMER_KEY');
$client->auth('USERNAME', 'PASSWORD'); 

Generally, the things you need the most are the access_token and organizer_key. You can retrieve those like this:

$client->getAccessToken(); //returns your access token
$client->getOrganizerKey(); //returns the organizer key

The code will handle all the authentication stuff for you, so you don't really have to worry about that.

Getting upcoming webinars

In order to get all the upcoming webinars, you have to do this:

$goToWebinar = new \Citrix\GoToWebinar($client); //@see $client definition above 
$webinars = $goToWebinar->getUpcoming();
var_dump($webinars); //this gives you all upcoming webinars

Getting past webinars

In order to get all the past webinars, you have to do this:

$goToWebinar = new \Citrix\GoToWebinar($client); //@see $client definition above 
$webinars = $goToWebinar->getPast();
var_dump($webinars); //this gives you all upcoming webinars

If you would like to get the registration/join URL for a webinar you can do so like this:

Register a user for a webinar

You can really easily register somebody for a webinar. Basically, all you need to do is this:

$data = array('email' => '[email protected]', 'firstName' => 'Joe', 'lastName' => 'Smith');
$consumer = new \Citrix\Entity\Consumer($client);
$consumer->setData($data)->populate();

//register a user for the very first upcoming webinar, @see Getting upcoming webinars
$webinar = reset($webinars);
$webinar->registerConsumer($consumer);

As mentioned above $client you can get from Authenticate and Get Going in 15 seconds section, and $webinar you can get from Getting upcoming webinars section.

Alternatively, you can register a user for a webinar by providing the webinarKey and the user data directly to the GoToWebinar class like so:

$webinarKey = 123123;
$registrantData = array('email' => '[email protected]', 'firstName' => 'Joe', 'lastName' => 'Smith');

$goToWebinar = new \Citrix\GoToWebinar($client); //@see $client definition above
$goToWebinar->register($webinarKey, $registrantData);

Error handling

The code does handle errors but it fails silently. You can check for errors like so:

$data = array('email' => '[email protected]', 'firstName' => 'Joe', 'lastName' => 'Smith');
$consumer = new \Citrix\Entity\Consumer($client);
$consumer->setData($data)->populate();

//register a user for the very first upcoming webinar, @see Getting upcoming webinars
$webinar = reset($webinars);
$registration = $webinar->registerConsumer($consumer);

if($registration->hasErrors()){
   //get the first error that occurred and use it as the exception message
   throw new \Exception($registration->getError());
}

//no errors, continue...
die('Registration was successful.');

You can also display/get all errors like so:

$registration->getErrors();

Also you can push new errors like so:

$registration->addError('Something went wrong!!!');

Error handling should be available everywhere, so you should always be able to call hasErrors() and check for errors.

Contributions - Fork, Fork, Fork

If you would like to help maintain this project and/or if you have any questions or comments about the library's design or implementation I'd love to hear from you.

What's coming?

More stuff, first and foremoest in-like documentation, so your IDE works. Unit testing, and more from Citrix API.


All versions of citrix with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package teodortalov/citrix contains the following files

Loading the files please wait ....