0.16.0 • Published 5 years ago

astrocite-googlebooks v0.16.0

Weekly downloads
256
License
MIT
Repository
github
Last release
5 years ago

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);
0.16.0

5 years ago

0.15.0

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago