MCPcopy Index your code
hub / github.com/Grover-c13/PokeGOAPI-Java / searchFort

Method searchFort

src/main/java/com/pokegoapi/api/map/Map.java:575–595  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 5

getDataMethod · 0.95
sendServerRequestsMethod · 0.80
getLatitudeMethod · 0.65
getLongitudeMethod · 0.65
getIdMethod · 0.45

Tested by

no test coverage detected