Giter VIP home page Giter VIP logo

gravago's Introduction

Gravago - Gravatar library for Go

Simple go library for creating gravatar.com avatar URLs

Current version: 0.4.0

Credits

This library has some inspiration from the eefret/gravatar Go library and the node-gravatar Node.js library.

Table of Contents

  1. Overview
  2. Installation - Getting this package ready to roll
  3. Usage - How to use this thing
  4. License - Licensing information
  5. Contact - How to contact me

Installation

Just like any other Go package, you can install this baby with go get ...

go get github.com/Ascendings/gravago

Usage

Now for the fun stuff... the meat! Seriously, though, this package isn't designed to be too difficult to use in a web application - just create a new instance, fiddle some options, then generate your URL!

For example:

// of course we need to import this package
import "github.com/Ascendings/gravago"

// create a new instance
grav := gravago.New(gravago.GravatarOptions{
  ForceHTTPS: true,
  IconSet: "mosterid",
  IconRating: "x",
  IconSize: 80,
})

// change some options later on...
grav.SetSize(80) // set the icon size to 80
grav.SetIcons("monsterid") // use monsterid default icons
grav.SetRating("x") // allow x-rated icons
grav.UseHTTPS(true) // force HTTPS

// generate URL
gravURL := grav.URL("[email protected]")

Contributions

Feel free to fork this repository and submit a PR. Any and all help is welcome!

License

This package/program is licensed under the 2-Clause BSD License

Contact

Email me at: [email protected]

Feel free to hit me up at:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.