Rhyming Words API - Ruby Gem

Word Rhymes is a simple tool for getting word rhymes. It returns a list of rhyming words.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_wordrhymes'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_wordrhymes

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_wordrhymes'

# Initialize the client
client = APIVerve::Wordrhymes::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({
  word: "blue",
  limit: 10
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ word: "blue", limit: 10 })
  puts response["data"]
rescue APIVerve::Wordrhymes::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Wordrhymes::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Wordrhymes::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "word": "blue",
    "rhymeCount": 10,
    "rhymes": [
      "deblois",
      "ballou",
      "bellew",
      "carilou",
      "chaloux",
      "clue",
      "flew",
      "flu",
      "flue",
      "glew"
    ]
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.