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


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

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

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)

    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:


76
77
78
79
80
81
82
83
84
85
# File 'generated/google/apis/plus_v1/service.rb', line 76

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)

    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:


206
207
208
209
210
211
212
213
214
215
# File 'generated/google/apis/plus_v1/service.rb', line 206

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)

    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:


287
288
289
290
291
292
293
294
295
296
# File 'generated/google/apis/plus_v1/service.rb', line 287

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)

    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:


120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'generated/google/apis/plus_v1/service.rb', line 120

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)

    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:


249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'generated/google/apis/plus_v1/service.rb', line 249

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)

    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:


333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'generated/google/apis/plus_v1/service.rb', line 333

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)

    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:


380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'generated/google/apis/plus_v1/service.rb', line 380

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)

    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:


169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'generated/google/apis/plus_v1/service.rb', line 169

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)

    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:


427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'generated/google/apis/plus_v1/service.rb', line 427

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