GitHub PullRequestReviewCommentEvent at 2014-11-21 22:10:42
Repository: acs-node-sdk
Actor: baobeimm
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/comments/20745840","id":20745840,"diff_hunk":"@@ -0,0 +1,160 @@\n+var _ = require('lodash'),\n+\trequest = require('request'),\n+\tfs = require('fs'),\n+\tu = require('./util'),\n+\tACSError = require('./acsError'),\n+\tmessages = require('./messages');\n+\n+const fileUploadParams = ['file', 'photo'],\n+\texcludedParameters = ['key', 'pretty_json', 'req', 'res'];\n+\n+var acsRequest = function(apiEntryPoint, appOptions, httpMethod, restOptions, callback) {\n+\tvar reqBody = _.omit(restOptions, excludedParameters);\n+\tvar j = request.jar();\n+\tvar cookie = null;\n+\tif (restOptions.req) {\n+\t\tif (restOptions.req.headers && restOptions.req.headers.cookie) {\n+\t\t\tcookie = request.cookie(restOptions.req.headers.cookie);\n+\t\t}\n+\t\t// Merge req.query and req.body into parameter JSON\n+\t\tif (restOptions.req.query) {\n+\t\t\treqBody = _.defaults(_.clone(restOptions.req.query), reqBody);\n+\t\t}\n+\t\tif (restOptions.req.body) {\n+\t\t\treqBody = _.defaults(_.clone(restOptions.req.body), reqBody);\n+\t\t}\n+\t}\n+\tif (restOptions.cookieString || appOptions.cookieString) {\n+\t\tcookie = request.cookie(restOptions.cookieString || appOptions.cookieString);\n+\t}\n+\tif (cookie) {\n+\t\tj.setCookie(cookie, apiEntryPoint);\n+\t}\n+\tif (appOptions.prettyJson) {\n+\t\trestOptions.pretty_json = true;","path":"lib/rest.js","position":34,"original_position":34,"commit_id":"e72f474fd29c219dfcdea264b31ca2d5279934ef","original_commit_id":"e72f474fd29c219dfcdea264b31ca2d5279934ef","user":{"login":"baobeimm","id":515622,"avatar_url":"https://avatars.githubusercontent.com/u/515622?v=3","gravatar_id":"","url":"https://api.github.com/users/baobeimm","html_url":"https://github.com/baobeimm","followers_url":"https://api.github.com/users/baobeimm/followers","following_url":"https://api.github.com/users/baobeimm/following{/other_user}","gists_url":"https://api.github.com/users/baobeimm/gists{/gist_id}","starred_url":"https://api.github.com/users/baobeimm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baobeimm/subscriptions","organizations_url":"https://api.github.com/users/baobeimm/orgs","repos_url":"https://api.github.com/users/baobeimm/repos","events_url":"https://api.github.com/users/baobeimm/events{/privacy}","received_events_url":"https://api.github.com/users/baobeimm/received_events","type":"User","site_admin":false},"body":"so why do we have to convert pretty_json to prettyJson? do we have to convert all paramter names from ruby style to java style?","created_at":"2014-11-21T22:10:42Z","updated_at":"2014-11-21T22:10:42Z","html_url":"https://github.com/appcelerator/acs-node-sdk/pull/28#discussion_r20745840","pull_request_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/comments/20745840"},"html":{"href":"https://github.com/appcelerator/acs-node-sdk/pull/28#discussion_r20745840"},"pull_request":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28","id":24351499,"html_url":"https://github.com/appcelerator/acs-node-sdk/pull/28","diff_url":"https://github.com/appcelerator/acs-node-sdk/pull/28.diff","patch_url":"https://github.com/appcelerator/acs-node-sdk/pull/28.patch","issue_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues/28","number":28,"state":"open","locked":false,"title":"[NODEJS-1753] ACS Node SDK Rework Integration","user":{"login":"realpaul","id":797251,"avatar_url":"https://avatars.githubusercontent.com/u/797251?v=3","gravatar_id":"","url":"https://api.github.com/users/realpaul","html_url":"https://github.com/realpaul","followers_url":"https://api.github.com/users/realpaul/followers","following_url":"https://api.github.com/users/realpaul/following{/other_user}","gists_url":"https://api.github.com/users/realpaul/gists{/gist_id}","starred_url":"https://api.github.com/users/realpaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realpaul/subscriptions","organizations_url":"https://api.github.com/users/realpaul/orgs","repos_url":"https://api.github.com/users/realpaul/repos","events_url":"https://api.github.com/users/realpaul/events{/privacy}","received_events_url":"https://api.github.com/users/realpaul/received_events","type":"User","site_admin":false},"body":"## Ticket Information\r\n***JIRA Ticket***\r\nhttps://jira.appcelerator.org/browse/NODEJS-1749\r\nhttps://jira.appcelerator.org/browse/NODEJS-1753\r\n\r\n***Description***\r\nThis PR is about to introduce new ACS Node SDK implementation (acs-node-sdk 1.0.0-beta) redesigned via https://jira.appcelerator.org/browse/NODEJS-1598 and https://wiki.appcelerator.org/display/cls/Redesign+and+rework+of+acs-node-sdk.\r\n\r\nWe redesigned ACS Node SDK to support modern NodeJS features, and fixed existing issues of current ACS Node SDK like cannot support multiple instances. We also make it more flexible to add/update corresponding ACS API easily by using a generic way.\r\nMoreover, we introduced travis and mocha test to make our ACS Node SDK unit-test driven, and avoid most potential code problem by JSHint code check.\r\n\r\nFor further and detailed information, please refer to README.md, examples and test cases within this PR.\r\n\r\n\r\n## Suggested Test Steps\r\n\\- Create an ACS app and get its app key\r\n\\- Git clone this code\r\n\\- $ cd acs-node-sdk; export ACS_APPKEY=YOUR_CREATED_ACS_APP_KEY; npm test","created_at":"2014-11-13T07:58:01Z","updated_at":"2014-11-21T22:10:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88a0963ca4949449e37b876887be438f86c67610","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28/commits","review_comments_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28/comments","review_comment_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/comments/{number}","comments_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues/28/comments","statuses_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/statuses/e72f474fd29c219dfcdea264b31ca2d5279934ef","head":{"label":"realpaul:NODEJS-1753_ReworkIntegration","ref":"NODEJS-1753_ReworkIntegration","sha":"e72f474fd29c219dfcdea264b31ca2d5279934ef","user":{"login":"realpaul","id":797251,"avatar_url":"https://avatars.githubusercontent.com/u/797251?v=3","gravatar_id":"","url":"https://api.github.com/users/realpaul","html_url":"https://github.com/realpaul","followers_url":"https://api.github.com/users/realpaul/followers","following_url":"https://api.github.com/users/realpaul/following{/other_user}","gists_url":"https://api.github.com/users/realpaul/gists{/gist_id}","starred_url":"https://api.github.com/users/realpaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realpaul/subscriptions","organizations_url":"https://api.github.com/users/realpaul/orgs","repos_url":"https://api.github.com/users/realpaul/repos","events_url":"https://api.github.com/users/realpaul/events{/privacy}","received_events_url":"https://api.github.com/users/realpaul/received_events","type":"User","site_admin":false},"repo":{"id":23109443,"name":"acs-node-sdk","full_name":"realpaul/acs-node-sdk","owner":{"login":"realpaul","id":797251,"avatar_url":"https://avatars.githubusercontent.com/u/797251?v=3","gravatar_id":"","url":"https://api.github.com/users/realpaul","html_url":"https://github.com/realpaul","followers_url":"https://api.github.com/users/realpaul/followers","following_url":"https://api.github.com/users/realpaul/following{/other_user}","gists_url":"https://api.github.com/users/realpaul/gists{/gist_id}","starred_url":"https://api.github.com/users/realpaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realpaul/subscriptions","organizations_url":"https://api.github.com/users/realpaul/orgs","repos_url":"https://api.github.com/users/realpaul/repos","events_url":"https://api.github.com/users/realpaul/events{/privacy}","received_events_url":"https://api.github.com/users/realpaul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/realpaul/acs-node-sdk","description":"SDK to use ACS from Node.js applications","fork":true,"url":"https://api.github.com/repos/realpaul/acs-node-sdk","forks_url":"https://api.github.com/repos/realpaul/acs-node-sdk/forks","keys_url":"https://api.github.com/repos/realpaul/acs-node-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realpaul/acs-node-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realpaul/acs-node-sdk/teams","hooks_url":"https://api.github.com/repos/realpaul/acs-node-sdk/hooks","issue_events_url":"https://api.github.com/repos/realpaul/acs-node-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/realpaul/acs-node-sdk/events","assignees_url":"https://api.github.com/repos/realpaul/acs-node-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/realpaul/acs-node-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/realpaul/acs-node-sdk/tags","blobs_url":"https://api.github.com/repos/realpaul/acs-node-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realpaul/acs-node-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realpaul/acs-node-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/realpaul/acs-node-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realpaul/acs-node-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/realpaul/acs-node-sdk/languages","stargazers_url":"https://api.github.com/repos/realpaul/acs-node-sdk/stargazers","contributors_url":"https://api.github.com/repos/realpaul/acs-node-sdk/contributors","subscribers_url":"https://api.github.com/repos/realpaul/acs-node-sdk/subscribers","subscription_url":"https://api.github.com/repos/realpaul/acs-node-sdk/subscription","commits_url":"https://api.github.com/repos/realpaul/acs-node-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/realpaul/acs-node-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/realpaul/acs-node-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/realpaul/acs-node-sdk/issues/comments/{number}","contents_url":"https://api.github.com/repos/realpaul/acs-node-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/realpaul/acs-node-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realpaul/acs-node-sdk/merges","archive_url":"https://api.github.com/repos/realpaul/acs-node-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realpaul/acs-node-sdk/downloads","issues_url":"https://api.github.com/repos/realpaul/acs-node-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/realpaul/acs-node-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/realpaul/acs-node-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/realpaul/acs-node-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realpaul/acs-node-sdk/labels{/name}","releases_url":"https://api.github.com/repos/realpaul/acs-node-sdk/releases{/id}","created_at":"2014-08-19T12:37:26Z","updated_at":"2014-07-28T12:53:07Z","pushed_at":"2014-11-18T10:02:00Z","git_url":"git://github.com/realpaul/acs-node-sdk.git","ssh_url":"git@github.com:realpaul/acs-node-sdk.git","clone_url":"https://github.com/realpaul/acs-node-sdk.git","svn_url":"https://github.com/realpaul/acs-node-sdk","homepage":"","size":860,"stargazers_count":0,"watchers_count":0,"language":null,"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":"appcelerator:cleanrepo","ref":"cleanrepo","sha":"527b8021015ed0f0607e7ce1b19ef2fc5bc6ebd1","user":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"repo":{"id":5280961,"name":"acs-node-sdk","full_name":"appcelerator/acs-node-sdk","owner":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appcelerator/acs-node-sdk","description":"SDK to use ACS from Node.js applications","fork":false,"url":"https://api.github.com/repos/appcelerator/acs-node-sdk","forks_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/forks","keys_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/teams","hooks_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/hooks","issue_events_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/events","assignees_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/tags","blobs_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/languages","stargazers_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/stargazers","contributors_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/contributors","subscribers_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/subscribers","subscription_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/subscription","commits_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues/comments/{number}","contents_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/merges","archive_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/downloads","issues_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/labels{/name}","releases_url":"https://api.github.com/repos/appcelerator/acs-node-sdk/releases{/id}","created_at":"2012-08-03T03:46:55Z","updated_at":"2014-11-07T00:25:42Z","pushed_at":"2014-11-13T07:41:01Z","git_url":"git://github.com/appcelerator/acs-node-sdk.git","ssh_url":"git@github.com:appcelerator/acs-node-sdk.git","clone_url":"https://github.com/appcelerator/acs-node-sdk.git","svn_url":"https://github.com/appcelerator/acs-node-sdk","homepage":"","size":877,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":6,"forks":17,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28"},"html":{"href":"https://github.com/appcelerator/acs-node-sdk/pull/28"},"issue":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues/28"},"comments":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/appcelerator/acs-node-sdk/statuses/e72f474fd29c219dfcdea264b31ca2d5279934ef"}}}}