photosets

package
Version: v0.0.0-...-3cc496d Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package implementing methods: flickr.photosets.*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPhoto

func AddPhoto(client *flickr.FlickrClient, photosetId, photoId string) (*flickr.BasicResponse, error)

Add a photo to a photoset This method requires authentication with 'write' permission.

func Delete

func Delete(client *flickr.FlickrClient, photosetId string) (*flickr.BasicResponse, error)

Delete a photoset This method requires authentication with 'write' permission.

func EditMeta

func EditMeta(client *flickr.FlickrClient, photosetId, title, description string) (*flickr.BasicResponse, error)

Edit set name and description This method requires authentication with 'write' permission.

func EditPhotos

func EditPhotos(client *flickr.FlickrClient, photosetId, primaryId string, photoIds []string) (*flickr.BasicResponse, error)

Modify the photos in a photoset. Use this method to add, remove and re-order photos. This method requires authentication with 'write' permission.

func OrderSets

func OrderSets(client *flickr.FlickrClient, photosetIds []string) (*flickr.BasicResponse, error)

Set the order of photosets for the calling user. Any set IDs not given in the list will be set to appear at the end of the list, ordered by their IDs. This method requires authentication with 'write' permission.

func RemovePhoto

func RemovePhoto(client *flickr.FlickrClient, photosetId, photoId string) (*flickr.BasicResponse, error)

Remove a photo from a photoset This method requires authentication with 'write' permission.

func RemovePhotos

func RemovePhotos(client *flickr.FlickrClient, photosetId string, photoIds []string) (*flickr.BasicResponse, error)

Remove multiple photos from a photoset. This method requires authentication with 'write' permission.

func ReorderPhotos

func ReorderPhotos(client *flickr.FlickrClient, photosetId, primaryId string, photoIds []string) (*flickr.BasicResponse, error)

Alias for EditPhotos

func SetPrimaryPhoto

func SetPrimaryPhoto(client *flickr.FlickrClient, photosetId, primaryId string) (*flickr.BasicResponse, error)

Set photoset primary photo This method requires authentication with 'write' permission.

Types

type Photo

type Photo struct {
	Id    string `xml:"id,attr"`
	Title string `xml:"title,attr"`
}

type PhotosListResponse

type PhotosListResponse struct {
	flickr.BasicResponse
	Photoset struct {
		Page    int     `xml:"page,attr"`
		Pages   int     `xml:"pages,attr"`
		Perpage int     `xml:"perpage,attr"`
		Total   int     `xml:"total,attr"`
		Photos  []Photo `xml:"photo"`
	} `xml:"photoset"`
}

func GetPhotos

func GetPhotos(client *flickr.FlickrClient, authenticate bool, photosetId, ownerID string, page int) (*PhotosListResponse, error)

Get the photos in a set This method requires authentication to retrieve photos from private sets

type Photoset

type Photoset struct {
	Id                string `xml:"id,attr"`
	Primary           string `xml:"primary,attr"`
	Secret            string `xml:"secret,attr"`
	Server            string `xml:"server,attr"`
	Farm              string `xml:"farm,attr"`
	Photos            int    `xml:"photos,attr"`
	Videos            int    `xml:"videos,attr"`
	NeedsInterstitial bool   `xml:"needs_interstitial,attr"`
	VisCanSeeSet      bool   `xml:"visibility_can_see_set,attr"`
	CountViews        int    `xml:"count_views,attr"`
	CountComments     int    `xml:"count_comments,attr"`
	CanComment        bool   `xml:"can_comment,attr"`
	DateCreate        int    `xml:"date_create,attr"`
	DateUpdate        int    `xml:"date_update,attr"`
	Title             string `xml:"title"`
	Description       string `xml:"description"`
	Url               string `xml:"url,attr"`
	Owner             string `xml:"owner,attr"`
}

type PhotosetResponse

type PhotosetResponse struct {
	flickr.BasicResponse
	Set Photoset `xml:"photoset"`
}

func Create

func Create(client *flickr.FlickrClient, title, description, primaryPhotoId string) (*PhotosetResponse, error)

Create a photoset specifying its primary photo This method requires authentication with 'write' permission.

func GetInfo

func GetInfo(client *flickr.FlickrClient, authenticate bool, photosetId, ownerID string) (*PhotosetResponse, error)

Gets information about a photoset. This method does not require authentication unless you want to access a private set

type PhotosetsListResponse

type PhotosetsListResponse struct {
	flickr.BasicResponse
	Photosets struct {
		Page    int        `xml:"page,attr"`
		Pages   int        `xml:"pages,attr"`
		Perpage int        `xml:"perpage,attr"`
		Total   int        `xml:"total,attr"`
		Items   []Photoset `xml:"photoset"`
	} `xml:"photosets"`
}

func GetList

func GetList(client *flickr.FlickrClient, authenticate bool, userId string, page int) (*PhotosetsListResponse, error)

Return the public sets belonging to the user with userId. If userId is not provided it defaults to the caller user but call needs to be authenticated. This method requires authentication to retrieve private sets.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL