photoslibrary

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package photoslibrary provides access to the Photos Library API.

For product documentation, see: https://developers.google.com/photos/

Creating a client

Usage example:

import "google.golang.org/api/photoslibrary/v1"
...
ctx := context.Background()
photoslibraryService, err := photoslibrary.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:

photoslibraryService, err := photoslibrary.NewService(ctx, option.WithScopes(photoslibrary.PhotoslibrarySharingScope))

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

photoslibraryService, err := photoslibrary.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
photoslibraryService, err := photoslibrary.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// View and manage your Google Photos library
	PhotoslibraryScope = "https://www.googleapis.com/auth/photoslibrary"

	// Add to your Google Photos library
	PhotoslibraryAppendonlyScope = "https://www.googleapis.com/auth/photoslibrary.appendonly"

	// View your Google Photos library
	PhotoslibraryReadonlyScope = "https://www.googleapis.com/auth/photoslibrary.readonly"

	// Manage photos added by this app
	PhotoslibraryReadonlyAppcreateddataScope = "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata"

	// Manage and add to shared albums on your behalf
	PhotoslibrarySharingScope = "https://www.googleapis.com/auth/photoslibrary.sharing"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEnrichmentToAlbumRequest

type AddEnrichmentToAlbumRequest struct {
	// AlbumPosition: The position in the album where the enrichment is to
	// be inserted.
	AlbumPosition *AlbumPosition `json:"albumPosition,omitempty"`

	// NewEnrichmentItem: The enrichment to be added.
	NewEnrichmentItem *NewEnrichmentItem `json:"newEnrichmentItem,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AlbumPosition") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AlbumPosition") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AddEnrichmentToAlbumRequest: Request to add an enrichment to a specific album at a specific position.

func (*AddEnrichmentToAlbumRequest) MarshalJSON

func (s *AddEnrichmentToAlbumRequest) MarshalJSON() ([]byte, error)

type AddEnrichmentToAlbumResponse

type AddEnrichmentToAlbumResponse struct {
	// EnrichmentItem: Output only. Enrichment which was added.
	EnrichmentItem *EnrichmentItem `json:"enrichmentItem,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "EnrichmentItem") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "EnrichmentItem") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

AddEnrichmentToAlbumResponse: The enrichment item that's created.

func (*AddEnrichmentToAlbumResponse) MarshalJSON

func (s *AddEnrichmentToAlbumResponse) MarshalJSON() ([]byte, error)

type Album

type Album struct {
	// CoverPhotoBaseUrl: [Output only] A URL to the cover photo's bytes.
	// This shouldn't be used as
	// is. Parameters should be appended to this URL before use. See
	// the
	// [developer
	// documentation](https://developers.google.com/photos/lib
	// rary/guides/access-media-items#base-urls)
	// for a complete list of supported parameters. For
	// example,
	// `'=w2048-h1024'` sets the dimensions of the cover photo to have a
	// width of
	// 2048 px and height of 1024 px.
	CoverPhotoBaseUrl string `json:"coverPhotoBaseUrl,omitempty"`

	// CoverPhotoMediaItemId: [Output only] Identifier for the media item
	// associated with the cover
	// photo.
	CoverPhotoMediaItemId string `json:"coverPhotoMediaItemId,omitempty"`

	// Id: [Ouput only] Identifier for the album. This is a persistent
	// identifier that
	// can be used between sessions to identify this album.
	Id string `json:"id,omitempty"`

	// IsWriteable: [Output only] True if you can create media items in this
	// album.
	// This field is based on the scopes granted and permissions of the
	// album. If
	// the scopes are changed or permissions of the album are changed, this
	// field
	// is updated.
	IsWriteable bool `json:"isWriteable,omitempty"`

	// MediaItemsCount: [Output only] The number of media items in the
	// album.
	MediaItemsCount int64 `json:"mediaItemsCount,omitempty,string"`

	// ProductUrl: [Output only] Google Photos URL for the album. The user
	// needs to be signed
	// in to their Google Photos account to access this link.
	ProductUrl string `json:"productUrl,omitempty"`

	// ShareInfo: [Output only] Information related to shared albums.
	// This field is only populated if the album is a shared album,
	// the
	// developer created the album and the user has granted
	// the
	// `photoslibrary.sharing` scope.
	ShareInfo *ShareInfo `json:"shareInfo,omitempty"`

	// Title: Name of the album displayed to the user in their Google Photos
	// account.
	// This string shouldn't be more than 500 characters.
	Title string `json:"title,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CoverPhotoBaseUrl")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CoverPhotoBaseUrl") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Album: Representation of an album in Google Photos. Albums are containers for media items. If an album has been shared by the application, it contains an extra `shareInfo` property.

func (*Album) MarshalJSON

func (s *Album) MarshalJSON() ([]byte, error)

type AlbumPosition

type AlbumPosition struct {
	// Position: Type of position, for a media or enrichment item.
	//
	// Possible values:
	//   "POSITION_TYPE_UNSPECIFIED" - Default value if this enum isn't set.
	//   "FIRST_IN_ALBUM" - At the beginning of the album.
	//   "LAST_IN_ALBUM" - At the end of the album.
	//   "AFTER_MEDIA_ITEM" - After a media item.
	//   "AFTER_ENRICHMENT_ITEM" - After an enrichment item.
	Position string `json:"position,omitempty"`

	// RelativeEnrichmentItemId: The enrichment item to which the position
	// is relative to.
	// Only used when position type is AFTER_ENRICHMENT_ITEM.
	RelativeEnrichmentItemId string `json:"relativeEnrichmentItemId,omitempty"`

	// RelativeMediaItemId: The media item to which the position is relative
	// to.
	// Only used when position type is AFTER_MEDIA_ITEM.
	RelativeMediaItemId string `json:"relativeMediaItemId,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Position") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Position") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AlbumPosition: Specifies a position in an album.

func (*AlbumPosition) MarshalJSON

func (s *AlbumPosition) MarshalJSON() ([]byte, error)

type AlbumsAddEnrichmentCall

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

func (*AlbumsAddEnrichmentCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsAddEnrichmentCall) Do

Do executes the "photoslibrary.albums.addEnrichment" call. Exactly one of *AddEnrichmentToAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AddEnrichmentToAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsAddEnrichmentCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsAddEnrichmentCall) Header

func (c *AlbumsAddEnrichmentCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlbumsBatchAddMediaItemsCall

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

func (*AlbumsBatchAddMediaItemsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsBatchAddMediaItemsCall) Do

Do executes the "photoslibrary.albums.batchAddMediaItems" call. Exactly one of *BatchAddMediaItemsToAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BatchAddMediaItemsToAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsBatchAddMediaItemsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsBatchAddMediaItemsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlbumsBatchRemoveMediaItemsCall

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

func (*AlbumsBatchRemoveMediaItemsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsBatchRemoveMediaItemsCall) Do

Do executes the "photoslibrary.albums.batchRemoveMediaItems" call. Exactly one of *BatchRemoveMediaItemsFromAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BatchRemoveMediaItemsFromAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsBatchRemoveMediaItemsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsBatchRemoveMediaItemsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlbumsCreateCall

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

func (*AlbumsCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsCreateCall) Do

func (c *AlbumsCreateCall) Do(opts ...googleapi.CallOption) (*Album, error)

Do executes the "photoslibrary.albums.create" call. Exactly one of *Album or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Album.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsCreateCall) Header

