remig26 / php-openlibrary
API Wrapper of OpenLibrary
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/remig26/php-openlibrary
Requires
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- pestphp/pest: ^3.8
README
A PHP client library for the Open Library API.
This library aims to facilitate the use of existing Open Library for READ-ONLY. It DOES NOT provide methods that requires authentication (create or edit works for example).
Installation
To install the package, use composer:
composer require remig26/php-openlibrary
Usage
<?php use PhpOpenlibrary\OpenLibrary; $api = new OpenLibrary(); $books = $api->searchBook("Name of a book"); $author = $api->findAuthor("OL234664A"); // Author's OLID $authorsBooks = $api->booksForAuthor("OL234664A"); // Advanced search $books = $api->searchBook("title:The,place:New York")
Testing
To run test cases (from the php-openlibrary directory):
./vendor/bin/pest