Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tasadurian/go-avatar

Go wrapper for the avatar api.
https://github.com/tasadurian/go-avatar

avatar-api go

Last synced: 7 days ago
JSON representation

Go wrapper for the avatar api.

Awesome Lists containing this project

README

        

# go-avatar [![Go Report Card](https://goreportcard.com/badge/github.com/TheTommyTwitch/go-avatar)](https://goreportcard.com/report/github.com/TheTommyTwitch/go-avatar)
Go wrapper for the [avatar api](http://www.avatarapi.com/).

## Usage

```go get github.com/TheTommyTwitch/go-avatar```

```
func main() {
c := new(Client)
c.Username = "username"
c.Password = "password"

response, err := c.GetResponse("[email protected]")
if err != nil {
panic(err)
}
fmt.Printf("%+v", response)
}
```

Return structure:
```
type Profile struct {
Name string // name
Image string // url to profile image
Valid string // valid: true or false
}
```