{"action":"created","comment":{"url":"https://api.github.com/repos/nearprotocol/nearcore/pulls/comments/244241546","pull_request_review_id":188195296,"id":244241546,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDI0MTU0Ng==","diff_hunk":"@@ -0,0 +1,45 @@\n+\n+/**\n+ * Creates a new account with a random new key.\n+ */\n+exports.createRandomAccount = async function() {\n+    // TODO: implement\n+};\n+\n+/**\n+ * Retrieves account data by plain-text account id. \n+ */\n+exports.viewAccount = async account_id => {\n+    return await viewAccount(account_id);\n+};\n+\n+// TODO: this is to sanity check that tests are working. Remove soon.\n+exports.returnOne = function() {\n+    return 1;\n+}\n+\n+// TODO: move impl to a diff file.\n+\n+const superagent = require('superagent');\n+\n+\n+const viewAccount = async account_id => {\n+    const viewAccountResponse = await request('view_account', {\n+        account_id: account_id,\n+    });\n+    return viewAccountResponse;\n+}\n+\n+const request = async (methodName, params) => {\n+    try {\n+        // TODO: make this configurable and testable\n+        const response = await superagent\n+            .post(`http://localhost:3030/${methodName}`)","path":"nearlib/account.js","position":37,"original_position":37,"commit_id":"383ade889886be538abb280c020df2cfa42f9ebd","original_commit_id":"4a94c99d559cd469834e1dfa65acb7c7d0268bbe","user":{"login":"vgrichina","id":126710,"node_id":"MDQ6VXNlcjEyNjcxMA==","avatar_url":"https://avatars3.githubusercontent.com/u/126710?v=4","gravatar_id":"","url":"https://api.github.com/users/vgrichina","html_url":"https://github.com/vgrichina","followers_url":"https://api.github.com/users/vgrichina/followers","following_url":"https://api.github.com/users/vgrichina/following{/other_user}","gists_url":"https://api.github.com/users/vgrichina/gists{/gist_id}","starred_url":"https://api.github.com/users/vgrichina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgrichina/subscriptions","organizations_url":"https://api.github.com/users/vgrichina/orgs","repos_url":"https://api.github.com/users/vgrichina/repos","events_url":"https://api.github.com/users/vgrichina/events{/privacy}","received_events_url":"https://api.github.com/users/vgrichina/received_events","type":"User","site_admin":false},"body":"Just realized `nearcore` requires all TODOs to have linked issues.","created_at":"2018-12-27T23:44:17Z","updated_at":"2018-12-27T23:44:17Z","html_url":"https://github.com/nearprotocol/nearcore/pull/317#discussion_r244241546","pull_request_url":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nearprotocol/nearcore/pulls/comments/244241546"},"html":{"href":"https://github.com/nearprotocol/nearcore/pull/317#discussion_r244241546"},"pull_request":{"href":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317"}},"in_reply_to_id":244234700},"pull_request":{"url":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317","id":241219087,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMjE5MDg3","html_url":"https://github.com/nearprotocol/nearcore/pull/317","diff_url":"https://github.com/nearprotocol/nearcore/pull/317.diff","patch_url":"https://github.com/nearprotocol/nearcore/pull/317.patch","issue_url":"https://api.github.com/repos/nearprotocol/nearcore/issues/317","number":317,"state":"open","locked":false,"title":"[nearlib] add viewAccount function + test for it ","user":{"login":"janedegtiareva","id":1320689,"node_id":"MDQ6VXNlcjEzMjA2ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/1320689?v=4","gravatar_id":"","url":"https://api.github.com/users/janedegtiareva","html_url":"https://github.com/janedegtiareva","followers_url":"https://api.github.com/users/janedegtiareva/followers","following_url":"https://api.github.com/users/janedegtiareva/following{/other_user}","gists_url":"https://api.github.com/users/janedegtiareva/gists{/gist_id}","starred_url":"https://api.github.com/users/janedegtiareva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janedegtiareva/subscriptions","organizations_url":"https://api.github.com/users/janedegtiareva/orgs","repos_url":"https://api.github.com/users/janedegtiareva/repos","events_url":"https://api.github.com/users/janedegtiareva/events{/privacy}","received_events_url":"https://api.github.com/users/janedegtiareva/received_events","type":"User","site_admin":false},"body":"Currently, running the test requires starting node manually.  \r\nFollow-up change will address starting node + put this on ci","created_at":"2018-12-27T20:28:49Z","updated_at":"2018-12-27T23:44:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"232ef0b5aa153ea43d432d0544635a3a5e7f951d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ilblackdragon","id":175486,"node_id":"MDQ6VXNlcjE3NTQ4Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/175486?v=4","gravatar_id":"","url":"https://api.github.com/users/ilblackdragon","html_url":"https://github.com/ilblackdragon","followers_url":"https://api.github.com/users/ilblackdragon/followers","following_url":"https://api.github.com/users/ilblackdragon/following{/other_user}","gists_url":"https://api.github.com/users/ilblackdragon/gists{/gist_id}","starred_url":"https://api.github.com/users/ilblackdragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilblackdragon/subscriptions","organizations_url":"https://api.github.com/users/ilblackdragon/orgs","repos_url":"https://api.github.com/users/ilblackdragon/repos","events_url":"https://api.github.com/users/ilblackdragon/events{/privacy}","received_events_url":"https://api.github.com/users/ilblackdragon/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317/commits","review_comments_url":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317/comments","review_comment_url":"https://api.github.com/repos/nearprotocol/nearcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nearprotocol/nearcore/issues/317/comments","statuses_url":"https://api.github.com/repos/nearprotocol/nearcore/statuses/383ade889886be538abb280c020df2cfa42f9ebd","head":{"label":"nearprotocol:j-nearlib2","ref":"j-nearlib2","sha":"383ade889886be538abb280c020df2cfa42f9ebd","user":{"login":"nearprotocol","id":42587064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTg3MDY0","avatar_url":"https://avatars2.githubusercontent.com/u/42587064?v=4","gravatar_id":"","url":"https://api.github.com/users/nearprotocol","html_url":"https://github.com/nearprotocol","followers_url":"https://api.github.com/users/nearprotocol/followers","following_url":"https://api.github.com/users/nearprotocol/following{/other_user}","gists_url":"https://api.github.com/users/nearprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/nearprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nearprotocol/subscriptions","organizations_url":"https://api.github.com/users/nearprotocol/orgs","repos_url":"https://api.github.com/users/nearprotocol/repos","events_url":"https://api.github.com/users/nearprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/nearprotocol/received_events","type":"Organization","site_admin":false},"repo":{"id":151331938,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEzMzE5Mzg=","name":"nearcore","full_name":"nearprotocol/nearcore","private":false,"owner":{"login":"nearprotocol","id":42587064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTg3MDY0","avatar_url":"https://avatars2.githubusercontent.com/u/42587064?v=4","gravatar_id":"","url":"https://api.github.com/users/nearprotocol","html_url":"https://github.com/nearprotocol","followers_url":"https://api.github.com/users/nearprotocol/followers","following_url":"https://api.github.com/users/nearprotocol/following{/other_user}","gists_url":"https://api.github.com/users/nearprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/nearprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nearprotocol/subscriptions","organizations_url":"https://api.github.com/users/nearprotocol/orgs","repos_url":"https://api.github.com/users/nearprotocol/repos","events_url":"https://api.github.com/users/nearprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/nearprotocol/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nearprotocol/nearcore","description":"Official NEAR Protocol client.","fork":false,"url":"https://api.github.com/repos/nearprotocol/nearcore","forks_url":"https://api.github.com/repos/nearprotocol/nearcore/forks","keys_url":"https://api.github.com/repos/nearprotocol/nearcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nearprotocol/nearcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nearprotocol/nearcore/teams","hooks_url":"https://api.github.com/repos/nearprotocol/nearcore/hooks","issue_events_url":"https://api.github.com/repos/nearprotocol/nearcore/issues/events{/number}","events_url":"https://api.github.com/repos/nearprotocol/nearcore/events","assignees_url":"https://api.github.com/repos/nearprotocol/nearcore/assignees{/user}","branches_url":"https://api.github.com/repos/nearprotocol/nearcore/branches{/branch}","tags_url":"https://api.github.com/repos/nearprotocol/nearcore/tags","blobs_url":"https://api.github.com/repos/nearprotocol/nearcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nearprotocol/nearcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nearprotocol/nearcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/nearprotocol/nearcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nearprotocol/nearcore/statuses/{sha}","languages_url":"https://api.github.com/repos/nearprotocol/nearcore/languages","stargazers_url":"https://api.github.com/repos/nearprotocol/nearcore/stargazers","contributors_url":"https://api.github.com/repos/nearprotocol/nearcore/contributors","subscribers_url":"https://api.github.com/repos/nearprotocol/nearcore/subscribers","subscription_url":"https://api.github.com/repos/nearprotocol/nearcore/subscription","commits_url":"https://api.github.com/repos/nearprotocol/nearcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/nearprotocol/nearcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/nearprotocol/nearcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/nearprotocol/nearcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/nearprotocol/nearcore/contents/{+path}","compare_url":"https://api.github.com/repos/nearprotocol/nearcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nearprotocol/nearcore/merges","archive_url":"https://api.github.com/repos/nearprotocol/nearcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nearprotocol/nearcore/downloads","issues_url":"https://api.github.com/repos/nearprotocol/nearcore/issues{/number}","pulls_url":"https://api.github.com/repos/nearprotocol/nearcore/pulls{/number}","milestones_url":"https://api.github.com/repos/nearprotocol/nearcore/milestones{/number}","notifications_url":"https://api.github.com/repos/nearprotocol/nearcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nearprotocol/nearcore/labels{/name}","releases_url":"https://api.github.com/repos/nearprotocol/nearcore/releases{/id}","deployments_url":"https://api.github.com/repos/nearprotocol/nearcore/deployments","created_at":"2018-10-02T22:30:39Z","updated_at":"2018-12-27T20:40:39Z","pushed_at":"2018-12-27T23:29:06Z","git_url":"git://github.com/nearprotocol/nearcore.git","ssh_url":"git@github.com:nearprotocol/nearcore.git","clone_url":"https://github.com/nearprotocol/nearcore.git","svn_url":"https://github.com/nearprotocol/nearcore","homepage":"http://nearprotocol.com","size":2395,"stargazers_count":61,"watchers_count":61,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":6,"open_issues":83,"watchers":61,"default_branch":"master"}},"base":{"label":"nearprotocol:master","ref":"master","sha":"7d439135f3173bcea64142b10ad921c3dbd739a3","user":{"login":"nearprotocol","id":42587064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTg3MDY0","avatar_url":"https://avatars2.githubusercontent.com/u/42587064?v=4","gravatar_id":"","url":"https://api.github.com/users/nearprotocol","html_url":"https://github.com/nearprotocol","followers_url":"https://api.github.com/users/nearprotocol/followers","following_url":"https://api.github.com/users/nearprotocol/following{/other_user}","gists_url":"https://api.github.com/users/nearprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/nearprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nearprotocol/subscriptions","organizations_url":"https://api.github.com/users/nearprotocol/orgs","repos_url":"https://api.github.com/users/nearprotocol/repos","events_url":"https://api.github.com/users/nearprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/nearprotocol/received_events","type":"Organization","site_admin":false},"repo":{"id":151331938,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEzMzE5Mzg=","name":"nearcore","full_name":"nearprotocol/nearcore","private":false,"owner":{"login":"nearprotocol","id":42587064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTg3MDY0","avatar_url":"https://avatars2.githubusercontent.com/u/42587064?v=4","gravatar_id":"","url":"https://api.github.com/users/nearprotocol","html_url":"https://github.com/nearprotocol","followers_url":"https://api.github.com/users/nearprotocol/followers","following_url":"https://api.github.com/users/nearprotocol/following{/other_user}","gists_url":"https://api.github.com/users/nearprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/nearprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nearprotocol/subscriptions","organizations_url":"https://api.github.com/users/nearprotocol/orgs","repos_url":"https://api.github.com/users/nearprotocol/repos","events_url":"https://api.github.com/users/nearprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/nearprotocol/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nearprotocol/nearcore","description":"Official NEAR Protocol client.","fork":false,"url":"https://api.github.com/repos/nearprotocol/nearcore","forks_url":"https://api.github.com/repos/nearprotocol/nearcore/forks","keys_url":"https://api.github.com/repos/nearprotocol/nearcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nearprotocol/nearcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nearprotocol/nearcore/teams","hooks_url":"https://api.github.com/repos/nearprotocol/nearcore/hooks","issue_events_url":"https://api.github.com/repos/nearprotocol/nearcore/issues/events{/number}","events_url":"https://api.github.com/repos/nearprotocol/nearcore/events","assignees_url":"https://api.github.com/repos/nearprotocol/nearcore/assignees{/user}","branches_url":"https://api.github.com/repos/nearprotocol/nearcore/branches{/branch}","tags_url":"https://api.github.com/repos/nearprotocol/nearcore/tags","blobs_url":"https://api.github.com/repos/nearprotocol/nearcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nearprotocol/nearcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nearprotocol/nearcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/nearprotocol/nearcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nearprotocol/nearcore/statuses/{sha}","languages_url":"https://api.github.com/repos/nearprotocol/nearcore/languages","stargazers_url":"https://api.github.com/repos/nearprotocol/nearcore/stargazers","contributors_url":"https://api.github.com/repos/nearprotocol/nearcore/contributors","subscribers_url":"https://api.github.com/repos/nearprotocol/nearcore/subscribers","subscription_url":"https://api.github.com/repos/nearprotocol/nearcore/subscription","commits_url":"https://api.github.com/repos/nearprotocol/nearcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/nearprotocol/nearcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/nearprotocol/nearcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/nearprotocol/nearcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/nearprotocol/nearcore/contents/{+path}","compare_url":"https://api.github.com/repos/nearprotocol/nearcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nearprotocol/nearcore/merges","archive_url":"https://api.github.com/repos/nearprotocol/nearcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nearprotocol/nearcore/downloads","issues_url":"https://api.github.com/repos/nearprotocol/nearcore/issues{/number}","pulls_url":"https://api.github.com/repos/nearprotocol/nearcore/pulls{/number}","milestones_url":"https://api.github.com/repos/nearprotocol/nearcore/milestones{/number}","notifications_url":"https://api.github.com/repos/nearprotocol/nearcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nearprotocol/nearcore/labels{/name}","releases_url":"https://api.github.com/repos/nearprotocol/nearcore/releases{/id}","deployments_url":"https://api.github.com/repos/nearprotocol/nearcore/deployments","created_at":"2018-10-02T22:30:39Z","updated_at":"2018-12-27T20:40:39Z","pushed_at":"2018-12-27T23:29:06Z","git_url":"git://github.com/nearprotocol/nearcore.git","ssh_url":"git@github.com:nearprotocol/nearcore.git","clone_url":"https://github.com/nearprotocol/nearcore.git","svn_url":"https://github.com/nearprotocol/nearcore","homepage":"http://nearprotocol.com","size":2395,"stargazers_count":61,"watchers_count":61,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":6,"open_issues":83,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317"},"html":{"href":"https://github.com/nearprotocol/nearcore/pull/317"},"issue":{"href":"https://api.github.com/repos/nearprotocol/nearcore/issues/317"},"comments":{"href":"https://api.github.com/repos/nearprotocol/nearcore/issues/317/comments"},"review_comments":{"href":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317/comments"},"review_comment":{"href":"https://api.github.com/repos/nearprotocol/nearcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nearprotocol/nearcore/pulls/317/commits"},"statuses":{"href":"https://api.github.com/repos/nearprotocol/nearcore/statuses/383ade889886be538abb280c020df2cfa42f9ebd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"vgrichina"}}