gquemener / 7digital-client
A PHP 7Digital api client
Installs: 1 674
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 5
Forks: 7
Open Issues: 0
Requires
- php: >=5.3.3
- doctrine/common: ~2.3
- guzzle/guzzle: ~3.1
Requires (Dev)
- phpspec/phpspec: ~2.0@dev
Suggests
- gquemener/7digital-bundle: 7digital API PHP Client integration into Symfony2 Framework
This package is auto-updated.
Last update: 2024-12-11 18:40:44 UTC
README
Installation
- Add the following to your composer.json:
"require": { "gquemener/7digital-client": "~1.0" }
- Update your deps using `composer.phar update --prefer-dist``
- Start playing!
Usage
<?php require './vendor/autoload.php'; use SevenDigital\ApiClient; $client = new ApiClient(/** consumer_key */); $track = $client->getTrackService(); //Services artist, release and tag are also accessible the same way $results = $track->search('Queen'); // Use the method name as described in the 7digital api documentation // (ex: http://api.7digital.com/1.2/static/documentation/7digitalpublicapi.html#track/search) // Required argument can be passed directly $results = $track->search(array( // Other arguments must be passed as a hash 'q' => 'Queen', // Method result will be an instance of \SimpleXMLElement (http://fr2.php.net/simplexmlelement) 'pageSize' => 1, ));
If a method is missing, feel free to [contact me](mailto:gildas.quemener at gmail dot com) or send a PR.