Hashtag Generator API - Ruby Gem

Hashtag Generator is a simple tool for generating hashtags. It returns a list of hashtags based on the text provided.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_hashtaggenerator'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_hashtaggenerator

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_hashtaggenerator'

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

# Make a request
response = client.execute({
  text: "Adventure awaits 🌍✈️ Who's ready to embark on a journey of a lifetime? Whether you're exploring exotic landscapes, immersing yourself in vibrant cultures, or simply indulging in delicious cuisines, there's something magical about travel that fills the soul with joy and wonder. Let's wander together and create unforgettable memories! 🌟",
  count: 5
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ text: "Adventure awaits 🌍✈️ Who's ready to embark on a journey of a lifetime? Whether you're exploring exotic landscapes, immersing yourself in vibrant cultures, or simply indulging in delicious cuisines, there's something magical about travel that fills the soul with joy and wonder. Let's wander together and create unforgettable memories! 🌟", count: 5 })
  puts response["data"]
rescue APIVerve::Hashtaggenerator::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Hashtaggenerator::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

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

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "count": 5,
    "hashtags": [
      "#adventure",
      "#awaits",
      "#ready",
      "#embark",
      "#journey"
    ]
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.