Search fort fort search response. @param fortData the fort data @return the fort search response @throws LoginFailedException the login failed exception @throws RemoteServerException the remote server exception
(FortData fortData)
| 573 | * @throws RemoteServerException the remote server exception |
| 574 | */ |
| 575 | @Deprecated |
| 576 | public FortSearchResponse searchFort(FortData fortData) throws LoginFailedException, RemoteServerException { |
| 577 | FortSearchMessage reqMsg = FortSearchMessage.newBuilder() |
| 578 | .setFortId(fortData.getId()) |
| 579 | .setFortLatitude(fortData.getLatitude()) |
| 580 | .setFortLongitude(fortData.getLongitude()) |
| 581 | .setPlayerLatitude(api.getLatitude()) |
| 582 | .setPlayerLongitude(api.getLongitude()) |
| 583 | .build(); |
| 584 | ServerRequest serverRequest = new ServerRequest(RequestType.FORT_SEARCH, reqMsg); |
| 585 | |
| 586 | api.getRequestHandler().sendServerRequests(serverRequest); |
| 587 | |
| 588 | FortSearchResponse response; |
| 589 | try { |
| 590 | response = FortSearchResponse.parseFrom(serverRequest.getData()); |
| 591 | } catch (InvalidProtocolBufferException e) { |
| 592 | throw new RemoteServerException(e); |
| 593 | } |
| 594 | return response; |
| 595 | } |
| 596 | |
| 597 | /** |
| 598 | * Encounter pokemon encounter response. |
nothing calls this directly
no test coverage detected