public void getMapObjects(List<Long> cellIds, double latitude, double longitude) { requestHandler.setLatitude(latitude); requestHandler.setLongitude(longitude); requestHandler.setAltitude(0); GetMapObjectsRequest request = new GetMapObjectsRequest(cellIds, latitude, longitude); requestHandler.addRequest(request); requestHandler.sendRequests(); }
public FortDetails getFortDetails(String id, long lon, long lat) { FortDetailsRequest request = new FortDetailsRequest(id); request.setLatitude(lat); request.setLongitude(lon); requestHandler.addRequest(request); requestHandler.sendRequests(); return new FortDetails(request.getOutput()); }
public PlayerProfile getPlayerProfile() { ProfileRequest pr = new ProfileRequest(); requestHandler.addRequest(pr); requestHandler.sendRequests(); return pr.getProfile(); }
private void getInventory() { InventoryRequest invRequest = new InventoryRequest(); invRequest.setTimestamp(lastInventoryUpdate); requestHandler.addRequest(invRequest); requestHandler.sendRequests(); for (Pokemon newPokemon : invRequest.getPokemon()) { this.pokebank.addPokemon(newPokemon); } }
public PokemonGo(AuthInfo auth) { playerProfile = null; // send profile request to get the ball rolling requestHandler = new RequestHandler(auth); ProfileRequest pr = new ProfileRequest(); requestHandler.addRequest(pr); requestHandler.sendRequests(); // should have proper end point now. pokebank = new PokeBank(this); lastInventoryUpdate = 0; getInventory(); }