Class: Google::Apis::PhotoslibraryV1::SearchMediaItemsRequest
- Inherits:
-
Object
- Object
- Google::Apis::PhotoslibraryV1::SearchMediaItemsRequest
- 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
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 which fulfills the criteria based upon the filters. Filters and album id must not both be set, as this will result in an invalid request.
Instance Attribute Summary collapse
-
#album_id ⇒ String
Identifier of an album.
-
#filters ⇒ Google::Apis::PhotoslibraryV1::Filters
Filters that can be applied to a media item search.
-
#page_size ⇒ Fixnum
Maximum number of media items to return in the response.
-
#page_token ⇒ String
A continuation token to get the next page of the results.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SearchMediaItemsRequest
constructor
A new instance of SearchMediaItemsRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ SearchMediaItemsRequest
Returns a new instance of SearchMediaItemsRequest
1036 1037 1038 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 1036 def initialize(**args) update!(**args) end |
Instance Attribute Details
#album_id ⇒ String
Identifier of an album. If populated will list all media items in
specified album. Cannot be set in conjunction with any filters.
Corresponds to the JSON property albumId
1013 1014 1015 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 1013 def album_id @album_id end |
#filters ⇒ Google::Apis::PhotoslibraryV1::Filters
Filters that can be applied to a media item search.
If multiple filter options are specified, they are treated as AND with each
other.
Corresponds to the JSON property filters
1020 1021 1022 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 1020 def filters @filters end |
#page_size ⇒ Fixnum
Maximum number of media items to return in the response. The default number
of media items to return at a time is 100. The maximum page size is 500.
Corresponds to the JSON property pageSize
1026 1027 1028 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 1026 def page_size @page_size end |
#page_token ⇒ String
A continuation token to get the next page of the results. Adding this to
the request will return the rows after the pageToken. The pageToken should
be the value returned in the nextPageToken parameter in the response to the
searchMediaItems request.
Corresponds to the JSON property pageToken
1034 1035 1036 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 1034 def page_token @page_token end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1041 1042 1043 1044 1045 1046 |
# File 'generated/google/apis/photoslibrary_v1/classes.rb', line 1041 def update!(**args) @album_id = args[:album_id] if args.key?(:album_id) @filters = args[:filters] if args.key?(:filters) @page_size = args[:page_size] if args.key?(:page_size) @page_token = args[:page_token] if args.key?(:page_token) end |