Class: Google::Apis::PlusV1::PlusService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::PlusV1::PlusService
- Defined in:
- generated/google/apis/plus_v1/service.rb
Overview
Google+ API
Builds on top of the Google+ platform.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_activity(activity_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::Activity
Get an activity.
-
#get_comment(comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PlusV1::Comment
Get a comment.
-
#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.
-
#initialize ⇒ PlusService
constructor
A new instance of PlusService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ PlusService
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/plus/v1' end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/plus_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
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.
44 45 46 |
# File 'generated/google/apis/plus_v1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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.
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', ) 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 |