Unicode Character Lookup API - Ruby Gem
Unicode Character Lookup is a tool for retrieving detailed information about Unicode characters. It provides codepoint, UTF-16 encoding, category, and emoji name information.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_unicodelookup'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_unicodelookup
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_unicodelookup'
# Initialize the client
client = APIVerve::Unicodelookup::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({
character: "👋",
codepoint: "1F44B"
})
# Print the response
puts response
Error Handling
begin
response = client.execute({ character: "👋", codepoint: "1F44B" })
puts response["data"]
rescue APIVerve::Unicodelookup::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Unicodelookup::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Unicodelookup::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"character": "�",
"codepoint": "U+D83D",
"decimal": 55357,
"hex": "D83D",
"utf16": "\\uD83D",
"category": "Control",
"name": null
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://apiverve.com/marketplace/unicodelookup?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.