Pictionary Generator API - Ruby Gem

Pictionary Generator creates random drawing prompts filtered by difficulty level for the classic Pictionary sketching game.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_pictionary'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_pictionary

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_pictionary'

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

# Make a request
response = client.execute({
  difficulty: "medium",
  count: 1
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ difficulty: "medium", count: 1 })
  puts response["data"]
rescue APIVerve::Pictionary::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Pictionary::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

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

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "words": [
      "Including",
      "Widely",
      "Nation",
      "Buffalo",
      "Twelve"
    ],
    "count": 5,
    "difficulty": "medium"
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.