Skip to content

Instantly share code, notes, and snippets.

@istro
Created January 28, 2014 02:59
Show Gist options
  • Save istro/8661599 to your computer and use it in GitHub Desktop.
Save istro/8661599 to your computer and use it in GitHub Desktop.
/// rooms.json
[{
"request": {
"url": "/rooms/:id"
},
"response": {
"data": {
"room": {
"id": 1,
"name": "Stubbed single room",
"kind": "bedroom",
"location": 1
}
}
}
},
{
"request": {
"url": "/rooms"
},
"response": {
"data": {
"rooms": [
{
"id": 1,
"name": "Kitchen",
"kind": "kitchen",
"location": 1
},
{
"id": 2,
"name": "Living room",
"kind": "living-room",
"location": 1
},
{
"id": 3,
"name": "Bedroom",
"kind": "bedroom",
"location": 1
}
]
}
}
}]
/// locations.json
[{
"description": "get info for one location",
"request": {
"url": "/locations/:id"
},
"response": {
"data": {
"location": {
"id": 1,
"name": "Stubbed single location",
"room_ids": [1, 2, 3]
}
}
}
},
{
"description": "get info for all locations for the current_user",
"request": {
"url": "/locations",
"method": "GET"
},
"response": {
"statusCode": "200",
"data": {
"locations": [
{
"id": 1,
"name": "Home",
"room_ids": [1, 2, 3]
},
{
"id": 2,
"name": "Office",
"room_ids": [4, 5, 6]
},
{
"id": 3,
"name": "Party House",
"room_ids": [7, 8, 9]
}
]
}
}
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment