0.16.4 • Published 3 years ago

astrocite-eutils v0.16.4

Weekly downloads
280
License
MIT
Repository
github
Last release
3 years ago

astrocite-eutils

A helper library for converting PubMed EUtils ESummary JSON to CSL JSON.

See astrocite for more details.

API

toCSL(apiResponse)

Returns: Array<CSL.Data | EUtilsError>

Where EUtilsError has the following interface

interface EUtilsError extends Error {
    /**
     * If the error occured on a single reference, then this is set with the identifier of that
     * reference
     */
    uid?: string;
    /**
     * True if the error is a global API-level error. Otherwise the Error occured on a single
     * reference (i.e, some of the request produced a valid result.)
     **/
    apiError: boolean;
}

apiResponse

Type: Object

The entire JSON response received from the PubMed EUtils ESummary API

Usage

import { toCSL } from 'astrocite-eutils';

// Assume apiResponse is the JSON received from the EUtils ESummary API
const cslJSON = toCSL(apiResponse);
0.16.4

3 years ago

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

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.6

7 years ago

0.8.5

7 years ago

0.8.4

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago