ihkh: hawx.me/code/ihkh/flickr Index | Files

package flickr

import "hawx.me/code/ihkh/flickr"

Index

Package Files

client.go http.go people.go photosets.go tags.go

type Client Uses

type Client interface {
    UserInfo(nsid string) (UserInfoResponse, error)
    PublicPhotos(nsid string, perPage, page int) (PhotosResponse, error)

    Photosets(nsid string) (PhotosetsResponse, error)
    Photoset(nsid, photosetId string, perPage, page int) (PhotosetResponse, error)
    PhotosetInfo(nsid string, photosetId string) (PhotosetInfo, error)

    Tags(nsid string) (TagsResponse, error)
    Tag(nsid, tag string, perPage, page int) (PhotosResponse, error)
}

func New Uses

func New(apiKey string) Client

type PhotosResponse Uses

type PhotosResponse struct {
    Photos struct {
        Page    int `xml:"page,attr"`
        Pages   int `xml:"pages,attr"`
        PerPage int `xml:"perpage,attr"`
        Total   int `xml:"total,attr"`

        Photo []struct {
            Id     string `xml:"id,attr"`
            Url    string `xml:"url_l,attr"`
            Height int    `xml:"height_l,attr"`
            Width  int    `xml:"width_l,attr"`
        }   `xml:"photo"`
    } `xml:"photos"`
}

type PhotosetInfo Uses

type PhotosetInfo struct {
    Photoset struct {
        Title string `xml:"title"`
    } `xml:"photoset"`
}

type PhotosetResponse Uses

type PhotosetResponse struct {
    Photos struct {
        Page    int `xml:"page,attr"`
        PerPage int `xml:"perpage,attr"`
        Pages   int `xml:"pages,attr"`

        Photo []struct {
            Id     string `xml:"id,attr"`
            Url    string `xml:"url_l,attr"`
            Height int    `xml:"height_l,attr"`
            Width  int    `xml:"width_l,attr"`
        }   `xml:"photo"`
    } `xml:"photoset"`
}

type PhotosetsResponse Uses

type PhotosetsResponse struct {
    Photosets struct {
        Photoset []struct {
            Id    string `xml:"id,attr"`
            Title string `xml:"title"`
        } `xml:"photoset"`
    } `xml:"photosets"`
}

type TagsResponse Uses

type TagsResponse struct {
    Tags struct {
        Tag []string `xml:"tag"`
    } `xml:"who>tags"`
}

type UserInfoResponse Uses

type UserInfoResponse struct {
    Username   string `xml:"person>username"`
    Realname   string `xml:"person>realname"`
    PhotosUrl  string `xml:"person>photosurl"`
    ProfileUrl string `xml:"person>profileurl"`
}

Package flickr imports 5 packages (graph) and is imported by 1 packages. Updated 2016-07-20. Refresh now. Tools for package owners.