Class: Google::Apis::PhotoslibraryV1::Album

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/photoslibrary_v1/classes.rb,
generated/google/apis/photoslibrary_v1/representations.rb,
generated/google/apis/photoslibrary_v1/representations.rb

Overview

Representation of an album in Google Photos. Albums are a container for media items. They contain an additional shareInfo property if they have been shared by the application.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Album

Returns a new instance of Album



123
124
125
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 123

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cover_photo_base_urlString

[Output only] A URL to the cover photo's bytes. This should not be used as is. Parameters should be appended to this URL before use. For example, '=w2048-h1024' will set the dimensions of the cover photo to have a width of 2048 px and height of 1024 px. Corresponds to the JSON property coverPhotoBaseUrl

Returns:

  • (String)


82
83
84
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 82

def cover_photo_base_url
  @cover_photo_base_url
end

#idString

[Ouput only] Identifier for the album. This is a persistent identifier that can be used between sessions to identify this album. Corresponds to the JSON property id

Returns:

  • (String)


88
89
90
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 88

def id
  @id
end

#is_writeableBoolean Also known as: is_writeable?

[Output only] True if media items can be created in the 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 will be updated. Corresponds to the JSON property isWriteable

Returns:

  • (Boolean)


96
97
98
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 96

def is_writeable
  @is_writeable
end

#product_urlString

[Output only] Google Photos URL for the album. The user needs to be signed in to their Google Photos account to access this link. Corresponds to the JSON property productUrl

Returns:

  • (String)


103
104
105
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 103

def product_url
  @product_url
end

#share_infoGoogle::Apis::PhotoslibraryV1::ShareInfo

Information about albums that are shared. Note that this information is only included if the album was created by you and you have the sharing scope. Corresponds to the JSON property shareInfo



110
111
112
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 110

def share_info
  @share_info
end

#titleString

Name of the album displayed to the user in their Google Photos account. This string should not be more than 500 characters. Corresponds to the JSON property title

Returns:

  • (String)


116
117
118
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 116

def title
  @title
end

#total_media_itemsFixnum

[Output only] The number of media items in the album Corresponds to the JSON property totalMediaItems

Returns:

  • (Fixnum)


121
122
123
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 121

def total_media_items
  @total_media_items
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



128
129
130
131
132
133
134
135
136
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 128

def update!(**args)
  @cover_photo_base_url = args[:cover_photo_base_url] if args.key?(:cover_photo_base_url)
  @id = args[:id] if args.key?(:id)
  @is_writeable = args[:is_writeable] if args.key?(:is_writeable)
  @product_url = args[:product_url] if args.key?(:product_url)
  @share_info = args[:share_info] if args.key?(:share_info)
  @title = args[:title] if args.key?(:title)
  @total_media_items = args[:total_media_items] if args.key?(:total_media_items)
end