Skip to content

Instantly share code, notes, and snippets.

@jmas
Last active April 10, 2016 09:36
Show Gist options
  • Save jmas/b5edd4ce609cf11ecd37d629745afb61 to your computer and use it in GitHub Desktop.
Save jmas/b5edd4ce609cf11ecd37d629745afb61 to your computer and use it in GitHub Desktop.

/

Start

REQUEST: POST /?moduleId=<STRING>

action=start
rate=<INT>

RESPONSE: 200-201 (success)

{
  status: "game",
  dice: <INT>,
  take: false,
  money: <INT>
}

RESPONSE: 500 (fail)

Make a bet

REQUEST: POST /?moduleId=<STRING>

action=bet
bet=<up|down>

RESPONSE: 200-201 (success)

{
  status: "game",
  dice: <INT>,
  gift: <true|false>,
  take: <true|false>,
  money: <INT>
}

RESPONSE: 500 (fail)

Take money

REQUEST: POST /?moduleId=<STRING>

action=take

RESPONSE: 200-201 (success)

{
  status: "finish",
  money: <INT>
}

RESPONSE: 500 (fail)

Finish

REQUEST: POST /?moduleId=<STRING>

action=bet
bet=<up|down>

RESPONSE: 200-201 (success)

{
  status: "finish",
  money: <NULL|INT>
}

RESPONSE: 500 (fail)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment