{"action":"created","comment":{"url":"https://api.github.com/repos/daneharrigan/hipchat/pulls/comments/53229943","id":53229943,"diff_hunk":"@@ -120,7 +120,14 @@ func (c *Client) Say(roomId, name, body string) {\n // character to HipChat every 60 seconds. This keeps the connection from\n // idling after 150 seconds.\n func (c *Client) KeepAlive() {\n-\tfor _ = range time.Tick(60 * time.Second) {\n+\tc.KeepAliveBy(60)\n+}\n+\n+// KeepAlive is meant to run as a goroutine. It sends a single whitespace","path":"hipchat.go","position":8,"original_position":8,"commit_id":"234800649783a2c9b593bcddbfad5648c9fa6b13","original_commit_id":"234800649783a2c9b593bcddbfad5648c9fa6b13","user":{"login":"daneharrigan","id":94443,"avatar_url":"https://avatars.githubusercontent.com/u/94443?v=3","gravatar_id":"","url":"https://api.github.com/users/daneharrigan","html_url":"https://github.com/daneharrigan","followers_url":"https://api.github.com/users/daneharrigan/followers","following_url":"https://api.github.com/users/daneharrigan/following{/other_user}","gists_url":"https://api.github.com/users/daneharrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/daneharrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneharrigan/subscriptions","organizations_url":"https://api.github.com/users/daneharrigan/orgs","repos_url":"https://api.github.com/users/daneharrigan/repos","events_url":"https://api.github.com/users/daneharrigan/events{/privacy}","received_events_url":"https://api.github.com/users/daneharrigan/received_events","type":"User","site_admin":false},"body":"I think `KeepAlive` should be `KeepAliveBy`? Just a copy-paste typo I think","created_at":"2016-02-17T20:56:20Z","updated_at":"2016-02-17T20:56:20Z","html_url":"https://github.com/daneharrigan/hipchat/pull/11#discussion_r53229943","pull_request_url":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/daneharrigan/hipchat/pulls/comments/53229943"},"html":{"href":"https://github.com/daneharrigan/hipchat/pull/11#discussion_r53229943"},"pull_request":{"href":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11","id":58620069,"html_url":"https://github.com/daneharrigan/hipchat/pull/11","diff_url":"https://github.com/daneharrigan/hipchat/pull/11.diff","patch_url":"https://github.com/daneharrigan/hipchat/pull/11.patch","issue_url":"https://api.github.com/repos/daneharrigan/hipchat/issues/11","number":11,"state":"open","locked":false,"title":"Add function for keep alive with arbitrary duration","user":{"login":"moznion","id":1422834,"avatar_url":"https://avatars.githubusercontent.com/u/1422834?v=3","gravatar_id":"","url":"https://api.github.com/users/moznion","html_url":"https://github.com/moznion","followers_url":"https://api.github.com/users/moznion/followers","following_url":"https://api.github.com/users/moznion/following{/other_user}","gists_url":"https://api.github.com/users/moznion/gists{/gist_id}","starred_url":"https://api.github.com/users/moznion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moznion/subscriptions","organizations_url":"https://api.github.com/users/moznion/orgs","repos_url":"https://api.github.com/users/moznion/repos","events_url":"https://api.github.com/users/moznion/events{/privacy}","received_events_url":"https://api.github.com/users/moznion/received_events","type":"User","site_admin":false},"body":"Hello,\r\n\r\nDuration of `KeepAlive()` is hard-coded so we cannot change that. Accordingly, I added a new function `KeepAliveBy(sec time.Duration)` to configure duration.\r\n\r\nRelated: #12 ","created_at":"2016-02-08T15:01:35Z","updated_at":"2016-02-17T20:56:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a86ca00ac3dd28bb43c245dfb6365d340a510009","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11/commits","review_comments_url":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11/comments","review_comment_url":"https://api.github.com/repos/daneharrigan/hipchat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/daneharrigan/hipchat/issues/11/comments","statuses_url":"https://api.github.com/repos/daneharrigan/hipchat/statuses/234800649783a2c9b593bcddbfad5648c9fa6b13","head":{"label":"moznion:keep_alive_duration_to_be_configurable","ref":"keep_alive_duration_to_be_configurable","sha":"234800649783a2c9b593bcddbfad5648c9fa6b13","user":{"login":"moznion","id":1422834,"avatar_url":"https://avatars.githubusercontent.com/u/1422834?v=3","gravatar_id":"","url":"https://api.github.com/users/moznion","html_url":"https://github.com/moznion","followers_url":"https://api.github.com/users/moznion/followers","following_url":"https://api.github.com/users/moznion/following{/other_user}","gists_url":"https://api.github.com/users/moznion/gists{/gist_id}","starred_url":"https://api.github.com/users/moznion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moznion/subscriptions","organizations_url":"https://api.github.com/users/moznion/orgs","repos_url":"https://api.github.com/users/moznion/repos","events_url":"https://api.github.com/users/moznion/events{/privacy}","received_events_url":"https://api.github.com/users/moznion/received_events","type":"User","site_admin":false},"repo":{"id":51302287,"name":"hipchat","full_name":"moznion/hipchat","owner":{"login":"moznion","id":1422834,"avatar_url":"https://avatars.githubusercontent.com/u/1422834?v=3","gravatar_id":"","url":"https://api.github.com/users/moznion","html_url":"https://github.com/moznion","followers_url":"https://api.github.com/users/moznion/followers","following_url":"https://api.github.com/users/moznion/following{/other_user}","gists_url":"https://api.github.com/users/moznion/gists{/gist_id}","starred_url":"https://api.github.com/users/moznion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moznion/subscriptions","organizations_url":"https://api.github.com/users/moznion/orgs","repos_url":"https://api.github.com/users/moznion/repos","events_url":"https://api.github.com/users/moznion/events{/privacy}","received_events_url":"https://api.github.com/users/moznion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moznion/hipchat","description":"A golang package to communicate with HipChat over XMPP","fork":true,"url":"https://api.github.com/repos/moznion/hipchat","forks_url":"https://api.github.com/repos/moznion/hipchat/forks","keys_url":"https://api.github.com/repos/moznion/hipchat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moznion/hipchat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moznion/hipchat/teams","hooks_url":"https://api.github.com/repos/moznion/hipchat/hooks","issue_events_url":"https://api.github.com/repos/moznion/hipchat/issues/events{/number}","events_url":"https://api.github.com/repos/moznion/hipchat/events","assignees_url":"https://api.github.com/repos/moznion/hipchat/assignees{/user}","branches_url":"https://api.github.com/repos/moznion/hipchat/branches{/branch}","tags_url":"https://api.github.com/repos/moznion/hipchat/tags","blobs_url":"https://api.github.com/repos/moznion/hipchat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moznion/hipchat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moznion/hipchat/git/refs{/sha}","trees_url":"https://api.github.com/repos/moznion/hipchat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moznion/hipchat/statuses/{sha}","languages_url":"https://api.github.com/repos/moznion/hipchat/languages","stargazers_url":"https://api.github.com/repos/moznion/hipchat/stargazers","contributors_url":"https://api.github.com/repos/moznion/hipchat/contributors","subscribers_url":"https://api.github.com/repos/moznion/hipchat/subscribers","subscription_url":"https://api.github.com/repos/moznion/hipchat/subscription","commits_url":"https://api.github.com/repos/moznion/hipchat/commits{/sha}","git_commits_url":"https://api.github.com/repos/moznion/hipchat/git/commits{/sha}","comments_url":"https://api.github.com/repos/moznion/hipchat/comments{/number}","issue_comment_url":"https://api.github.com/repos/moznion/hipchat/issues/comments{/number}","contents_url":"https://api.github.com/repos/moznion/hipchat/contents/{+path}","compare_url":"https://api.github.com/repos/moznion/hipchat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moznion/hipchat/merges","archive_url":"https://api.github.com/repos/moznion/hipchat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moznion/hipchat/downloads","issues_url":"https://api.github.com/repos/moznion/hipchat/issues{/number}","pulls_url":"https://api.github.com/repos/moznion/hipchat/pulls{/number}","milestones_url":"https://api.github.com/repos/moznion/hipchat/milestones{/number}","notifications_url":"https://api.github.com/repos/moznion/hipchat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moznion/hipchat/labels{/name}","releases_url":"https://api.github.com/repos/moznion/hipchat/releases{/id}","deployments_url":"https://api.github.com/repos/moznion/hipchat/deployments","created_at":"2016-02-08T14:23:51Z","updated_at":"2016-02-08T14:23:52Z","pushed_at":"2016-02-09T01:14:13Z","git_url":"git://github.com/moznion/hipchat.git","ssh_url":"git@github.com:moznion/hipchat.git","clone_url":"https://github.com/moznion/hipchat.git","svn_url":"https://github.com/moznion/hipchat","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"daneharrigan:master","ref":"master","sha":"c13136508322cce27abf778254bb8cb6286a5580","user":{"login":"daneharrigan","id":94443,"avatar_url":"https://avatars.githubusercontent.com/u/94443?v=3","gravatar_id":"","url":"https://api.github.com/users/daneharrigan","html_url":"https://github.com/daneharrigan","followers_url":"https://api.github.com/users/daneharrigan/followers","following_url":"https://api.github.com/users/daneharrigan/following{/other_user}","gists_url":"https://api.github.com/users/daneharrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/daneharrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneharrigan/subscriptions","organizations_url":"https://api.github.com/users/daneharrigan/orgs","repos_url":"https://api.github.com/users/daneharrigan/repos","events_url":"https://api.github.com/users/daneharrigan/events{/privacy}","received_events_url":"https://api.github.com/users/daneharrigan/received_events","type":"User","site_admin":false},"repo":{"id":9724058,"name":"hipchat","full_name":"daneharrigan/hipchat","owner":{"login":"daneharrigan","id":94443,"avatar_url":"https://avatars.githubusercontent.com/u/94443?v=3","gravatar_id":"","url":"https://api.github.com/users/daneharrigan","html_url":"https://github.com/daneharrigan","followers_url":"https://api.github.com/users/daneharrigan/followers","following_url":"https://api.github.com/users/daneharrigan/following{/other_user}","gists_url":"https://api.github.com/users/daneharrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/daneharrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneharrigan/subscriptions","organizations_url":"https://api.github.com/users/daneharrigan/orgs","repos_url":"https://api.github.com/users/daneharrigan/repos","events_url":"https://api.github.com/users/daneharrigan/events{/privacy}","received_events_url":"https://api.github.com/users/daneharrigan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daneharrigan/hipchat","description":"A golang package to communicate with HipChat over XMPP","fork":false,"url":"https://api.github.com/repos/daneharrigan/hipchat","forks_url":"https://api.github.com/repos/daneharrigan/hipchat/forks","keys_url":"https://api.github.com/repos/daneharrigan/hipchat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daneharrigan/hipchat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daneharrigan/hipchat/teams","hooks_url":"https://api.github.com/repos/daneharrigan/hipchat/hooks","issue_events_url":"https://api.github.com/repos/daneharrigan/hipchat/issues/events{/number}","events_url":"https://api.github.com/repos/daneharrigan/hipchat/events","assignees_url":"https://api.github.com/repos/daneharrigan/hipchat/assignees{/user}","branches_url":"https://api.github.com/repos/daneharrigan/hipchat/branches{/branch}","tags_url":"https://api.github.com/repos/daneharrigan/hipchat/tags","blobs_url":"https://api.github.com/repos/daneharrigan/hipchat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daneharrigan/hipchat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daneharrigan/hipchat/git/refs{/sha}","trees_url":"https://api.github.com/repos/daneharrigan/hipchat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daneharrigan/hipchat/statuses/{sha}","languages_url":"https://api.github.com/repos/daneharrigan/hipchat/languages","stargazers_url":"https://api.github.com/repos/daneharrigan/hipchat/stargazers","contributors_url":"https://api.github.com/repos/daneharrigan/hipchat/contributors","subscribers_url":"https://api.github.com/repos/daneharrigan/hipchat/subscribers","subscription_url":"https://api.github.com/repos/daneharrigan/hipchat/subscription","commits_url":"https://api.github.com/repos/daneharrigan/hipchat/commits{/sha}","git_commits_url":"https://api.github.com/repos/daneharrigan/hipchat/git/commits{/sha}","comments_url":"https://api.github.com/repos/daneharrigan/hipchat/comments{/number}","issue_comment_url":"https://api.github.com/repos/daneharrigan/hipchat/issues/comments{/number}","contents_url":"https://api.github.com/repos/daneharrigan/hipchat/contents/{+path}","compare_url":"https://api.github.com/repos/daneharrigan/hipchat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daneharrigan/hipchat/merges","archive_url":"https://api.github.com/repos/daneharrigan/hipchat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daneharrigan/hipchat/downloads","issues_url":"https://api.github.com/repos/daneharrigan/hipchat/issues{/number}","pulls_url":"https://api.github.com/repos/daneharrigan/hipchat/pulls{/number}","milestones_url":"https://api.github.com/repos/daneharrigan/hipchat/milestones{/number}","notifications_url":"https://api.github.com/repos/daneharrigan/hipchat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daneharrigan/hipchat/labels{/name}","releases_url":"https://api.github.com/repos/daneharrigan/hipchat/releases{/id}","deployments_url":"https://api.github.com/repos/daneharrigan/hipchat/deployments","created_at":"2013-04-28T02:16:21Z","updated_at":"2016-02-14T16:46:29Z","pushed_at":"2016-02-17T20:54:18Z","git_url":"git://github.com/daneharrigan/hipchat.git","ssh_url":"git@github.com:daneharrigan/hipchat.git","clone_url":"https://github.com/daneharrigan/hipchat.git","svn_url":"https://github.com/daneharrigan/hipchat","homepage":"","size":15,"stargazers_count":89,"watchers_count":89,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":1,"forks":25,"open_issues":1,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11"},"html":{"href":"https://github.com/daneharrigan/hipchat/pull/11"},"issue":{"href":"https://api.github.com/repos/daneharrigan/hipchat/issues/11"},"comments":{"href":"https://api.github.com/repos/daneharrigan/hipchat/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/daneharrigan/hipchat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/daneharrigan/hipchat/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/daneharrigan/hipchat/statuses/234800649783a2c9b593bcddbfad5648c9fa6b13"}}}}