rclone: github.com/ncw/rclone/backend/googlephotos/api Index | Files

package api

import "github.com/ncw/rclone/backend/googlephotos/api"


Package Files


type Album Uses

type Album struct {
    ID                    string `json:"id,omitempty"`
    Title                 string `json:"title"`
    ProductURL            string `json:"productUrl,omitempty"`
    MediaItemsCount       string `json:"mediaItemsCount,omitempty"`
    CoverPhotoBaseURL     string `json:"coverPhotoBaseUrl,omitempty"`
    CoverPhotoMediaItemID string `json:"coverPhotoMediaItemId,omitempty"`
    IsWriteable           bool   `json:"isWriteable,omitempty"`

Album of photos

type BatchCreateRequest Uses

type BatchCreateRequest struct {
    AlbumID       string         `json:"albumId,omitempty"`
    NewMediaItems []NewMediaItem `json:"newMediaItems"`

BatchCreateRequest creates media items from upload tokens

type BatchCreateResponse Uses

type BatchCreateResponse struct {
    NewMediaItemResults []struct {
        UploadToken string `json:"uploadToken"`
        Status      struct {
            Message string `json:"message"`
            Code    int    `json:"code"`
        }   `json:"status"`
        MediaItem MediaItem `json:"mediaItem"`
    } `json:"newMediaItemResults"`

BatchCreateResponse is returned from BatchCreateRequest

type BatchRemoveItems Uses

type BatchRemoveItems struct {
    MediaItemIds []string `json:"mediaItemIds"`

BatchRemoveItems is for removing items from an album

type ContentFilter Uses

type ContentFilter struct {
    IncludedContentCategories []string `json:"includedContentCategories,omitempty"`
    ExcludedContentCategories []string `json:"excludedContentCategories,omitempty"`

ContentFilter is uses to add content categories to media item queries

type CreateAlbum Uses

type CreateAlbum struct {
    Album *Album `json:"album"`

CreateAlbum creates an Album

type Date Uses

type Date struct {
    Year  int `json:"year,omitempty"`
    Month int `json:"month,omitempty"`
    Day   int `json:"day,omitempty"`

Date is used as part of SearchFilter

type DateFilter Uses

type DateFilter struct {
    Dates  []Date `json:"dates,omitempty"`
    Ranges []struct {
        StartDate Date `json:"startDate,omitempty"`
        EndDate   Date `json:"endDate,omitempty"`
    }   `json:"ranges,omitempty"`

DateFilter is uses to add date ranges to media item queries

type Error Uses

type Error struct {
    Details ErrorDetails `json:"error"`

Error is returned on errors

func (*Error) Error Uses

func (e *Error) Error() string

Error satisfies error interface

type ErrorDetails Uses

type ErrorDetails struct {
    Code    int    `json:"code"`
    Message string `json:"message"`
    Status  string `json:"status"`

ErrorDetails in the internals of the Error type

type FeatureFilter Uses

type FeatureFilter struct {
    IncludedFeatures []string `json:"includedFeatures,omitempty"`

FeatureFilter is uses to add features to media item queries

type Filters Uses

type Filters struct {
    DateFilter               *DateFilter      `json:"dateFilter,omitempty"`
    ContentFilter            *ContentFilter   `json:"contentFilter,omitempty"`
    MediaTypeFilter          *MediaTypeFilter `json:"mediaTypeFilter,omitempty"`
    FeatureFilter            *FeatureFilter   `json:"featureFilter,omitempty"`
    IncludeArchivedMedia     *bool            `json:"includeArchivedMedia,omitempty"`
    ExcludeNonAppCreatedData *bool            `json:"excludeNonAppCreatedData,omitempty"`

Filters combines all the filter types for media item queries

type ListAlbums Uses

type ListAlbums struct {
    Albums        []Album `json:"albums"`
    SharedAlbums  []Album `json:"sharedAlbums"`
    NextPageToken string  `json:"nextPageToken"`

ListAlbums is returned from albums.list and sharedAlbums.list

type MediaItem Uses

type MediaItem struct {
    ID            string `json:"id"`
    ProductURL    string `json:"productUrl"`
    BaseURL       string `json:"baseUrl"`
    MimeType      string `json:"mimeType"`
    MediaMetadata struct {
        CreationTime time.Time `json:"creationTime"`
        Width        string    `json:"width"`
        Height       string    `json:"height"`
        Photo        struct {
        }   `json:"photo"`
    }   `json:"mediaMetadata"`
    Filename string `json:"filename"`

MediaItem is a photo or video

type MediaItems Uses

type MediaItems struct {
    MediaItems    []MediaItem `json:"mediaItems"`
    NextPageToken string      `json:"nextPageToken"`

MediaItems is returned from mediaitems.list, mediaitems.search

type MediaTypeFilter Uses

type MediaTypeFilter struct {
    MediaTypes []string `json:"mediaTypes,omitempty"`

MediaTypeFilter is uses to add media types to media item queries

type NewMediaItem Uses

type NewMediaItem struct {
    Description     string          `json:"description"`
    SimpleMediaItem SimpleMediaItem `json:"simpleMediaItem"`

NewMediaItem is a single media item for upload

type SearchFilter Uses

type SearchFilter struct {
    AlbumID   string   `json:"albumId,omitempty"`
    PageSize  int      `json:"pageSize"`
    PageToken string   `json:"pageToken,omitempty"`
    Filters   *Filters `json:"filters,omitempty"`

SearchFilter is uses with mediaItems.search

type SimpleMediaItem Uses

type SimpleMediaItem struct {
    UploadToken string `json:"uploadToken"`

SimpleMediaItem is part of NewMediaItem

Package api imports 2 packages (graph). Updated 2020-08-03. Refresh now. Tools for package owners.