Skip to content

Instantly share code, notes, and snippets.

@harleyholt
Created September 26, 2011 17:58
Show Gist options
  • Save harleyholt/1242870 to your computer and use it in GitHub Desktop.
Save harleyholt/1242870 to your computer and use it in GitHub Desktop.
Example Data API Summary Return Object
/**
* Example of a summary only data API return. The returned information contains the aggregate information.
* The site value is the site that we are getting information for (it will not exist if the results are not filtered
* to a specific site)
* The time value contains the start and end of the sampling period while the resolution tells the client what the aggregate
* period is for the client
*/
{
site: example.com,
time: {
start: 437466101,
end: 1317050100,
resolution: "day"
},
summaries: {
average_sleep: {
meta: {
units: 'hours'
},
value: 6.4
},
max_sleep: {
meta: {
units: 'hours'
},
value: 10.2
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment