Interface PeopleOperations
-
- All Known Implementing Classes:
PeopleTemplate
public interface PeopleOperationsDefines operations for searching and retrieving Google people information. To use "me" as user ID, requires OAuth2 authentication.- Author:
- Oscar Carballo
-
-
Field Summary
Fields Modifier and Type Field Description static StringALL_FIELDSAll the fields available in google people api.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PeoplePersongetGoogleProfile()Retrieves the authenticated user's complete Google profile.PeoplePersongetGoogleProfile(String fields)Retrieves the authenticated user's complete Google profile.PeoplePersongetPerson(String id)Retrieves a user's Google profile.PeoplePersongetPerson(String id, String fields)Retrieves a user's Google profile populated with the requested fields.
-
-
-
Field Detail
-
ALL_FIELDS
static final String ALL_FIELDS
All the fields available in google people api. In order to get a field value, the authentication must have been done with the right scope.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPerson
PeoplePerson getPerson(String id)
Retrieves a user's Google profile. Google people api requires to send the fields you want back. This will try to retrieve all fields for that user. The expected values will be returned as long as the right scope has been requested previously- Parameters:
id- user ID or "me"- Returns:
- the retrieved
PeoplePerson
-
getPerson
PeoplePerson getPerson(String id, String fields)
Retrieves a user's Google profile populated with the requested fields. Google people api requires to send the fields you want back. This will try to retrieve the fields passed in. The expected values will be returned as long as the right scope has been requested previously- Parameters:
id- user ID or "me"fields- comma separated values containing the desired fields- Returns:
- the retrieved
PeoplePerson
-
getGoogleProfile
PeoplePerson getGoogleProfile()
Retrieves the authenticated user's complete Google profile. Google people api requires to send the fields you want back. This will try to retrieve all fields for that user. The expected values will be returned as long as the right scope has been requested previously- Returns:
- the retrieved
PeoplePerson
-
getGoogleProfile
PeoplePerson getGoogleProfile(String fields)
Retrieves the authenticated user's complete Google profile. Google people api requires to send the fields you want back. This will try to retrieve the fields passed in. The expected values will be returned as long as the right scope has been requested previously- Parameters:
fields- user ID or "me"- Returns:
- the retrieved
PeoplePerson
-
-