VuFind API Documentation

Booksite extends AbstractBase
in package

Booksite review content loader.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$apiKey  : string
API key for Booksite
$url  : string
Base URL for Booksite
__construct()  : mixed
Constructor
loadByIsbn()  : array<string|int, mixed>
Booksite
debug()  : void
Log a debug message.
getHttpClient()  : Client
Get an HTTP client
getIsbn10()  : string
Attempt to get an ISBN-10; revert to ISBN-13 only when ISBN-10 representation is impossible.
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.

Properties

$apiKey

API key for Booksite

protected string $apiKey

$url

Base URL for Booksite

protected string $url

Methods

__construct()

Constructor

public __construct(string $url, string $apiKey) : mixed
Parameters
$url : string

Base URL for Booksite

$apiKey : string

API key for Booksite

Return values
mixed

loadByIsbn()

Booksite

public loadByIsbn(string $key, ISBN $isbnObj) : array<string|int, mixed>

Connects to Booksite's API and retrieves reviews for the specific ISBN

Parameters
$key : string

API key (unused here)

$isbnObj : ISBN

ISBN object

Tags
throws
Exception
author

Joe Atzberger

SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
array<string|int, mixed>

Returns array with review data.

debug()

Log a debug message.

protected debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

getHttpClient()

Get an HTTP client

protected getHttpClient([string $url = null ]) : Client
Parameters
$url : string = null

URL for client to use

Tags
throws
Exception
Return values
Client

getIsbn10()

Attempt to get an ISBN-10; revert to ISBN-13 only when ISBN-10 representation is impossible.

protected getIsbn10(ISBN $isbnObj) : string
Parameters
$isbnObj : ISBN

ISBN object to convert

Return values
string

log()

Send a message to the logger.

protected log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
$level : string

Log level

$message : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = false

Prepend class name to message?

Return values
void

logError()

Log an error message.

protected logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

logWarning()

Log a warning message.

protected logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

Search results