func (c *AlbumsCreateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlbumsGetCall

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

func (*AlbumsGetCall) Context

func (c *AlbumsGetCall) Context(ctx context.Context) *AlbumsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsGetCall) Do

func (c *AlbumsGetCall) Do(opts ...googleapi.CallOption) (*Album, error)

Do executes the "photoslibrary.albums.get" call. Exactly one of *Album or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Album.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsGetCall) Fields

func (c *AlbumsGetCall) Fields(s ...googleapi.Field) *AlbumsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsGetCall) Header

func (c *AlbumsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AlbumsGetCall) IfNoneMatch

func (c *AlbumsGetCall) IfNoneMatch(entityTag string) *AlbumsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AlbumsListCall

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

func (*AlbumsListCall) Context

func (c *AlbumsListCall) Context(ctx context.Context) *AlbumsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsListCall) Do

Do executes the "photoslibrary.albums.list" call. Exactly one of *ListAlbumsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListAlbumsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsListCall) ExcludeNonAppCreatedData

func (c *AlbumsListCall) ExcludeNonAppCreatedData(excludeNonAppCreatedData bool) *AlbumsListCall

ExcludeNonAppCreatedData sets the optional parameter "excludeNonAppCreatedData": If set, the results exclude media items that were not created by this app. Defaults to false (all albums are returned). This field is ignored if the photoslibrary.readonly.appcreateddata scope is used.

func (*AlbumsListCall) Fields

func (c *AlbumsListCall) Fields(s ...googleapi.Field) *AlbumsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsListCall) Header

func (c *AlbumsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AlbumsListCall) IfNoneMatch

func (c *AlbumsListCall) IfNoneMatch(entityTag string) *AlbumsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AlbumsListCall) PageSize

func (c *AlbumsListCall) PageSize(pageSize int64) *AlbumsListCall

PageSize sets the optional parameter "pageSize": Maximum number of albums to return in the response. The default number of albums to return at a time is 20. The maximum `pageSize` is 50.

func (*AlbumsListCall) PageToken

func (c *AlbumsListCall) PageToken(pageToken string) *AlbumsListCall

PageToken sets the optional parameter "pageToken": A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `listAlbums` request.

func (*AlbumsListCall) Pages

