Class: Google::Apis::PhotoslibraryV1::MediaItem
- Inherits:
-
Object
- Object
- Google::Apis::PhotoslibraryV1::MediaItem
- 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 a media item (e.g. photo, video etc.) in Google Photos.
Instance Attribute Summary collapse
-
#base_url ⇒ String
A URL to the media item's bytes.
-
#contributor_info ⇒ Google::Apis::PhotoslibraryV1::ContributorInfo
Information about a user who contributed the media item.
-
#description ⇒ String
Description of the media item.
-
#id ⇒ String
Identifier for the media item.
-
#media_metadata ⇒ Google::Apis::PhotoslibraryV1::MediaMetadata
Metadata for a media item.
-
#mime_type ⇒ String
MIME type of the media item.
-
#product_url ⇒ String
Google Photos URL for the media item.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MediaItem
constructor
A new instance of MediaItem.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ MediaItem
Returns a new instance of MediaItem
734 735 736 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 734 def initialize(**args) update!(**args) end |
Instance Attribute Details
#base_url ⇒ String
A URL to the media item's bytes. This should not be used as is.
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.
Corresponds to the JSON property baseUrl
697 698 699 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 697 def base_url @base_url end |
#contributor_info ⇒ Google::Apis::PhotoslibraryV1::ContributorInfo
Information about a user who contributed the media item. Note that this
information is only included if the album containing the media item is
shared, was created by you and you have the sharing scope.
Corresponds to the JSON property contributorInfo
704 705 706 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 704 def contributor_info @contributor_info end |
#description ⇒ String
Description of the media item. This is shown to the user in the item's
info section in the Google Photos app.
Corresponds to the JSON property description
710 711 712 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 710 def description @description end |
#id ⇒ String
Identifier for the media item. This is a persistent identifier that can be
used between sessions to identify this media item.
Corresponds to the JSON property id
716 717 718 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 716 def id @id end |
#media_metadata ⇒ Google::Apis::PhotoslibraryV1::MediaMetadata
Metadata for a media item.
Corresponds to the JSON property mediaMetadata
721 722 723 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 721 def @media_metadata end |
#mime_type ⇒ String
MIME type of the media item.
Corresponds to the JSON property mimeType
726 727 728 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 726 def mime_type @mime_type end |
#product_url ⇒ String
Google Photos URL for the media item. This link will only be available to
the user if they're signed in.
Corresponds to the JSON property productUrl
732 733 734 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 732 def product_url @product_url end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
739 740 741 742 743 744 745 746 747 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 739 def update!(**args) @base_url = args[:base_url] if args.key?(:base_url) @contributor_info = args[:contributor_info] if args.key?(:contributor_info) @description = args[:description] if args.key?(:description) @id = args[:id] if args.key?(:id) @media_metadata = args[:media_metadata] if args.key?(:media_metadata) @mime_type = args[:mime_type] if args.key?(:mime_type) @product_url = args[:product_url] if args.key?(:product_url) end |