A PHP 7Digital api client
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin Upgraded to phpspec2 Jul 11, 2013
spec/SevenDigital
src/SevenDigital
.gitignore
.scrutinizer.yml
.travis.yml
LICENCE
README.md
composer.json
phpspec.yml

README.md

Build Status Latest Stable Version SensioLabsInsight Scrutinizer Quality Score

Installation

  1. Add the following to your composer.json:
    "require": {
        "gquemener/7digital-client": "~1.0"
    }
  1. Update your deps using composer.phar update --prefer-dist`
  2. 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 or send a PR.