Skip to content

Instantly share code, notes, and snippets.

@spikeheap
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save spikeheap/72a6b67bafeb4504fce4 to your computer and use it in GitHub Desktop.

Select an option

Save spikeheap/72a6b67bafeb4504fce4 to your computer and use it in GitHub Desktop.
JSON structure for CodeRetreat client-server comms
// Connection request from client, and update every time a test set is run
{
"action": "consumeTestsResults",
"payload": {
"session": 0,
"testsRun": 10,
"testsFailed": 5,
"testsIgnored": 2
}
}
//
// Requests from server
//
// Request next iteration
{
"action": "processIteration",
"payload": {
"generation0": "000011101010101110111101101"
}
}
// Response
{
"respondingTo": "processIteration",
"payload": {
"generation0": "000100100111101011101011010101",
"generation1": "000100100111101011101011010101",
}
}
// Request client info
{
"action": "getClientInfo",
}
// Response
{
"respondingTo": "getClientInfo",
"payload": {
"team": [
{"name": "Ryan Brooks"},
{"name": "Ben Foxall"}
],
"session": 0,
"language": "javascript",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment