Skip to content

Commit af59637

Browse files
pvanassenGrover-c13
authored andcommitted
Async implementation based in Futures (#360)
* Base for async * Transparent async requests * Converted map * Converted map, may have broken cache * Cleanup leftovers of Rx * Start on catchable pokemon * Did some methods on CatchablePokemon. Implemented NestedFutureWrapper to link Futures * Switched Pokestop * Some tinkering with timings and forgetting to clear lists * Exceptions shoudl accept Throwable * Cleanup of deprecate methods, Removed sleeps * Fixed sending garbage * Actually got it working * Checkstyle update * Checkstyle update * Upped timer a bit because of a few issues with empty requests
1 parent 6cec95d commit af59637

19 files changed

+1134
-461
lines changed

src/main/java/com/pokegoapi/api/PokemonGo.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,9 @@ public PokemonGo(CredentialProvider credentialProvider, OkHttpClient client, Tim
7878
// send profile request to get the ball rolling
7979
requestHandler = new RequestHandler(this, client);
8080

81-
try {
82-
playerProfile = new PlayerProfile(this);
83-
Thread.sleep(300);
84-
inventories = new Inventories(this);
85-
Thread.sleep(300);
86-
settings = new Settings(this);
87-
Thread.sleep(300);
88-
} catch (InterruptedException e) {
89-
// should not happen but why not
90-
e.printStackTrace();
91-
}
81+
playerProfile = new PlayerProfile(this);
82+
inventories = new Inventories(this);
83+
settings = new Settings(this);
9284

9385
// should have proper end point now.
9486
map = new Map(this);

0 commit comments

Comments
 (0)