Skip to content

PaulWaldo/go-flickr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-flickr

A minimalistic Flickr API client for Go

Install

$ go get github.com/azer/go-flickr

Manual

API Reference

Request

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.

user, err := client.FindUser("azer")

user.Id
// => "123124324"

user.Name
// => azer

Following

List the people given user follows on Flickr

userId := "123123123"

following, err := client.Following(userId)

Album

List photos in the album with given ID

photos, err := client.Album("72157662053417706")

Favorites

List photos that have been favorited by the given user ID. Note the Flickr API returns the list as paginated results.

client, err := flickr.NewPhotosClient()
favs, err := client.Favs("98269877@N00")
if favs.Pages > 1 {
  favs, err = client.NextPage()
}

Packages

No packages published

Languages

  • Go 100.0%