You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refresh the OAuth token when it expires
* Fix my siliness and provide API consumers a way to provide their refresh token when using static auth
* add query from hatched eggs + rewrite stuff around EggPokemon
* fix the explaination for eclipse user
* Level enum public for custom loggers
* Publish sources jar
Fixes#128
* add license to GoogleLoginSecrets
* Use a reset instead of using another instance
* Fix the checkstyle config to not break other modules
* find Pokemon by ID
update inventory after hatching eggs
add missing license
* Meta info on pokemon
* add method the incubator
* fix typo
* Add a callback for when the Initial oAuth completes so that the app can automate the flow
* Power up pokemon API
* Add info about native google sign in
* REAME.md: fix Usefull->Useful typo
* README.md: fix PtcLogin classname type
* fix force updating inventories
* Fix incorrect static statements on point
* Added iv calculator (#207)
* Added iv calculator
* checkstyleMain fix
* Fix @returns in doc of getIVRatio()
* take care that the candies actually are in the map
* forgot that cancerous check style
* tweak checkstyle config to be friendly (#226)
* Add cause to LoginFailedExceptions. (#220)
Signed-off-by: Niklas Walter <[email protected]>
* Remove printStackTrace from updateProfile (#221)
updateProfile, in case of failure, would dump stacktraces to the console and then crash in the next line with a NullPointerException
* Added request to add modifiers to forts, for example a lure-module on a pokestop (#217)
* implemented request to add fort modifier
* added @throws to javadoc for addModifier in Pokestop.java
* Added SetFavoritePokemon method (#222)
* add lombok to more objects (#212)
* add lombok to more objects
* add lombok to GoogleAuthJson
* add lombok to Team
* getItemsCount function (#224)
* get total space used by items
* get total space used by items
* add javadoc
* Rewrote and Refactored login logic. Now the credential providers transparently handle providing credentials and refreshing tokens.
* Update the protobuf dependency (#235)
Includes fix for hatched eggs IndexOutOfBoundsException
* WIP: Gym/Battle (#203)
* Add info about native google sign in
* fix force updating inventories
* REAME.md: fix Usefull->Useful typo
* README.md: fix PtcLogin classname type
* Start Gym + Battle API
* Battle API - Example included, utility functions to get state of battle. Can only spam attack right now.
* Deprecate pokemon.getFavorite, rename to pokemon.isFavorite (#230)
* deprecate getFavorite, rename to isFavorite
* Adhere to checkstyle
* Use gradle-wrapper instead (#200)
* Use gradle-wrapper instead
* Changed second gradle usage to use gradlew aswell
* Fix typos (#218)
* Fix UTF-8 encoding
* Fix typo recieved -> received
* fix example
* Consistently use RemoteServerException for network/server errors (#243)
* Redone meta pm, lots of info available, several enums for pokemon (some may be duplicates of proto enums), fix catchable pokemon (#246)
* fix#237 + #227 (#240)
* Update protobufs to latest version
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ You may open an issue also to request new features. Make sure you describe what
11
11
If you consider submitting a pull request, please note the following:
12
12
13
13
1. All pull requests **must** be submitted to the `Development` branch. The `master` branch is exclusively mutable by release. PRs against `master` will not be merged.
14
-
2.Pleae make sure you follow the projects code style. To make sure you did, you can use `./gradlew checkstyleMain`.
14
+
2.Please make sure you follow the projects code style. To make sure you did, you can use `./gradlew checkstyleMain`.
15
15
3. The project is licensed under [GNU GPLv3](../LICENSE.txt) thus all code you submit will be subject to this license.
16
16
17
17
## Contact
18
-
If you have any questions regarding the library you can ask those on the `#javaapi` channel on the [Pokemon GO Reverse Engineering Slack](https://pkre.slack.com/). You can [get your invite here](https://shielded-earth-81203.herokuapp.com/).
18
+
If you have any questions regarding the library you can ask those on the `#javaapi` channel on the [Pokemon GO Reverse Engineering Slack](https://pkre.slack.com/). You can [get your invite here](https://shielded-earth-81203.herokuapp.com/).
Copy file name to clipboardExpand all lines: README.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,24 +27,29 @@ ___
27
27
# Build
28
28
- Clone the repo and cd into the folder
29
29
-`` git submodule update --init ``
30
-
-verify that you have gradle in your path
31
-
-``gradle build bundle ``
30
+
-compile and package
31
+
-``./gradlew build bundle ``
32
32
- you should have the api bundled in ``build/libs/PokeGOAPI-Java_bundle-0.0.1-SNAPSHOT.jar``
33
33
34
-
PS : To eclipse user, you may build one time and add the generated java class for proto into eclipse path : Right click on the project > Build path > New Source Folder > Type 'build/generated/source/proto/main/java' > Finish
34
+
PS : To Eclipse user, you must build once : `` ./gradlew build ``and add the generated java class for proto into eclipse source path : Right click on the project > Build path > Configure Build Path > Source > Add Folder > Select `build/generated/source/proto/main/java` > Finish
35
35
36
36
# Usage
37
37
Include the API as jar from your own build, or use Maven/Gradle/SBT/Leiningen: https://jitpack.io/#Grover-c13/PokeGOAPI-Java/master-SNAPSHOT
38
38
39
39
Mostly everything is accessed through the PokemonGo class in the API package.
40
40
41
-
The constructor of PokemonGo class requires a AuthInfo object which can be obtained from GoogleLogin().login or PTCLogin().login, and a OkHttpClient object.
41
+
The constructor of PokemonGo class requires a AuthInfo object which can be obtained from GoogleLogin().login or PtcLogin().login, and a OkHttpClient object.
//First Ever Login. Persist info when you recieve callback
48
+
PokemonGo go =newPokemonGo(newGoogleCredentialProvider(httpClient,listner),httpClient);
49
+
//Subsequently
50
+
PokemonGo go =newPokemonGo(newGoogleCredentialProvider(httpClient,refreshToken),httpClient);
51
+
//Or use PTC
52
+
PokemonGo go =newPokemonGo(newPtcCredentialProvider(httpClient,username,password),httpClient);
48
53
Log.v(go.getPlayerProfile());
49
54
```
50
55
##Android Dev FAQ
@@ -57,13 +62,17 @@ You're running the sample code on the UI thread. Strict mode policy will throw a
57
62
58
63
This library is meant to be a Java implementation of the API. Google Volley is specific to Android and should not be introduced in this library. However, if you still want to refactor it, you should create it as a separate project.
59
64
65
+
- How can I use Android's native Google sign in with this library?
66
+
67
+
You can't. The Google Identity Platform uses the SHA1 fingerprint and package name to authenticate the caller of all sign in requests. This means that Niantic would need to add your app's SHA1 fingerprint and package name to their Google API Console. If you ever requested a Google Maps API key, you went through the same process. An alternative would be using a WebView to access the web based OAuth flow. This will work with the client ID and secret provided by this library.
68
+
60
69
61
70
## Contributing
62
71
- Fork it!
63
72
- Create your feature branch: `git checkout -b my-new-feature`
64
-
- Commit your changes: `git commit -am 'Usefull information about your new features'`
73
+
- Commit your changes: `git commit -am 'Useful information about your new features'`
65
74
- Push to the branch: `git push origin my-new-feature`
66
-
- Submit a pull request :D
75
+
- Submit a pull request on the `Development` branch :D
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
0 commit comments