Download the PHP package macsidigital/laravel-zoom without Composer
On this page you can find all versions of the php package macsidigital/laravel-zoom. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download macsidigital/laravel-zoom
More information about macsidigital/laravel-zoom
Files in macsidigital/laravel-zoom
Package laravel-zoom
Short Description Laravel Zoom package
License MIT
Homepage https://github.com/MacsiDigital/laravel-zoom
Rated 1.00 based on 1 reviews
Informations about the package laravel-zoom
Laravel Zoom
Laravel Zoom API Client
Laravel Zoom API Package
Support us
We invest a lot in creating open source packages, and would be grateful for a sponsor if you make money from your product that uses them.
Our API mission!
Let's be honest, API's are all over the place and so inconsistent. We are therefore setting out to try to change this for all Laravel user's who need an API client and have developed an API Client Library, which our API's are built on top of, to give a common set of consistent functionality.
Updates & Issues
We only accept Issues through Github
We update security and bug fixes as soon as we can, other pull requests and enhancements will be as and when we can do them.
You can follow us on Twitter where we will post any major updates. MacsiDigital Twitter
Installation
You can install the package via composer:
For versioning:-
-
1.0 - deprecated - was a quick build for a client project, not recommended you use this version.
-
2.0 - Laravel 5.5 - 5.8 - deprecated, no longer maintained
-
3.0 - Laravel 6.0 - Maintained, feel free to create pull requests. This is open source which is a 2 way street.
- 4.0 - Laravel 7.0 - 8.0 - Maintained, feel free to create pull requests. This is open source which is a 2 way street.
Configuration file
Publish the configuration file
This will create a zoom.php config file within your config directory:-
You need to add ZOOM_CLIENT_KEY and ZOOM_CLIENT_SECRET into your .env file.
Also note the tokenLife, there were numerous users of the old API who said the token expired to quickly, so we have set for a longer lifeTime by default and more importantly made it customisable.
That should be it.
Usage
Everything has been set up to be similar to Laravel syntax. So hopefully using it will be similar to Eloquent, right down to relationships.
Unfortunately the Zoom API is not very uniform and is a bit all over the place. But we have hopefully made this uniform and logical. However you will still need to read the Zoom documentation to know what is and isn't possible.
At present we cover the following modules
- Users
- Roles
- Meetings
- Past Meetings
- Webinars
- Past Webinars
- Recordings
Doesn't look like a lot but Meetings and Webinars are the 2 big modules and includes, polls, registration questions, registrants, panelists and various other relationships.
Also note that some of the functionality is only available to certain plan types. Check the Zoom documentation.
Connecting
To get an access point you can simply create a new instance and the resource.
Accessing models
There are 2 main ways to work with models, to call them directly from the access entry point via a facade, or to call them in the standard php 'new' method and pass in the access entry point
Custom settings
If you would like to use different configuration values than those in your zoom.php config file, you can feed those as parameters to \MacsiDigital\Zoom\Support\Entry as shown below.
Working with models
As noted we are aiming for functionality similar to Laravel, so most things that you can do in Laravel you can do here, with exception to any database specific functionality, as we are not using databases.
Each model may also have some custom functions where Zoom has some unique functionality. We try to list all this below, under Resources.
Common get functions
First
We utilise the first function to return the first record from the record set. This will return an instantiated model.
Find
We utilise the find function to return a record by searching for it by a unique attribute. This will return an instantiated model.
All
The find all function returns a customised Laravel Collection, which we call a resultset.
When calling the all function we will make up to 5 API calls to retrieve all the data, so 5 x 300 records (the max allowed), i.e. up to 1500 records per request. This can be amended in the config by updating 'max_api_calls_per_request'.
More info below in ResultSets.
Get
We utilise the get function when we want to retrieve filtered records. Note that Zoom doesn't offer much in the way of filters. So check the documentation.
When using the get call we will automatically paginate results, which by default is 30 records. You can increase/decrease this by calling the paginate function.
You can disable the pagination, so it behaves the same as the all() function
resultSet
The all and get functions return a resultSet which is an enhanced Laravel Collection. Like collections, we can call the toArray and toJson functions, which places the data in a 'data' field and adds some meta information on total records and page information.
There are a few additional helper functions.
If our data set is larger than the returned records then we call the nextPage() function to return the next page of records.
We can then also navigate back a page by calling the previousPage() function. When doing this we will return cached results rather than querying the API.
There is also a function to accumulate more records, if you call the getNextRecords() function it will retrieve the next 1500 results and add them to the current records, so you can then run through 3000 records if required.
It is not advisable to mix the page navigation with the accumulating records function.
There are also a number of helper functions.
As noted above we are using collections as the base for the record sets, so anything that is possible in collections is possible here. As Zoom's ability to filter is limited we can use the collections 'where' function for example.
Persisting Models
Again, the aim is to be similar to laravel, so you can utilise the save, create, update and make methods.
Save
To save a model we will use the save method, this will determine if the model is a new model or an existing and insert or update the model as needed.
Create
Currently, only the User model and Role model can be created directly, most other models need to be created as part of a relationship, see below for details.
To create a user.
Make
Make is similar to create except it will not persist the model to the API. This is handy for relationship models, more on this below.
Update
We can also mass update attributes.
Relationships
A major change to the newer versions of our API client is we use Relationships similar to Laravel. To retrieve all meetings associated to a user we would call like so.
In the Zoom API some relationships get returned direct with the parent model, some we have to make additional API calls for (this is worthwhile knowing for performance reasons and API rate limits).
Its also worth pointing out that we are returning the resultset by calling ->meetings. If we call the function ->meetings() we receive the relationship object which can be further queried.
The later is handy when we need to filter results
As noted above, Zoom has very limited queryable filters, so check with the Zoom documentation.
Save & Create
We can utilise the create and save functions on the relationship model to create models that require a relationship.
We can also utilise the Make and Attach methods for creating and attaching models to a parent without persisting the model. This is handy for attaching sub models that need to save as part of the parent.
Validation
Validation is built into the API where possible, and will throw an exception if there are validation errors. If our own validation fails and the Zoom request returns an error, then we will throw a HTTP exception.
If Validation in the API changes or something is not working, then the best is to amend the request object for the failing model and submit a pull request.
Resources
We give a brief overview of the common models, we have not included any validation requirements, you will need to check documentation for this.
Roles
Users
This is the main access for most models in Zoom.
User Settings
Meetings
Webinars
Meeting/Webinar Occurrences
We are showing info for meeting, you will need to switch out meeting to webinar for webinars.
Meeting/Webinar Settings
We are showing info for meeting, you will need to switch out meeting to webinar for webinars.
Past Meetings
Coming soon
Past Webinars
Coming soon
To Do's
- Documentation Site
- Documentation for other Meeting/Webinar relationships
- Documentation for Past Meetings & Past Webinars
- OAuth2 implementation
- Tests
Changelog
Please see CHANGELOG for more information on 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
- Colin Hall
- MacsiDigital
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-zoom with dependencies
illuminate/support Version ^8.0|^9.0|^10.0
macsidigital/laravel-api-client Version ^5.0