Module: Gplus::Activity

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

Overview

A collection of methods for Google+ Activities API calls.

Instance Method Summary collapse

Instance Method Details

#get_activity(id) ⇒ Hash

Get an Activity by its unique ID.


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

def get_activity(id)
  get("activities/#{id}")
end

#list_activities(person_id, options = {}) ⇒ Hash

List a Person's Google+ activities.

Options Hash (options):

  • maxResults (Integer) — default: 20

    The number of activities, between 1 and 100, to return.

  • pageToken (String)

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

See Also:


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

def list_activities(person_id, options = {})
  get("people/#{person_id}/activities/public", options)
end

#search_activities(query, options = {}) ⇒ Hash

Search all public Google+ activities.

Options Hash (options):

  • maxResults (Integer) — default: 10

    The number of activities, between 1 and 20, to return.

  • pageToken (String)

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

  • orderBy (String) — default: 'recent'

    Specifies how to order search results. Acceptable values are 'best' and 'recent'.

See Also:


34
35
36
# File 'lib/gplus/activity.rb', line 34

def search_activities(query, options = {})
  get("activities", options.merge(:query => query))
end