Download the PHP package bmeme/eventbrite_connector without Composer
On this page you can find all versions of the php package bmeme/eventbrite_connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bmeme/eventbrite_connector
More information about bmeme/eventbrite_connector
Files in bmeme/eventbrite_connector
Package eventbrite_connector
Short Description PHP Library for integration with Eventbrite API v3
License MIT
Informations about the package eventbrite_connector
Eventbrite Connector
Eventbrite Connector is a simple and easy to use PHP Library for integration with Eventbrite API v3.
Installation
Require the library via composer: composer require bmeme/eventbrite_connector
Install it by running composer install
And then add the autoloader file to your script:
And it's done! Congratulations!
The Connector
Consider that the Connector class, provides all the necessary methods to deal with "Personal Tokens" or "OAuth token flow" access methods provided by Eventbrite, but the implementation logic is demanded to you.
Now that you've required the autoloader you can instantiate the Connector:
For this example i'm in the "Personal Tokens" magic world.
Congratulations, this is your firs Connector! Take care of him.
Has someone said "Entities"?
To send requests to Eventbrite API, the Connector must know of what are we talking about:
- Events
- Users
- Orders
- ... (other)
Each of these points is an Eventbrite Entity type, identified by its own EntityApiType, that defines the base path for its specific REST call (eg: events for Event, users for User, etc...).
Entity C.R.U.D.:
Create
Is it possible to create new entities* via the static method create() for each "creatable" Entity class:
* Creatable entities are: Event, Organizer, Series, Venues, Webhooks.
In order to create *entity properties you can use the Entity saveProperty()** method:
* Entity properties are all those endpoints defined with the following schema:
/<entity_api_type>/:id/<property_name>/
Eg:POST /events/:id/ticket_classes/
Read
Entities can be fetched by using the Connector fetch() method:
You can load a specific entity property, or filter property results by condition criteria using the Entity load() method.
Note: Is it possible to access last loaded data by using the Entity method getActiveData()
Update
To update an entity use the Entity update() method with an array of values to be changed as argument.
Delete
Entities can be deleted by using the Entity delete() method:
Media
You can use the Media Entity to upload() your files to Eventbrite.
Note: Crop mask parameter is optional.
E.B. phone home
So, now that you have understood the Entities concept and you have a Connector, you are ready to use both of them for data retrieving. You can use your Connector in a "standard" way or in a more "fluent" one.