0.0
No commit activity in last 3 years
No release in over 3 years
A library for easy, object oriented Gravatar API access.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

gravatar-api

A library for easy, object oriented Gravatar API access.

Gem Version Dependency Status

Using the Gem

gravatar-api was designed to use the Gravatar API properly for easy use in web applications (and whatever else you want!).

If you want to see an example of web app source code using gravatar-api check out this.

Examples:

require 'gravatar-api'

profile = Gravatar.new("jessegrantherrick@gmail.com")
# Return the avatar URL with default size (80px)
profile.url
 # => "http://www.gravatar.com/avatar/9f3712c7a02579d7e50cb20d2680eb67"

# Return the avatar URL with a different size (150px)
profile.url(:size => 150)
 # => "http://www.gravatar.com/avatar/9f3712c7a02579d7e50cb20d2680eb67?s=150"

# Return a hash of your given email (as of v0.1.3)
profile.hash!
 # => "9f3712c7a02579d7e50cb20d2680eb67"

The hash!(email) method also works as a class method.

require 'gravatar-api'

Gravatar.hash!("jessegrantherrick@gmail.com")
# => "9f3712c7a02579d7e50cb20d2680eb67"