use of POGOProtos.Networking.Requests.Messages.GetHatchedEggsMessageOuterClass.GetHatchedEggsMessage in project PokeGOAPI-Java by Grover-c13.
the class Hatchery method queryHatchedEggs.
/**
* Get if eggs has hatched.
*
* @return list of hatched eggs
* @throws RequestFailedException if an exception occurred while sending requests
* @deprecated Use getHatchedEggs()
*/
@Deprecated
public List<HatchedEgg> queryHatchedEggs() throws RequestFailedException {
GetHatchedEggsMessage msg = GetHatchedEggsMessage.newBuilder().build();
ServerRequest serverRequest = new ServerRequest(RequestType.GET_HATCHED_EGGS, msg);
api.requestHandler.sendServerRequests(serverRequest, false);
GetHatchedEggsResponse response;
try {
response = GetHatchedEggsResponse.parseFrom(serverRequest.getData());
} catch (InvalidProtocolBufferException e) {
throw new RequestFailedException(e);
}
api.inventories.updateInventories();
return updateHatchedEggs(response);
}
Aggregations