Class: Google::Apis::PhotoslibraryV1::Album
- Inherits:
-
Object
- Object
- Google::Apis::PhotoslibraryV1::Album
- 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
-
#cover_photo_base_url ⇒ String
[Output only] A URL to the cover photo's bytes.
-
#id ⇒ String
[Ouput only] Identifier for the album.
-
#is_writeable ⇒ Boolean
(also: #is_writeable?)
[Output only] True if media items can be created in the album.
-
#product_url ⇒ String
[Output only] Google Photos URL for the album.
-
#share_info ⇒ Google::Apis::PhotoslibraryV1::ShareInfo
Information about albums that are shared.
-
#title ⇒ String
Name of the album displayed to the user in their Google Photos account.
-
#total_media_items ⇒ Fixnum
[Output only] The number of media items in the album Corresponds to the JSON property
totalMediaItems
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Album
constructor
A new instance of Album.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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_url ⇒ String
[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
82 83 84 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 82 def cover_photo_base_url @cover_photo_base_url end |
#id ⇒ String
[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
88 89 90 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 88 def id @id end |
#is_writeable ⇒ Boolean 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
96 97 98 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 96 def is_writeable @is_writeable end |
#product_url ⇒ String
[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
103 104 105 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 103 def product_url @product_url end |
#share_info ⇒ Google::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 |
#title ⇒ String
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
116 117 118 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 116 def title @title end |
#total_media_items ⇒ Fixnum
[Output only] The number of media items in the album
Corresponds to the JSON property totalMediaItems
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 |