{"action":"created","issue":{"url":"https://api.github.com/repos/MatthewAllanWilson/portfolio/issues/10","repository_url":"https://api.github.com/repos/MatthewAllanWilson/portfolio","labels_url":"https://api.github.com/repos/MatthewAllanWilson/portfolio/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/MatthewAllanWilson/portfolio/issues/10/comments","events_url":"https://api.github.com/repos/MatthewAllanWilson/portfolio/issues/10/events","html_url":"https://github.com/MatthewAllanWilson/portfolio/issues/10","id":150177075,"number":10,"title":"app.js","user":{"login":"MatthewAllanWilson","id":16773116,"avatar_url":"https://avatars.githubusercontent.com/u/16773116?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewAllanWilson","html_url":"https://github.com/MatthewAllanWilson","followers_url":"https://api.github.com/users/MatthewAllanWilson/followers","following_url":"https://api.github.com/users/MatthewAllanWilson/following{/other_user}","gists_url":"https://api.github.com/users/MatthewAllanWilson/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewAllanWilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewAllanWilson/subscriptions","organizations_url":"https://api.github.com/users/MatthewAllanWilson/orgs","repos_url":"https://api.github.com/users/MatthewAllanWilson/repos","events_url":"https://api.github.com/users/MatthewAllanWilson/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewAllanWilson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-21T20:03:17Z","updated_at":"2016-04-22T22:44:17Z","closed_at":"2016-04-22T22:44:17Z","body":"` (function(module){\r\n\r\n  function Post (obj){\r\n    this.title = obj.title;\r\n    this.date = obj.date;\r\n    this.description = obj.description;\r\n    this.link = obj.link;\r\n    this.image = obj.image;\r\n  }\r\n\r\n  Post.all = [];\r\n\r\n  Post.prototype.toHtml = function() {\r\n    var $source = $('#project-template').html();\r\n    var template = Handlebars.compile($source);\r\n\r\n    return template(this);\r\n  };\r\n\r\n  Post.loadAll = function(dataPassedIn) {\r\n    dataPassedIn.forEach(function(ele) {\r\n      Post.all.push(new Post(ele));\r\n    });\r\n  };\r\n\r\n  Post.fetchAll = function (){\r\n    if (localStorage.postRawData){\r\n      // $.ajax({\r\n      //   type: 'HEAD',\r\n      //   url: '/data/projects.json'\r\n      // }).done(function(xhr, message, data) {\r\n      //   var eTag = xhr.getResponseHeader('eTag');\r\n      //   if(eTag = localStorage.eTag) {\r\n      //     projectView.initIndexPage();\r\n      //   } else {\r\n      Post.loadAll(JSON.parse(localStorage.postRawData));\r\n      projectView.initIndexPage();\r\n        // }\r\n      // });\r\n    } else {\r\n      $.getJSON('/data/projects.json', function(data){\r\n        Post.loadAll(data);\r\n        localStorage.setItem('postRawData', JSON.stringify(data));\r\n        projectView.initIndexPage();\r\n      });\r\n    }\r\n  };\r\n\r\n  module.Post = Post;\r\n\r\n})(window); '"},"comment":{"url":"https://api.github.com/repos/MatthewAllanWilson/portfolio/issues/comments/213615220","html_url":"https://github.com/MatthewAllanWilson/portfolio/issues/10#issuecomment-213615220","issue_url":"https://api.github.com/repos/MatthewAllanWilson/portfolio/issues/10","id":213615220,"user":{"login":"MatthewAllanWilson","id":16773116,"avatar_url":"https://avatars.githubusercontent.com/u/16773116?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewAllanWilson","html_url":"https://github.com/MatthewAllanWilson","followers_url":"https://api.github.com/users/MatthewAllanWilson/followers","following_url":"https://api.github.com/users/MatthewAllanWilson/following{/other_user}","gists_url":"https://api.github.com/users/MatthewAllanWilson/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewAllanWilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewAllanWilson/subscriptions","organizations_url":"https://api.github.com/users/MatthewAllanWilson/orgs","repos_url":"https://api.github.com/users/MatthewAllanWilson/repos","events_url":"https://api.github.com/users/MatthewAllanWilson/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewAllanWilson/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T22:44:17Z","updated_at":"2016-04-22T22:44:17Z","body":"Check!"}}