use of POGOProtos.Networking.Requests.Messages.GetIncensePokemonMessageOuterClass.GetIncensePokemonMessage in project PokeGOAPI-Java by Grover-c13.
the class Map method requestIncensePokemon.
/**
* Requests and returns incense pokemon from the server.
*
* @return the returned incense pokemon response
* @throws RequestFailedException if an exception occurred while sending requests
*/
protected GetIncensePokemonResponse requestIncensePokemon() throws RequestFailedException {
GetIncensePokemonMessage message = GetIncensePokemonMessage.newBuilder().setPlayerLatitude(api.getLatitude()).setPlayerLongitude(api.getLongitude()).build();
ServerRequest request = new ServerRequest(RequestType.GET_INCENSE_POKEMON, message);
api.getRequestHandler().sendServerRequests(request);
try {
return GetIncensePokemonResponse.parseFrom(request.getData());
} catch (InvalidProtocolBufferException e) {
throw new RequestFailedException(e);
}
}
Aggregations