GithubHelp home page GithubHelp logo

worldcat-linkeddata-php's Introduction

WorldCat Linked Data for PHP

A PHP library for working with OCLC WorldCat's Linked Data implementation.

Allows you to retrieve metadata for known items (via OCLC number or ISBN) and retrieve the work and all other examples of work (i.e. FRBR Work/Manifestations).

Provides most of the functionality of OCLC's xID services and includes a semi-functional class for returning data in the rough shape as xID. (removed this for now)

Examples:

$manifestation = new \WorldCatLD\Manifestation();
$manifestation->findByIsbn('9780375985294');
echo $manifestation->name;
=> "The phantom tollbooth"

get_class($manifestation->author);
=> "WorldCatLD\Entity"

echo $manifestation->creator->name;
=> "Norton Juster"

$work = $manifestation->getWork();
$manifestations = $work->getWorkExample();
count($manifestations);
=> 152

foreach ($manifestations as $id => $exampleOfWork) {
    echo $exampleOfWork->name . "\n";
}

=>  The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    La caseta magica.
    Milos ganz und gar unmögliche Reise
    The phantom tollbooth
    The phantom tollbooth
    收费亭里的小米洛 = The phantom tollbooth
    The phantom tollbooth
    המגדל הפּורח באויר.
    The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    The phantom tollbooth
    Il casello magico
    ...

worldcat-linkeddata-php's People

Contributors

rsinger avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cboulanger

worldcat-linkeddata-php's Issues

Lots of ISBNs not found

Hi, I have the strange behavior that a lot of perfectly fine ISBNs are not found.

For example: 9783593508863 certainly exists:

https://www.worldcat.org/search?q=bn%3A9783593508863&qt=advanced&dblist=638

but $manifestation->findByIsbn("9783593508863"); will result in:

Client error: `GET http://experiment.worldcat.org/entity/work/data/4617044771.jsonld` resulted in a `404 Not Found` response:
--
  | <html><head><title> - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-colo (truncated...)
  | '

This happens with roughly half of the ISBNs in my test data.

Undefined offset: 4 in Resource.php:96

Thank you for this library, very useful!

Hi, when searching for book data via ISBN, I am getting the following error:

Undefined offset: 4 in /path/to/vendor/rsinger/worldcat-linkeddata-php/src/Resource.php:96

I am investigating why this could happen, but maybe you have an idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.