Sha256: e369baeab77d818145b2c599a41e78d2143b859f23c4c6753da6516141ff331b

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

module Gplus
  class Client
    # Get an Activity by its unique ID.
    # See http://developers.google.com/+/api/latest/activities/get for more details.
    #
    # @param [String] id The unique ID of the activity you want to retrieve.
    # @return [Hash] A nested hash representation of an {http://developers.google.com/+/api/latest/activities Activity resource}.
    def get_activity(id)
      get("activities/#{id}")
    end

    # List a Person's Google+ activities.
    # See http://developers.google.com/+/api/latest/activities/list for more details.
    #
    # @param [String] person_id The unique ID of the person whose activities you want to list. Pass the string 'me' to list the activities for the person that the API client is authorized as.
    # @param [Integer] results The number of activities, between 1 and 100, to return.
    # @param [String] page The page of activities to fetch. Pass the value of :nextPageToken from the previous result set to get the next page of results.
    # @return [Hash] A nested hash representation of {http://developers.google.com/+/api/latest/activities/list list of activities}.
    def list_activities(person_id, results = 20, page = nil)
      get("people/#{person_id}/activities/public", { :maxResults => results, :pageToken => page })
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gplus-0.5.0 lib/gplus/activity.rb
gplus-0.4.0 lib/gplus/activity.rb
gplus-0.3.1 lib/gplus/activity.rb