Download the PHP package skiddle/skiddle-php-sdk without Composer
On this page you can find all versions of the php package skiddle/skiddle-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skiddle/skiddle-php-sdk
More information about skiddle/skiddle-php-sdk
Files in skiddle/skiddle-php-sdk
Package skiddle-php-sdk
Short Description PHP Wrapper for Skiddle API
License MIT
Homepage https://github.com/Skiddle/skiddle-php-sdk
Informations about the package skiddle-php-sdk
Skiddle PHP SDK
The purpose of the SDK is to allow for easy access to the Skiddle API. This will allow developers to easily communicate with the Skiddle API to pull through information about events, artists and venues
Table of contents
- Requirements
- Installation
- Download the SDK
- Get an API Key
- Integrate
- Examples
- Authenticate Yourself
- Get the class Ready
- Add and Remove conditions
- Get results
- Get a single result
- Things to note
- License
- Contact
Requirements
The API requires PHP > 5.4.0, due to using autoloading and new array constructs. It also requires cURL to be enabled, which is normally done by default in PHP, but best to double check.
To connect to the API, TLS v1.2 or above is required. This has been supported by Curl using OpenSSL since version 1.0.1
Installation
Download the SDK
There are a couple of ways to get the SDK integrated to your project, the easiest way is probably via composer:
`
You can also clone the git repository `
Or, simply download the zip here and unzip to your project.
If using either of the last two methods, you will need to include the ` file in your project to load everything up
Get an API Key
Getting an API key is simple and free, simply go to https://www.skiddle.com/api/join.php to get one now
Integrate
Once you have the code and an API key, you are ready to get started!!
Examples
You can view code samples in the ` directory included in the repo
Authenticate yourself
The first step is to simply authenticate yourself - just tell the SDK what your API Key is
If you don't want to store this in your code, you can add it to your server environment as and the SDK will read from there.
Get the class Ready
After you have successfully authenticated yourself, you then need to pass your credentials to the revelant class that you want to use. This combines your authentication info with the endpoint necessary to make the calls.
To do this, simply call the setSession() method of the class you wish to use:
Add and Remove conditions
You are now ready to make calls to the API. You can now technically make a call to return listings, however the Skiddle SDK allows you to easily add or remove conditions to make your query specific to your needs.
To add a condition, you just need to pass the field and value in the method:
Likewise, to remove conditions, just use the method, using only the field name:
Get Results
Once you have built up your filter list, you can then get your listings!
For a full list of arguments you can filter by, have a look here
Get a single result
If you need to get a single result, you can call getListing()
, without having to build an array of arguments - just pass the relevant ID
For example:
Things to note
- When querying eventcodes, try to keeo values uppercase. Passing CLUB will work, whereas passing club may return an error
- When using the minDate and maxDate conditions, timestamps need to be in either
Y-m-d
orY-m-dTH:i:s
format. -
Don't like objects? You can get results in array format by passing a boolean in :
- Check back for more
License
This SDK is licensed under the GNU General Public License v3.0. View the license here
Contact
Got any questions, or ways to improve the SDK? Feel free to log an issue, or pull and fork as much as you want!
All versions of skiddle-php-sdk with dependencies
ext-curl Version *