Emoji Lookup API - Ruby Gem

Emoji is a simple tool for getting emoji data. It returns the emoji name, category, and more.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_emoji'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_emoji

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_emoji'

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

# Make a request
response = client.execute({ emoji: "🥳" })

# Print the response
puts response

Error Handling

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

Debug Mode

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

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "count": 1,
    "emojisFound": [
      {
        "emoji": "🥳",
        "description": "partying face",
        "category": "Smileys & Emotion",
        "aliases": [
          "partying_face"
        ],
        "tags": [
          "celebration",
          "birthday"
        ],
        "unicode_version": "11.0",
        "ios_version": "12.1",
        "codePoint": "1f973"
      }
    ]
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.