Skip to content

Instantly share code, notes, and snippets.

@jrob00
Created June 11, 2013 23:01
Show Gist options
  • Save jrob00/5761530 to your computer and use it in GitHub Desktop.
Save jrob00/5761530 to your computer and use it in GitHub Desktop.
JSON API Response
rails g scaffold User
username:string
password:string
first_name:string
last_name:string
is_archived:boolean
rails g scaffold User username:string password:string first_name:string last_name:string is_archived:boolean
{
"sites": [
{
"name": "firstbaptist",
"design_id": 1,
"is_archived": 0,
"archived_at": null,
"created_at": "2013-06-01 10:00:00",
"updated_at": "2013-06-03 15:30:00",
"number_of_pages":
"number_of_sections":
"pages": [
{
"id": 1,
"name": "Welcome",
"url": "",
"order_by": 1,
"nav_info"
},
{
"id": 2,
"name": "About Us",
"ancestry": 2,
"slug": "about-us",
"url": "",
"order_by": 2,
"created_at": "2013-05-10 10:00:00",
"updated_at": "2013-05-13 15:30:00"
},
]
"designs": {
"name": "First Design",
"settings": "",
"created_at": "2013-05-01 10:00:00",
"updated_at": "2013-05-03 15:30:00"
},
"pages": [
{
"id": 1,
"name": "Welcome",
"ancestry": "",
"slug": "",
"order_by": 1,
"created_at": "2013-05-10 10:00:00",
"updated_at": "2013-05-13 15:30:00"
"sections": [
{
"id": 1,
"type": "text",
"order_by": 1,
"content": "content is here",
"created_at": "2013-05-10 11:00:00",
"updated_at": "2013-05-13 16:30:00"
},
{
"id": 2,
"type": "list",
"order_by": 1,
"content": "content is here",
"created_at": "2013-05-10 11:00:00",
"updated_at": "2013-05-13 16:30:00"
}
]
},
{
"id": 2,
"name": "Contact Us",
"ancestry": "",
"slug": "",
"order_by": 5,
"created_at": "2013-05-10 10:00:00",
"updated_at": "2013-05-13 15:30:00"
}
]
}
]
}
{"debug": true,"window": {"title": "Sample Konfabulator Widget","name": "main_window","width": 500,"height": 500},"Pairs": [ {"src": "Images/Sun.png","name": "sun1"},{"hOffset": 250,"vOffset": 200},null,{"alignment": "center"}],"text": {"a very long item label here": "Click Here","size": 36,"style": null,"name": "text1","hOffset": 250,"vOffset": 100,"alignment": "center","onmouseover": function(){alert("Hello World");},"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment