opendaje/isbndb-client

0.1.1 2024-04-05 11:53 UTC

README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

CD/CI

⚠ Launching early stage releases (0.x.x) could break the API according to Semantic Versioning 2.0. We are using minor for breaking changes. This will change with the release of the stable 1.0.0 version.

PHP api client for ISBNdb database.

Install

composer require opendaje/isbndb-client

// add a PSR Http client

composer require http-interop/http-factory-guzzle php-http/guzzle6-adapter

Usage

Register for your API KEY at https://isbndb.com/isbn-database

<?php declare(strict_types=1);

use IsbnDbClient\IsbnDbClient;

require_once __DIR__ . '/../vendor/autoload.php';

$token = 'YOUR_API_KEY';

$client = new IsbnDbClient();
$client->authenticate($token);

try {
    $response = $client->api('author')->searchAuthors('eric evans');

    print_r($response);
} catch (Exception $exception){
    print_r($exception->getMessage());
}