Giter Site home page Giter Site logo

citrix's Introduction

Citrix GotoWebinar API Provider for Laravel

This package is a Citrix GotoWebinar API service provider and facade for Laravel 5.1+. It was inspired by Teodor Talov's Citrix API wrapper package.

Installing

You can use Composer to install the library

composer require slakbal/citrix

Find the providers array in the config/app.php file and add the following Service Provider:

'providers' => [
  // ...
  Slakbal\Citrix\CitrixServiceProvider::class
];

Now find the aliases array in the same config file and add the following Facade class:

'aliases' => [
  // ...
  'GotoWebinar' => Slakbal\Citrix\Facade\GotoWebinar::class
];

Config

Before you can use the Citrix service provider you have configure it. You can create API access keys here: CITRIX Developer portal.

Note that you need to have an active or trial account for the API to function properly. Just dev credentials alone will not work.

The provider currently only support Direct authentication. An OAuth2 authentication will be added later also.

The following environment values are required in your .env file. The provider doesn't publish any config, etc. thus your project stays clean.

[email protected]
CITRIX_DIRECT_PASSWORD=testpassword
CITRIX_CONSUMER_KEY=123123123123

Usage

Webinar Resource

// Return list of all the Webinars
$webinars = GotoWebinar::getAllWebinars();


// Return the list of all upcoming Webinars
$webinars = GotoWebinar::getUpcomingWebinars();


// Return list of historical Webinars - date format standard: W3C - ISO 8601
$dateRange = [  'fromTime' => "2016-01-01T01:00:00Z",
                'toTime'   => "2016-03-23T20:00:00Z", ];

$webinars = GotoWebinar::getHistoricalWebinars( $dateRange );


// Return a specific Webinar
$webinar = GotoWebinar::getWebinar( $webinarKey );


// Create a Webinar - date format standard: W3C - ISO 8601
$webinar = [ 'subject'     => 'API Test 2',
             'description' => 'This Webinar is created via the API',
             'startTime'   => "2016-03-23T19:00:00Z",
             'endTime'     => "2016-03-23T20:00:00Z", ];

$webinar = GotoWebinar::createWebinar( $webinar );


// Update a Webinar - date format standard: W3C - ISO 8601
$webinar = [ 'subject'     => 'API Test 2.2',
             'description' => 'This Webinar is updated via the API',
             'startTime'   => "2016-03-24T19:00:00Z",
             'endTime'     => "2016-03-24T20:00:00Z", ];

$webinar = GotoWebinar::updateWebinar( $webinarKey, $params, $sendNotification = true);


// Delete a specific Webinar
$result = GotoWebinar::deleteWebinar( $webinarKey, $sendNotification = true );

Attendee and Registrant Resource

// Return a list of attendees for a specific Webinar
$attendees = GotoWebinar::getWebinarAttendees( $webinarKey );


// Register an attendee for a specific Webinar
$webinarKey = '7102152795910768396';

$registrant = [ 'firstname'    => 'Peter',
                'lastname'     => 'Pan',
                'email'        => '[email protected]',
                'organization' => 'Neverland', ];

$result = GotoWebinar::registerAttendee( $webinarKey, $registrant );


// Return a list of registrants for a specific Webinar
$registrants = GotoWebinar::getWebinarRegistrants( $webinarKey );


// Return a specific registrant from a specific Webinar
$registrant = GotoWebinar::getWebinarRegistrant( $webinarKey, $registrantKey );


// Remove a specific registrant from a specific Webinar
$result = GotoWebinar::deleteWebinarRegistrant( $webinarKey, $registrantKey );

Session Resource

// Return list of sessions for the Organizer ()
$sessions = GotoWebinar::getOrganizerSessions();


// Return list of attendees for a specific Webinar and specific session
$attendees = GotoWebinar::getWebinarSessionAttendees( $webinarKey, $sessionKey );


// Return a specific attendee for a specific Webinar and specific session
$attendee = GotoWebinar::getWebinarSessionAttendee( $webinarKey, $sessionKey, $registrantKey );

Your contribution or bug fixes are welcome!

Next steps will be to build out more robuster error handling, add OAuth2 Authentication and adding the GotoMeeting provider into the package also.

Enjoy!

Slakkie

citrix's People

Contributors

slakbal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.