-
Notifications
You must be signed in to change notification settings - Fork 0
API
return a JsonObject
{
"id": 0,
"username": "Marvin",
"friends": [friendsId],
"role": "Member"
}
lighter query when only username required.
return a JsonObject
{
"username": "Marvin"
}
lighter query when only friends list required.
return a JsonObject
{
"friends": [friendId, ...]
}
return the [jpg, jpeg, png] file is selected by user as is profile picture
return from the blockchain all the games in which user was involved
Warning all active games are exclude from this API call (an active game isn't in the blockchain)
return a JsonObject
[{"gameId: 0,
"playerIds": [0, 0],(2 or 4)
"gameType": false,(false=pong, true=connect4)
"score": [2,3],(indexes matches playerIds indexes)
"duration": 20,(value in secondes)
"startTime": 0,(POSIX time)
"endTime": 0(POSIX time)
},
...]
A one time API to call at init for pushing smart-contract to blockchain
return the number of game all time (without the currently played)
return a JsonObject
{
"gameNumber": 6
}
{"gameId: 0,
"playerIds": [0, 0],(2 or 4)
"gameType": false,(false=pong, true=connect4)
"score": [2,3],(indexes matches playerIds indexes)
"duration": 20,(value in secondes)
"startTime": 0,(POSIX time)
"endTime": 0(POSIX time)
}