Gravatar is a golang package for gravatar.com
Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums, so why not on any site?
Developers use gravatar images to bring to life user database or contacts in their apps. All you need to have to get a gravatar image is an email. If an email address is not registered at gravatar.com, then the user with that email address will have a funky looking image.
This is a very small and timy package compared to some other ones, it has only two functions.
- GetHash() - will return only the hash
- GetImg() - will return a complete url to the image.
First run go get
$ go get github.com/ivanmrchk/gravatarImport it into your project
Example:
func main() {
x := gravatar.GetImg("example@example.com")
}This will return such string: http://www.gravatar.com/avatar/23463b99b62a72f26ed677cc556c44e8?d=identicon
This package comes with doc.go file.
MIT
Free Software, Hell Yeah!