Wordle Helper API - Ruby Gem
Wordle Helper finds possible 5-letter word solutions based on known letter positions, letters in wrong positions, and eliminated letters.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_wordlehelper'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_wordlehelper
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_wordlehelper'
# Initialize the client
client = APIVerve::Wordlehelper::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({
green: "A1,E5",
yellow: "R2,O3",
gray: "STLN",
pattern: "A___E",
limit: 25
})
# Print the response
puts response
Error Handling
begin
response = client.execute({ green: "A1,E5", yellow: "R2,O3", gray: "STLN", pattern: "A___E", limit: 25 })
puts response["data"]
rescue APIVerve::Wordlehelper::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Wordlehelper::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Wordlehelper::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"matchCount": 11,
"suggestions": [
"adore",
"afore",
"afire",
"argue",
"aerie",
"azure",
"aurae",
"arame",
"agree",
"aware",
"areae"
],
"filters": {
"green": {
"0": "a",
"4": "e"
},
"yellow": [
"r"
],
"gray": [
"s",
"t",
"l",
"n"
]
},
"pattern": "A___E"
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://apiverve.com/marketplace/wordlehelper?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.