{"action":"created","comment":{"url":"https://api.github.com/repos/salemove/apiary_docs/pulls/comments/50124623","id":50124623,"diff_hunk":"@@ -301,59 +301,57 @@ Notifies listener of operator state updates (availability, media)\n \n > + Sample usage: different behaviour depending on how many operators are available.\n \n-```\n-var useElement = false\n-var operators = []\n+```js\n+var elementEnabled = false;\n+var operators = [];","path":"apiary.apib","position":9,"original_position":9,"commit_id":"b3deaf5920915221391011a014d7c74dac9b45ff","original_commit_id":"b3deaf5920915221391011a014d7c74dac9b45ff","user":{"login":"deiwin","id":2261897,"avatar_url":"https://avatars.githubusercontent.com/u/2261897?v=3","gravatar_id":"","url":"https://api.github.com/users/deiwin","html_url":"https://github.com/deiwin","followers_url":"https://api.github.com/users/deiwin/followers","following_url":"https://api.github.com/users/deiwin/following{/other_user}","gists_url":"https://api.github.com/users/deiwin/gists{/gist_id}","starred_url":"https://api.github.com/users/deiwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deiwin/subscriptions","organizations_url":"https://api.github.com/users/deiwin/orgs","repos_url":"https://api.github.com/users/deiwin/repos","events_url":"https://api.github.com/users/deiwin/events{/privacy}","received_events_url":"https://api.github.com/users/deiwin/received_events","type":"User","site_admin":false},"body":"`#onOperatorStatusChange()` only gets that one changed operator, but needs to call `#updateElementUI()` with the entire list of operators. So we do need to hold state. ","created_at":"2016-01-19T15:20:59Z","updated_at":"2016-01-19T15:20:59Z","html_url":"https://github.com/salemove/apiary_docs/pull/15#discussion_r50124623","pull_request_url":"https://api.github.com/repos/salemove/apiary_docs/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/salemove/apiary_docs/pulls/comments/50124623"},"html":{"href":"https://github.com/salemove/apiary_docs/pull/15#discussion_r50124623"},"pull_request":{"href":"https://api.github.com/repos/salemove/apiary_docs/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/salemove/apiary_docs/pulls/15","id":56478763,"html_url":"https://github.com/salemove/apiary_docs/pull/15","diff_url":"https://github.com/salemove/apiary_docs/pull/15.diff","patch_url":"https://github.com/salemove/apiary_docs/pull/15.patch","issue_url":"https://api.github.com/repos/salemove/apiary_docs/issues/15","number":15,"state":"open","locked":false,"title":"Clean up operator changes listener example","user":{"login":"deiwin","id":2261897,"avatar_url":"https://avatars.githubusercontent.com/u/2261897?v=3","gravatar_id":"","url":"https://api.github.com/users/deiwin","html_url":"https://github.com/deiwin","followers_url":"https://api.github.com/users/deiwin/followers","following_url":"https://api.github.com/users/deiwin/following{/other_user}","gists_url":"https://api.github.com/users/deiwin/gists{/gist_id}","starred_url":"https://api.github.com/users/deiwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deiwin/subscriptions","organizations_url":"https://api.github.com/users/deiwin/orgs","repos_url":"https://api.github.com/users/deiwin/repos","events_url":"https://api.github.com/users/deiwin/events{/privacy}","received_events_url":"https://api.github.com/users/deiwin/received_events","type":"User","site_admin":false},"body":"Cleans up formatting and some logic errors in the example code. Uses\r\nmethods like `Array.prototype.filter` instead of for loops.","created_at":"2016-01-19T15:13:25Z","updated_at":"2016-01-19T15:20:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b8133fa8d3c0e5f3e5310c40477ec7e6ac4ce87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/salemove/apiary_docs/pulls/15/commits","review_comments_url":"https://api.github.com/repos/salemove/apiary_docs/pulls/15/comments","review_comment_url":"https://api.github.com/repos/salemove/apiary_docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salemove/apiary_docs/issues/15/comments","statuses_url":"https://api.github.com/repos/salemove/apiary_docs/statuses/b3deaf5920915221391011a014d7c74dac9b45ff","head":{"label":"salemove:clean_up_code_example","ref":"clean_up_code_example","sha":"b3deaf5920915221391011a014d7c74dac9b45ff","user":{"login":"salemove","id":5281619,"avatar_url":"https://avatars.githubusercontent.com/u/5281619?v=3","gravatar_id":"","url":"https://api.github.com/users/salemove","html_url":"https://github.com/salemove","followers_url":"https://api.github.com/users/salemove/followers","following_url":"https://api.github.com/users/salemove/following{/other_user}","gists_url":"https://api.github.com/users/salemove/gists{/gist_id}","starred_url":"https://api.github.com/users/salemove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salemove/subscriptions","organizations_url":"https://api.github.com/users/salemove/orgs","repos_url":"https://api.github.com/users/salemove/repos","events_url":"https://api.github.com/users/salemove/events{/privacy}","received_events_url":"https://api.github.com/users/salemove/received_events","type":"Organization","site_admin":false},"repo":{"id":43673810,"name":"apiary_docs","full_name":"salemove/apiary_docs","owner":{"login":"salemove","id":5281619,"avatar_url":"https://avatars.githubusercontent.com/u/5281619?v=3","gravatar_id":"","url":"https://api.github.com/users/salemove","html_url":"https://github.com/salemove","followers_url":"https://api.github.com/users/salemove/followers","following_url":"https://api.github.com/users/salemove/following{/other_user}","gists_url":"https://api.github.com/users/salemove/gists{/gist_id}","starred_url":"https://api.github.com/users/salemove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salemove/subscriptions","organizations_url":"https://api.github.com/users/salemove/orgs","repos_url":"https://api.github.com/users/salemove/repos","events_url":"https://api.github.com/users/salemove/events{/privacy}","received_events_url":"https://api.github.com/users/salemove/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salemove/apiary_docs","description":"","fork":false,"url":"https://api.github.com/repos/salemove/apiary_docs","forks_url":"https://api.github.com/repos/salemove/apiary_docs/forks","keys_url":"https://api.github.com/repos/salemove/apiary_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salemove/apiary_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salemove/apiary_docs/teams","hooks_url":"https://api.github.com/repos/salemove/apiary_docs/hooks","issue_events_url":"https://api.github.com/repos/salemove/apiary_docs/issues/events{/number}","events_url":"https://api.github.com/repos/salemove/apiary_docs/events","assignees_url":"https://api.github.com/repos/salemove/apiary_docs/assignees{/user}","branches_url":"https://api.github.com/repos/salemove/apiary_docs/branches{/branch}","tags_url":"https://api.github.com/repos/salemove/apiary_docs/tags","blobs_url":"https://api.github.com/repos/salemove/apiary_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salemove/apiary_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salemove/apiary_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/salemove/apiary_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salemove/apiary_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/salemove/apiary_docs/languages","stargazers_url":"https://api.github.com/repos/salemove/apiary_docs/stargazers","contributors_url":"https://api.github.com/repos/salemove/apiary_docs/contributors","subscribers_url":"https://api.github.com/repos/salemove/apiary_docs/subscribers","subscription_url":"https://api.github.com/repos/salemove/apiary_docs/subscription","commits_url":"https://api.github.com/repos/salemove/apiary_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/salemove/apiary_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/salemove/apiary_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/salemove/apiary_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/salemove/apiary_docs/contents/{+path}","compare_url":"https://api.github.com/repos/salemove/apiary_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salemove/apiary_docs/merges","archive_url":"https://api.github.com/repos/salemove/apiary_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salemove/apiary_docs/downloads","issues_url":"https://api.github.com/repos/salemove/apiary_docs/issues{/number}","pulls_url":"https://api.github.com/repos/salemove/apiary_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/salemove/apiary_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/salemove/apiary_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salemove/apiary_docs/labels{/name}","releases_url":"https://api.github.com/repos/salemove/apiary_docs/releases{/id}","created_at":"2015-10-05T08:49:04Z","updated_at":"2016-01-11T08:38:17Z","pushed_at":"2016-01-19T15:17:14Z","git_url":"git://github.com/salemove/apiary_docs.git","ssh_url":"git@github.com:salemove/apiary_docs.git","clone_url":"https://github.com/salemove/apiary_docs.git","svn_url":"https://github.com/salemove/apiary_docs","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":"API Blueprint","has_issues":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":"salemove:master","ref":"master","sha":"15c153e162b16c693983270a86169c45fa5d243c","user":{"login":"salemove","id":5281619,"avatar_url":"https://avatars.githubusercontent.com/u/5281619?v=3","gravatar_id":"","url":"https://api.github.com/users/salemove","html_url":"https://github.com/salemove","followers_url":"https://api.github.com/users/salemove/followers","following_url":"https://api.github.com/users/salemove/following{/other_user}","gists_url":"https://api.github.com/users/salemove/gists{/gist_id}","starred_url":"https://api.github.com/users/salemove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salemove/subscriptions","organizations_url":"https://api.github.com/users/salemove/orgs","repos_url":"https://api.github.com/users/salemove/repos","events_url":"https://api.github.com/users/salemove/events{/privacy}","received_events_url":"https://api.github.com/users/salemove/received_events","type":"Organization","site_admin":false},"repo":{"id":43673810,"name":"apiary_docs","full_name":"salemove/apiary_docs","owner":{"login":"salemove","id":5281619,"avatar_url":"https://avatars.githubusercontent.com/u/5281619?v=3","gravatar_id":"","url":"https://api.github.com/users/salemove","html_url":"https://github.com/salemove","followers_url":"https://api.github.com/users/salemove/followers","following_url":"https://api.github.com/users/salemove/following{/other_user}","gists_url":"https://api.github.com/users/salemove/gists{/gist_id}","starred_url":"https://api.github.com/users/salemove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salemove/subscriptions","organizations_url":"https://api.github.com/users/salemove/orgs","repos_url":"https://api.github.com/users/salemove/repos","events_url":"https://api.github.com/users/salemove/events{/privacy}","received_events_url":"https://api.github.com/users/salemove/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salemove/apiary_docs","description":"","fork":false,"url":"https://api.github.com/repos/salemove/apiary_docs","forks_url":"https://api.github.com/repos/salemove/apiary_docs/forks","keys_url":"https://api.github.com/repos/salemove/apiary_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salemove/apiary_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salemove/apiary_docs/teams","hooks_url":"https://api.github.com/repos/salemove/apiary_docs/hooks","issue_events_url":"https://api.github.com/repos/salemove/apiary_docs/issues/events{/number}","events_url":"https://api.github.com/repos/salemove/apiary_docs/events","assignees_url":"https://api.github.com/repos/salemove/apiary_docs/assignees{/user}","branches_url":"https://api.github.com/repos/salemove/apiary_docs/branches{/branch}","tags_url":"https://api.github.com/repos/salemove/apiary_docs/tags","blobs_url":"https://api.github.com/repos/salemove/apiary_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salemove/apiary_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salemove/apiary_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/salemove/apiary_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salemove/apiary_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/salemove/apiary_docs/languages","stargazers_url":"https://api.github.com/repos/salemove/apiary_docs/stargazers","contributors_url":"https://api.github.com/repos/salemove/apiary_docs/contributors","subscribers_url":"https://api.github.com/repos/salemove/apiary_docs/subscribers","subscription_url":"https://api.github.com/repos/salemove/apiary_docs/subscription","commits_url":"https://api.github.com/repos/salemove/apiary_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/salemove/apiary_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/salemove/apiary_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/salemove/apiary_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/salemove/apiary_docs/contents/{+path}","compare_url":"https://api.github.com/repos/salemove/apiary_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salemove/apiary_docs/merges","archive_url":"https://api.github.com/repos/salemove/apiary_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salemove/apiary_docs/downloads","issues_url":"https://api.github.com/repos/salemove/apiary_docs/issues{/number}","pulls_url":"https://api.github.com/repos/salemove/apiary_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/salemove/apiary_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/salemove/apiary_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salemove/apiary_docs/labels{/name}","releases_url":"https://api.github.com/repos/salemove/apiary_docs/releases{/id}","created_at":"2015-10-05T08:49:04Z","updated_at":"2016-01-11T08:38:17Z","pushed_at":"2016-01-19T15:17:14Z","git_url":"git://github.com/salemove/apiary_docs.git","ssh_url":"git@github.com:salemove/apiary_docs.git","clone_url":"https://github.com/salemove/apiary_docs.git","svn_url":"https://github.com/salemove/apiary_docs","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":"API Blueprint","has_issues":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/salemove/apiary_docs/pulls/15"},"html":{"href":"https://github.com/salemove/apiary_docs/pull/15"},"issue":{"href":"https://api.github.com/repos/salemove/apiary_docs/issues/15"},"comments":{"href":"https://api.github.com/repos/salemove/apiary_docs/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/salemove/apiary_docs/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/salemove/apiary_docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salemove/apiary_docs/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/salemove/apiary_docs/statuses/b3deaf5920915221391011a014d7c74dac9b45ff"}}}}