https://github.com/markfchavez/what_is
gem that defines a string
https://github.com/markfchavez/what_is
Last synced: 23 days ago
JSON representation
gem that defines a string
- Host: GitHub
- URL: https://github.com/markfchavez/what_is
- Owner: MarkFChavez
- License: mit
- Created: 2015-09-02T06:09:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-03T10:05:06.000Z (almost 11 years ago)
- Last Synced: 2026-06-21T01:32:39.517Z (23 days ago)
- Language: Ruby
- Size: 176 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# What Is
What the hell is this gem for? To put simply, this library enables us (developers) to define a given word. Think "dictionary". It uses the Merriam-Webster's API as the reference for giving the definitions.
# Setup
Register an account on http://www.dictionaryapi.com/ and make sure you request an api key for
Collegiate Dictionary and Collegiate Thesaurus. These are the two references that this library supports for now.
After registration, you should already have two api keys; one for the dictionary and other is for the thesaurus
version.
## Installation
Add this line to your application's Gemfile:
gem 'what_is'
And then execute:
$ bundle
Or install it yourself as:
$ gem install what_is
## Usage
Configure your api keys first.
WhatIs.configure do |config|
config.thesaurus_api_key = ""
config.dictionary_api_key = ""
end
Implementation.
x = WhatIs::Define.new("", ) # where reference can be :thesaurus or :dictionary
x.define! # returns the meaning of the word
## Contributing
1. Fork it ( http://github.com/what_is/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request