{"action":"created","comment":{"url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/comments/123537568","pull_request_review_id":45751356,"id":123537568,"diff_hunk":"@@ -32,6 +33,163 @@ Site = {\n   },\n };\n \n+Site.Programacion = {\n+  // parse JSON event posts object from Wordpress\n+  eventsPosts: JSON.parse(WP.programacionEvents),\n+  scheduleArray: [],\n+  programacionContainer: document.getElementById('page-programacion'),\n+\n+  init: function() {\n+    var _this = this;\n+\n+    // loop through Years -> Months -> Days -> Events\n+    _this.fillEventsObject();\n+  },\n+\n+  fillEventsObject: function() {\n+    var _this = this;\n+\n+    // forEach event\n+    _this.eventsPosts.forEach(function(el) {\n+      // generate moment from timestamp in user local timezone\n+      var eventMoment = moment.unix(parseInt(el.timestamp));\n+\n+      var year = eventMoment.format('YYYY');\n+      var month = eventMoment.format('MMMM');\n+      var monthNum = eventMoment.format('M');\n+      var day = eventMoment.format('dddd Do');\n+      var dayNum = eventMoment.format('D');\n+      var hour = eventMoment.format('H:mm');\n+\n+      // Create this Year object if missing in schedule array\n+      if (!_this.scheduleArray[year]) {\n+        _this.scheduleArray[year] = [];\n+        _this.scheduleArray[year] = {\n+          year: year,\n+          months: []\n+        }\n+      }\n+\n+      // Create this Month object if missing in Year\n+      if (_this.scheduleArray[year].months[monthNum] === undefined) {\n+        _this.scheduleArray[year].months[monthNum] = {\n+          month: month,\n+          days: []\n+        };\n+      }\n+\n+      // Create this Day object if missing in Month\n+      if (_this.scheduleArray[year].months[monthNum].days[dayNum] === undefined) {\n+        _this.scheduleArray[year].months[monthNum].days[dayNum] = {\n+          day: day,\n+          events: []\n+        };\n+      }\n+\n+      // Push Event object to events array\n+      _this.scheduleArray[year].months[monthNum].days[dayNum].events.push({\n+        hour: hour,\n+        title: el.title,\n+        content: el.content\n+      });\n+    });\n+\n+    //\n+    _this.addEventsToDom();","path":"src/js/main.js","position":87,"original_position":87,"commit_id":"aaeee1043cee0013e7b2aa8111e99e36b5f842d4","original_commit_id":"aaeee1043cee0013e7b2aa8111e99e36b5f842d4","user":{"login":"mikeyrayvon","id":7727722,"avatar_url":"https://avatars0.githubusercontent.com/u/7727722?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeyrayvon","html_url":"https://github.com/mikeyrayvon","followers_url":"https://api.github.com/users/mikeyrayvon/followers","following_url":"https://api.github.com/users/mikeyrayvon/following{/other_user}","gists_url":"https://api.github.com/users/mikeyrayvon/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeyrayvon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeyrayvon/subscriptions","organizations_url":"https://api.github.com/users/mikeyrayvon/orgs","repos_url":"https://api.github.com/users/mikeyrayvon/repos","events_url":"https://api.github.com/users/mikeyrayvon/events{/privacy}","received_events_url":"https://api.github.com/users/mikeyrayvon/received_events","type":"User","site_admin":false},"body":"yea agreed","created_at":"2017-06-22T15:08:21Z","updated_at":"2017-06-22T15:08:21Z","html_url":"https://github.com/interglobalvision/ondamundial-net/pull/6#discussion_r123537568","pull_request_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/comments/123537568"},"html":{"href":"https://github.com/interglobalvision/ondamundial-net/pull/6#discussion_r123537568"},"pull_request":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6","id":126900630,"html_url":"https://github.com/interglobalvision/ondamundial-net/pull/6","diff_url":"https://github.com/interglobalvision/ondamundial-net/pull/6.diff","patch_url":"https://github.com/interglobalvision/ondamundial-net/pull/6.patch","issue_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/6","number":6,"state":"open","locked":false,"title":"Scaffold schedule","user":{"login":"mikeyrayvon","id":7727722,"avatar_url":"https://avatars0.githubusercontent.com/u/7727722?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeyrayvon","html_url":"https://github.com/mikeyrayvon","followers_url":"https://api.github.com/users/mikeyrayvon/followers","following_url":"https://api.github.com/users/mikeyrayvon/following{/other_user}","gists_url":"https://api.github.com/users/mikeyrayvon/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeyrayvon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeyrayvon/subscriptions","organizations_url":"https://api.github.com/users/mikeyrayvon/orgs","repos_url":"https://api.github.com/users/mikeyrayvon/repos","events_url":"https://api.github.com/users/mikeyrayvon/events{/privacy}","received_events_url":"https://api.github.com/users/mikeyrayvon/received_events","type":"User","site_admin":false},"body":"adds the timezone offset for mexico city to the utc timezone coming from event meta field\r\n\r\nsorts event json from wordpress into nested associative array in js\r\n- year\r\n  - month\r\n    - day\r\n      - event\r\n\r\nthen loops thru that array and adds its content to `front-page.php #page-programacion` in nested divs","created_at":"2017-06-22T03:00:57Z","updated_at":"2017-06-22T15:08:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cc99997ad4343ce70573198099ba4cf9bc6427b","assignee":{"login":"varffs","id":845186,"avatar_url":"https://avatars1.githubusercontent.com/u/845186?v=3","gravatar_id":"","url":"https://api.github.com/users/varffs","html_url":"https://github.com/varffs","followers_url":"https://api.github.com/users/varffs/followers","following_url":"https://api.github.com/users/varffs/following{/other_user}","gists_url":"https://api.github.com/users/varffs/gists{/gist_id}","starred_url":"https://api.github.com/users/varffs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varffs/subscriptions","organizations_url":"https://api.github.com/users/varffs/orgs","repos_url":"https://api.github.com/users/varffs/repos","events_url":"https://api.github.com/users/varffs/events{/privacy}","received_events_url":"https://api.github.com/users/varffs/received_events","type":"User","site_admin":false},"assignees":[{"login":"varffs","id":845186,"avatar_url":"https://avatars1.githubusercontent.com/u/845186?v=3","gravatar_id":"","url":"https://api.github.com/users/varffs","html_url":"https://github.com/varffs","followers_url":"https://api.github.com/users/varffs/followers","following_url":"https://api.github.com/users/varffs/following{/other_user}","gists_url":"https://api.github.com/users/varffs/gists{/gist_id}","starred_url":"https://api.github.com/users/varffs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varffs/subscriptions","organizations_url":"https://api.github.com/users/varffs/orgs","repos_url":"https://api.github.com/users/varffs/repos","events_url":"https://api.github.com/users/varffs/events{/privacy}","received_events_url":"https://api.github.com/users/varffs/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6/commits","review_comments_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6/comments","review_comment_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/6/comments","statuses_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/statuses/aaeee1043cee0013e7b2aa8111e99e36b5f842d4","head":{"label":"interglobalvision:scaffold-schedule","ref":"scaffold-schedule","sha":"aaeee1043cee0013e7b2aa8111e99e36b5f842d4","user":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars2.githubusercontent.com/u/6844994?v=3","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"repo":{"id":94918788,"name":"ondamundial-net","full_name":"interglobalvision/ondamundial-net","owner":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars2.githubusercontent.com/u/6844994?v=3","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interglobalvision/ondamundial-net","description":null,"fork":false,"url":"https://api.github.com/repos/interglobalvision/ondamundial-net","forks_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/forks","keys_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/teams","hooks_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/hooks","issue_events_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/events{/number}","events_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/events","assignees_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/assignees{/user}","branches_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/branches{/branch}","tags_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/tags","blobs_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/statuses/{sha}","languages_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/languages","stargazers_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/stargazers","contributors_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/contributors","subscribers_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/subscribers","subscription_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/subscription","commits_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/contents/{+path}","compare_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/merges","archive_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/downloads","issues_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues{/number}","pulls_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls{/number}","milestones_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/milestones{/number}","notifications_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/labels{/name}","releases_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/releases{/id}","deployments_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/deployments","created_at":"2017-06-20T17:42:11Z","updated_at":"2017-06-20T17:45:48Z","pushed_at":"2017-06-22T03:00:57Z","git_url":"git://github.com/interglobalvision/ondamundial-net.git","ssh_url":"git@github.com:interglobalvision/ondamundial-net.git","clone_url":"https://github.com/interglobalvision/ondamundial-net.git","svn_url":"https://github.com/interglobalvision/ondamundial-net","homepage":null,"size":1230,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"interglobalvision:master","ref":"master","sha":"bd274b49eef3d7f56bb103d9f93876c632e57871","user":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars2.githubusercontent.com/u/6844994?v=3","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"repo":{"id":94918788,"name":"ondamundial-net","full_name":"interglobalvision/ondamundial-net","owner":{"login":"interglobalvision","id":6844994,"avatar_url":"https://avatars2.githubusercontent.com/u/6844994?v=3","gravatar_id":"","url":"https://api.github.com/users/interglobalvision","html_url":"https://github.com/interglobalvision","followers_url":"https://api.github.com/users/interglobalvision/followers","following_url":"https://api.github.com/users/interglobalvision/following{/other_user}","gists_url":"https://api.github.com/users/interglobalvision/gists{/gist_id}","starred_url":"https://api.github.com/users/interglobalvision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interglobalvision/subscriptions","organizations_url":"https://api.github.com/users/interglobalvision/orgs","repos_url":"https://api.github.com/users/interglobalvision/repos","events_url":"https://api.github.com/users/interglobalvision/events{/privacy}","received_events_url":"https://api.github.com/users/interglobalvision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interglobalvision/ondamundial-net","description":null,"fork":false,"url":"https://api.github.com/repos/interglobalvision/ondamundial-net","forks_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/forks","keys_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/teams","hooks_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/hooks","issue_events_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/events{/number}","events_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/events","assignees_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/assignees{/user}","branches_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/branches{/branch}","tags_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/tags","blobs_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/statuses/{sha}","languages_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/languages","stargazers_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/stargazers","contributors_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/contributors","subscribers_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/subscribers","subscription_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/subscription","commits_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/contents/{+path}","compare_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/merges","archive_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/downloads","issues_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues{/number}","pulls_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls{/number}","milestones_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/milestones{/number}","notifications_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/labels{/name}","releases_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/releases{/id}","deployments_url":"https://api.github.com/repos/interglobalvision/ondamundial-net/deployments","created_at":"2017-06-20T17:42:11Z","updated_at":"2017-06-20T17:45:48Z","pushed_at":"2017-06-22T03:00:57Z","git_url":"git://github.com/interglobalvision/ondamundial-net.git","ssh_url":"git@github.com:interglobalvision/ondamundial-net.git","clone_url":"https://github.com/interglobalvision/ondamundial-net.git","svn_url":"https://github.com/interglobalvision/ondamundial-net","homepage":null,"size":1230,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6"},"html":{"href":"https://github.com/interglobalvision/ondamundial-net/pull/6"},"issue":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/6"},"comments":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/interglobalvision/ondamundial-net/statuses/aaeee1043cee0013e7b2aa8111e99e36b5f842d4"}}}}
{"actor":{"display_login":"mikeyrayvon"}}