astrocite-googlebooks
    TypeScript icon, indicating that this package has built-in type declarations

    0.16.0 • Public • Published

    astrocite-googlebooks

    A helper library for converting Google Books API JSON to CSL JSON.

    See astrocite for more details.

    API

    toCSL(apiResponse, isChapter = false)

    Returns: Array<CSL.Data>

    apiResponse

    Type: Object

    The entire JSON response received from the Google Books volumes API.

    isChapter

    Type: boolean

    Use this to set title to the appropriate field when you intend to use the data for citing an individual chapter.

    Usage

    import { toCSL } from 'astrocite-googlebooks';
     
    // Assume apiResponse is the JSON received from the Google Books volume API
    const cslJSON = toCSL(apiResponse);
     
    // Citing a chapter
    const chapterCslJSON = toCSL(apiResponse, true);

    Keywords

    none

    Install

    npm i astrocite-googlebooks

    DownloadsWeekly Downloads

    627

    Version

    0.16.0

    License

    MIT

    Unpacked Size

    7.05 kB

    Total Files

    11

    Last publish

    Collaborators

    • dsifford