{"action":"created","issue":{"url":"https://api.github.com/repos/optimizely/marketing-website/issues/804","labels_url":"https://api.github.com/repos/optimizely/marketing-website/issues/804/labels{/name}","comments_url":"https://api.github.com/repos/optimizely/marketing-website/issues/804/comments","events_url":"https://api.github.com/repos/optimizely/marketing-website/issues/804/events","html_url":"https://github.com/optimizely/marketing-website/pull/804","id":55187028,"number":804,"title":"broken request for Google Calendar endpoint on events page","user":{"login":"dtothefp","id":4656726,"avatar_url":"https://avatars.githubusercontent.com/u/4656726?v=3","gravatar_id":"","url":"https://api.github.com/users/dtothefp","html_url":"https://github.com/dtothefp","followers_url":"https://api.github.com/users/dtothefp/followers","following_url":"https://api.github.com/users/dtothefp/following{/other_user}","gists_url":"https://api.github.com/users/dtothefp/gists{/gist_id}","starred_url":"https://api.github.com/users/dtothefp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtothefp/subscriptions","organizations_url":"https://api.github.com/users/dtothefp/orgs","repos_url":"https://api.github.com/users/dtothefp/repos","events_url":"https://api.github.com/users/dtothefp/events{/privacy}","received_events_url":"https://api.github.com/users/dtothefp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/optimizely/marketing-website/labels/eng%20review","name":"eng review","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-22T18:00:02Z","updated_at":"2015-01-23T15:31:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/optimizely/marketing-website/pulls/804","html_url":"https://github.com/optimizely/marketing-website/pull/804","diff_url":"https://github.com/optimizely/marketing-website/pull/804.diff","patch_url":"https://github.com/optimizely/marketing-website/pull/804.patch"},"body":"This PR address https://optimizely.atlassian.net/browse/MKT-886 for the broken API request to Google Calendar api for /events.  Google released a v3 api and apparently deprecated the old one. The new API requires:\r\n- a script tag to load the gapi api on the page\r\n- turning on the google calendar integration in the developers console\r\n- generating an public browser API key for the Calendar integration\r\n- enabling domains for this integration\r\n\r\nIn addition to old functionality I could no longer restrict request to pull past and future data separately. I had to pull all the data and sort it appropriately.  The request is made through the gapi API which returns an object rather than JSON.  Therefore, error reporting logic for JSON parsing of request was no longer necessary.\r\n\r\nAdditional functionality was added allowing the user to toggle back to future events after they have previously toggled to past events.\r\n\r\nTo test go to /events and set some breakpoints in the JS to inspect the resp on restructuring of data for past and future events. "},"comment":{"url":"https://api.github.com/repos/optimizely/marketing-website/issues/comments/71209857","html_url":"https://github.com/optimizely/marketing-website/pull/804#issuecomment-71209857","issue_url":"https://api.github.com/repos/optimizely/marketing-website/issues/804","id":71209857,"user":{"login":"stewsmith","id":2864449,"avatar_url":"https://avatars.githubusercontent.com/u/2864449?v=3","gravatar_id":"","url":"https://api.github.com/users/stewsmith","html_url":"https://github.com/stewsmith","followers_url":"https://api.github.com/users/stewsmith/followers","following_url":"https://api.github.com/users/stewsmith/following{/other_user}","gists_url":"https://api.github.com/users/stewsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/stewsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stewsmith/subscriptions","organizations_url":"https://api.github.com/users/stewsmith/orgs","repos_url":"https://api.github.com/users/stewsmith/repos","events_url":"https://api.github.com/users/stewsmith/events{/privacy}","received_events_url":"https://api.github.com/users/stewsmith/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T15:31:04Z","updated_at":"2015-01-23T15:31:04Z","body":"@dtothefp Let me know once the section switching is fixed and I'll review this again."}}