Пример #1
0
    def get_entity_by_id(self, get_entity_by_id_request):
        """Return one or more user entities.

        Searching by phone number only finds entities when their phone number
        is in your contacts (and not always even then), and can't be used to
        find Google Voice contacts.
        """
        response = hangouts_pb2.GetEntityByIdResponse()
        yield from self._pb_request('contacts/getentitybyid',
                                    get_entity_by_id_request, response)
        return response
Пример #2
0
    def getentitybyid(self, gaia_id_list):
        """Return information about a list of contacts.

        Raises hangups.NetworkError if the request fails.
        """
        request = hangouts_pb2.GetEntityByIdRequest(
            request_header=self._get_request_header_pb(),
            batch_lookup_spec=[hangouts_pb2.EntityLookupSpec(gaia_id=gaia_id)
                               for gaia_id in gaia_id_list],
        )
        response = hangouts_pb2.GetEntityByIdResponse()
        yield from self._pb_request('contacts/getentitybyid', request,
                                    response)
        return response
Пример #3
0
 def get_entity_by_id(self, get_entity_by_id_request):
     """Return info about a list of users."""
     response = hangouts_pb2.GetEntityByIdResponse()
     yield from self._pb_request('contacts/getentitybyid',
                                 get_entity_by_id_request, response)
     return response