Class PeopleTemplate

    • Constructor Detail

      • PeopleTemplate

        public PeopleTemplate​(org.springframework.web.client.RestTemplate restTemplate,
                              boolean isAuthorized)
    • Method Detail

      • getPerson

        public PeoplePerson getPerson​(String id)
        Description copied from interface: PeopleOperations
        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
        Specified by:
        getPerson in interface PeopleOperations
        Parameters:
        id - user ID or "me"
        Returns:
        the retrieved PeoplePerson
      • getPerson

        public PeoplePerson getPerson​(String id,
                                      String fields)
        Description copied from interface: PeopleOperations
        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
        Specified by:
        getPerson in interface PeopleOperations
        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: PeopleOperations
        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
        Specified by:
        getGoogleProfile in interface PeopleOperations
        Returns:
        the retrieved PeoplePerson
      • getGoogleProfile

        public PeoplePerson getGoogleProfile​(String fields)
        Description copied from interface: PeopleOperations
        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
        Specified by:
        getGoogleProfile in interface PeopleOperations
        Parameters:
        fields - user ID or "me"
        Returns:
        the retrieved PeoplePerson