flickr

package
v0.0.0-...-0898738 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New(apiKey string) Client

type PhotosResponse

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

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

type PhotosetResponse

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

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

type TagsResponse

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

type UserInfoResponse

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL