# oxford-dictionaries-api

> node module wrapper for oxford dictionaries api

Latest version **0.1.2** (published 2020-04-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install oxford-dictionaries-api
pnpm add oxford-dictionaries-api
yarn add oxford-dictionaries-api
bun add oxford-dictionaries-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2020-04-07 |
| First published | 2019-03-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | josue rojas |
| Maintainers | withcheesepls |
| Keywords | dictionary, dictionaries, oxford, words, definition, wordlist, thesaurus, lemmatron, lexistats, translation, sentences, api |

## Links

- npm: https://www.npmjs.com/package/oxford-dictionaries-api
- Repository: https://github.com/josuerojasrojas/oxford-dictionaries-api
- Homepage: https://github.com/josuerojasrojas/oxford-dictionaries-api#readme
- Issues: https://github.com/josuerojasrojas/oxford-dictionaries-api/issues
- npm.io page: https://npm.io/package/oxford-dictionaries-api

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2020-04-07
- 0.1.1 — 2019-10-03
- 0.1.0 — 2019-10-03
- 0.0.12 — 2019-10-02
- 0.0.11 — 2019-10-02
- 0.0.10 — 2019-05-01
- 0.0.6 — 2019-04-01
- 0.0.5 — 2019-04-01
- 0.0.4 — 2019-04-01
- 0.0.3 — 2019-03-31
- 0.0.2 — 2019-03-30
- 0.0.1 — 2019-03-30

## README

# oxford-dictionaries-api
node module wrapper for [Oxford dictionaries api v2](https://developer.oxforddictionaries.com)

## Install
```bash
npm install --save oxford-dictionaries-api
```

## Usage
### initial
Initialize an instance of the OxfordDictionaries class to use
```javascript
// need app_id and app_key
const app_id = 'your_appid'
const app_key = 'your_appkey';

let oxford= require('oxford-dictionaries-api');
let oxforddictionaries = new oxford(app_id, app_key);
```

### functions

Note: A lot of the key names for the functions' objects are taken from the oxford docs [Here](https://developer.oxforddictionaries.com/documentation#!/). I might not have updated this readme cause I probably would be working on other things. (I think the biggest thing that people would usually use is entries, which should get you the definition of words)

#### entries({ word_id, source_lang, fields, grammaticalFeatures, lexicalCategory, domains, registers, strictMatch })

function takes in an object with the following:


| Key | Type | Optional | About | Default | Example |
| --- | --- | -- | --- | --- | --- |
| word_id | String | No | The identifier for an Entry (case-sensitive). | Null | "ace" |
| source_lang | String | Yes | Language code of the source language in a monolingual dataset. | "en-gb" | "en-gb" |
| fields | Array[String] | Yes | A comma-separated list of data fields to return for the matched entries | Null | ["definitions", "domains"] |
| grammaticalFeatures | Array[String] | Yes | A comma-separated list of grammatical features ids to match on (default: all features). | Null | ["Cardinal", "Ordinal"] |
| lexicalCategory | Array[String] | Yes | A comma-separated list of lexical categories ids to match on (default: all categories). | Null | |
| domains | Array[String] | Yes | A comma-separated list of domains ids to match on (default: all domains). | Null | |
| registers | Array[String] | Yes | A comma-separated list of registers ids to match on (default: all registers). | Null | |
| strictMatch | Boolean | Yes | Specifies whether diacritics must match exactly. | False | True |

Example:
```javascript
oxforddictionaries.entries({word_id: 'ace'})
  .then((data) => console.log(data))
  .catch((e) => console.log('Error', e));
```

#### lemmas({ word_id, source_lang, grammaticalFeatures, lexicalCategory })
#### search({ source_lang, target_lang, q, prefix, limit, offset })
#### translation({ source_lang, target_lang, word_id, strictMatch })
#### thesaurus({ lang, word_id, fields, strictMatch })
#### sentences({ source_lang, word_id, strictMatch })
#### lexistats_ngrams({ source_lang, corpus, ngram_size, tokens, contains, format, minFrequency, maxFrequency, collate, sort, offset, limit })
#### lexistats_word({ source_lang, corpus, wordform, trueCase, lemma, lexicalCategory })
#### lexistats_words({ source_lang, corpus, wordform, trueCase, lemma, lexicalCategory, grammaticalFeatures, minFrequency, maxFrequency, minNormalizedFrequency, maxNormalizedFrequency, collate, sort, offset, limit })
#### domains({ source_lang, target_lang } = {})
#### fields({ endpoint } = {})
#### filters({ endpoint } = {})
#### grammaticalFeatures({ source_lang, target_lang } = {})
#### languages({ sourceLanguage, targetLanguage } = {})
#### lexicalcategories({ source_lang, target_lang } = {})
#### registers({ source_lang, target_lang } = {})

---
_Source: https://npm.io/package/oxford-dictionaries-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
