API replacement #4

Closed
opened 2021-10-24 20:54:17 +00:00 by conco · 5 comments
Owner

The game sends and receives data from an API endpoint that we cannot access or know the location of. As a result, in order for the game to load properly we need to first overwrite the config table to not be loaded from encrypted kv. Then we need to do one of the following

  • Stub out the request methods and simply return viable data from the lua
  • Set up a full API including respecting user input (needed for power level stuff i think unless we can just give them x game points every time and not save). No protection
  • Set up a readonly API that doesn't store data and returns mock data based on defaults
The game sends and receives data from an API endpoint that we cannot access or know the location of. As a result, in order for the game to load properly we need to first overwrite the config table to not be loaded from encrypted kv. Then we need to do one of the following * Stub out the request methods and simply return viable data from the lua * Set up a full API including respecting user input (needed for power level stuff i think unless we can just give them x game points every time and not save). No protection * Set up a readonly API that doesn't store data and returns mock data based on defaults
Author
Owner

Config object in game consists of:

{
admin: bool // Used to check some stuff like debug commands,can just be false
gameCode: string? // Used in outgoing requests. Not sure the purpose, we don't care
urlGameConfig: string // Since we dont have a base url, these probably consist of full url to website+api endpoint
urlPlayerData: string
urlRankData: string
urlPlayerBaseData: string
}
Config object in game consists of: ``` { admin: bool // Used to check some stuff like debug commands,can just be false gameCode: string? // Used in outgoing requests. Not sure the purpose, we don't care urlGameConfig: string // Since we dont have a base url, these probably consist of full url to website+api endpoint urlPlayerData: string urlRankData: string urlPlayerBaseData: string } ```
Author
Owner

Started on replacing the api

Started on replacing the api
Author
Owner

API Replacement has been started on a new repository in this organization. Once all the endpoints are replaced in the config structure, this can be closed.

API Replacement has been started on a new repository in this organization. Once all the endpoints are replaced in the config structure, this can be closed.
Author
Owner

Works up to getting in a game, but card groups are not stored or saved right now.

Works up to getting in a game, but card groups are not stored or saved right now.
conco added the working label 2021-10-26 15:14:35 +00:00
Author
Owner

All URLS replaced, savng card groups and loading works, closing this as rest of endpoints is on API project board

All URLS replaced, savng card groups and loading works, closing this as rest of endpoints is on API project board
conco closed this issue 2021-10-30 22:11:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2huCardTD/2HUCardTDGame#4