Created
May 18, 2015 22:07
-
-
Save awinder/66725a50c18c67896f57 to your computer and use it in GitHub Desktop.
Mocked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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