GET {user}/events HTTP/1.1
Authorization: {token}
⬇
{
"events": [
{
"time": 1369143391.115,
"type": "temperature/c",
"content": 27.7,
"...": "..."
},
{
"time": 1369140027.36,
"type": "position/wgs84",
"content": {
"latitude": 46.517699,
"longitude": 6.562671
},
"...": "..."
},
...
]
}
GET /events HTTP/1.1
Host: {user}.pryv.me
Authorization: {token}
⬇
{
"events": [
{
"time": 1369143391.115,
"type": "temperature/c",
"content": 27.7,
"...": "..."
},
{
"time": 1369140027.36,
"type": "position/wgs84",
"content": {
"latitude": 46.517699,
"longitude": 6.562671
},
"...": "..."
},
...
]
}
socket.emit('events.get', {}, function (err, result) {
// > result.events
// [
// {
// time: 1369143391.115,
// type: 'temperature/c',
// content: 27.7,
// ...
// },
// ...
// ]
});