{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/comments/41301186","id":41301186,"diff_hunk":"@@ -24,7 +38,8 @@ class Core extends Model {\n \n \t\t} else {\n \n-\t\t\tthis.data = null; // new InfoboxData(...);\n+\t\t\t// If no 'from' is not defend, we instantiate a fresh infobox","path":"src/core.js","position":36,"original_position":36,"commit_id":"aeddac4cefba1dcf7e7efc099ccd697f5b48279f","original_commit_id":"aeddac4cefba1dcf7e7efc099ccd697f5b48279f","user":{"login":"lizlux","id":201367,"avatar_url":"https://avatars.githubusercontent.com/u/201367?v=3","gravatar_id":"","url":"https://api.github.com/users/lizlux","html_url":"https://github.com/lizlux","followers_url":"https://api.github.com/users/lizlux/followers","following_url":"https://api.github.com/users/lizlux/following{/other_user}","gists_url":"https://api.github.com/users/lizlux/gists{/gist_id}","starred_url":"https://api.github.com/users/lizlux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizlux/subscriptions","organizations_url":"https://api.github.com/users/lizlux/orgs","repos_url":"https://api.github.com/users/lizlux/repos","events_url":"https://api.github.com/users/lizlux/events{/privacy}","received_events_url":"https://api.github.com/users/lizlux/received_events","type":"User","site_admin":false},"body":"actually two typos. I think you mean:  `If 'from' is not defined, we instantiate a fresh infobox`","created_at":"2015-10-06T18:14:44Z","updated_at":"2015-10-06T18:14:44Z","html_url":"https://github.com/Wikia/infobox-template-builder/pull/3#discussion_r41301186","pull_request_url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/comments/41301186"},"html":{"href":"https://github.com/Wikia/infobox-template-builder/pull/3#discussion_r41301186"},"pull_request":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3","id":46665977,"html_url":"https://github.com/Wikia/infobox-template-builder/pull/3","diff_url":"https://github.com/Wikia/infobox-template-builder/pull/3.diff","patch_url":"https://github.com/Wikia/infobox-template-builder/pull/3.patch","issue_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/3","number":3,"state":"open","locked":false,"title":"CONSF-45: InfoboxDataModel","user":{"login":"kenkouot","id":2964310,"avatar_url":"https://avatars.githubusercontent.com/u/2964310?v=3","gravatar_id":"","url":"https://api.github.com/users/kenkouot","html_url":"https://github.com/kenkouot","followers_url":"https://api.github.com/users/kenkouot/followers","following_url":"https://api.github.com/users/kenkouot/following{/other_user}","gists_url":"https://api.github.com/users/kenkouot/gists{/gist_id}","starred_url":"https://api.github.com/users/kenkouot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenkouot/subscriptions","organizations_url":"https://api.github.com/users/kenkouot/orgs","repos_url":"https://api.github.com/users/kenkouot/repos","events_url":"https://api.github.com/users/kenkouot/events{/privacy}","received_events_url":"https://api.github.com/users/kenkouot/received_events","type":"User","site_admin":false},"body":"## Proposed API\r\nThe following code example illustrates the proposed API for working with the structural nature of the infobox data.\r\n```es6\r\n// Instantiate a new instance of the infobox\r\nvar infobox = new InfoboxTemplateBuilder({});\r\n\r\n// alias the infobox data model for easier handling\r\nvar infoData = infobox.data;\r\n\r\n// Create a new field\r\nvar title = infoData.newField({\r\n\ttype: 'title',\r\n\tdefaultValue: 'Dang',\r\n\tlabel: 'Who let the dogs out?',\r\n\tboundVariableName: 'foo'\r\n});\r\n\r\n// And add it to the infobox data model instance\r\ninfoData.add(title);\r\n\r\n// Or create a new group, with that field\r\nvar group = infoData.newGroup({\r\n\titems: [title]\r\n});\r\n\r\n// Add more fields to that group\r\ngroup.add(infoData.newField({\r\n\ttype: 'image',\r\n\tdefaultValue: 'dang.png',\r\n\tlabel: 'Avatar',\r\n\tboundVariableName: 'bar'\r\n}));\r\n\r\n// and finally add that group to the infobox data instance\r\ninfoData.add(group);\r\n```\r\nAnd here is an example of an instance of `InfoboxData` serialized to JSON.\r\n```json\r\n{\r\n    \"items\": [\r\n        {\r\n            \"_model\": \"field\",\r\n            \"attributes\": [],\r\n            \"boundVariableName\": \"foo\",\r\n            \"defaultValue\": \"Dang\",\r\n            \"label\": \"Who let the dogs out?\",\r\n            \"stringTemplate\": null,\r\n            \"type\": \"title\"\r\n        },\r\n        {\r\n            \"items\": [\r\n                {\r\n                    \"_model\": \"field\",\r\n                    \"attributes\": [],\r\n                    \"boundVariableName\": \"foo\",\r\n                    \"defaultValue\": \"Dang\",\r\n                    \"label\": \"Who let the dogs out?\",\r\n                    \"stringTemplate\": null,\r\n                    \"type\": \"title\"\r\n                },\r\n                {\r\n                    \"_model\": \"field\",\r\n                    \"attributes\": [],\r\n                    \"boundVariableName\": \"bar\",\r\n                    \"defaultValue\": \"dang.png\",\r\n                    \"label\": \"Avatar\",\r\n                    \"stringTemplate\": null,\r\n                    \"type\": \"image\"\r\n                }\r\n            ],\r\n            \"_model\": \"group\",\r\n            \"attributes\": [],\r\n            \"layout\": null,\r\n            \"show\": null\r\n        }\r\n    ],\r\n    \"theme\": null,\r\n    \"themeVarName\": null,\r\n    \"layout\": null\r\n}\r\n```","created_at":"2015-10-02T18:22:54Z","updated_at":"2015-10-06T18:14:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2978574ae2039dda5480b816bb11f1af7c4f14e0","assignee":{"login":"lizlux","id":201367,"avatar_url":"https://avatars.githubusercontent.com/u/201367?v=3","gravatar_id":"","url":"https://api.github.com/users/lizlux","html_url":"https://github.com/lizlux","followers_url":"https://api.github.com/users/lizlux/followers","following_url":"https://api.github.com/users/lizlux/following{/other_user}","gists_url":"https://api.github.com/users/lizlux/gists{/gist_id}","starred_url":"https://api.github.com/users/lizlux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizlux/subscriptions","organizations_url":"https://api.github.com/users/lizlux/orgs","repos_url":"https://api.github.com/users/lizlux/repos","events_url":"https://api.github.com/users/lizlux/events{/privacy}","received_events_url":"https://api.github.com/users/lizlux/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/3/comments","statuses_url":"https://api.github.com/repos/Wikia/infobox-template-builder/statuses/aeddac4cefba1dcf7e7efc099ccd697f5b48279f","head":{"label":"Wikia:CONSF-45-data-model","ref":"CONSF-45-data-model","sha":"aeddac4cefba1dcf7e7efc099ccd697f5b48279f","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":43470716,"name":"infobox-template-builder","full_name":"Wikia/infobox-template-builder","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/infobox-template-builder","description":"","fork":false,"url":"https://api.github.com/repos/Wikia/infobox-template-builder","forks_url":"https://api.github.com/repos/Wikia/infobox-template-builder/forks","keys_url":"https://api.github.com/repos/Wikia/infobox-template-builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/infobox-template-builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/infobox-template-builder/teams","hooks_url":"https://api.github.com/repos/Wikia/infobox-template-builder/hooks","issue_events_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/infobox-template-builder/events","assignees_url":"https://api.github.com/repos/Wikia/infobox-template-builder/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/infobox-template-builder/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/infobox-template-builder/tags","blobs_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/infobox-template-builder/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/infobox-template-builder/languages","stargazers_url":"https://api.github.com/repos/Wikia/infobox-template-builder/stargazers","contributors_url":"https://api.github.com/repos/Wikia/infobox-template-builder/contributors","subscribers_url":"https://api.github.com/repos/Wikia/infobox-template-builder/subscribers","subscription_url":"https://api.github.com/repos/Wikia/infobox-template-builder/subscription","commits_url":"https://api.github.com/repos/Wikia/infobox-template-builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/infobox-template-builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/infobox-template-builder/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/infobox-template-builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/infobox-template-builder/merges","archive_url":"https://api.github.com/repos/Wikia/infobox-template-builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/infobox-template-builder/downloads","issues_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/infobox-template-builder/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/infobox-template-builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/infobox-template-builder/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/infobox-template-builder/releases{/id}","created_at":"2015-10-01T00:54:42Z","updated_at":"2015-10-01T18:25:28Z","pushed_at":"2015-10-06T01:01:34Z","git_url":"git://github.com/Wikia/infobox-template-builder.git","ssh_url":"git@github.com:Wikia/infobox-template-builder.git","clone_url":"https://github.com/Wikia/infobox-template-builder.git","svn_url":"https://github.com/Wikia/infobox-template-builder","homepage":null,"size":300,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"88e3e07bde91544761ff6ae650eda232e8577d1c","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":43470716,"name":"infobox-template-builder","full_name":"Wikia/infobox-template-builder","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/infobox-template-builder","description":"","fork":false,"url":"https://api.github.com/repos/Wikia/infobox-template-builder","forks_url":"https://api.github.com/repos/Wikia/infobox-template-builder/forks","keys_url":"https://api.github.com/repos/Wikia/infobox-template-builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/infobox-template-builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/infobox-template-builder/teams","hooks_url":"https://api.github.com/repos/Wikia/infobox-template-builder/hooks","issue_events_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/infobox-template-builder/events","assignees_url":"https://api.github.com/repos/Wikia/infobox-template-builder/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/infobox-template-builder/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/infobox-template-builder/tags","blobs_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/infobox-template-builder/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/infobox-template-builder/languages","stargazers_url":"https://api.github.com/repos/Wikia/infobox-template-builder/stargazers","contributors_url":"https://api.github.com/repos/Wikia/infobox-template-builder/contributors","subscribers_url":"https://api.github.com/repos/Wikia/infobox-template-builder/subscribers","subscription_url":"https://api.github.com/repos/Wikia/infobox-template-builder/subscription","commits_url":"https://api.github.com/repos/Wikia/infobox-template-builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/infobox-template-builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/infobox-template-builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/infobox-template-builder/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/infobox-template-builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/infobox-template-builder/merges","archive_url":"https://api.github.com/repos/Wikia/infobox-template-builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/infobox-template-builder/downloads","issues_url":"https://api.github.com/repos/Wikia/infobox-template-builder/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/infobox-template-builder/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/infobox-template-builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/infobox-template-builder/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/infobox-template-builder/releases{/id}","created_at":"2015-10-01T00:54:42Z","updated_at":"2015-10-01T18:25:28Z","pushed_at":"2015-10-06T01:01:34Z","git_url":"git://github.com/Wikia/infobox-template-builder.git","ssh_url":"git@github.com:Wikia/infobox-template-builder.git","clone_url":"https://github.com/Wikia/infobox-template-builder.git","svn_url":"https://github.com/Wikia/infobox-template-builder","homepage":null,"size":300,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3"},"html":{"href":"https://github.com/Wikia/infobox-template-builder/pull/3"},"issue":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/3"},"comments":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/infobox-template-builder/statuses/aeddac4cefba1dcf7e7efc099ccd697f5b48279f"}}}}