Login   Register  
PHP Classes

File: examples/WhatWork.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Robert van der Linde  >  LibraryThing Services  >  examples/WhatWork.php  >  Download  
File: examples/WhatWork.php
Role: Example script
Content type: text/plain
Description: example for WhatWork
Class: LibraryThing Services
Get book information using the LibraryThing API
Author: By
Last change:
Date: 5 years ago
Size: 660 bytes


Class file image Download
 * Instantiate the webservice
$service = new WhatWorkService();

 * Will dump out an associative array
 * array( 'link' => 'http://a_link_to_the.librarything.work/',
 *        'work' => 'a_work_id');
var_dump($service->getWorkInformation(array(WhatWorkService::PARAMETER_AUTHOR => 'Tom Clancy')));

 * Will return the link to the book identified by isbn 0001010192
$link $service->getWorkLink(array(WhatWorkService::PARAMETER_ISBN => '001010192'));

 * Will return the work id for the first book found with the title "Art of war"
$workId $service->getWorkId(array(WhatWorkService::PARAMETER_TITLE => 'Art of war'));