Gravatar Lookup API - Ruby Gem
Gravatar Lookup is a simple tool for looking up Gravatar profiles. It returns the Gravatar profile information of the email address provided.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_gravatarlookup'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_gravatarlookup
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_gravatarlookup'
# Initialize the client
client = APIVerve::Gravatarlookup::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({ email: "hello@apiverve.com" })
# Print the response
puts response
Error Handling
begin
response = client.execute({ email: "hello@apiverve.com" })
puts response["data"]
rescue APIVerve::Gravatarlookup::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Gravatarlookup::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Gravatarlookup::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"profileUrl": "https://gravatar.com/apiverve",
"thumbnailUrl": "https://0.gravatar.com/avatar/08ccd5c0bdd88b0ac13f776a4f7914db",
"photos": [
{
"value": "https://0.gravatar.com/avatar/08ccd5c0bdd88b0ac13f776a4f7914db",
"type": "thumbnail"
}
],
"displayName": "APIVerve",
"aboutMe": "APIVerve stands out as a premier source for cloud-based API and Software-as-a-Service (SaaS) solutions catering to developers, startups and products.",
"currentLocation": "United States",
"company": "APIVerve",
"contactInfo": [
{
"type": "contactform",
"value": "apiverve.com/contact"
}
],
"accounts": [
{
"domain": "x.com",
"display": "@apivervehq",
"url": "https://x.com/apivervehq",
"verified": true,
"name": "X"
},
{
"domain": "github.com",
"display": "apivervehq",
"url": "https://github.com/apivervehq",
"verified": true,
"name": "GitHub"
},
{
"domain": "calendly.com",
"display": "apiverve",
"url": "https://calendly.com/apiverve",
"verified": true,
"name": "Calendly"
}
],
"username": "apiverve",
"accountCount": 3,
"verifiedAccountCount": 3
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://apiverve.com/marketplace/gravatarlookup?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.