GithubHelp home page GithubHelp logo

laravel-zoom's Introduction

Laravel package for Zoom video conferencing

Latest Version on Packagist Build Status StyleCI Total Downloads

Package to manage the Zoom API in Laravel

Installation

You can install the package via composer:

composer require vaporic/laravel-zoom

The service provider should automatically register for For Laravel > 5.4.

For Laravel < 5.5, open config/app.php and, within the providers array, append:

vaporic\Zoom\Providers\ZoomServiceProvider::class

Configuration file

Publish the configuration file

php artisan vendor:publish --provider="vaporic\Zoom\Providers\ZoomServiceProvider"

This will create a zoom/config.php within your config directory, where you add value for api_key and api_secret.

Usage

Everything has been setup to be similar to Laravel syntax.

Unfortunately the Zoom API is not very uniform and is a bit all over the place, so at the minute there are a number of hacks to be able to get this to work. We will refactor and improve this.

We use relationships so you will need to check the Zoom API, for example to get a list of meetings or webinars you need to pass in a user id. WE use a little bit of relationship magic to acheive this in a more laravel type way.

So to get a list of meetings

	$zoom = new \vaporic\Zoom\Zoom;
	$meetings = $zoom->user->find('[email protected]')->meetings()->all();

Find all

The find all function returns a Laravel Collection so you can use all the Laravel Collection magic

	$zoom = new \vaporic\Zoom\Zoom;
	$users = $zoom->user->all();

Filtered

There are very few ocassions in the API where you can filter the results, but where you can you can use the where function. Again check the API documentation for where you can add a query to the request. To action you would do like so

    $zoom = new \vaporic\Zoom\Zoom;
    $thing = $zoom->thing->where('Name', '=', 'Test Name')->get();

You can also just passs the name and value if it is to equal

    $zoom = new \vaporic\Zoom\Zoom;
    $thing = $zoom->thing->where('Name', 'Test Name')->get();

To only get a single item use the 'first' method

    $zoom = new \vaporic\Zoom\Zoom;
    $thing = $zoom->thing->where('Name', 'Test Name')->first();

Find by ID

Just like Laravel we can use the 'find' method to return a single matched result on the ID. For users/registrants/panelists you can also use the email as well as the ID.

	$zoom = new \vaporic\Zoom\Zoom;
	$meeting = $zoom->meeting->find('000000000');

Creating Items

We can create and update records using the save function, below is the full save script for a creation.

	$user = $zoom->user->create([
        'name' => 'Test Name',
        'first_name' => 'First Name',
        'last_name' => 'Last Name',
        'email' => '[email protected]',
        'password' => 'secret',
        'type' => 1
    ]);
    $meeting = $user->meetings()->create([
    	'type' => '2',
    	'start_time' => '2019-06-29T20:00:00Z'
    ]);
    $registrant = $meeting->registrants()->create([
    	'email' => '[email protected]',
    	'first_name' => 'Test',
    	'last_name' => 'Registrant'
    ]);

There are also helper functions for adding sub objects

    $meeting = $zoom->meeting->find('000000000');
    $recurrance = $zoom->recurrance->create(['fields' => 'values']);
    $meeting->addRecurrance($recurrance);
    $meeting->save();

RESOURCES

We cover the main resources

Meetings
Panelists
Registrants
Users
Webinars

But some also have sub cresources, like

Recurrance
Occurance
Settings (for meetings and webinars)
Tracking Fields

We aim to add additional resources/sub-resources over time

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

laravel-zoom's People

Contributors

colinhall17 avatar vaporic avatar tpenaranda avatar

Stargazers

Roman 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.