Class: Google::Apis::MirrorV1::MirrorService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/mirror_v1/service.rb

Overview

Google Mirror API

Interacts with Glass users via the timeline.

Examples:

require 'google/apis/mirror_v1'

Mirror = Google::Apis::MirrorV1 # Alias the module
service = Mirror::MirrorService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeMirrorService

Returns a new instance of MirrorService



49
50
51
52
# File 'generated/google/apis/mirror_v1/service.rb', line 49

def initialize
  super('https://www.googleapis.com/', 'mirror/v1/')
  @batch_path = 'batch/mirror/v1'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/mirror_v1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



43
44
45
# File 'generated/google/apis/mirror_v1/service.rb', line 43

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



47
48
49
# File 'generated/google/apis/mirror_v1/service.rb', line 47

def user_ip
  @user_ip
end

Instance Method Details

#delete_contact(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a contact.

Parameters:

  • id (String)

    The ID of the contact.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



118
119
120
121
122
123
124
125
# File 'generated/google/apis/mirror_v1/service.rb', line 118

def delete_contact(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'contacts/{id}', options)
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_subscription(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a subscription.

Parameters:

  • id (String)

    The ID of the subscription.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



417
418
419
420
421
422
423
424
# File 'generated/google/apis/mirror_v1/service.rb', line 417

def delete_subscription(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'subscriptions/{id}', options)
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_timeline(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a timeline item.

Parameters:

  • id (String)

    The ID of the timeline item.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



547
548
549
550
551
552
553
554
# File 'generated/google/apis/mirror_v1/service.rb', line 547

def delete_timeline(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'timeline/{id}', options)
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_timeline_attachment(item_id, attachment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes an attachment from a timeline item.

Parameters:

  • item_id (String)

    The ID of the timeline item the attachment belongs to.

  • attachment_id (String)

    The ID of the attachment.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



789
790
791
792
793
794
795
796
797
# File 'generated/google/apis/mirror_v1/service.rb', line 789

def delete_timeline_attachment(item_id, attachment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'timeline/{itemId}/attachments/{attachmentId}', options)
  command.params['itemId'] = item_id unless item_id.nil?
  command.params['attachmentId'] = attachment_id unless attachment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_contact(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Contact

Gets a single contact by ID.

Parameters:

  • id (String)

    The ID of the contact.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



149
150
151
152
153
154
155
156
157
158
# File 'generated/google/apis/mirror_v1/service.rb', line 149

def get_contact(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'contacts/{id}', options)
  command.response_representation = Google::Apis::MirrorV1::Contact::Representation
  command.response_class = Google::Apis::MirrorV1::Contact
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_location(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Location

Gets a single location by ID.

Parameters:

  • id (String)

    The ID of the location or latest for the last known location.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



317
318
319
320
321
322
323
324
325
326
# File 'generated/google/apis/mirror_v1/service.rb', line 317

def get_location(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'locations/{id}', options)
  command.response_representation = Google::Apis::MirrorV1::Location::Representation
  command.response_class = Google::Apis::MirrorV1::Location
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_setting(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Setting

Gets a single setting by ID.

Parameters:

  • id (String)

    The ID of the setting. The following IDs are valid:

    • locale - The key to the user’s language/locale (BCP 47 identifier) that Glassware should use to render localized content.
    • timezone - The key to the user’s current time zone region as defined in the tz database. Example: America/Los_Angeles.
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



384
385
386
387
388
389
390
391
392
393
# File 'generated/google/apis/mirror_v1/service.rb', line 384

def get_setting(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'settings/{id}', options)
  command.response_representation = Google::Apis::MirrorV1::Setting::Representation
  command.response_class = Google::Apis::MirrorV1::Setting
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_timeline(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::TimelineItem

Gets a single timeline item by ID.

Parameters:

  • id (String)

    The ID of the timeline item.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



578
579
580
581
582
583
584
585
586
587
# File 'generated/google/apis/mirror_v1/service.rb', line 578

def get_timeline(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'timeline/{id}', options)
  command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.response_class = Google::Apis::MirrorV1::TimelineItem
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_timeline_attachment(item_id, attachment_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Attachment

Retrieves an attachment on a timeline item by item ID and attachment ID.

Parameters:

  • item_id (String)

    The ID of the timeline item the attachment belongs to.

  • attachment_id (String)

    The ID of the attachment.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'generated/google/apis/mirror_v1/service.rb', line 825

def get_timeline_attachment(item_id, attachment_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:get, 'timeline/{itemId}/attachments/{attachmentId}', options)
  else
    command = make_download_command(:get, 'timeline/{itemId}/attachments/{attachmentId}', options)
    command.download_dest = download_dest
  end
  command.response_representation = Google::Apis::MirrorV1::Attachment::Representation
  command.response_class = Google::Apis::MirrorV1::Attachment
  command.params['itemId'] = item_id unless item_id.nil?
  command.params['attachmentId'] = attachment_id unless attachment_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_account(user_token, account_type, account_name, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Account

Inserts a new account for a user

Parameters:

  • user_token (String)

    The ID for the user.

  • account_type (String)

    Account type to be passed to Android Account Manager.

  • account_name (String)

    The name of the account to be passed to the Android Account Manager.

  • account_object (Google::Apis::MirrorV1::Account) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'generated/google/apis/mirror_v1/service.rb', line 81

def (user_token, , ,  = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'accounts/{userToken}/{accountType}/{accountName}', options)
  command.request_representation = Google::Apis::MirrorV1::Account::Representation
  command.request_object = 
  command.response_representation = Google::Apis::MirrorV1::Account::Representation
  command.response_class = Google::Apis::MirrorV1::Account
  command.params['userToken'] = user_token unless user_token.nil?
  command.params['accountType'] =  unless .nil?
  command.params['accountName'] =  unless .nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_contact(contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Contact

Inserts a new contact.

Parameters:

  • contact_object (Google::Apis::MirrorV1::Contact) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



181
182
183
184
185
186
187
188
189
190
191
# File 'generated/google/apis/mirror_v1/service.rb', line 181

def insert_contact(contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'contacts', options)
  command.request_representation = Google::Apis::MirrorV1::Contact::Representation
  command.request_object = contact_object
  command.response_representation = Google::Apis::MirrorV1::Contact::Representation
  command.response_class = Google::Apis::MirrorV1::Contact
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_subscription(subscription_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Subscription

Creates a new subscription.

Parameters:

  • subscription_object (Google::Apis::MirrorV1::Subscription) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



447
448
449
450
451
452
453
454
455
456
457
# File 'generated/google/apis/mirror_v1/service.rb', line 447

def insert_subscription(subscription_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'subscriptions', options)
  command.request_representation = Google::Apis::MirrorV1::Subscription::Representation
  command.request_object = subscription_object
  command.response_representation = Google::Apis::MirrorV1::Subscription::Representation
  command.response_class = Google::Apis::MirrorV1::Subscription
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_timeline(timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::TimelineItem

Inserts a new item into the timeline.

Parameters:

  • timeline_item_object (Google::Apis::MirrorV1::TimelineItem) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
# File 'generated/google/apis/mirror_v1/service.rb', line 614

def insert_timeline(timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:post, 'timeline', options)
  else
    command = make_upload_command(:post, 'timeline', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.request_object = timeline_item_object
  command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.response_class = Google::Apis::MirrorV1::TimelineItem
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_timeline_attachment(item_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Attachment

Adds a new attachment to a timeline item.

Parameters:

  • item_id (String)

    The ID of the timeline item the attachment belongs to.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
# File 'generated/google/apis/mirror_v1/service.rb', line 868

def insert_timeline_attachment(item_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:post, 'timeline/{itemId}/attachments', options)
  else
    command = make_upload_command(:post, 'timeline/{itemId}/attachments', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.response_representation = Google::Apis::MirrorV1::Attachment::Representation
  command.response_class = Google::Apis::MirrorV1::Attachment
  command.params['itemId'] = item_id unless item_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_contacts(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::ListContactsResponse

Retrieves a list of contacts for the authenticated user.

Parameters:

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



213
214
215
216
217
218
219
220
221
# File 'generated/google/apis/mirror_v1/service.rb', line 213

def list_contacts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'contacts', options)
  command.response_representation = Google::Apis::MirrorV1::ListContactsResponse::Representation
  command.response_class = Google::Apis::MirrorV1::ListContactsResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_locations(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::ListLocationsResponse

Retrieves a list of locations for the user.

Parameters:

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



348
349
350
351
352
353
354
355
356
# File 'generated/google/apis/mirror_v1/service.rb', line 348

def list_locations(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'locations', options)
  command.response_representation = Google::Apis::MirrorV1::ListLocationsResponse::Representation
  command.response_class = Google::Apis::MirrorV1::ListLocationsResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_subscriptions(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::ListSubscriptionsResponse

Retrieves a list of subscriptions for the authenticated user and service.

Parameters:

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



479
480
481
482
483
484
485
486
487
# File 'generated/google/apis/mirror_v1/service.rb', line 479

def list_subscriptions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'subscriptions', options)
  command.response_representation = Google::Apis::MirrorV1::ListSubscriptionsResponse::Representation
  command.response_class = Google::Apis::MirrorV1::ListSubscriptionsResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_timeline_attachments(item_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::ListAttachmentsResponse

Returns a list of attachments for a timeline item.

Parameters:

  • item_id (String)

    The ID of the timeline item whose attachments should be listed.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



907
908
909
910
911
912
913
914
915
916
# File 'generated/google/apis/mirror_v1/service.rb', line 907

def list_timeline_attachments(item_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'timeline/{itemId}/attachments', options)
  command.response_representation = Google::Apis::MirrorV1::ListAttachmentsResponse::Representation
  command.response_class = Google::Apis::MirrorV1::ListAttachmentsResponse
  command.params['itemId'] = item_id unless item_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_timelines(bundle_id: nil, include_deleted: nil, max_results: nil, order_by: nil, page_token: nil, pinned_only: nil, source_item_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::ListTimelineResponse

Retrieves a list of timeline items for the authenticated user.

Parameters:

  • bundle_id (String)

    If provided, only items with the given bundleId will be returned.

  • include_deleted (Boolean)

    If true, tombstone records for deleted items will be returned.

  • max_results (Fixnum)

    The maximum number of items to include in the response, used for paging.

  • order_by (String)

    Controls the order in which timeline items are returned.

  • page_token (String)

    Token for the page of results to return.

  • pinned_only (Boolean)

    If true, only pinned items will be returned.

  • source_item_id (String)

    If provided, only items with the given sourceItemId will be returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
# File 'generated/google/apis/mirror_v1/service.rb', line 666

def list_timelines(bundle_id: nil, include_deleted: nil, max_results: nil, order_by: nil, page_token: nil, pinned_only: nil, source_item_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'timeline', options)
  command.response_representation = Google::Apis::MirrorV1::ListTimelineResponse::Representation
  command.response_class = Google::Apis::MirrorV1::ListTimelineResponse
  command.query['bundleId'] = bundle_id unless bundle_id.nil?
  command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pinnedOnly'] = pinned_only unless pinned_only.nil?
  command.query['sourceItemId'] = source_item_id unless source_item_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_contact(id, contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Contact

Updates a contact in place. This method supports patch semantics.

Parameters:

  • id (String)

    The ID of the contact.

  • contact_object (Google::Apis::MirrorV1::Contact) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



246
247
248
249
250
251
252
253
254
255
256
257
# File 'generated/google/apis/mirror_v1/service.rb', line 246

def patch_contact(id, contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'contacts/{id}', options)
  command.request_representation = Google::Apis::MirrorV1::Contact::Representation
  command.request_object = contact_object
  command.response_representation = Google::Apis::MirrorV1::Contact::Representation
  command.response_class = Google::Apis::MirrorV1::Contact
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_timeline(id, timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::TimelineItem

Updates a timeline item in place. This method supports patch semantics.

Parameters:

  • id (String)

    The ID of the timeline item.

  • timeline_item_object (Google::Apis::MirrorV1::TimelineItem) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



706
707
708
709
710
711
712
713
714
715
716
717
# File 'generated/google/apis/mirror_v1/service.rb', line 706

def patch_timeline(id, timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'timeline/{id}', options)
  command.request_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.request_object = timeline_item_object
  command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.response_class = Google::Apis::MirrorV1::TimelineItem
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_contact(id, contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Contact

Updates a contact in place.

Parameters:

  • id (String)

    The ID of the contact.

  • contact_object (Google::Apis::MirrorV1::Contact) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



282
283
284
285
286
287
288
289
290
291
292
293
# File 'generated/google/apis/mirror_v1/service.rb', line 282

def update_contact(id, contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'contacts/{id}', options)
  command.request_representation = Google::Apis::MirrorV1::Contact::Representation
  command.request_object = contact_object
  command.response_representation = Google::Apis::MirrorV1::Contact::Representation
  command.response_class = Google::Apis::MirrorV1::Contact
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_subscription(id, subscription_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::Subscription

Updates an existing subscription in place.

Parameters:

  • id (String)

    The ID of the subscription.

  • subscription_object (Google::Apis::MirrorV1::Subscription) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



512
513
514
515
516
517
518
519
520
521
522
523
# File 'generated/google/apis/mirror_v1/service.rb', line 512

def update_subscription(id, subscription_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'subscriptions/{id}', options)
  command.request_representation = Google::Apis::MirrorV1::Subscription::Representation
  command.request_object = subscription_object
  command.response_representation = Google::Apis::MirrorV1::Subscription::Representation
  command.response_class = Google::Apis::MirrorV1::Subscription
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_timeline(id, timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MirrorV1::TimelineItem

Updates a timeline item in place.

Parameters:

  • id (String)

    The ID of the timeline item.

  • timeline_item_object (Google::Apis::MirrorV1::TimelineItem) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
# File 'generated/google/apis/mirror_v1/service.rb', line 746

def update_timeline(id, timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:put, 'timeline/{id}', options)
  else
    command = make_upload_command(:put, 'timeline/{id}', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.request_object = timeline_item_object
  command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation
  command.response_class = Google::Apis::MirrorV1::TimelineItem
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end