use of POGOProtos.Networking.Requests.Messages.GetGymDetailsMessageOuterClass.GetGymDetailsMessage in project PokeGOAPI-Java by Grover-c13.
the class Gym method details.
private GetGymDetailsResponse details() throws RequestFailedException {
if (details == null) {
GetGymDetailsMessage reqMsg = GetGymDetailsMessage.newBuilder().setGymId(this.getId()).setGymLatitude(this.getLatitude()).setGymLongitude(this.getLongitude()).setPlayerLatitude(api.getLatitude()).setPlayerLongitude(api.getLongitude()).build();
ServerRequest serverRequest = new ServerRequest(RequestType.GET_GYM_DETAILS, reqMsg);
api.getRequestHandler().sendServerRequests(serverRequest, true);
try {
details = GetGymDetailsResponse.parseFrom(serverRequest.getData());
} catch (InvalidProtocolBufferException e) {
throw new RequestFailedException();
}
}
return details;
}
Aggregations