flickr

package
v0.0.0-...-8ecf71c Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: BSD-2-Clause Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	ExecuteMethod(string, url.Values) ([]byte, error)
	ExecuteMethodPaginated(string, url.Values, SPRCallbackFunc) error
	Call(url.Values) (*http.Response, error)
}

func NewFlickrAuthAPI

func NewFlickrAuthAPI(key string, secret string) (API, error)

type FlickrAuthAPI

type FlickrAuthAPI struct {
	API
	Key    string
	Secret string
	// contains filtered or unexported fields
}

func (FlickrAuthAPI) Call

func (api FlickrAuthAPI) Call(params url.Values) (*http.Response, error)

func (*FlickrAuthAPI) ExecuteMethod

func (api *FlickrAuthAPI) ExecuteMethod(method string, params url.Values) ([]byte, error)

func (*FlickrAuthAPI) ExecuteMethodPaginated

func (api *FlickrAuthAPI) ExecuteMethodPaginated(method string, params url.Values, cb SPRCallbackFunc) error

func (*FlickrAuthAPI) Sign

func (api *FlickrAuthAPI) Sign(args url.Values) string

type SPRCallbackFunc

type SPRCallbackFunc func(StandardPhotoResponse) error

type StandardPhotoResponse

type StandardPhotoResponse struct {
	Photos StandardPhotoResponsePhotos `json:"photos"`
	Stat   string                      `json:"stat"`
}

type StandardPhotoResponsePhoto

type StandardPhotoResponsePhoto struct {
	ID       string `json:"id"` // string... what??
	Owner    string `json:"owner"`
	Secret   string `json:"secret"`
	Server   string `json:"server"` // string... what??
	Farm     int    `json:"farm"`
	Title    string `json:title"`
	IsPublic int    `json:ispublic"` // Y U NO bool
	IsFriend int    `json:isfriend"` // see above
	IsFamily int    `json:isfamily"` // see above
}

type StandardPhotoResponsePhotos

type StandardPhotoResponsePhotos struct {
	Page    int                          `json:"page"`
	Pages   int                          `json:"pages"`
	PerPage int                          `json:"perpage"`
	Total   string                       `json:"total"` // see the way this is a string... what???
	Photos  []StandardPhotoResponsePhoto `json:"photo"` // see the way its 'photo' and not 'photos' ... yeah, that
}

type WIPStandardPhoto

type WIPStandardPhoto interface {
	ID() int64
	Owner() string
	Secret() string
	Server() int
	Farm() int
	Title() string
	IsPublic() bool
	IsPrivate() bool
	IsFamily() bool
	PhotoPage() url.URL
	PhotoURL() url.URL
}

type WIPStandardPhotoResponse

type WIPStandardPhotoResponse interface {
	Page() int
	Pages() int
	PerPage() int
	Total() int
	Photos() []WIPStandardPhoto
}

Jump to

Keyboard shortcuts

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