shared_albums

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpSharedAlbumsService

type HttpSharedAlbumsService struct {
	// contains filtered or unexported fields
}

func NewHttpSharedAlbumsService

func NewHttpSharedAlbumsService(authenticatedClient *http.Client) HttpSharedAlbumsService

func (HttpSharedAlbumsService) Get

func (s HttpSharedAlbumsService) Get(shareToken string, ctx context.Context) (*albums.Album, error)

Fetches album based on specified shareToken

Doc: https://developers.google.com/photos/library/reference/rest/v1/sharedAlbums/get

func (HttpSharedAlbumsService) Join

func (s HttpSharedAlbumsService) Join(shareToken string, ctx context.Context) (*albums.Album, error)

Joins a shared album on behalf of the Google Photos user.

Doc: https://developers.google.com/photos/library/reference/rest/v1/sharedAlbums/join

func (HttpSharedAlbumsService) Leave

func (s HttpSharedAlbumsService) Leave(shareToken string, ctx context.Context) error

Leaves a previously-joined shared album on behalf of the Google Photos user. The user must not own this album.

Doc: https://developers.google.com/photos/library/reference/rest/v1/sharedAlbums/leave

func (HttpSharedAlbumsService) List

func (s HttpSharedAlbumsService) List(options *ListOptions, pageToken string, ctx context.Context) (result []albums.Album, nextPageToken string, err error)

Lists all shared albums available in the Sharing tab of the user's Google Photos app.

Doc: https://developers.google.com/photos/library/reference/rest/v1/sharedAlbums/list

func (HttpSharedAlbumsService) ListAll

func (s HttpSharedAlbumsService) ListAll(options *ListOptions, ctx context.Context) ([]albums.Album, error)

Synchronous wrapper for ListAllAsync

func (HttpSharedAlbumsService) ListAllAsync

func (s HttpSharedAlbumsService) ListAllAsync(options *ListOptions, ctx context.Context) (<-chan albums.Album, <-chan error)

Asynchronous wrapper for List that takes care of pagination. Returned channel has buffer size of 50

type ListOptions

type ListOptions struct {
	PageSize                 int  `url:"pageSize"`
	ExcludeNonAppCreatedData bool `url:"excludeNonAppCreatedData"`
}

type SharedAlbumsService

type SharedAlbumsService interface {
	Get(shareToken string, ctx context.Context) (*albums.Album, error)
	Join(shareToken string, ctx context.Context) (*albums.Album, error)
	Leave(shareToken string, ctx context.Context) error
	List(options *ListOptions, pageToken string, ctx context.Context) (result []albums.Album, nextPageToken string, err error)
	ListAll(options *ListOptions, ctx context.Context) ([]albums.Album, error)
	ListAllAsync(options *ListOptions, ctx context.Context) (<-chan albums.Album, <-chan error)
}

Interface for https://developers.google.com/photos/library/reference/rest/v1/sharedAlbums resource

Jump to

Keyboard shortcuts

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