All Projects → swcraig → oxford_dictionary

swcraig / oxford_dictionary

Licence: MIT License
📙 A Ruby wrapper for the Oxford Dictionary API

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to oxford dictionary

Binancedotnet
Official C# Wrapper for the Binance exchange API, with REST and WebSocket endpoints
Stars: ✭ 102 (+343.48%)
Mutual labels:  wrapper, api-wrapper
nanoleaf-aurora
A java wrapper for the Nanoleaf Aurora API
Stars: ✭ 19 (-17.39%)
Mutual labels:  wrapper, api-wrapper
Tlaw
The Last API Wrapper: Pragmatic API wrapper framework
Stars: ✭ 112 (+386.96%)
Mutual labels:  wrapper, api-wrapper
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+2321.74%)
Mutual labels:  wrapper, api-wrapper
Pyblox
An API wrapper for Roblox written in Python. (Receives Updates)
Stars: ✭ 30 (+30.43%)
Mutual labels:  wrapper, api-wrapper
Golang Tmdb
This is a Golang wrapper for working with TMDb API. It aims to support version 3.
Stars: ✭ 36 (+56.52%)
Mutual labels:  wrapper, api-wrapper
clash-api
Ruby wrapper for the Clash of Clans API
Stars: ✭ 14 (-39.13%)
Mutual labels:  api-wrapper, ruby-wrapper
SoundCloud-API
SoundCloud API wrapped into a bunch of classes. Built with Retrofit2 and RxJava2.
Stars: ✭ 63 (+173.91%)
Mutual labels:  wrapper, api-wrapper
discord.bat
🗑️ the BEST discord lib
Stars: ✭ 38 (+65.22%)
Mutual labels:  wrapper, api-wrapper
HerePy
A library that provides a Python interface to the HERE APIs.
Stars: ✭ 73 (+217.39%)
Mutual labels:  wrapper, api-wrapper
Cuda Api Wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Stars: ✭ 362 (+1473.91%)
Mutual labels:  wrapper, api-wrapper
popyt
A very easy to use Youtube Data v3 API wrapper.
Stars: ✭ 42 (+82.61%)
Mutual labels:  wrapper, api-wrapper
Pycoingecko
Python wrapper for the CoinGecko API
Stars: ✭ 270 (+1073.91%)
Mutual labels:  wrapper, api-wrapper
Discord.jl
The Julia Discord API Wrapper
Stars: ✭ 93 (+304.35%)
Mutual labels:  wrapper, api-wrapper
Scrython
A python wrapper for the Scryfall API
Stars: ✭ 87 (+278.26%)
Mutual labels:  wrapper, api-wrapper
PowerSchool-API
A Node.js library for interacting with the PowerSchool SIS API.
Stars: ✭ 21 (-8.7%)
Mutual labels:  wrapper, api-wrapper
Dis-Snek
A Python API wrapper for Discord
Stars: ✭ 71 (+208.7%)
Mutual labels:  wrapper, api-wrapper
activecampaign-python
ActiveCampaign API wrapper written in python.
Stars: ✭ 25 (+8.7%)
Mutual labels:  wrapper, api-wrapper
cablecuttr
An R wrapper for CanIStream.It API
Stars: ✭ 17 (-26.09%)
Mutual labels:  wrapper, api-wrapper
nextcloud
Nextcloud OCS and WebDAV API wrapper for Ruby.
Stars: ✭ 16 (-30.43%)
Mutual labels:  api-wrapper, ruby-wrapper

Build Status Test Coverage Code Climate Gem Version

OxfordDictionary

Ruby wrapper to consume the Oxford Dictionary API

Getting Started

$ gem install oxford_dictionary

# To use in your script/application
require 'oxford_dictionary'

After registering for an API key, setup the client:

client = OxfordDictionary::Client.new(app_id: 'ID', app_key: 'SECRET')
client = OxfordDictionary.new(app_id: 'ID', app_key: 'SECRET')

Usage Examples

This wrapper follows the schema laid out by the API quite closely. The data schema for the different API calls can be found here.

Entries
entry = client.entry(word: 'vapid', dataset: 'en-gb', params: {})

# Access the first entry
# Refer to the API documentation for the schema of the returned data structure
first_lexical_entry = entry.lexicalEntries.first

# With some filters
filters = { lexicalCategory: 'Verb', domains: 'Art'}
client.entry(word: 'truth', dataset: 'en-gb', params: filters)

# To have multiple values for a single filter use comma separated terms
filters = { lexicalCategory: 'Verb,Noun' }

# You can also search for the results for different datasets
# Refer to the Oxford Dictionaries documentation for all the
# possible datasets
client.entry(word: 'ace', dataset: 'es', params: {})

# You can query for results from a specific "field"
# Refer to the Oxford Dictionaries documentation for all the
# possible fields
client.entry(word: 'explain', dataset: 'en-gb', params: { fields: 'examples' })
Lemmas
client.lemma(word: 'condition', language: 'en', params: {})
Translations
client.translation(
  word: 'condition',
  source_language: 'en',
  target_language: 'es',
  params: {}
)
Sentences
client.sentence(word: 'paraphrase', language: 'en', params: {})
Search
client.search(language: 'en-gb', params: { q: 'vapid' })
Thesaurus
client.thesaurus(
  word: 'book',
  language: 'en',
  params: { fields: 'synonyms,antonyms'}
)
# Or use { fields: 'synonyms' } for just synonyms

Development

After checking out the repo, run bin/setup to install dependencies. Run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are more than welcome! Please make tests for anything that is added. bundle exec rake will run rspec/rubocop.

Pull Requests

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].