func (c *AlbumsListCall) Pages(ctx context.Context, f func(*ListAlbumsResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type AlbumsService

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

func NewAlbumsService

func NewAlbumsService(s *Service) *AlbumsService

func (*AlbumsService) AddEnrichment

func (r *AlbumsService) AddEnrichment(albumId string, addenrichmenttoalbumrequest *AddEnrichmentToAlbumRequest) *AlbumsAddEnrichmentCall

AddEnrichment: Adds an enrichment at a specified position in a defined album.

func (*AlbumsService) BatchAddMediaItems

func (r *AlbumsService) BatchAddMediaItems(albumId string, batchaddmediaitemstoalbumrequest *BatchAddMediaItemsToAlbumRequest) *AlbumsBatchAddMediaItemsCall

BatchAddMediaItems: Adds one or more media items in a user's Google Photos library to an album. The media items and albums must have been created by the developer via the API.

Media items are added to the end of the album. If multiple media items are given, they are added in the order specified in this call.

Each album can contain up to 20,000 media items.

Only media items that are in the user's library can be added to an album. For albums that are shared, the album must either be owned by the user or the user must have joined the album as a collaborator.

Partial success is not supported. The entire request will fail if an invalid media item or album is specified.

func (*AlbumsService) BatchRemoveMediaItems

func (r *AlbumsService) BatchRemoveMediaItems(albumId string, batchremovemediaitemsfromalbumrequest *BatchRemoveMediaItemsFromAlbumRequest) *AlbumsBatchRemoveMediaItemsCall

BatchRemoveMediaItems: Removes one or more media items from a specified album. The media items and the album must have been created by the developer via the API.

For albums that are shared, this action is only supported for media items that were added to the album by this user, or for all media items if the album was created by this user.

Partial success is not supported. The entire request will fail and no action will be performed on the album if an invalid media item or album is specified.

func (*AlbumsService) Create

func (r *AlbumsService) Create(createalbumrequest *CreateAlbumRequest) *AlbumsCreateCall

Create: Creates an album in a user's Google Photos library.

func (*AlbumsService) Get

func (r *AlbumsService) Get(albumId string) *AlbumsGetCall

Get: Returns the album based on the specified `albumId`. The `albumId` must be the ID of an album owned by the user or a shared album that the user has joined.

func (*AlbumsService) List

func (r *AlbumsService) List() *AlbumsListCall

List: Lists all albums shown to a user in the Albums tab of the Google Photos app.

func (*AlbumsService) Share

func (r *AlbumsService) Share(albumId string, sharealbumrequest *ShareAlbumRequest) *AlbumsShareCall

Share: Marks an album as shared and accessible to other users. This action can only be performed on albums which were created by the developer via the API.

func (*AlbumsService) Unshare

func (r *AlbumsService) Unshare(albumId string, unsharealbumrequest *UnshareAlbumRequest) *AlbumsUnshareCall

Unshare: Marks a previously shared album as private. This means that the album is no longer shared and all the non-owners will lose access to the album. All non-owner content will be removed from the album. If a non-owner has previously added the album to their library, they will retain all photos in their library. This action can only be performed on albums which were created by the developer via the API.

type AlbumsShareCall

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

func (*AlbumsShareCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsShareCall) Do

Do executes the "photoslibrary.albums.share" call. Exactly one of *ShareAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ShareAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsShareCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsShareCall) Header

func (c *AlbumsShareCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AlbumsUnshareCall

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

func (*AlbumsUnshareCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AlbumsUnshareCall) Do

Do executes the "photoslibrary.albums.unshare" call. Exactly one of *UnshareAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UnshareAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AlbumsUnshareCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AlbumsUnshareCall) Header

func (c *AlbumsUnshareCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type BatchAddMediaItemsToAlbumRequest

type BatchAddMediaItemsToAlbumRequest struct {
	// MediaItemIds: Identifiers of the MediaItems to be
	// added.
	// The maximum number of media items that can be added in one call is
	// 50.
	MediaItemIds []string `json:"mediaItemIds,omitempty"`

	// ForceSendFields is a list of field names (e.g. "MediaItemIds") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItemIds") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

BatchAddMediaItemsToAlbumRequest: Request to add media items to an album.

func (*BatchAddMediaItemsToAlbumRequest) MarshalJSON

func (s *BatchAddMediaItemsToAlbumRequest) MarshalJSON() ([]byte, error)

type BatchAddMediaItemsToAlbumResponse

type BatchAddMediaItemsToAlbumResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

BatchAddMediaItemsToAlbumResponse: Response for adding media items to an album.

type BatchCreateMediaItemsRequest

type BatchCreateMediaItemsRequest struct {
	// AlbumId: Identifier of the album where the media items are added. The
	// media items
	// are also added to the user's library. This is an optional field.
	AlbumId string `json:"albumId,omitempty"`

	// AlbumPosition: Position in the album where the media items are added.
	// If not
	// specified, the media items are added to the end of the album (as
	// per
	// the default value, that is, `LAST_IN_ALBUM`). The request fails if
	// this
	// field is set and the `albumId` is not specified. The request will
	// also fail
	// if you set the field and are not the owner of the shared album.
	AlbumPosition *AlbumPosition `json:"albumPosition,omitempty"`

	// NewMediaItems: List of media items to be created.
	NewMediaItems []*NewMediaItem `json:"newMediaItems,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AlbumId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AlbumId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

BatchCreateMediaItemsRequest: Request to create one or more media items in a user's Google Photos library. If an `albumid` is specified, the media items are also added to that album. `albumPosition` is optional and can only be specified if an `albumId` is set.

func (*BatchCreateMediaItemsRequest) MarshalJSON

func (s *BatchCreateMediaItemsRequest) MarshalJSON() ([]byte, error)

type BatchCreateMediaItemsResponse

type BatchCreateMediaItemsResponse struct {
	// NewMediaItemResults: Output only. List of media items created.
	NewMediaItemResults []*NewMediaItemResult `json:"newMediaItemResults,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NewMediaItemResults")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NewMediaItemResults") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

BatchCreateMediaItemsResponse: List of media items created.

func (*BatchCreateMediaItemsResponse) MarshalJSON

func (s *BatchCreateMediaItemsResponse) MarshalJSON() ([]byte, error)

type BatchGetMediaItemsResponse

type BatchGetMediaItemsResponse struct {
	// MediaItemResults: Output only. List of media items retrieved.
	// Note that even if the call to BatchGetMediaItems succeeds, there may
	// have
	// been failures for some media items in the batch. These failures
	// are
	// indicated in each
	// MediaItemResult.status.
	MediaItemResults []*MediaItemResult `json:"mediaItemResults,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "MediaItemResults") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItemResults") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

BatchGetMediaItemsResponse: Response to retrieve a list of media items.

func (*BatchGetMediaItemsResponse) MarshalJSON

func (s *BatchGetMediaItemsResponse) MarshalJSON() ([]byte, error)

type BatchRemoveMediaItemsFromAlbumRequest

type BatchRemoveMediaItemsFromAlbumRequest struct {
	// MediaItemIds: Identifiers of the MediaItems to be
	// removed.
	//
	// Must not contain repeated identifiers and cannot be empty. The
	// maximum
	// number of media items that can be removed in one call is 50.
	MediaItemIds []string `json:"mediaItemIds,omitempty"`

	// ForceSendFields is a list of field names (e.g. "MediaItemIds") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItemIds") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

BatchRemoveMediaItemsFromAlbumRequest: Request to remove a list of media items from an album.

func (*BatchRemoveMediaItemsFromAlbumRequest) MarshalJSON

func (s *BatchRemoveMediaItemsFromAlbumRequest) MarshalJSON() ([]byte, error)

type BatchRemoveMediaItemsFromAlbumResponse

type BatchRemoveMediaItemsFromAlbumResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

BatchRemoveMediaItemsFromAlbumResponse: Response for successfully removing all specified media items from the album.

type ContentFilter

type ContentFilter struct {
	// ExcludedContentCategories: The set of categories which are not to be
	// included in the media item search
	// results. The items in the set are ORed. There's a maximum of
	// 10
	// `excludedContentCategories` per request.
	//
	// Possible values:
	//   "NONE" - Default content category. This category is ignored when
	// any other category
	// is used in the filter.
	//   "LANDSCAPES" - Media items containing landscapes.
	//   "RECEIPTS" - Media items containing receipts.
	//   "CITYSCAPES" - Media items containing cityscapes.
	//   "LANDMARKS" - Media items containing landmarks.
	//   "SELFIES" - Media items that are selfies.
	//   "PEOPLE" - Media items containing people.
	//   "PETS" - Media items containing pets.
	//   "WEDDINGS" - Media items from weddings.
	//   "BIRTHDAYS" - Media items from birthdays.
	//   "DOCUMENTS" - Media items containing documents.
	//   "TRAVEL" - Media items taken during travel.
	//   "ANIMALS" - Media items containing animals.
	//   "FOOD" - Media items containing food.
	//   "SPORT" - Media items from sporting events.
	//   "NIGHT" - Media items taken at night.
	//   "PERFORMANCES" - Media items from performances.
	//   "WHITEBOARDS" - Media items containing whiteboards.
	//   "SCREENSHOTS" - Media items that are screenshots.
	//   "UTILITY" - Media items that are considered to be utility. These
	// include, but aren't
	// limited to documents, screenshots, whiteboards etc.
	//   "ARTS" - Media items containing art.
	//   "CRAFTS" - Media items containing crafts.
	//   "FASHION" - Media items related to fashion.
	//   "HOUSES" - Media items containing houses.
	//   "GARDENS" - Media items containing gardens.
	//   "FLOWERS" - Media items containing flowers.
	//   "HOLIDAYS" - Media items taken of holidays.
	ExcludedContentCategories []string `json:"excludedContentCategories,omitempty"`

	// IncludedContentCategories: The set of categories to be included in
	// the media item search results.
	// The items in the set are ORed. There's a maximum of
	// 10
	// `includedContentCategories` per request.
	//
	// Possible values:
	//   "NONE" - Default content category. This category is ignored when
	// any other category
	// is used in the filter.
	//   "LANDSCAPES" - Media items containing landscapes.
	//   "RECEIPTS" - Media items containing receipts.
	//   "CITYSCAPES" - Media items containing cityscapes.
	//   "LANDMARKS" - Media items containing landmarks.
	//   "SELFIES" - Media items that are selfies.
	//   "PEOPLE" - Media items containing people.
	//   "PETS" - Media items containing pets.
	//   "WEDDINGS" - Media items from weddings.
	//   "BIRTHDAYS" - Media items from birthdays.
	//   "DOCUMENTS" - Media items containing documents.
	//   "TRAVEL" - Media items taken during travel.
	//   "ANIMALS" - Media items containing animals.
	//   "FOOD" - Media items containing food.
	//   "SPORT" - Media items from sporting events.
	//   "NIGHT" - Media items taken at night.
	//   "PERFORMANCES" - Media items from performances.
	//   "WHITEBOARDS" - Media items containing whiteboards.
	//   "SCREENSHOTS" - Media items that are screenshots.
	//   "UTILITY" - Media items that are considered to be utility. These
	// include, but aren't
	// limited to documents, screenshots, whiteboards etc.
	//   "ARTS" - Media items containing art.
	//   "CRAFTS" - Media items containing crafts.
	//   "FASHION" - Media items related to fashion.
	//   "HOUSES" - Media items containing houses.
	//   "GARDENS" - Media items containing gardens.
	//   "FLOWERS" - Media items containing flowers.
	//   "HOLIDAYS" - Media items taken of holidays.
	IncludedContentCategories []string `json:"includedContentCategories,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "ExcludedContentCategories") to unconditionally include in API
	// requests. By default, fields with empty values are omitted from API
	// requests. However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g.
	// "ExcludedContentCategories") to include in API requests with the JSON
	// null value. By default, fields with empty values are omitted from API
	// requests. However, any field with an empty value appearing in
	// NullFields will be sent to the server as null. It is an error if a
	// field in this list has a non-empty value. This may be used to include
	// null fields in Patch requests.
	NullFields []string `json:"-"`
}

ContentFilter: This filter allows you to return media items based on the content type.

It's possible to specify a list of categories to include, and/or a list of categories to exclude. Within each list, the categories are combined with an OR. <p> The content filter `includedContentCategories`: [c1, c2, c3] would get media items that contain (c1 OR c2 OR c3). <p> The content filter `excludedContentCategories`: [c1, c2, c3] would NOT get media items that contain (c1 OR c2 OR c3). <p> You can also include some categories while excluding others, as in this example: `includedContentCategories`: [c1, c2], `excludedContentCategories`: [c3, c4] <p> The previous example would get media items that contain (c1 OR c2) AND NOT (c3 OR c4). A category that appears in `includedContentategories` must not appear in `excludedContentCategories`.

func (*ContentFilter) MarshalJSON

func (s *ContentFilter) MarshalJSON() ([]byte, error)

type ContributorInfo

type ContributorInfo struct {
	// DisplayName: Display name of the contributor.
	DisplayName string `json:"displayName,omitempty"`

	// ProfilePictureBaseUrl: URL to the profile picture of the contributor.
	ProfilePictureBaseUrl string `json:"profilePictureBaseUrl,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DisplayName") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ContributorInfo: Information about the user who added the media item. Note that this information is included only if the media item is within a shared album created by your app and you have the sharing scope.

func (*ContributorInfo) MarshalJSON

func (s *ContributorInfo) MarshalJSON() ([]byte, error)

type CreateAlbumRequest

type CreateAlbumRequest struct {
	// Album: The album to be created.
	Album *Album `json:"album,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Album") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Album") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CreateAlbumRequest: Request to create an album in Google Photos.

func (*CreateAlbumRequest) MarshalJSON

func (s *CreateAlbumRequest) MarshalJSON() ([]byte, error)

type Date

type Date struct {
	// Day: Day of month. Must be from 1 to 31 and valid for the year and
	// month, or 0 if specifying a year/month where the day isn't
	// significant.
	Day int64 `json:"day,omitempty"`

	// Month: Month of year. Must be from 1 to 12, or 0 if specifying a year
	// without a
	// month and day.
	Month int64 `json:"month,omitempty"`

	// Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
	// without
	// a year.
	Year int64 `json:"year,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Day") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Day") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Date: Represents a whole calendar date. The day may be 0 to represent a year and month where the day isn't significant, such as a whole calendar month. The month may be 0 to represent a a day and a year where the month isn't signficant, like when you want to specify the same day in every month of a year or a specific year. The year may be 0 to represent a month and day independent of year, like an anniversary date.

func (*Date) MarshalJSON

func (s *Date) MarshalJSON() ([]byte, error)

type DateFilter

type DateFilter struct {
	// Dates: List of dates that match the media items' creation date. A
	// maximum of
	// 5 dates can be included per request.
	Dates []*Date `json:"dates,omitempty"`

	// Ranges: List of dates ranges that match the media items' creation
	// date. A
	// maximum of 5 dates ranges can be included per request.
	Ranges []*DateRange `json:"ranges,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Dates") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Dates") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DateFilter: This filter defines the allowed dates or date ranges for the media returned. It's possible to pick a set of specific dates and a set of date ranges.

func (*DateFilter) MarshalJSON

func (s *DateFilter) MarshalJSON() ([]byte, error)

type DateRange

type DateRange struct {
	// EndDate: The end date (included as part of the range). It must be
	// specified in the
	// same format as the start date.
	EndDate *Date `json:"endDate,omitempty"`

	// StartDate: The start date (included as part of the range) in one of
	// the formats
	// described.
	StartDate *Date `json:"startDate,omitempty"`

	// ForceSendFields is a list of field names (e.g. "EndDate") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "EndDate") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DateRange: Defines a range of dates. Both dates must be of the same format. For more information, see <a href="#Date">Date</a>

func (*DateRange) MarshalJSON

func (s *DateRange) MarshalJSON() ([]byte, error)

type EnrichmentItem

type EnrichmentItem struct {
	// Id: Identifier of the enrichment item.
	Id string `json:"id,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Id") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

EnrichmentItem: An enrichment item.

func (*EnrichmentItem) MarshalJSON

func (s *EnrichmentItem) MarshalJSON() ([]byte, error)

type FeatureFilter

type FeatureFilter struct {
	// IncludedFeatures: The set of features to be included in the media
	// item search results.
	// The items in the set are ORed and may match any of the specified
	// features.
	//
	// Possible values:
	//   "NONE" - Treated as if no filters are applied. All features are
	// included.
	//   "FAVORITES" - Media items that the user has marked as favorites in
	// the Google Photos
	// app.
	IncludedFeatures []string `json:"includedFeatures,omitempty"`

	// ForceSendFields is a list of field names (e.g. "IncludedFeatures") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "IncludedFeatures") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

FeatureFilter: This filter defines the features that the media items should have.

func (*FeatureFilter) MarshalJSON

func (s *FeatureFilter) MarshalJSON() ([]byte, error)

type Filters

type Filters struct {
	// ContentFilter: Filters the media items based on their content.
	ContentFilter *ContentFilter `json:"contentFilter,omitempty"`

	// DateFilter: Filters the media items based on their creation date.
	DateFilter *DateFilter `json:"dateFilter,omitempty"`

	// ExcludeNonAppCreatedData: If set, the results exclude media items
	// that were not created by this app.
	// Defaults to false (all media items are returned). This field is
	// ignored if
	// the photoslibrary.readonly.appcreateddata scope is used.
	ExcludeNonAppCreatedData bool `json:"excludeNonAppCreatedData,omitempty"`

	// FeatureFilter: Filters the media items based on their features.
	FeatureFilter *FeatureFilter `json:"featureFilter,omitempty"`

	// IncludeArchivedMedia: If set, the results include media items that
	// the user has archived.
	// Defaults to false (archived media items aren't included).
	IncludeArchivedMedia bool `json:"includeArchivedMedia,omitempty"`

	// MediaTypeFilter: Filters the media items based on the type of media.
	MediaTypeFilter *MediaTypeFilter `json:"mediaTypeFilter,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ContentFilter") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ContentFilter") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Filters: Filters that can be applied to a media item search. If multiple filter options are specified, they're treated as AND with each other.

func (*Filters) MarshalJSON

func (s *Filters) MarshalJSON() ([]byte, error)

type JoinSharedAlbumRequest

type JoinSharedAlbumRequest struct {
	// ShareToken: Token to join the shared album on behalf of the user.
	ShareToken string `json:"shareToken,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ShareToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ShareToken") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

JoinSharedAlbumRequest: Request to join a shared album on behalf of the user. This uses a shareToken which can be acquired via the shareAlbum or listSharedAlbums calls.

func (*JoinSharedAlbumRequest) MarshalJSON

func (s *JoinSharedAlbumRequest) MarshalJSON() ([]byte, error)

type JoinSharedAlbumResponse

type JoinSharedAlbumResponse struct {
	// Album: Shared album that the user has joined.
	Album *Album `json:"album,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Album") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Album") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

JoinSharedAlbumResponse: Response to successfully joining the shared album on behalf of the user.

func (*JoinSharedAlbumResponse) MarshalJSON

func (s *JoinSharedAlbumResponse) MarshalJSON() ([]byte, error)

type LatLng

type LatLng struct {
	// Latitude: The latitude in degrees. It must be in the range [-90.0,
	// +90.0].
	Latitude float64 `json:"latitude,omitempty"`

	// Longitude: The longitude in degrees. It must be in the range [-180.0,
	// +180.0].
	Longitude float64 `json:"longitude,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Latitude") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Latitude") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

LatLng: An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 st andard</a>. Values must be within normalized ranges.

func (*LatLng) MarshalJSON

func (s *LatLng) MarshalJSON() ([]byte, error)

func (*LatLng) UnmarshalJSON

func (s *LatLng) UnmarshalJSON(data []byte) error

type LeaveSharedAlbumRequest

type LeaveSharedAlbumRequest struct {
	// ShareToken: Token to leave the shared album on behalf of the user.
	ShareToken string `json:"shareToken,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ShareToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ShareToken") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

LeaveSharedAlbumRequest: Request to leave a shared album on behalf of the user. This uses a shareToken which can be acquired via the or listSharedAlbums or getAlbum calls.

func (*LeaveSharedAlbumRequest) MarshalJSON

func (s *LeaveSharedAlbumRequest) MarshalJSON() ([]byte, error)

type LeaveSharedAlbumResponse

type LeaveSharedAlbumResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

LeaveSharedAlbumResponse: Response to successfully leaving the shared album on behalf of the user.

type ListAlbumsResponse

type ListAlbumsResponse struct {
	// Albums: Output only. List of albums shown in the Albums tab of the
	// user's Google
	// Photos app.
	Albums []*Album `json:"albums,omitempty"`

	// NextPageToken: Output only. Token to use to get the next set of
	// albums. Populated if
	// there are more albums to retrieve for this request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Albums") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Albums") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListAlbumsResponse: List of albums requested.

func (*ListAlbumsResponse) MarshalJSON

func (s *ListAlbumsResponse) MarshalJSON() ([]byte, error)

type ListMediaItemsResponse

type ListMediaItemsResponse struct {
	// MediaItems: Output only. List of media items in the user's library.
	MediaItems []*MediaItem `json:"mediaItems,omitempty"`

	// NextPageToken: Output only. Token to use to get the next set of media
	// items. Its presence
	// is the only reliable indicator of more media items being available in
	// the
	// next request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "MediaItems") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItems") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListMediaItemsResponse: List of all media items from the user's Google Photos library.

func (*ListMediaItemsResponse) MarshalJSON

func (s *ListMediaItemsResponse) MarshalJSON() ([]byte, error)

type ListSharedAlbumsResponse

type ListSharedAlbumsResponse struct {
	// NextPageToken: Output only. Token to use to get the next set of
	// shared albums. Populated
	// if there are more shared albums to retrieve for this request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// SharedAlbums: Output only. List of shared albums.
	SharedAlbums []*Album `json:"sharedAlbums,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListSharedAlbumsResponse: List of shared albums requested.

func (*ListSharedAlbumsResponse) MarshalJSON

func (s *ListSharedAlbumsResponse) MarshalJSON() ([]byte, error)

type Location

type Location struct {
	// Latlng: Position of the location on the map.
	Latlng *LatLng `json:"latlng,omitempty"`

	// LocationName: Name of the location to be displayed.
	LocationName string `json:"locationName,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Latlng") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Latlng") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Location: Represents a physical location.

func (*Location) MarshalJSON

func (s *Location) MarshalJSON() ([]byte, error)

type LocationEnrichment

type LocationEnrichment struct {
	// Location: Location for this enrichment item.
	Location *Location `json:"location,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Location") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Location") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

LocationEnrichment: An enrichment containing a single location.

func (*LocationEnrichment) MarshalJSON

func (s *LocationEnrichment) MarshalJSON() ([]byte, error)

type MapEnrichment

type MapEnrichment struct {
	// Destination: Destination location for this enrichemt item.
	Destination *Location `json:"destination,omitempty"`

	// Origin: Origin location for this enrichment item.
	Origin *Location `json:"origin,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Destination") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Destination") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MapEnrichment: An enrichment containing a map, showing origin and destination locations.

func (*MapEnrichment) MarshalJSON

func (s *MapEnrichment) MarshalJSON() ([]byte, error)

type MediaItem

type MediaItem struct {
	// BaseUrl: A URL to the media item's bytes. This shouldn't be used as
	// is. Parameters
	// should be appended to this URL before use. See the
	// [developer
	// documentation](https://developers.google.com/photos/library
	// /guides/access-media-items#base-urls)
	// for a complete list of supported parameters. For example,
	// `'=w2048-h1024'`
	// will set the dimensions of a media item of type photo to have a width
	// of
	// 2048 px and height of 1024 px.
	BaseUrl string `json:"baseUrl,omitempty"`

	// ContributorInfo: Information about the user who created this media
	// item.
	ContributorInfo *ContributorInfo `json:"contributorInfo,omitempty"`

	// Description: Description of the media item. This is shown to the user
	// in the item's
	// info section in the Google Photos app.
	Description string `json:"description,omitempty"`

	// Filename: Filename of the media item. This is shown to the user in
	// the item's info
	// section in the Google Photos app.
	Filename string `json:"filename,omitempty"`

	// Id: Identifier for the media item. This is a persistent identifier
	// that can be
	// used between sessions to identify this media item.
	Id string `json:"id,omitempty"`

	// MediaMetadata: Metadata related to the media item, such as, height,
	// width, or
	// creation time.
	MediaMetadata *MediaMetadata `json:"mediaMetadata,omitempty"`

	// MimeType: MIME type of the media item. For example, `image/jpeg`.
	MimeType string `json:"mimeType,omitempty"`

	// ProductUrl: Google Photos URL for the media item. This link is
	// available to
	// the user only if they're signed in.
	ProductUrl string `json:"productUrl,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "BaseUrl") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BaseUrl") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MediaItem: Representation of a media item (such as a photo or video) in Google Photos.

func (*MediaItem) MarshalJSON

func (s *MediaItem) MarshalJSON() ([]byte, error)

type MediaItemResult

type MediaItemResult struct {
	// MediaItem: Media item retrieved from the user's library. It's
	// populated if no errors
	// occurred and the media item was fetched successfully.
	MediaItem *MediaItem `json:"mediaItem,omitempty"`

	// Status: If an error occurred while accessing this media item, this
	// field
	// is populated with information related to the error. For details
	// regarding
	// this field, see Status.
	Status *Status `json:"status,omitempty"`

	// ForceSendFields is a list of field names (e.g. "MediaItem") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItem") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MediaItemResult: Result of retrieving a media item.

func (*MediaItemResult) MarshalJSON

func (s *MediaItemResult) MarshalJSON() ([]byte, error)

type MediaItemsBatchCreateCall

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

func (*MediaItemsBatchCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MediaItemsBatchCreateCall) Do

Do executes the "photoslibrary.mediaItems.batchCreate" call. Exactly one of *BatchCreateMediaItemsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BatchCreateMediaItemsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaItemsBatchCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaItemsBatchCreateCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type MediaItemsBatchGetCall

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

func (*MediaItemsBatchGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MediaItemsBatchGetCall) Do

Do executes the "photoslibrary.mediaItems.batchGet" call. Exactly one of *BatchGetMediaItemsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BatchGetMediaItemsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaItemsBatchGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaItemsBatchGetCall) Header

func (c *MediaItemsBatchGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MediaItemsBatchGetCall) IfNoneMatch

func (c *MediaItemsBatchGetCall) IfNoneMatch(entityTag string) *MediaItemsBatchGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*MediaItemsBatchGetCall) MediaItemIds

func (c *MediaItemsBatchGetCall) MediaItemIds(mediaItemIds ...string) *MediaItemsBatchGetCall

MediaItemIds sets the optional parameter "mediaItemIds": Identifiers of the media items to be requested. Must not contain repeated identifiers and cannot be empty. The maximum number of media items that can be retrieved in one call is 50.

type MediaItemsGetCall

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

func (*MediaItemsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MediaItemsGetCall) Do

Do executes the "photoslibrary.mediaItems.get" call. Exactly one of *MediaItem or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *MediaItem.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaItemsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaItemsGetCall) Header

func (c *MediaItemsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MediaItemsGetCall) IfNoneMatch

func (c *MediaItemsGetCall) IfNoneMatch(entityTag string) *MediaItemsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type MediaItemsListCall

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

func (*MediaItemsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MediaItemsListCall) Do

Do executes the "photoslibrary.mediaItems.list" call. Exactly one of *ListMediaItemsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListMediaItemsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaItemsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaItemsListCall) Header

func (c *MediaItemsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MediaItemsListCall) IfNoneMatch

func (c *MediaItemsListCall) IfNoneMatch(entityTag string) *MediaItemsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*MediaItemsListCall) PageSize

func (c *MediaItemsListCall) PageSize(pageSize int64) *MediaItemsListCall

PageSize sets the optional parameter "pageSize": Maximum number of media items to return in the response. The default number of media items to return at a time is 25. The maximum `pageSize` is 100.

func (*MediaItemsListCall) PageToken

func (c *MediaItemsListCall) PageToken(pageToken string) *MediaItemsListCall

PageToken sets the optional parameter "pageToken": A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `listMediaItems` request.

func (*MediaItemsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type MediaItemsSearchCall

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

func (*MediaItemsSearchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MediaItemsSearchCall) Do

Do executes the "photoslibrary.mediaItems.search" call. Exactly one of *SearchMediaItemsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SearchMediaItemsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaItemsSearchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaItemsSearchCall) Header

func (c *MediaItemsSearchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MediaItemsSearchCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type MediaItemsService

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

func NewMediaItemsService

func NewMediaItemsService(s *Service) *MediaItemsService

func (*MediaItemsService) BatchCreate

func (r *MediaItemsService) BatchCreate(batchcreatemediaitemsrequest *BatchCreateMediaItemsRequest) *MediaItemsBatchCreateCall

BatchCreate: Creates one or more media items in a user's Google Photos library.

This is the second step for creating a media item. For details regarding Step 1, uploading the raw bytes to a Google Server, see <a href="/photos/library/guides/upload-media">Uploading media</a>.

This call adds the media item to the library. If an album `id` is specified, the call adds the media item to the album too. Each album can contain up to 20,000 media items. By default, the media item will be added to the end of the library or album.

If an album `id` and position are both defined, the media item is added to the album at the specified position.

If the call contains multiple media items, they're added at the specified position. If you are creating a media item in a shared album where you are not the owner, you are not allowed to position the media item. Doing so will result in a `BAD REQUEST` error.

func (*MediaItemsService) BatchGet

BatchGet: Returns the list of media items for the specified media item identifiers. Items are returned in the same order as the supplied identifiers.

func (*MediaItemsService) Get

func (r *MediaItemsService) Get(mediaItemId string) *MediaItemsGetCall

Get: Returns the media item for the specified media item identifier.

func (*MediaItemsService) List

List: List all media items from a user's Google Photos library.

func (*MediaItemsService) Search

func (r *MediaItemsService) Search(searchmediaitemsrequest *SearchMediaItemsRequest) *MediaItemsSearchCall

Search: Searches for media items in a user's Google Photos library. If no filters are set, then all media items in the user's library are returned. If an album is set, all media items in the specified album are returned. If filters are specified, media items that match the filters from the user's library are listed. If you set both the album and the filters, the request results in an error.

type MediaMetadata

type MediaMetadata struct {
	// CreationTime: Time when the media item was first created (not when it
	// was uploaded to
	// Google Photos).
	CreationTime string `json:"creationTime,omitempty"`

	// Height: Original height (in pixels) of the media item.
	Height int64 `json:"height,omitempty,string"`

	// Photo: Metadata for a photo media type.
	Photo *Photo `json:"photo,omitempty"`

	// Video: Metadata for a video media type.
	Video *Video `json:"video,omitempty"`

	// Width: Original width (in pixels) of the media item.
	Width int64 `json:"width,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "CreationTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CreationTime") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MediaMetadata: Metadata for a media item.

func (*MediaMetadata) MarshalJSON

func (s *MediaMetadata) MarshalJSON() ([]byte, error)

type MediaTypeFilter

type MediaTypeFilter struct {
	// MediaTypes: The types of media items to be included. This field
	// should be populated
	// with only one media type. If you specify multiple media types, it
	// results
	// in an error.
	//
	// Possible values:
	//   "ALL_MEDIA" - Treated as if no filters are applied. All media types
	// are included.
	//   "VIDEO" - All media items that are considered videos.
	// This also includes movies the user has created using the Google
	// Photos
	// app.
	//   "PHOTO" - All media items that are considered photos. This includes
	// .bmp, .gif,
	// .ico, .jpg (and other spellings), .tiff, .webp and special photo
	// types
	// such as iOS live photos, Android motion photos, panoramas,
	// photospheres.
	MediaTypes []string `json:"mediaTypes,omitempty"`

	// ForceSendFields is a list of field names (e.g. "MediaTypes") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaTypes") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MediaTypeFilter: This filter defines the type of media items to be returned, for example, videos or photos. All the specified media types are treated as an OR when used together.

func (*MediaTypeFilter) MarshalJSON

func (s *MediaTypeFilter) MarshalJSON() ([]byte, error)

type NewEnrichmentItem

type NewEnrichmentItem struct {
	// LocationEnrichment: Location to be added to the album.
	LocationEnrichment *LocationEnrichment `json:"locationEnrichment,omitempty"`

	// MapEnrichment: Map to be added to the album.
	MapEnrichment *MapEnrichment `json:"mapEnrichment,omitempty"`

	// TextEnrichment: Text to be added to the album.
	TextEnrichment *TextEnrichment `json:"textEnrichment,omitempty"`

	// ForceSendFields is a list of field names (e.g. "LocationEnrichment")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "LocationEnrichment") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

NewEnrichmentItem: A new enrichment item to be added to an album, used by the `albums.addEnrichment` call.

func (*NewEnrichmentItem) MarshalJSON

func (s *NewEnrichmentItem) MarshalJSON() ([]byte, error)

type NewMediaItem

type NewMediaItem struct {
	// Description: Description of the media item. This will be shown to the
	// user in the item's
	// info section in the Google Photos app.
	// This string shouldn't be more than 1000 characters.
	Description string `json:"description,omitempty"`

	// SimpleMediaItem: A new media item that has been uploaded via the
	// included `uploadToken`.
	SimpleMediaItem *SimpleMediaItem `json:"simpleMediaItem,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Description") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

NewMediaItem: New media item that's created in a user's Google Photos account.

func (*NewMediaItem) MarshalJSON

func (s *NewMediaItem) MarshalJSON() ([]byte, error)

type NewMediaItemResult

type NewMediaItemResult struct {
	// MediaItem: Media item created with the upload token. It's populated
	// if no errors
	// occurred and the media item was created successfully.
	MediaItem *MediaItem `json:"mediaItem,omitempty"`

	// Status: If an error occurred during the creation of this media item,
	// this field
	// is  populated with information related to the error. For details
	// regarding
	// this field, see <a href="#Status">Status</a>.
	Status *Status `json:"status,omitempty"`

	// UploadToken: The upload token used to create this new media item.
	UploadToken string `json:"uploadToken,omitempty"`

	// ForceSendFields is a list of field names (e.g. "MediaItem") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItem") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

NewMediaItemResult: Result of creating a new media item.

func (*NewMediaItemResult) MarshalJSON

func (s *NewMediaItemResult) MarshalJSON() ([]byte, error)

type Photo

type Photo struct {
	// ApertureFNumber: Aperture f number of the camera lens with which the
	// photo was taken.
	ApertureFNumber float64 `json:"apertureFNumber,omitempty"`

	// CameraMake: Brand of the camera with which the photo was taken.
	CameraMake string `json:"cameraMake,omitempty"`

	// CameraModel: Model of the camera with which the photo was taken.
	CameraModel string `json:"cameraModel,omitempty"`

	// ExposureTime: Exposure time of the camera aperture when the photo was
	// taken.
	ExposureTime string `json:"exposureTime,omitempty"`

	// FocalLength: Focal length of the camera lens with which the photo was
	// taken.
	FocalLength float64 `json:"focalLength,omitempty"`

	// IsoEquivalent: ISO of the camera with which the photo was taken.
	IsoEquivalent int64 `json:"isoEquivalent,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ApertureFNumber") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ApertureFNumber") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Photo: Metadata that is specific to a photo, such as, ISO, focal length and exposure time. Some of these fields may be null or not included.

func (*Photo) MarshalJSON

func (s *Photo) MarshalJSON() ([]byte, error)

func (*Photo) UnmarshalJSON

func (s *Photo) UnmarshalJSON(data []byte) error

type SearchMediaItemsRequest

type SearchMediaItemsRequest struct {
	// AlbumId: Identifier of an album. If populated, lists all media items
	// in
	// specified album. Can't set in conjunction with any filters.
	AlbumId string `json:"albumId,omitempty"`

	// Filters: Filters to apply to the request. Can't be set in conjunction
	// with an
	// `albumId`.
	Filters *Filters `json:"filters,omitempty"`

	// PageSize: Maximum number of media items to return in the response.
	// The default number
	// of media items to return at a time is 25. The maximum
	// `pageSize` is 100.
	PageSize int64 `json:"pageSize,omitempty"`

	// PageToken: A continuation token to get the next page of the results.
	// Adding this to
	// the request returns the rows after the `pageToken`. The `pageToken`
	// should
	// be the value returned in the `nextPageToken` parameter in the
	// response to
	// the `searchMediaItems` request.
	PageToken string `json:"pageToken,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AlbumId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AlbumId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SearchMediaItemsRequest: Request to search for media items in a user's library.

If the album id is specified, this call will return the list of media items in the album. If neither filters nor album id are specified, this call will return all media items in a user's Google Photos library.

If filters are specified, this call will return all media items in the user's library that fulfill the filter criteria.

Filters and album id must not both be set, as this will result in an invalid request.

func (*SearchMediaItemsRequest) MarshalJSON

func (s *SearchMediaItemsRequest) MarshalJSON() ([]byte, error)

type SearchMediaItemsResponse

type SearchMediaItemsResponse struct {
	// MediaItems: Output only. List of media items that match the search
	// parameters.
	MediaItems []*MediaItem `json:"mediaItems,omitempty"`

	// NextPageToken: Output only. Use this token to get the next set of
	// media items. Its
	// presence is the only reliable indicator of more media items being
	// available
	// in the next request.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "MediaItems") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MediaItems") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SearchMediaItemsResponse: List of media items that match the search parameters.

func (*SearchMediaItemsResponse) MarshalJSON

func (s *SearchMediaItemsResponse) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Albums *AlbumsService

	MediaItems *MediaItemsService

	SharedAlbums *SharedAlbumsService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type ShareAlbumRequest

type ShareAlbumRequest struct {
	// SharedAlbumOptions: Options to be set when converting the album to a
	// shared album.
	SharedAlbumOptions *SharedAlbumOptions `json:"sharedAlbumOptions,omitempty"`

	// ForceSendFields is a list of field names (e.g. "SharedAlbumOptions")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "SharedAlbumOptions") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

ShareAlbumRequest: Request to make an album shared in Google Photos.

func (*ShareAlbumRequest) MarshalJSON

func (s *ShareAlbumRequest) MarshalJSON() ([]byte, error)

type ShareAlbumResponse

type ShareAlbumResponse struct {
	// ShareInfo: Output only. Information about the shared album.
	ShareInfo *ShareInfo `json:"shareInfo,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ShareInfo") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ShareInfo") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ShareAlbumResponse: Response to successfully sharing an album.

func (*ShareAlbumResponse) MarshalJSON

func (s *ShareAlbumResponse) MarshalJSON() ([]byte, error)

type ShareInfo

type ShareInfo struct {
	// IsJoined: True if the user has joined the album. This is always true
	// for the owner
	// of the shared album.
	IsJoined bool `json:"isJoined,omitempty"`

	// IsOwned: True if the user owns the album.
	IsOwned bool `json:"isOwned,omitempty"`

	// ShareToken: A token that can be used by other users to join this
	// shared album via the
	// API.
	ShareToken string `json:"shareToken,omitempty"`

	// ShareableUrl: A link to the album that's now shared on the Google
	// Photos website and app.
	// Anyone with the link can access this shared album and see all of the
	// items
	// present in the album.
	ShareableUrl string `json:"shareableUrl,omitempty"`

	// SharedAlbumOptions: Options that control the sharing of an album.
	SharedAlbumOptions *SharedAlbumOptions `json:"sharedAlbumOptions,omitempty"`

	// ForceSendFields is a list of field names (e.g. "IsJoined") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "IsJoined") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ShareInfo: Information about albums that are shared. This information is only included if you created the album, it is shared and you have the sharing scope.

func (*ShareInfo) MarshalJSON

func (s *ShareInfo) MarshalJSON() ([]byte, error)

type SharedAlbumOptions

type SharedAlbumOptions struct {
	// IsCollaborative: True if the shared album allows collaborators (users
	// who have joined
	// the album) to add media items to it. Defaults to false.
	IsCollaborative bool `json:"isCollaborative,omitempty"`

	// IsCommentable: True if the shared album allows the owner and the
	// collaborators (users
	// who have joined the album) to add comments to the album. Defaults to
	// false.
	IsCommentable bool `json:"isCommentable,omitempty"`

	// ForceSendFields is a list of field names (e.g. "IsCollaborative") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "IsCollaborative") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

SharedAlbumOptions: Options that control the sharing of an album.

func (*SharedAlbumOptions) MarshalJSON

func (s *SharedAlbumOptions) MarshalJSON() ([]byte, error)

type SharedAlbumsGetCall

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

func (*SharedAlbumsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SharedAlbumsGetCall) Do

func (c *SharedAlbumsGetCall) Do(opts ...googleapi.CallOption) (*Album, error)

Do executes the "photoslibrary.sharedAlbums.get" call. Exactly one of *Album or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Album.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SharedAlbumsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SharedAlbumsGetCall) Header

func (c *SharedAlbumsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SharedAlbumsGetCall) IfNoneMatch

func (c *SharedAlbumsGetCall) IfNoneMatch(entityTag string) *SharedAlbumsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SharedAlbumsJoinCall

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

func (*SharedAlbumsJoinCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SharedAlbumsJoinCall) Do

Do executes the "photoslibrary.sharedAlbums.join" call. Exactly one of *JoinSharedAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *JoinSharedAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SharedAlbumsJoinCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SharedAlbumsJoinCall) Header

func (c *SharedAlbumsJoinCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SharedAlbumsLeaveCall

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

func (*SharedAlbumsLeaveCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SharedAlbumsLeaveCall) Do

Do executes the "photoslibrary.sharedAlbums.leave" call. Exactly one of *LeaveSharedAlbumResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LeaveSharedAlbumResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SharedAlbumsLeaveCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SharedAlbumsLeaveCall) Header

func (c *SharedAlbumsLeaveCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SharedAlbumsListCall

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

func (*SharedAlbumsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SharedAlbumsListCall) Do

Do executes the "photoslibrary.sharedAlbums.list" call. Exactly one of *ListSharedAlbumsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListSharedAlbumsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SharedAlbumsListCall) ExcludeNonAppCreatedData

func (c *SharedAlbumsListCall) ExcludeNonAppCreatedData(excludeNonAppCreatedData bool) *SharedAlbumsListCall

ExcludeNonAppCreatedData sets the optional parameter "excludeNonAppCreatedData": If set, the results exclude media items that were not created by this app. Defaults to false (all albums are returned). This field is ignored if the photoslibrary.readonly.appcreateddata scope is used.

func (*SharedAlbumsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SharedAlbumsListCall) Header

func (c *SharedAlbumsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SharedAlbumsListCall) IfNoneMatch

func (c *SharedAlbumsListCall) IfNoneMatch(entityTag string) *SharedAlbumsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SharedAlbumsListCall) PageSize

func (c *SharedAlbumsListCall) PageSize(pageSize int64) *SharedAlbumsListCall

PageSize sets the optional parameter "pageSize": Maximum number of albums to return in the response. The default number of albums to return at a time is 20. The maximum `pageSize` is 50.

func (*SharedAlbumsListCall) PageToken

func (c *SharedAlbumsListCall) PageToken(pageToken string) *SharedAlbumsListCall

PageToken sets the optional parameter "pageToken": A continuation token to get the next page of the results. Adding this to the request returns the rows after the `pageToken`. The `pageToken` should be the value returned in the `nextPageToken` parameter in the response to the `listSharedAlbums` request.

func (*SharedAlbumsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type SharedAlbumsService

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

func NewSharedAlbumsService

func NewSharedAlbumsService(s *Service) *SharedAlbumsService

func (*SharedAlbumsService) Get

func (r *SharedAlbumsService) Get(shareToken string) *SharedAlbumsGetCall

Get: Returns the album based on the specified `shareToken`.

func (*SharedAlbumsService) Join

func (r *SharedAlbumsService) Join(joinsharedalbumrequest *JoinSharedAlbumRequest) *SharedAlbumsJoinCall

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

func (*SharedAlbumsService) Leave

func (r *SharedAlbumsService) Leave(leavesharedalbumrequest *LeaveSharedAlbumRequest) *SharedAlbumsLeaveCall

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

func (*SharedAlbumsService) List

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

type SimpleMediaItem

type SimpleMediaItem struct {
	// UploadToken: Token identifying the media bytes that have been
	// uploaded to Google.
	UploadToken string `json:"uploadToken,omitempty"`

	// ForceSendFields is a list of field names (e.g. "UploadToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "UploadToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SimpleMediaItem: A simple media item to be created in Google Photos via an upload token.

func (*SimpleMediaItem) MarshalJSON

func (s *SimpleMediaItem) MarshalJSON() ([]byte, error)

type Status

type Status struct {
	// Code: The status code, which should be an enum value of
	// google.rpc.Code.
	Code int64 `json:"code,omitempty"`

	// Details: A list of messages that carry the error details.  There is a
	// common set of
	// message types for APIs to use.
	Details []googleapi.RawMessage `json:"details,omitempty"`

	// Message: A developer-facing error message, which should be in
	// English. Any
	// user-facing error message should be localized and sent in
	// the
	// google.rpc.Status.details field, or localized by the client.
	Message string `json:"message,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Code") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Code") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).

func (*Status) MarshalJSON

func (s *Status) MarshalJSON() ([]byte, error)

type TextEnrichment

type TextEnrichment struct {
	// Text: Text for this enrichment item.
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Text") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Text") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TextEnrichment: An enrichment containing text.

func (*TextEnrichment) MarshalJSON

func (s *TextEnrichment) MarshalJSON() ([]byte, error)

type UnshareAlbumRequest

type UnshareAlbumRequest struct {
}

UnshareAlbumRequest: Request to unshare a shared album in Google Photos.

type UnshareAlbumResponse

type UnshareAlbumResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

UnshareAlbumResponse: Response of a successful unshare of a shared album.

type Video

type Video struct {
	// CameraMake: Brand of the camera with which the video was taken.
	CameraMake string `json:"cameraMake,omitempty"`

	// CameraModel: Model of the camera with which the video was taken.
	CameraModel string `json:"cameraModel,omitempty"`

	// Fps: Frame rate of the video.
	Fps float64 `json:"fps,omitempty"`

	// Status: Processing status of the video.
	//
	// Possible values:
	//   "UNSPECIFIED" - Video processing status is unknown.
	//   "PROCESSING" - Video is being processed. The user sees an icon for
	// this
	// video in the Google Photos app; however, it isn't playable yet.
	//   "READY" - Video processing is complete and it is now ready for
	// viewing.
	//   "FAILED" - Something has gone wrong and the video has failed to
	// process.
	Status string `json:"status,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CameraMake") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CameraMake") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Video: Metadata that is specific to a video, for example, fps and processing status. Some of these fields may be null or not included.

func (*Video) MarshalJSON

func (s *Video) MarshalJSON() ([]byte, error)

func (*Video) UnmarshalJSON

func (s *Video) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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