/openlibrary-php

A PHP wrapper for the Open Library API

Primary LanguagePHP

Open Library API Client

Warning

This was forked from beezus/openlibrary-php in order to add updated support for current guzzlehttp/guzzle:^7.0 and PHP >=8. It's looking like the API has changed pretty significantly, so this is going to need more work than originally thought to return sane responses. The OLID endpoint appears to work now, but that's about it so far.

Allows some interaction with the Open Library API using an object-based interface.

Installation

This package can be installed via Composer:

composer require beezus/openlibrary-php

Basic usage

<?php

// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

use OpenLibrary\API\Client as OpenLibraryAPI;

$api = new OpenLibraryAPI();
$book = $api->getBookByOLID( 'OL24222743M' );
echo $book->title;