{"action":"created","comment":{"url":"https://api.github.com/repos/01org/zephyr.js/pulls/comments/93701017","pull_request_review_id":14235030,"id":93701017,"diff_hunk":"@@ -0,0 +1,118 @@\n+ZJS API for Events\n+==================\n+\n+* [Introduction](#introduction)\n+* [Web IDL](#web-idl)\n+* [API Documentation](#api-documentation)\n+* [Sample Apps](#sample-apps)\n+\n+Introduction\n+------------\n+ZJS provides event API's which match Node.js Event's. We describe them here as there could\n+potentially be minor differences.\n+\n+Web IDL\n+-------\n+This IDL provides an overview of the interface; see below for documentation of\n+specific API functions.\n+\n+```javascript\n+this on(string event, function listener);","path":"docs/events.md","position":20,"original_position":20,"commit_id":"8e2bfa2f794ddd0b2d8a0a7ff410938a304afdcd","original_commit_id":"8e2bfa2f794ddd0b2d8a0a7ff410938a304afdcd","user":{"login":"grgustaf","id":664464,"avatar_url":"https://avatars.githubusercontent.com/u/664464?v=3","gravatar_id":"","url":"https://api.github.com/users/grgustaf","html_url":"https://github.com/grgustaf","followers_url":"https://api.github.com/users/grgustaf/followers","following_url":"https://api.github.com/users/grgustaf/following{/other_user}","gists_url":"https://api.github.com/users/grgustaf/gists{/gist_id}","starred_url":"https://api.github.com/users/grgustaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grgustaf/subscriptions","organizations_url":"https://api.github.com/users/grgustaf/orgs","repos_url":"https://api.github.com/users/grgustaf/repos","events_url":"https://api.github.com/users/grgustaf/events{/privacy}","received_events_url":"https://api.github.com/users/grgustaf/received_events","type":"User","site_admin":false},"body":"Using function like this breaks the javascript syntax highlighting on GitHub. Instead name your callback types something like \"EventCallback\" or \"ListenerCallback\" and then you can define it below so people know what it takes and returns.\r\n\r\nSee the [GPIO API](https://github.com/01org/zephyr.js/blob/master/docs/gpio.md)'s ChangeCallback for an example.\r\n\r\nI think this might really be an EventEmitter interface that these functions should be enclosed inside? That might help it make 'this' less confusing because standalone here it's not clear what object we're talking about. Again take a look at GPIO maybe to see how that can be specified.\r\n\r\nBut that's kind of open-ended. I'll merge it with just the syntax highlighting fix if this is unclear.","created_at":"2016-12-22T21:42:19Z","updated_at":"2016-12-22T21:42:30Z","html_url":"https://github.com/01org/zephyr.js/pull/570#discussion_r93701017","pull_request_url":"https://api.github.com/repos/01org/zephyr.js/pulls/570","_links":{"self":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/comments/93701017"},"html":{"href":"https://github.com/01org/zephyr.js/pull/570#discussion_r93701017"},"pull_request":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/570"}}},"pull_request":{"url":"https://api.github.com/repos/01org/zephyr.js/pulls/570","id":99158505,"html_url":"https://github.com/01org/zephyr.js/pull/570","diff_url":"https://github.com/01org/zephyr.js/pull/570.diff","patch_url":"https://github.com/01org/zephyr.js/pull/570.patch","issue_url":"https://api.github.com/repos/01org/zephyr.js/issues/570","number":570,"state":"open","locked":false,"title":"[docs] Event API documentation","user":{"login":"jprestwo","id":8986787,"avatar_url":"https://avatars.githubusercontent.com/u/8986787?v=3","gravatar_id":"","url":"https://api.github.com/users/jprestwo","html_url":"https://github.com/jprestwo","followers_url":"https://api.github.com/users/jprestwo/followers","following_url":"https://api.github.com/users/jprestwo/following{/other_user}","gists_url":"https://api.github.com/users/jprestwo/gists{/gist_id}","starred_url":"https://api.github.com/users/jprestwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jprestwo/subscriptions","organizations_url":"https://api.github.com/users/jprestwo/orgs","repos_url":"https://api.github.com/users/jprestwo/repos","events_url":"https://api.github.com/users/jprestwo/events{/privacy}","received_events_url":"https://api.github.com/users/jprestwo/received_events","type":"User","site_admin":false},"body":"Signed-off-by: James Prestwood <james.prestwood@intel.com>","created_at":"2016-12-22T19:36:13Z","updated_at":"2016-12-22T21:42:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"517fbfbf1c9140b1c96c8e24746956220a39bee6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/01org/zephyr.js/pulls/570/commits","review_comments_url":"https://api.github.com/repos/01org/zephyr.js/pulls/570/comments","review_comment_url":"https://api.github.com/repos/01org/zephyr.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/zephyr.js/issues/570/comments","statuses_url":"https://api.github.com/repos/01org/zephyr.js/statuses/8e2bfa2f794ddd0b2d8a0a7ff410938a304afdcd","head":{"label":"jprestwo:event-docs","ref":"event-docs","sha":"8e2bfa2f794ddd0b2d8a0a7ff410938a304afdcd","user":{"login":"jprestwo","id":8986787,"avatar_url":"https://avatars.githubusercontent.com/u/8986787?v=3","gravatar_id":"","url":"https://api.github.com/users/jprestwo","html_url":"https://github.com/jprestwo","followers_url":"https://api.github.com/users/jprestwo/followers","following_url":"https://api.github.com/users/jprestwo/following{/other_user}","gists_url":"https://api.github.com/users/jprestwo/gists{/gist_id}","starred_url":"https://api.github.com/users/jprestwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jprestwo/subscriptions","organizations_url":"https://api.github.com/users/jprestwo/orgs","repos_url":"https://api.github.com/users/jprestwo/repos","events_url":"https://api.github.com/users/jprestwo/events{/privacy}","received_events_url":"https://api.github.com/users/jprestwo/received_events","type":"User","site_admin":false},"repo":{"id":70271798,"name":"zephyr.js-1","full_name":"jprestwo/zephyr.js-1","owner":{"login":"jprestwo","id":8986787,"avatar_url":"https://avatars.githubusercontent.com/u/8986787?v=3","gravatar_id":"","url":"https://api.github.com/users/jprestwo","html_url":"https://github.com/jprestwo","followers_url":"https://api.github.com/users/jprestwo/followers","following_url":"https://api.github.com/users/jprestwo/following{/other_user}","gists_url":"https://api.github.com/users/jprestwo/gists{/gist_id}","starred_url":"https://api.github.com/users/jprestwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jprestwo/subscriptions","organizations_url":"https://api.github.com/users/jprestwo/orgs","repos_url":"https://api.github.com/users/jprestwo/repos","events_url":"https://api.github.com/users/jprestwo/events{/privacy}","received_events_url":"https://api.github.com/users/jprestwo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jprestwo/zephyr.js-1","description":"JavaScript* Runtime for Zephyr* OS","fork":true,"url":"https://api.github.com/repos/jprestwo/zephyr.js-1","forks_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/forks","keys_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/teams","hooks_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/hooks","issue_events_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/issues/events{/number}","events_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/events","assignees_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/assignees{/user}","branches_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/branches{/branch}","tags_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/tags","blobs_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/statuses/{sha}","languages_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/languages","stargazers_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/stargazers","contributors_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/contributors","subscribers_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/subscribers","subscription_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/subscription","commits_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/contents/{+path}","compare_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/merges","archive_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/downloads","issues_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/issues{/number}","pulls_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/pulls{/number}","milestones_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/milestones{/number}","notifications_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/labels{/name}","releases_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/releases{/id}","deployments_url":"https://api.github.com/repos/jprestwo/zephyr.js-1/deployments","created_at":"2016-10-07T18:19:13Z","updated_at":"2016-10-07T18:19:14Z","pushed_at":"2016-12-22T20:15:18Z","git_url":"git://github.com/jprestwo/zephyr.js-1.git","ssh_url":"git@github.com:jprestwo/zephyr.js-1.git","clone_url":"https://github.com/jprestwo/zephyr.js-1.git","svn_url":"https://github.com/jprestwo/zephyr.js-1","homepage":"","size":1181,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"01org:master","ref":"master","sha":"e56007569505b54493229523a21cccdb268b0bee","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":61588342,"name":"zephyr.js","full_name":"01org/zephyr.js","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/zephyr.js","description":"JavaScript* Runtime for Zephyr* OS","fork":false,"url":"https://api.github.com/repos/01org/zephyr.js","forks_url":"https://api.github.com/repos/01org/zephyr.js/forks","keys_url":"https://api.github.com/repos/01org/zephyr.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/zephyr.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/zephyr.js/teams","hooks_url":"https://api.github.com/repos/01org/zephyr.js/hooks","issue_events_url":"https://api.github.com/repos/01org/zephyr.js/issues/events{/number}","events_url":"https://api.github.com/repos/01org/zephyr.js/events","assignees_url":"https://api.github.com/repos/01org/zephyr.js/assignees{/user}","branches_url":"https://api.github.com/repos/01org/zephyr.js/branches{/branch}","tags_url":"https://api.github.com/repos/01org/zephyr.js/tags","blobs_url":"https://api.github.com/repos/01org/zephyr.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/zephyr.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/zephyr.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/zephyr.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/zephyr.js/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/zephyr.js/languages","stargazers_url":"https://api.github.com/repos/01org/zephyr.js/stargazers","contributors_url":"https://api.github.com/repos/01org/zephyr.js/contributors","subscribers_url":"https://api.github.com/repos/01org/zephyr.js/subscribers","subscription_url":"https://api.github.com/repos/01org/zephyr.js/subscription","commits_url":"https://api.github.com/repos/01org/zephyr.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/zephyr.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/zephyr.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/zephyr.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/zephyr.js/contents/{+path}","compare_url":"https://api.github.com/repos/01org/zephyr.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/zephyr.js/merges","archive_url":"https://api.github.com/repos/01org/zephyr.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/zephyr.js/downloads","issues_url":"https://api.github.com/repos/01org/zephyr.js/issues{/number}","pulls_url":"https://api.github.com/repos/01org/zephyr.js/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/zephyr.js/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/zephyr.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/zephyr.js/labels{/name}","releases_url":"https://api.github.com/repos/01org/zephyr.js/releases{/id}","deployments_url":"https://api.github.com/repos/01org/zephyr.js/deployments","created_at":"2016-06-20T23:53:57Z","updated_at":"2016-12-18T05:55:11Z","pushed_at":"2016-12-22T21:30:52Z","git_url":"git://github.com/01org/zephyr.js.git","ssh_url":"git@github.com:01org/zephyr.js.git","clone_url":"https://github.com/01org/zephyr.js.git","svn_url":"https://github.com/01org/zephyr.js","homepage":"","size":1050,"stargazers_count":37,"watchers_count":37,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":74,"forks":22,"open_issues":74,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/570"},"html":{"href":"https://github.com/01org/zephyr.js/pull/570"},"issue":{"href":"https://api.github.com/repos/01org/zephyr.js/issues/570"},"comments":{"href":"https://api.github.com/repos/01org/zephyr.js/issues/570/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/570/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/570/commits"},"statuses":{"href":"https://api.github.com/repos/01org/zephyr.js/statuses/8e2bfa2f794ddd0b2d8a0a7ff410938a304afdcd"}}}}
{"actor":{"display_login":"grgustaf"}}