{"action":"created","comment":{"url":"https://api.github.com/repos/CIP-NL/kermit/pulls/comments/211874377","pull_request_review_id":148384910,"id":211874377,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTg3NDM3Nw==","diff_hunk":"@@ -0,0 +1,68 @@\n+package bittrex\n+\n+import (\n+\t\"github.com/CIP-NL/kermit/kermit\"\n+\t\"github.com/carterjones/signalr\"\n+\t\"github.com/carterjones/signalr/hubs\"\n+\t\"github.com/sirupsen/logrus\"\n+)\n+\n+type Client struct {\n+\tConnector     Connector\n+\tHandler       Handler\n+\tsubscriptions []Subscription\n+\tsigclient     *signalr.Client\n+}\n+\n+func NewClient(host string, protocol string, endpoint string, connectionData string, connector Connector,\n+\thandler Handler) *Client {\n+\ta := signalr.New(host, protocol, endpoint, connectionData, nil)\n+\ta.Headers[\"User-Agent\"] = \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\"\n+\treturn &Client{sigclient: a, Connector: connector, Handler: handler, subscriptions: *new([]Subscription)}\n+}\n+\n+func (b Client) start() kermit.Error {\n+\tlogrus.Info(\"Bypassing Cloudfare. This takes about 5 seconds.\")\n+\terr := b.sigclient.Run(b.Handler.HandleMessage, b.Handler.HandleError)\n+\tif err != nil {\n+\t\treturn kermit.NewError(\"cannot connect\", kermit.Other, \"Cannot connect\", false)\n+\t}\n+\tfor i := 0; i < len(b.subscriptions); i++ {\n+","path":"bittrex/client.go","position":31,"original_position":31,"commit_id":"da9d3aab4589623bea4703c4966f29a872acfc9f","original_commit_id":"da9d3aab4589623bea4703c4966f29a872acfc9f","user":{"login":"YoctoByte","id":8415443,"node_id":"MDQ6VXNlcjg0MTU0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/8415443?v=4","gravatar_id":"","url":"https://api.github.com/users/YoctoByte","html_url":"https://github.com/YoctoByte","followers_url":"https://api.github.com/users/YoctoByte/followers","following_url":"https://api.github.com/users/YoctoByte/following{/other_user}","gists_url":"https://api.github.com/users/YoctoByte/gists{/gist_id}","starred_url":"https://api.github.com/users/YoctoByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YoctoByte/subscriptions","organizations_url":"https://api.github.com/users/YoctoByte/orgs","repos_url":"https://api.github.com/users/YoctoByte/repos","events_url":"https://api.github.com/users/YoctoByte/events{/privacy}","received_events_url":"https://api.github.com/users/YoctoByte/received_events","type":"User","site_admin":false},"body":"A and I are a bit unclear variable names. Comment maybe?","created_at":"2018-08-22T08:44:56Z","updated_at":"2018-08-22T08:44:56Z","html_url":"https://github.com/CIP-NL/kermit/pull/13#discussion_r211874377","pull_request_url":"https://api.github.com/repos/CIP-NL/kermit/pulls/13","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/CIP-NL/kermit/pulls/comments/211874377"},"html":{"href":"https://github.com/CIP-NL/kermit/pull/13#discussion_r211874377"},"pull_request":{"href":"https://api.github.com/repos/CIP-NL/kermit/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/CIP-NL/kermit/pulls/13","id":210056461,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMDU2NDYx","html_url":"https://github.com/CIP-NL/kermit/pull/13","diff_url":"https://github.com/CIP-NL/kermit/pull/13.diff","patch_url":"https://github.com/CIP-NL/kermit/pull/13.patch","issue_url":"https://api.github.com/repos/CIP-NL/kermit/issues/13","number":13,"state":"open","locked":false,"title":"Bittrex","user":{"login":"LaurensKubat","id":32776056,"node_id":"MDQ6VXNlcjMyNzc2MDU2","avatar_url":"https://avatars1.githubusercontent.com/u/32776056?v=4","gravatar_id":"","url":"https://api.github.com/users/LaurensKubat","html_url":"https://github.com/LaurensKubat","followers_url":"https://api.github.com/users/LaurensKubat/followers","following_url":"https://api.github.com/users/LaurensKubat/following{/other_user}","gists_url":"https://api.github.com/users/LaurensKubat/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurensKubat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurensKubat/subscriptions","organizations_url":"https://api.github.com/users/LaurensKubat/orgs","repos_url":"https://api.github.com/users/LaurensKubat/repos","events_url":"https://api.github.com/users/LaurensKubat/events{/privacy}","received_events_url":"https://api.github.com/users/LaurensKubat/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-22T08:30:53Z","updated_at":"2018-08-22T08:44:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d000be2452ae4cff471549bf2dc1495a11e01b8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CIP-NL/kermit/pulls/13/commits","review_comments_url":"https://api.github.com/repos/CIP-NL/kermit/pulls/13/comments","review_comment_url":"https://api.github.com/repos/CIP-NL/kermit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CIP-NL/kermit/issues/13/comments","statuses_url":"https://api.github.com/repos/CIP-NL/kermit/statuses/da9d3aab4589623bea4703c4966f29a872acfc9f","head":{"label":"CIP-NL:bittrex","ref":"bittrex","sha":"da9d3aab4589623bea4703c4966f29a872acfc9f","user":{"login":"CIP-NL","id":38425945,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDI1OTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/38425945?v=4","gravatar_id":"","url":"https://api.github.com/users/CIP-NL","html_url":"https://github.com/CIP-NL","followers_url":"https://api.github.com/users/CIP-NL/followers","following_url":"https://api.github.com/users/CIP-NL/following{/other_user}","gists_url":"https://api.github.com/users/CIP-NL/gists{/gist_id}","starred_url":"https://api.github.com/users/CIP-NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CIP-NL/subscriptions","organizations_url":"https://api.github.com/users/CIP-NL/orgs","repos_url":"https://api.github.com/users/CIP-NL/repos","events_url":"https://api.github.com/users/CIP-NL/events{/privacy}","received_events_url":"https://api.github.com/users/CIP-NL/received_events","type":"Organization","site_admin":false},"repo":{"id":140563238,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA1NjMyMzg=","name":"kermit","full_name":"CIP-NL/kermit","owner":{"login":"CIP-NL","id":38425945,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDI1OTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/38425945?v=4","gravatar_id":"","url":"https://api.github.com/users/CIP-NL","html_url":"https://github.com/CIP-NL","followers_url":"https://api.github.com/users/CIP-NL/followers","following_url":"https://api.github.com/users/CIP-NL/following{/other_user}","gists_url":"https://api.github.com/users/CIP-NL/gists{/gist_id}","starred_url":"https://api.github.com/users/CIP-NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CIP-NL/subscriptions","organizations_url":"https://api.github.com/users/CIP-NL/orgs","repos_url":"https://api.github.com/users/CIP-NL/repos","events_url":"https://api.github.com/users/CIP-NL/events{/privacy}","received_events_url":"https://api.github.com/users/CIP-NL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CIP-NL/kermit","description":"Websocket client shell around Gorilla websocket","fork":true,"url":"https://api.github.com/repos/CIP-NL/kermit","forks_url":"https://api.github.com/repos/CIP-NL/kermit/forks","keys_url":"https://api.github.com/repos/CIP-NL/kermit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CIP-NL/kermit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CIP-NL/kermit/teams","hooks_url":"https://api.github.com/repos/CIP-NL/kermit/hooks","issue_events_url":"https://api.github.com/repos/CIP-NL/kermit/issues/events{/number}","events_url":"https://api.github.com/repos/CIP-NL/kermit/events","assignees_url":"https://api.github.com/repos/CIP-NL/kermit/assignees{/user}","branches_url":"https://api.github.com/repos/CIP-NL/kermit/branches{/branch}","tags_url":"https://api.github.com/repos/CIP-NL/kermit/tags","blobs_url":"https://api.github.com/repos/CIP-NL/kermit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CIP-NL/kermit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CIP-NL/kermit/git/refs{/sha}","trees_url":"https://api.github.com/repos/CIP-NL/kermit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CIP-NL/kermit/statuses/{sha}","languages_url":"https://api.github.com/repos/CIP-NL/kermit/languages","stargazers_url":"https://api.github.com/repos/CIP-NL/kermit/stargazers","contributors_url":"https://api.github.com/repos/CIP-NL/kermit/contributors","subscribers_url":"https://api.github.com/repos/CIP-NL/kermit/subscribers","subscription_url":"https://api.github.com/repos/CIP-NL/kermit/subscription","commits_url":"https://api.github.com/repos/CIP-NL/kermit/commits{/sha}","git_commits_url":"https://api.github.com/repos/CIP-NL/kermit/git/commits{/sha}","comments_url":"https://api.github.com/repos/CIP-NL/kermit/comments{/number}","issue_comment_url":"https://api.github.com/repos/CIP-NL/kermit/issues/comments{/number}","contents_url":"https://api.github.com/repos/CIP-NL/kermit/contents/{+path}","compare_url":"https://api.github.com/repos/CIP-NL/kermit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CIP-NL/kermit/merges","archive_url":"https://api.github.com/repos/CIP-NL/kermit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CIP-NL/kermit/downloads","issues_url":"https://api.github.com/repos/CIP-NL/kermit/issues{/number}","pulls_url":"https://api.github.com/repos/CIP-NL/kermit/pulls{/number}","milestones_url":"https://api.github.com/repos/CIP-NL/kermit/milestones{/number}","notifications_url":"https://api.github.com/repos/CIP-NL/kermit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CIP-NL/kermit/labels{/name}","releases_url":"https://api.github.com/repos/CIP-NL/kermit/releases{/id}","deployments_url":"https://api.github.com/repos/CIP-NL/kermit/deployments","created_at":"2018-07-11T11:02:21Z","updated_at":"2018-08-21T11:19:08Z","pushed_at":"2018-08-22T08:30:54Z","git_url":"git://github.com/CIP-NL/kermit.git","ssh_url":"git@github.com:CIP-NL/kermit.git","clone_url":"https://github.com/CIP-NL/kermit.git","svn_url":"https://github.com/CIP-NL/kermit","homepage":"","size":3654,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"CIP-NL:master","ref":"master","sha":"4c46afd578740ae49dcf16084555872722f710fa","user":{"login":"CIP-NL","id":38425945,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDI1OTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/38425945?v=4","gravatar_id":"","url":"https://api.github.com/users/CIP-NL","html_url":"https://github.com/CIP-NL","followers_url":"https://api.github.com/users/CIP-NL/followers","following_url":"https://api.github.com/users/CIP-NL/following{/other_user}","gists_url":"https://api.github.com/users/CIP-NL/gists{/gist_id}","starred_url":"https://api.github.com/users/CIP-NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CIP-NL/subscriptions","organizations_url":"https://api.github.com/users/CIP-NL/orgs","repos_url":"https://api.github.com/users/CIP-NL/repos","events_url":"https://api.github.com/users/CIP-NL/events{/privacy}","received_events_url":"https://api.github.com/users/CIP-NL/received_events","type":"Organization","site_admin":false},"repo":{"id":140563238,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA1NjMyMzg=","name":"kermit","full_name":"CIP-NL/kermit","owner":{"login":"CIP-NL","id":38425945,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDI1OTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/38425945?v=4","gravatar_id":"","url":"https://api.github.com/users/CIP-NL","html_url":"https://github.com/CIP-NL","followers_url":"https://api.github.com/users/CIP-NL/followers","following_url":"https://api.github.com/users/CIP-NL/following{/other_user}","gists_url":"https://api.github.com/users/CIP-NL/gists{/gist_id}","starred_url":"https://api.github.com/users/CIP-NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CIP-NL/subscriptions","organizations_url":"https://api.github.com/users/CIP-NL/orgs","repos_url":"https://api.github.com/users/CIP-NL/repos","events_url":"https://api.github.com/users/CIP-NL/events{/privacy}","received_events_url":"https://api.github.com/users/CIP-NL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CIP-NL/kermit","description":"Websocket client shell around Gorilla websocket","fork":true,"url":"https://api.github.com/repos/CIP-NL/kermit","forks_url":"https://api.github.com/repos/CIP-NL/kermit/forks","keys_url":"https://api.github.com/repos/CIP-NL/kermit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CIP-NL/kermit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CIP-NL/kermit/teams","hooks_url":"https://api.github.com/repos/CIP-NL/kermit/hooks","issue_events_url":"https://api.github.com/repos/CIP-NL/kermit/issues/events{/number}","events_url":"https://api.github.com/repos/CIP-NL/kermit/events","assignees_url":"https://api.github.com/repos/CIP-NL/kermit/assignees{/user}","branches_url":"https://api.github.com/repos/CIP-NL/kermit/branches{/branch}","tags_url":"https://api.github.com/repos/CIP-NL/kermit/tags","blobs_url":"https://api.github.com/repos/CIP-NL/kermit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CIP-NL/kermit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CIP-NL/kermit/git/refs{/sha}","trees_url":"https://api.github.com/repos/CIP-NL/kermit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CIP-NL/kermit/statuses/{sha}","languages_url":"https://api.github.com/repos/CIP-NL/kermit/languages","stargazers_url":"https://api.github.com/repos/CIP-NL/kermit/stargazers","contributors_url":"https://api.github.com/repos/CIP-NL/kermit/contributors","subscribers_url":"https://api.github.com/repos/CIP-NL/kermit/subscribers","subscription_url":"https://api.github.com/repos/CIP-NL/kermit/subscription","commits_url":"https://api.github.com/repos/CIP-NL/kermit/commits{/sha}","git_commits_url":"https://api.github.com/repos/CIP-NL/kermit/git/commits{/sha}","comments_url":"https://api.github.com/repos/CIP-NL/kermit/comments{/number}","issue_comment_url":"https://api.github.com/repos/CIP-NL/kermit/issues/comments{/number}","contents_url":"https://api.github.com/repos/CIP-NL/kermit/contents/{+path}","compare_url":"https://api.github.com/repos/CIP-NL/kermit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CIP-NL/kermit/merges","archive_url":"https://api.github.com/repos/CIP-NL/kermit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CIP-NL/kermit/downloads","issues_url":"https://api.github.com/repos/CIP-NL/kermit/issues{/number}","pulls_url":"https://api.github.com/repos/CIP-NL/kermit/pulls{/number}","milestones_url":"https://api.github.com/repos/CIP-NL/kermit/milestones{/number}","notifications_url":"https://api.github.com/repos/CIP-NL/kermit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CIP-NL/kermit/labels{/name}","releases_url":"https://api.github.com/repos/CIP-NL/kermit/releases{/id}","deployments_url":"https://api.github.com/repos/CIP-NL/kermit/deployments","created_at":"2018-07-11T11:02:21Z","updated_at":"2018-08-21T11:19:08Z","pushed_at":"2018-08-22T08:30:54Z","git_url":"git://github.com/CIP-NL/kermit.git","ssh_url":"git@github.com:CIP-NL/kermit.git","clone_url":"https://github.com/CIP-NL/kermit.git","svn_url":"https://github.com/CIP-NL/kermit","homepage":"","size":3654,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CIP-NL/kermit/pulls/13"},"html":{"href":"https://github.com/CIP-NL/kermit/pull/13"},"issue":{"href":"https://api.github.com/repos/CIP-NL/kermit/issues/13"},"comments":{"href":"https://api.github.com/repos/CIP-NL/kermit/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/CIP-NL/kermit/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/CIP-NL/kermit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CIP-NL/kermit/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/CIP-NL/kermit/statuses/da9d3aab4589623bea4703c4966f29a872acfc9f"}},"author_association":"NONE"}}
{"actor":{"display_login":"YoctoByte"}}