2017 © Pedro Peláez
 

library gracenote

A PHP library for abstracting the Gracenote API

image

gracenote/gracenote

A PHP library for abstracting the Gracenote API

  • Tuesday, May 28, 2013
  • by tom_anderson
  • Repository
  • 1 Watchers
  • 2 Stars
  • 122 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Gracenote API PHP Library

This is a library to abstract the Gracenote API, (*1)

Installation

  1. edit composer.json file with following contents:, (*2)

    json "require": { "gracenote/gracenote": "dev-master" }, (*3)

  2. install composer via curl -s http://getcomposer.org/installer | php (on windows, download http://getcomposer.org/installer and execute it with PHP)
  3. run php composer.phar install

Use

Configure the service, (*4)

use Gracenote\Service\Gracenote;

Gracenote::configure($clientId, $userId);

If you do not have a userId you may fetch one by setting your clientId and running, (*5)

Gracenote::register();

Run a query, (*6)

$simpleXmlResult = Gracenote::query('ALBUM_SEARCH', array(
    'mode' => 'SINGLE_BEST_COVER',
    'parameters' => array(
        'ARTIST' => 'the bengals',
        'ALBUM_TITLE' => 'different light',
        'TRACK_TITLE' => 'walk like an egyptian'
    ),
    'options' => array(
        'SELECT_EXTENDED' => 'COVER,REVIEW,ARTIST_BIOGRAPHY,ARTIST_IMAGE,ARTIST_OET,MOOD,TEMPO',
        'SELECT_DETAIL' => 'GENRE:3LEVEL,MOOD:2LEVEL,TEMPO:3LEVEL,ARTIST_ORIGIN:4LEVEL,ARTIST_ERA:2LEVEL,ARTIST_TYPE:2LEVEL',
    ),
));

The Gracenote API will return a SimpleXmlElement of the results, (*7)

The Versions

28/05 2013

dev-master

9999999-dev http://developer.gracenote.com

A PHP library for abstracting the Gracenote API

  Sources   Download

MIT

The Requires

 

zf2 music gracenote