<?php /** * 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')); ?>
|