Skip to content

Instantly share code, notes, and snippets.

@AdamMagaluk
Created April 24, 2014 07:26
Show Gist options
  • Save AdamMagaluk/11244880 to your computer and use it in GitHub Desktop.
Save AdamMagaluk/11244880 to your computer and use it in GitHub Desktop.
{
"class": [
"camera"
],
"properties": {
"type": "camera",
"name": "joes-camera",
"data": {},
"state": "ready",
"streams": []
},
"actions": [
{
"name": "take-photo",
"method": "POST",
"href": "http://localhost:3000/hello/joes-camera",
"fields": [
{
"name": "action",
"type": "hidden",
"value": "take-photo"
}
]
},
{
"name": "live",
"method": "POST",
"href": "http://localhost:3000/hello/joes-camera",
"fields": [
{
"name": "action",
"type": "hidden",
"value": "live"
}
]
}
],
"links": [
{
"rel": [
"self"
],
"href": "http://localhost:3000/hello/joes-camera"
},
{
"rel": [
"index"
],
"href": "http://localhost:3000/hello"
}
]
}
{
"class": [
"app"
],
"properties": {
"name": "hello"
},
"entities": [
{
"class": [
"machine"
],
"rel": [
"http://rels.zettajs.io/machine"
],
"properties": {
"type": "camera",
"name": "joes-camera",
"data": {},
"state": "ready",
"streams": []
},
"links": [
{
"rel": [
"self"
],
"href": "http://localhost:3000/hello/joes-camera"
}
]
},
{
"class": [
"machine"
],
"rel": [
"http://rels.zettajs.io/machine"
],
"properties": {
"type": "photosensor",
"name": "joes-office-photosensor",
"data": {},
"state": "on",
"value": 0,
"image": "http://mobilesyrup.com/wp-content/uploads/2013/10/DropCam-PRO_Flat_R6_white.png",
"streams": [
"photosensor/value"
]
},
"links": [
{
"rel": [
"self"
],
"href": "http://localhost:3000/hello/joes-office-photosensor"
}
]
}
],
"links": [
{
"rel": [
"self"
],
"href": "http://localhost:3000/hello"
}
]
}
{
"class": [
"photosensor"
],
"properties": {
"type": "photosensor",
"name": "joes-office-photosensor",
"data": {},
"state": "on",
"value": 0,
"image": "http://mobilesyrup.com/wp-content/uploads/2013/10/DropCam-PRO_Flat_R6_white.png",
"streams": [
"photosensor/value"
]
},
"actions": [
{
"class": [
"event-subscription"
],
"name": "photosensor-value-subscribe",
"method": "subscribe",
"href": "ws://localhost:3000/events",
"fields": [
{
"name": "name",
"type": "hidden",
"value": "photosensor/value"
}
]
}
],
"links": [
{
"rel": [
"self"
],
"href": "http://localhost:3000/hello/joes-office-photosensor"
},
{
"rel": [
"index"
],
"href": "http://localhost:3000/hello"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment