Skip to content

Instantly share code, notes, and snippets.

@whalec
Created August 3, 2011 13:45
Show Gist options
  • Save whalec/1122671 to your computer and use it in GitHub Desktop.
Save whalec/1122671 to your computer and use it in GitHub Desktop.
suggested API view for /timeline.json
[
{
"id":2504,
"brand": {
"name" : "20000000 fragments",
"images" : {
"style":"icon",
"url":"http://s3.amazonaws.com/sns-bucket/production/images/4/icon/file.png?1310604103",
"updated_at":"2011-07-14T00:41:44Z",
}
},
"content":"this is a test",
"name":"this is a test",
"updated_at":"2011-07-08T07:30:08Z",
"created_at":"2011-07-08T07:30:08Z",
"url":"",
}
]
[
// This is a plain text Post.
{
"id":2504,
"brand": {
"id" : 107,
"updated_at" : "2011-07-08T07:30:08Z",
"name" : "20000000 fragments",
"attachments" : [
{
"id" : 4
"endpoint" : "http://s3.amazonaws.com/sns-bucket/production/images/"
"file" : "file.png",
"styles" : [
{"name" : "icon"},
{"name" : "small"},
{"name" : "small@2x"}
]
"updated_at" : "2011-07-14T00:41:44Z"
}
]
},
"content":"this is a test",
"updated_at":"2011-07-08T07:30:08Z",
"created_at":"2011-07-08T07:30:08Z",
"url":"",
},
// This is an image Post. - Does an image post still use it's brand at all? CB
{
"id":2504,
"brand": {
"id" : 107,
"updated_at" : "2011-07-08T07:30:08Z",
"name" : "20000000 fragments",
"attachments" : [
{
"id" : 4
"endpoint" : "http://s3.amazonaws.com/sns-bucket/production/images/"
"file" : "file.png",
"styles" : [
{"name" : "icon"},
{"name" : "small"},
{"name" : "small@2x"}
]
"updated_at" : "2011-07-14T00:41:44Z"
}
]
},
"content":"this is a test",
"attachments" :
[
{
"id" : 4
"endpoint" : "http://s3.amazonaws.com/sns-bucket/production/images/"
"file" : "file.png",
"styles" : [
{"name" : "icon"},
{"name" : "small"},
{"name" : "small@2x"}
]
"updated_at" : "2011-07-14T00:41:44Z"
},
{
"id" : 11,
"style":"large@2x",
"url":"http://s3.amazonaws.com/sns-bucket/production/images/4/large/file.png?1310604103",
"updated_at":"2011-07-14T00:41:44Z",
}
],
"updated_at":"2011-07-08T07:30:08Z",
"created_at":"2011-07-08T07:30:08Z",
"url":"",
}
// This is a catalog Post. - Not 100% certain of the catalog data required to render the Catalog UITableViewCell, i.e. Do we need brand on this? - CB
{
"id":2504,
"brand": {
"id" : 107,
"updated_at" : "2011-07-08T07:30:08Z",
"name" : "20000000 fragments",
"attachments" : [
{
"id" : 1,
"style":"icon",
"url":"http://s3.amazonaws.com/sns-bucket/production/images/4/icon/file.png?1310604103",
"updated_at":"2011-07-14T00:41:44Z",
}
]
},
"content":"this is a test",
"catalog" : {
"id" : 102,
"updated_at" : "2011-07-08T07:30:08Z",
"attachments" : [
{
"id" : 11,
"style":"large",
"url":"http://s3.amazonaws.com/sns-bucket/production/images/4/large/file.png?1310604103",
"updated_at":"2011-07-14T00:41:44Z",
},
{
"id" : 11,
"style":"large@2x",
"url":"http://s3.amazonaws.com/sns-bucket/production/images/4/large/file.png?1310604103",
"updated_at":"2011-07-14T00:41:44Z",
}
]
}
"updated_at":"2011-07-08T07:30:08Z",
"created_at":"2011-07-08T07:30:08Z",
"url":"",
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment