This is an example of using the PHP client SDK to make queries to OneMusicAPI.
PHP 5.5 and later
In short, follow the instructions at https://packagist.org/.
When composer
is run, the dependencies are downloaded. These include the client-php
package itself, and downstream dependencies like a HTTP client.
- Download
composer.phar
into the root folder of the project. - Run composer to download the dependencies:
php composer.phar install
- Inside your code, replace the
$user_key
variable, inputting your user key sent to you when you signed up. - Test the page!
Currently we only have one example, which queries OneMusicAPI for information about a release given its title and artist.
Update the dependencies via composer running in Docker:
docker run -it --rm --name php-composer -v "$PWD":/usr/src/myapp -w /usr/src/myapp alexwijn/docker-git-php-composer php composer.phar update