UNPKG

oxford-dictionary-nodejs

Version:

A modern tiny nodeJS wrapper for the oxforddictionary.com V2 REST API.

23 lines (22 loc) 831 B
import { DictionaryConfig, GetEntriesReponse } from "./types"; declare type Filelds = "definitions" | "domains" | "etymologies" | "examples" | "pronunciations" | "regions" | "registers" | "variantForms"; declare type APIOption = { fields?: Filelds[]; strictMatch?: boolean; }; export declare class Dictionary { private options; constructor(options: DictionaryConfig); /** * /api/v2/entries/{source_lang}/{word_id}: * * Use this to retrieve definitions, pronunciations, example sentences, grammatical information and word origins. * * @param wordId * @param options */ entries(wordId: string, opt?: APIOption): Promise<GetEntriesReponse>; private request; } export declare const generatePath: (wordId: string, { fields, strictMatch }?: APIOption) => string; export {};