Skip to content

Instantly share code, notes, and snippets.

@awinder
Created May 18, 2015 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awinder/66725a50c18c67896f57 to your computer and use it in GitHub Desktop.
Save awinder/66725a50c18c67896f57 to your computer and use it in GitHub Desktop.
Mocked
## What we have
"data": [
{
"id" : "<ISO_8601 datetime for the time slot>",
"name" : "status",
"value" : "available"
},
{
"id" : "<ISO_8601 datetime for the occupied or free time slot>",
"name" : "status",
"value" : "unavailable",
"data" : [{
"url" : "http://api.urgentconsult.com/appointments/<uuid1>",
"rel" : "http://api.urgentconsult.com/rels/appointment",
"name" : "status",
"value" : "booked",
"label" : "Patient1 Name1"
},
{
"url" : "http://api.urgentconsult.com/appointments/<uuid2>",
"rel" : "http://api.urgentconsult.com/rels/appointment",
"name" : "status",
"value" : "billing complete",
"label" : "Patient2 Name2"
}]
}
]
}
## What would be nicer for a client developer
"data": {
"2015-05-18T12:12:12Z" : {
"name" : "status",
"value" : "available"
},
"2015-05-22T08:10:00Z" : {
"name" : "status",
"value" : "unavailable",
"data" : [
{
"url" : "http://api.urgentconsult.com/appointments/<uuid1>",
"rel" : "http://api.urgentconsult.com/rels/appointment",
"name" : "status",
"value" : "booked",
"label" : "Patient1 Name1"
},
{
"url" : "http://api.urgentconsult.com/appointments/<uuid2>",
"rel" : "http://api.urgentconsult.com/rels/appointment",
"name" : "status",
"value" : "billing complete",
"label" : "Patient2 Name2"
}
]
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment