Interface PeopleOperations

  • All Known Implementing Classes:
    PeopleTemplate

    public interface PeopleOperations
    Defines operations for searching and retrieving Google people information. To use "me" as user ID, requires OAuth2 authentication.
    Author:
    Oscar Carballo
    • 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