Class: Google::Apis::PlusV1::PlusService

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

Overview

Google+ API

Builds on top of the Google+ platform.

Examples:

require 'google/apis/plus_v1'

Plus = Google::Apis::PlusV1 # Alias the module
service = Plus::PlusService.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

#initializePlusService

Returns a new instance of PlusService



51
52
53
54
# File 'generated/google/apis/plus_v1/service.rb', line 51

def initialize
  super('https://www.googleapis.com/', 'plus/v1/')
  @batch_path = 'batch'
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/plus_v1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.



44
45
46
# File 'generated/google/apis/plus_v1/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



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

def user_ip
  @user_ip
end

Instance Method Details

#get_activity(activity_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::Activity

Get an activity.

Parameters:

  • activity_id (String)

    The ID of the activity to get.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



80
81
82
83
84
85
86
87
88
89
# File 'generated/google/apis/plus_v1/service.rb', line 80

def get_activity(activity_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'activities/{activityId}', options)
  command.response_representation = Google::Apis::PlusV1::Activity::Representation
  command.response_class = Google::Apis::PlusV1::Activity
  command.params['activityId'] = activity_id unless activity_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_comment(comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::Comment

Get a comment.

Parameters:

  • comment_id (String)

    The ID of the comment to get.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



216
217
218
219
220
221
222
223
224
225
# File 'generated/google/apis/plus_v1/service.rb', line 216

def get_comment(comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'comments/{commentId}', options)
  command.response_representation = Google::Apis::PlusV1::Comment::Representation
  command.response_class = Google::Apis::PlusV1::Comment
  command.params['commentId'] = comment_id unless comment_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_person(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::Person

Get a person's profile. If your app uses scope https://www.googleapis.com/auth/ plus.login, this method is guaranteed to return ageRange and language.

Parameters:

  • user_id (String)

    The ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



301
302
303
304
305
306
307
308
309
310
# File 'generated/google/apis/plus_v1/service.rb', line 301

def get_person(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'people/{userId}', options)
  command.response_representation = Google::Apis::PlusV1::Person::Representation
  command.response_class = Google::Apis::PlusV1::Person
  command.params['userId'] = user_id unless user_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_activities(user_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::ActivityFeed

List all of the activities in the specified collection for a particular user.

Parameters:

  • user_id (String)

    The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.

  • collection (String)

    The collection of activities to list.

  • max_results (Fixnum)

    The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

  • page_token (String)

    The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of " nextPageToken" from the previous response.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'generated/google/apis/plus_v1/service.rb', line 126

def list_activities(user_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'people/{userId}/activities/{collection}', options)
  command.response_representation = Google::Apis::PlusV1::ActivityFeed::Representation
  command.response_class = Google::Apis::PlusV1::ActivityFeed
  command.params['userId'] = user_id unless user_id.nil?
  command.params['collection'] = collection unless collection.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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_comments(activity_id, max_results: nil, page_token: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::CommentFeed

List all of the comments for an activity.

Parameters:

  • activity_id (String)

    The ID of the activity to get comments for.

  • max_results (Fixnum)

    The maximum number of comments to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

  • page_token (String)

    The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of " nextPageToken" from the previous response.

  • sort_order (String)

    The order in which to sort the list of comments.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'generated/google/apis/plus_v1/service.rb', line 261

def list_comments(activity_id, max_results: nil, page_token: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'activities/{activityId}/comments', options)
  command.response_representation = Google::Apis::PlusV1::CommentFeed::Representation
  command.response_class = Google::Apis::PlusV1::CommentFeed
  command.params['activityId'] = activity_id unless activity_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['sortOrder'] = sort_order unless sort_order.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_people(user_id, collection, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::PeopleFeed

List all of the people in the specified collection.

Parameters:

  • user_id (String)

    Get the collection of people for the person identified. Use "me" to indicate the authenticated user.

  • collection (String)

    The collection of people to list.

  • max_results (Fixnum)

    The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

  • order_by (String)

    The order to return people in.

  • page_token (String)

    The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of " nextPageToken" from the previous response.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'generated/google/apis/plus_v1/service.rb', line 349

def list_people(user_id, collection, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'people/{userId}/people/{collection}', options)
  command.response_representation = Google::Apis::PlusV1::PeopleFeed::Representation
  command.response_class = Google::Apis::PlusV1::PeopleFeed
  command.params['userId'] = user_id unless user_id.nil?
  command.params['collection'] = collection unless collection.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['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_people_by_activity(activity_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::PeopleFeed

List all of the people in the specified collection for a particular activity.

Parameters:

  • activity_id (String)

    The ID of the activity to get the list of people for.

  • collection (String)

    The collection of people to list.

  • max_results (Fixnum)

    The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

  • page_token (String)

    The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of " nextPageToken" from the previous response.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'generated/google/apis/plus_v1/service.rb', line 398

def list_people_by_activity(activity_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'activities/{activityId}/people/{collection}', options)
  command.response_representation = Google::Apis::PlusV1::PeopleFeed::Representation
  command.response_class = Google::Apis::PlusV1::PeopleFeed
  command.params['activityId'] = activity_id unless activity_id.nil?
  command.params['collection'] = collection unless collection.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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

#search_activities(query, language: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::ActivityFeed

Search public activities.

Parameters:

  • query (String)

    Full-text search query string.

  • language (String)

    Specify the preferred language to search with. See search language codes for available values.

  • max_results (Fixnum)

    The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

  • order_by (String)

    Specifies how to order search results.

  • page_token (String)

    The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of " nextPageToken" from the previous response. This token can be of any length.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'generated/google/apis/plus_v1/service.rb', line 177

def search_activities(query, language: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'activities', options)
  command.response_representation = Google::Apis::PlusV1::ActivityFeed::Representation
  command.response_class = Google::Apis::PlusV1::ActivityFeed
  command.query['language'] = language unless language.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['query'] = query unless query.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

#search_people(query, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::PeopleFeed

Search all public profiles.

Parameters:

  • query (String)

    Specify a query string for full text search of public text in all profiles.

  • language (String)

    Specify the preferred language to search with. See search language codes for available values.

  • max_results (Fixnum)

    The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.

  • page_token (String)

    The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of " nextPageToken" from the previous response. This token can be of any length.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • 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
458
459
# File 'generated/google/apis/plus_v1/service.rb', line 447

def search_people(query, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'people', options)
  command.response_representation = Google::Apis::PlusV1::PeopleFeed::Representation
  command.response_class = Google::Apis::PlusV1::PeopleFeed
  command.query['language'] = language unless language.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.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