gravatar

package module
v0.0.0-...-6ab2262 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2012 License: MIT Imports: 5 Imported by: 0

README

Go wrapper for the Gravatar API.

See: http://en.gravatar.com/site/implement/

MIT License
Copyright (c) 2012 Erik Unger

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Documentation

Overview

Wrapper for the Gravatar API.

See: http://en.gravatar.com/site/implement/

Index

Constants

View Source
const (
	HTTP404    = "404"       // do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response
	MysteryMan = "mm"        // (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash)
	IdentIcon  = "identicon" // a geometric pattern based on an email hash
	MonsterID  = "monsterid" // a generated 'monster' with different colors, faces, etc
	Wavatar    = "wavatar"   // generated faces with differing features and backgrounds
	Retro      = "retro"     // awesome generated, 8-bit arcade-style pixelated faces
)

Default images (used as defaultURL)

Variables

This section is empty.

Functions

func Available

func Available(email string) (ok bool, err error)

func Hash

func Hash(email string) string

func SecureUrl

func SecureUrl(email string) string

func SecureUrlDefault

func SecureUrlDefault(email, defaultURL string) string

func SecureUrlSize

func SecureUrlSize(email string, size int) string

func SecureUrlSizeDefault

func SecureUrlSizeDefault(email string, size int, defaultURL string) string

func Url

func Url(email string) string

func UrlDefault

func UrlDefault(email, defaultURL string) string

func UrlSize

func UrlSize(email string, size int) string

You may request images anywhere from 1px up to 512px

func UrlSizeDefault

func UrlSizeDefault(email string, size int, defaultURL string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL