Heratio Framework API Reference

LibraryCoverService
in package

Service to download and store library book covers as AtoM digital objects

Table of Contents

Methods

downloadAndSaveAsDigitalObject()  : bool
Download cover from URL and save as AtoM digital object
downloadAndSaveCover()  : string|null
Legacy method - kept for compatibility but now saves to digital_object
getOpenLibraryCoverUrl()  : string|null
Get Open Library cover URL for an ISBN
hasOpenLibraryCover()  : bool
Check if Open Library has a cover for this ISBN

Methods

downloadAndSaveAsDigitalObject()

Download cover from URL and save as AtoM digital object

public downloadAndSaveAsDigitalObject(int $informationObjectId, string $coverUrl) : bool
Parameters
$informationObjectId : int
$coverUrl : string

External URL of the cover image

Return values
bool

True on success, false on failure

downloadAndSaveCover()

Legacy method - kept for compatibility but now saves to digital_object

public downloadAndSaveCover(int $informationObjectId, string $coverUrl) : string|null
Parameters
$informationObjectId : int
$coverUrl : string
Return values
string|null

getOpenLibraryCoverUrl()

Get Open Library cover URL for an ISBN

public getOpenLibraryCoverUrl(string $isbn[, string $size = 'L' ]) : string|null
Parameters
$isbn : string
$size : string = 'L'

S, M, or L

Return values
string|null

hasOpenLibraryCover()

Check if Open Library has a cover for this ISBN

public hasOpenLibraryCover(string $isbn) : bool
Parameters
$isbn : string
Return values
bool

        
On this page

Search results