Play Game
Each game will have different rules with corresponding parameters according to that game.
Play TicTacToe/Caro
Request
POST /v1/game/tic-tac-toe/66862431a9404bfd528fb100 HTTP/1.1
Host: roomkeeper.api.mimiland.io
mm-user-id: 662a347843e80ce0a0d73384
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
Content-Length: 24
{
"x":2,
"y":1
}const myHeaders = new Headers();
myHeaders.append("mm-user-id", "662a347843e80ce0a0d73384");
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
const requestOptions = {
method: "POST",
headers: myHeaders,
redirect: "follow"
};
fetch("https://roomkeeper.api.mimiland.io/v1/game/start/66862431a9404bfd528fb100", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));Parameter
Key
Type
Description
x *required
Int
Vertical position
y *required
Int
Horizontal position
Play Flip&Match
Request
POST /v2/game/flipnmatch/turn/663ae9f4407dedd9ec2d7bc0 HTTP/1.1
Host: roomkeeper.api.mimiland.io
mm-user-id: 662a347843e80ce0a0d73384
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
Content-Length: 20
{
"position":0
}const myHeaders = new Headers();
myHeaders.append("mm-user-id", "662a347843e80ce0a0d73384");
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
const raw = JSON.stringify({
"position": 0
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://roomkeeper.api.mimiland.io/v2/game/flipnmatch/turn/663ae9f4407dedd9ec2d7bc0", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));Parameter
Key
Type
Description
position *required
Int
Flip's position
Play Connect 4
Request
POST /v2/game/tic-tac-toe/{{roomUid}} HTTP/1.1
Host: localhost:8200
mm-user-id: 653263bed995b4f348456dd6
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
Content-Length: 16
{
"col": 4
}const myHeaders = new Headers();
myHeaders.append("mm-user-id", "653263bed995b4f348456dd6");
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
const raw = JSON.stringify({
"col": 4
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("http://localhost:8200/v2/game/tic-tac-toe/{{roomUid}}", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));Parameter
Key
Type
Description
col *required
Int
Column on chessboard
Last updated