Add a status field to external_games, to indicate games that don't lead anywhere
take this json response for example:
{
"id": 3183491,
"uid": "1725510",
"external_game_source": {
"id": 1,
"name": "Steam"
}
},
{
"id": 214838,
"uid": "678950",
"external_game_source": {
"id": 1,
"name": "Steam"
}
},
this is Dragon Ball FighterZ, if we expand external_games, we can see there's 2 entries for Steam, but only the second one is valid (and some games, like Street Fighter 6, only the first one is valid).
I suggest a field status or something, that indicates this entry does not lead anywhere, like that:
{
"id": 3183491,
"uid": "1725510",
"external_game_source": {
"id": 1,
"name": "Steam"
}
},
{
"id": 214838,
"uid": "678950",
"external_game_source": {
"id": 1,
"name": "Steam"
}
},{
"id": 3183491,
"uid": "1725510",
"status": "inactive"
"external_game_source": {
"id": 1,
"name": "Steam"
}
},
{
"id": 214838,
"uid": "678950",
"status": "active"
"external_game_source": {
"id": 1,
"name": "Steam"
}
},
That way, a simple if condition check if status == active should suffice to get the correct entry.
Although Steam routes both entries to the second one, if we need the uid for some integration in our app, the first one will not be valid
2
votes