Module: Gplus::Comment

Included in:
Client
Defined in:
lib/gplus/comment.rb

Overview

A collection of methods for Google+ Comments API calls.

Instance Method Summary collapse

Instance Method Details

#get_comment(id) ⇒ Hash

Get a Comment by its unique ID.

Parameters:

  • id (String)

    The unique ID of the comment you want to retrieve.

Returns:

See Also:



10
11
12
# File 'lib/gplus/comment.rb', line 10

def get_comment(id)
  get("comments/#{id}")
end

#list_comments(activity_id, options = {}) ⇒ Hash

List an activity's comments.

Parameters:

  • activity_id (String)

    The unique ID of the activity whose comments you want to list.

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • maxResults (Integer) — default: 20

    The number of comments, between 0 and 100, to return.

  • pageToken (String)

    The page of comments to fetch. Pass the value of :nextPageToken from the previous result set to get the next page of results.

Returns:

See Also:



22
23
24
# File 'lib/gplus/comment.rb', line 22

def list_comments(activity_id, options = {})
  get("activities/#{activity_id}/comments", options)
end