Skip to content

azer/go-flickr

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

Favs

List given user's favorites

userId := "123123123"

favs, err := client.Favs(userId)

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")

Releases

No releases published

Packages

No packages published

Languages