Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mosegontar/rubymuse
A Ruby wrapper for the Datamuse API
https://github.com/mosegontar/rubymuse
api-wrapper datamuse datamuse-api language rhymes ruby thesaurus
Last synced: about 2 months ago
JSON representation
A Ruby wrapper for the Datamuse API
- Host: GitHub
- URL: https://github.com/mosegontar/rubymuse
- Owner: mosegontar
- License: mit
- Created: 2017-08-08T19:19:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T01:05:17.000Z (over 7 years ago)
- Last Synced: 2024-10-21T01:58:51.308Z (2 months ago)
- Topics: api-wrapper, datamuse, datamuse-api, language, rhymes, ruby, thesaurus
- Language: Ruby
- Homepage:
- Size: 31.3 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rubymuse
Rubymuse is a tiny api wrapper for the [Datamuse API](http://www.datamuse.com/api/).
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'rubymuse'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install rubymuse
## Usage
To construct queries, pass query parameters as keyword arguments to `Datamuse::words`.
```ruby
require('rubymuse')# Find words with a meaning similar to the word 'programming'
Datamuse.words(ml: 'programming')# Find words with a meaning similiar to the word 'programming' and related to the topic 'television'
Datamuse.words(ml: 'programming', topics: 'television')# Find words that rhyme with 'orange'
Datamuse.words(rel_rhy: 'orange')# Find suggested words based on partial string 'prog'
Datamuse.sug(s: 'prog')# Find suggested words in Spanish based on partial string 'prog'
Datamuse.sug(s: 'prog', v: 'es')```
See [Datamuse API](http://www.datamuse.com/api/) for full documentation on Datamuse's query parameters and options.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/mosegontar/rubymuse.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).