Download the PHP package mrpc/beatportapi without Composer
On this page you can find all versions of the php package mrpc/beatportapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrpc/beatportapi
More information about mrpc/beatportapi
Files in mrpc/beatportapi
Package beatportapi
Short Description Beatport Api Class
License WTFPL
Homepage https://github.com/mrpc/beatportapi
Informations about the package beatportapi
Beatport API PHP Class
A simple PHP class to query the Beatport API via Oauth, server side.
The use case is for a server to server context.
The class essentially just returns an array which you can then manipulate as you please.
This is originally based on the following people's work:
- Beatport API PHP Class by Moussa Clarke (I forked this repo as a starting point)
- Beatport API Json Feed by Federico Giust
- Beatport OAuth Connect w/ PECL by Tim Brandwijk (Federico Giust's script was based on this one)
- Beatport OAuth Connect w/ PEAR by Christian Kolloch (Also based on Tim Brandwijk's script)
Aims
- Login and query the Beatport API
- Abstract away the OAuth pain
- Send back a simple array with the query results
Requirements
- PHP 5.5+
- Beatport API Key and login details (You'll need to request those from Beatport)
- Guzzle 6 (via composer)
Install
Usage
You can check the Beatport API documentation for which queries you can make and which parameters are required, although they are currently untested much beyond the above example, and not everything is documented, so your mileage may vary.
Disclaimer
Totally and utterly alpha, and likely to break at any point. Not guaranteed to work as intended in any way, so use at your own risk.
Todo
- Store the tokens somewhere and re-use until expiry
- Get some sanity into the variable / method names
- Add some proper error catching / messaging
- Test and document other query types.
Contribute
Would be cool to improve this, so feel free to submit bug reports, suggestions and pull requests. Can't guarantee I've got enough time to do very much though! Alternatively just fork it and make your own thing.
License
WFTPL, insofar as those other guys are cool with that.