https://github.com/azer/go-flickr
Flickr API Client for Golang
https://github.com/azer/go-flickr
Last synced: 11 months ago
JSON representation
Flickr API Client for Golang
- Host: GitHub
- URL: https://github.com/azer/go-flickr
- Owner: azer
- Created: 2014-09-26T06:44:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-05-14T11:07:34.000Z (about 10 years ago)
- Last Synced: 2024-06-21T18:50:17.130Z (almost 2 years ago)
- Language: Go
- Homepage: https://godoc.org/github.com/azer/go-flickr
- Size: 15.6 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## go-flickr
A minimalistic Flickr API client for Go
## Install
```
$ go get github.com/azer/go-flickr
```
## Manual
[API Reference](https://godoc.org/github.com/azer/go-flickr)
### Request
```go
import (
"github.com/azer/go-flickr"
)
client := &flickr.Client{
Key: "key",
Token: "token", // optional
Sig: "sig", // optional
}
response, err := client.Get("people.findByUsername", &flickr.Params{ "username": "azer" })
// => {"user":{"id":"98269877@N00", "nsid":"98269877@N00", "username":{"_content":"azerbike"}}, "stat":"ok"}
```
### FindUser
Find user by name.
```go
user, err := client.FindUser("azer")
user.Id
// => "123124324"
user.Name
// => azer
```
### Favs
List given user's favorites
```go
userId := "123123123"
favs, err := client.Favs(userId)
```
### Following
List the people given user follows on Flickr
```go
userId := "123123123"
following, err := client.Following(userId)
```
### Album
List photos in the album with given ID
```go
photos, err := client.Album("72157662053417706")
```