Last active
May 22, 2017 22:40
-
-
Save ninfia/fd8ba1045ae4de47303bacb504b1b6d6 to your computer and use it in GitHub Desktop.
Incomplete Gwent API stuff. Outdated after Open Beta.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
addresses | |
=============== | |
[Access token service](https://auth.gog.com) | |
[Config](https://seawolf-config.gog.com/game/v3/prod) | |
Most of GOG's service requires an oauth2 token. | |
[Profile service](https://seawolf-profile.gog.com) | |
[Deck service](https://seawolf-deck.gog.com) | |
[Matchmaking service](https://seawolf-matchmaking.gog.com) | |
[Server manager](https://seawolf-server-manager.gog.com) | |
[Games log](https://seawolf-games-log.gog.com) | |
[Inventory](https://seawolf-inventory.gog.com) | |
[In-game/microtransaction](https://seawolf-shop.gog.com) | |
[Ranking service](https://gwent-ranking.gog.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
config service | |
=============== | |
There are two requests known. | |
**You don't need oauth2 token for this. ** | |
As usual, HTTP/1.1 is optional. | |
# GET /game/v3/prod/config.json | |
Fetching the game's config. Indicates if certain services are available to play or not, aka, campaign/shop/multiplayer casual/competitive. | |
As well as determine whether if you can get a new message announcing patch or not. | |
Lasts a day. [1] | |
# GET /game/v3/prod/messages.json | |
Just like what it writes on the tin can: Messages. | |
Usually for CDPR to announce new patch. That's just it. [2] | |
# GET /data/prod/<version>/<platform> | |
Data definition file. | |
Fetched every time you launch the game. | |
Platforms are usually noted in config.json, for now only *XboxOne* and *PC*. | |
Data are **downloaded at launch in *0.8.60***, however will **download during sign in since *0.8.60.1*** | |
I don't know why they makes PC players downloading XB1 data as well. (Since 0.8.60.1) | |
0.8.60/0.8.60.1 uses version 14 to 16. (Also 13, but that stuff is in PTR build) | |
0.8.65/0.8.67 uses version 20. (65 is PTR1, 67 is PTR2) | |
Can be opened using UABE | |
References/example result: | |
========================== | |
[1]: https://seawolf-config.gog.com/game/v3/prod/config.json | |
[2]: https://seawolf-config.gog.com/game/v3/prod/messages.json | |
[3]: https://seawolf-config.gog.com/data/prod/16/GOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
deck service | |
=============== | |
**Requires access token** | |
# GET /users/<user id>/cards?_version=2&_data_version=11 | |
Display user collection. [1] | |
# GET /users/<user id>/decks?_version=2&_data_version=11 | |
Display user decks. [2] | |
# PUT users/<user id>/decks/<deck id>?_version=2&_data_version=11 | |
Saving deck content. | |
Example on a deck saving [3] | |
You can rename deck as well. | |
Deck name has a limit of displaying 255 characters/unlimited in selection menu, and 2 rows/143 characters in deck editor. | |
400 characters limit, included formatting. (Such as <#00000></color> and <b>) | |
# POST /users/<user id>cards/craft?_version=2&_data_version=11 | |
Content: | |
--------- | |
{ | |
"card_definition_id": 16110100 | |
} | |
--------- | |
References/example result: | |
========================== | |
[1]: https://p.teknik.io/nBXbm | |
[2]: https://p.teknik.io/zPt92 | |
[3]: https://p.teknik.io/nlnf3 | |
![Funsies!](https://cdn.discordapp.com/attachments/240553280097222657/289839443274104832/unknown.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
inventory service | |
=============== | |
Managing currency. | |
# GET /users/<user id>/currencies | |
Listed amount of gold and scrap you have | |
# GET /users/<user id>/items | |
Listed all your inventory items. | |
Kegs for now. Other vanity might be added later. | |
[1]: https://p.teknik.io/8tv6Y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
profile service | |
=============== | |
**Requires access token** | |
# GET /users/<user id>?_version=4 | |
Display user's personal info. | |
Example result: | |
[1]: https://p.teknik.io/URQ3o | |
# POST /users/<user id>/accomplishments?_version=4 | |
{ | |
"type": "" | |
} | |
Use: Implement accomplishments (later achievements?) to user account. Cannot implement twice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
ranking service | |
=============== | |
**Requires access token** | |
# GET /seasons/current | |
Display current season rank information[1]. Rank, MMR required, season's name. Date start and end of season. | |
# GET /seasons/<season id>/users/<user id> | |
Display infos of an user. | |
You can get info of other people with this request. | |
Used by buffy on his deck tracker as well. | |
Example is Deou's data back in a long time ago [2]. /cronyshrug | |
# GET /seasons/<user id>/leaderboards/all_platforms/users?page=1&limit=7 | |
Getting leaderboard info. [3] | |
Can find up to 1000 users. | |
Result is crossplatform. | |
References/example result: | |
========================== | |
[1]: https://p.teknik.io/k3DWo | |
[2]: https://p.teknik.io/IxmJi | |
[3]: https://p.teknik.io/8Dy6h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============== | |
SHOOP service | |
=============== | |
# GET /platforms/GOG/products?language=en&user_id=<user id>&_version=2 | |
Listing prices of microtransaction. and other goodies. | |
[1]: https://p.teknik.io/eld7K |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment