Module: Gplus::Person

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

Overview

A collection of methods for Google+ People API calls.

Instance Method Summary collapse

Instance Method Details

#get_person(id) ⇒ Hash

Get a person's Google+ profile. @ developers.google.com/+/api/latest/people/get The Google+ 'People: get' documentation.


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

def get_person(id)
  get("people/#{id}")
end

#list_people_by_activity(activity_id, collection, options = {}) ⇒ Hash

List all of the people in the specified collection for a particular activity.

Options Hash (options):

  • maxResults (Integer) — default: 20

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

  • pageToken (String)

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

See Also:


36
37
38
# File 'lib/gplus/person.rb', line 36

def list_people_by_activity(activity_id, collection, options = {})
  get("activities/#{activity_id}/people/#{collection}", options)
end

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

Search all public Google+ profiles.

Options Hash (options):

  • language (String)

    The preferred language to search with. See the official list of allowed language codes.

  • maxResults (Integer) — default: 10

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

  • pageToken (String)

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

See Also:


23
24
25
# File 'lib/gplus/person.rb', line 23

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