Class PeopleTemplate
- java.lang.Object
-
- org.springframework.social.google.api.impl.AbstractGoogleApiOperations
-
- org.springframework.social.google.api.people.impl.PeopleTemplate
-
- All Implemented Interfaces:
PeopleOperations
public class PeopleTemplate extends AbstractGoogleApiOperations implements PeopleOperations
PeopleOperationsimplementation.- Author:
- Oscar Carballo
-
-
Field Summary
-
Fields inherited from class org.springframework.social.google.api.impl.AbstractGoogleApiOperations
isAuthorized, restTemplate
-
Fields inherited from interface org.springframework.social.google.api.people.PeopleOperations
ALL_FIELDS
-
-
Constructor Summary
Constructors Constructor Description PeopleTemplate(org.springframework.web.client.RestTemplate restTemplate, boolean isAuthorized)
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class org.springframework.social.google.api.impl.AbstractGoogleApiOperations
deleteEntity, deleteEntity, getEntity, patch, requireAuthorization, saveEntity
-
-
-
-
Method Detail
-
getPerson
public PeoplePerson getPerson(String id)
Description copied from interface:PeopleOperationsRetrieves 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- Specified by:
getPersonin interfacePeopleOperations- Parameters:
id- user ID or "me"- Returns:
- the retrieved
PeoplePerson
-
getPerson
public PeoplePerson getPerson(String id, String fields)
Description copied from interface:PeopleOperationsRetrieves 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- Specified by:
getPersonin interfacePeopleOperations- Parameters:
id- user ID or "me"fields- comma separated values containing the desired fields- Returns:
- the retrieved
PeoplePerson
-
getGoogleProfile
public PeoplePerson getGoogleProfile()
Description copied from interface:PeopleOperationsRetrieves 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- Specified by:
getGoogleProfilein interfacePeopleOperations- Returns:
- the retrieved
PeoplePerson
-
getGoogleProfile
public PeoplePerson getGoogleProfile(String fields)
Description copied from interface:PeopleOperationsRetrieves 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- Specified by:
getGoogleProfilein interfacePeopleOperations- Parameters:
fields- user ID or "me"- Returns:
- the retrieved
PeoplePerson
-
-