{"action":"created","comment":{"url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/comments/25989685","id":25989685,"diff_hunk":"@@ -62,13 +62,25 @@ exports.getResource = function (stack, resource, callback) {\n  * @param {function}          callback      f(err, resources) where stacks is an array of Resource\n  * @returns {*}\n  */\n-exports.getResources = function (stack, callback) {\n+exports.getResources = function (stack, options, callback) {\n   var self = this;\n \n+  if (typeof options === 'function') {\n+    callback = options;\n+    options = {};\n+  }\n+\n   function getResources(stack) {\n-    return self._request({\n+    var requestOptions = {\n       path: urlJoin('/stacks', stack.name, stack.id, 'resources')\n-    }, function (err, body) {\n+    };\n+\n+    requestOptions.qs = [];\n+    if (options.nestedDepth) {\n+      requestOptions.qs['nested_depth'] = options.nestedDepth;","path":"lib/pkgcloud/openstack/orchestration/client/resources.js","position":22,"original_position":22,"commit_id":"ebb931f9b9f585e8aea3561dfe01ba920662801b","original_commit_id":"ebb931f9b9f585e8aea3561dfe01ba920662801b","user":{"login":"kenperkins","id":730664,"avatar_url":"https://avatars.githubusercontent.com/u/730664?v=3","gravatar_id":"","url":"https://api.github.com/users/kenperkins","html_url":"https://github.com/kenperkins","followers_url":"https://api.github.com/users/kenperkins/followers","following_url":"https://api.github.com/users/kenperkins/following{/other_user}","gists_url":"https://api.github.com/users/kenperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/kenperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenperkins/subscriptions","organizations_url":"https://api.github.com/users/kenperkins/orgs","repos_url":"https://api.github.com/users/kenperkins/repos","events_url":"https://api.github.com/users/kenperkins/events{/privacy}","received_events_url":"https://api.github.com/users/kenperkins/received_events","type":"User","site_admin":false},"body":"Should we do a `typeof` check here? We're not very consistent on that.","created_at":"2015-03-07T00:31:29Z","updated_at":"2015-03-07T00:31:29Z","html_url":"https://github.com/pkgcloud/pkgcloud/pull/411#discussion_r25989685","pull_request_url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411","_links":{"self":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/comments/25989685"},"html":{"href":"https://github.com/pkgcloud/pkgcloud/pull/411#discussion_r25989685"},"pull_request":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411"}}},"pull_request":{"url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411","id":30691894,"html_url":"https://github.com/pkgcloud/pkgcloud/pull/411","diff_url":"https://github.com/pkgcloud/pkgcloud/pull/411.diff","patch_url":"https://github.com/pkgcloud/pkgcloud/pull/411.patch","issue_url":"https://api.github.com/repos/pkgcloud/pkgcloud/issues/411","number":411,"state":"open","locked":false,"title":"Adding support for nestedDepth option to getResources method.","user":{"login":"ycombinator","id":51061,"avatar_url":"https://avatars.githubusercontent.com/u/51061?v=3","gravatar_id":"","url":"https://api.github.com/users/ycombinator","html_url":"https://github.com/ycombinator","followers_url":"https://api.github.com/users/ycombinator/followers","following_url":"https://api.github.com/users/ycombinator/following{/other_user}","gists_url":"https://api.github.com/users/ycombinator/gists{/gist_id}","starred_url":"https://api.github.com/users/ycombinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycombinator/subscriptions","organizations_url":"https://api.github.com/users/ycombinator/orgs","repos_url":"https://api.github.com/users/ycombinator/repos","events_url":"https://api.github.com/users/ycombinator/events{/privacy}","received_events_url":"https://api.github.com/users/ycombinator/received_events","type":"User","site_admin":false},"body":"Fixes #410.","created_at":"2015-03-07T00:25:33Z","updated_at":"2015-03-07T00:31:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad786f1f46a47663f4dad731a4f2c770e6393948","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411/commits","review_comments_url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411/comments","review_comment_url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pkgcloud/pkgcloud/issues/411/comments","statuses_url":"https://api.github.com/repos/pkgcloud/pkgcloud/statuses/ebb931f9b9f585e8aea3561dfe01ba920662801b","head":{"label":"ycombinator:gh-410","ref":"gh-410","sha":"ebb931f9b9f585e8aea3561dfe01ba920662801b","user":{"login":"ycombinator","id":51061,"avatar_url":"https://avatars.githubusercontent.com/u/51061?v=3","gravatar_id":"","url":"https://api.github.com/users/ycombinator","html_url":"https://github.com/ycombinator","followers_url":"https://api.github.com/users/ycombinator/followers","following_url":"https://api.github.com/users/ycombinator/following{/other_user}","gists_url":"https://api.github.com/users/ycombinator/gists{/gist_id}","starred_url":"https://api.github.com/users/ycombinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycombinator/subscriptions","organizations_url":"https://api.github.com/users/ycombinator/orgs","repos_url":"https://api.github.com/users/ycombinator/repos","events_url":"https://api.github.com/users/ycombinator/events{/privacy}","received_events_url":"https://api.github.com/users/ycombinator/received_events","type":"User","site_admin":false},"repo":{"id":26774561,"name":"pkgcloud","full_name":"ycombinator/pkgcloud","owner":{"login":"ycombinator","id":51061,"avatar_url":"https://avatars.githubusercontent.com/u/51061?v=3","gravatar_id":"","url":"https://api.github.com/users/ycombinator","html_url":"https://github.com/ycombinator","followers_url":"https://api.github.com/users/ycombinator/followers","following_url":"https://api.github.com/users/ycombinator/following{/other_user}","gists_url":"https://api.github.com/users/ycombinator/gists{/gist_id}","starred_url":"https://api.github.com/users/ycombinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycombinator/subscriptions","organizations_url":"https://api.github.com/users/ycombinator/orgs","repos_url":"https://api.github.com/users/ycombinator/repos","events_url":"https://api.github.com/users/ycombinator/events{/privacy}","received_events_url":"https://api.github.com/users/ycombinator/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ycombinator/pkgcloud","description":"pkgcloud is a standard library for node.js that abstracts away differences among multiple cloud providers.","fork":true,"url":"https://api.github.com/repos/ycombinator/pkgcloud","forks_url":"https://api.github.com/repos/ycombinator/pkgcloud/forks","keys_url":"https://api.github.com/repos/ycombinator/pkgcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ycombinator/pkgcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ycombinator/pkgcloud/teams","hooks_url":"https://api.github.com/repos/ycombinator/pkgcloud/hooks","issue_events_url":"https://api.github.com/repos/ycombinator/pkgcloud/issues/events{/number}","events_url":"https://api.github.com/repos/ycombinator/pkgcloud/events","assignees_url":"https://api.github.com/repos/ycombinator/pkgcloud/assignees{/user}","branches_url":"https://api.github.com/repos/ycombinator/pkgcloud/branches{/branch}","tags_url":"https://api.github.com/repos/ycombinator/pkgcloud/tags","blobs_url":"https://api.github.com/repos/ycombinator/pkgcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ycombinator/pkgcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ycombinator/pkgcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/ycombinator/pkgcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ycombinator/pkgcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/ycombinator/pkgcloud/languages","stargazers_url":"https://api.github.com/repos/ycombinator/pkgcloud/stargazers","contributors_url":"https://api.github.com/repos/ycombinator/pkgcloud/contributors","subscribers_url":"https://api.github.com/repos/ycombinator/pkgcloud/subscribers","subscription_url":"https://api.github.com/repos/ycombinator/pkgcloud/subscription","commits_url":"https://api.github.com/repos/ycombinator/pkgcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/ycombinator/pkgcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/ycombinator/pkgcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/ycombinator/pkgcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/ycombinator/pkgcloud/contents/{+path}","compare_url":"https://api.github.com/repos/ycombinator/pkgcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ycombinator/pkgcloud/merges","archive_url":"https://api.github.com/repos/ycombinator/pkgcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ycombinator/pkgcloud/downloads","issues_url":"https://api.github.com/repos/ycombinator/pkgcloud/issues{/number}","pulls_url":"https://api.github.com/repos/ycombinator/pkgcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/ycombinator/pkgcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/ycombinator/pkgcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ycombinator/pkgcloud/labels{/name}","releases_url":"https://api.github.com/repos/ycombinator/pkgcloud/releases{/id}","created_at":"2014-11-17T19:59:52Z","updated_at":"2014-12-27T14:06:18Z","pushed_at":"2015-03-07T00:28:17Z","git_url":"git://github.com/ycombinator/pkgcloud.git","ssh_url":"git@github.com:ycombinator/pkgcloud.git","clone_url":"https://github.com/ycombinator/pkgcloud.git","svn_url":"https://github.com/ycombinator/pkgcloud","homepage":"http://github.com/pkgcloud/pkgcloud","size":13413,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"pkgcloud:master","ref":"master","sha":"bd377a199d0150e12e91c8294ed60c3930be18e5","user":{"login":"pkgcloud","id":6363726,"avatar_url":"https://avatars.githubusercontent.com/u/6363726?v=3","gravatar_id":"","url":"https://api.github.com/users/pkgcloud","html_url":"https://github.com/pkgcloud","followers_url":"https://api.github.com/users/pkgcloud/followers","following_url":"https://api.github.com/users/pkgcloud/following{/other_user}","gists_url":"https://api.github.com/users/pkgcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/pkgcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkgcloud/subscriptions","organizations_url":"https://api.github.com/users/pkgcloud/orgs","repos_url":"https://api.github.com/users/pkgcloud/repos","events_url":"https://api.github.com/users/pkgcloud/events{/privacy}","received_events_url":"https://api.github.com/users/pkgcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":2898669,"name":"pkgcloud","full_name":"pkgcloud/pkgcloud","owner":{"login":"pkgcloud","id":6363726,"avatar_url":"https://avatars.githubusercontent.com/u/6363726?v=3","gravatar_id":"","url":"https://api.github.com/users/pkgcloud","html_url":"https://github.com/pkgcloud","followers_url":"https://api.github.com/users/pkgcloud/followers","following_url":"https://api.github.com/users/pkgcloud/following{/other_user}","gists_url":"https://api.github.com/users/pkgcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/pkgcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkgcloud/subscriptions","organizations_url":"https://api.github.com/users/pkgcloud/orgs","repos_url":"https://api.github.com/users/pkgcloud/repos","events_url":"https://api.github.com/users/pkgcloud/events{/privacy}","received_events_url":"https://api.github.com/users/pkgcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pkgcloud/pkgcloud","description":"pkgcloud is a standard library for node.js that abstracts away differences among multiple cloud providers.","fork":false,"url":"https://api.github.com/repos/pkgcloud/pkgcloud","forks_url":"https://api.github.com/repos/pkgcloud/pkgcloud/forks","keys_url":"https://api.github.com/repos/pkgcloud/pkgcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkgcloud/pkgcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkgcloud/pkgcloud/teams","hooks_url":"https://api.github.com/repos/pkgcloud/pkgcloud/hooks","issue_events_url":"https://api.github.com/repos/pkgcloud/pkgcloud/issues/events{/number}","events_url":"https://api.github.com/repos/pkgcloud/pkgcloud/events","assignees_url":"https://api.github.com/repos/pkgcloud/pkgcloud/assignees{/user}","branches_url":"https://api.github.com/repos/pkgcloud/pkgcloud/branches{/branch}","tags_url":"https://api.github.com/repos/pkgcloud/pkgcloud/tags","blobs_url":"https://api.github.com/repos/pkgcloud/pkgcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkgcloud/pkgcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkgcloud/pkgcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkgcloud/pkgcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkgcloud/pkgcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/pkgcloud/pkgcloud/languages","stargazers_url":"https://api.github.com/repos/pkgcloud/pkgcloud/stargazers","contributors_url":"https://api.github.com/repos/pkgcloud/pkgcloud/contributors","subscribers_url":"https://api.github.com/repos/pkgcloud/pkgcloud/subscribers","subscription_url":"https://api.github.com/repos/pkgcloud/pkgcloud/subscription","commits_url":"https://api.github.com/repos/pkgcloud/pkgcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkgcloud/pkgcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkgcloud/pkgcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkgcloud/pkgcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkgcloud/pkgcloud/contents/{+path}","compare_url":"https://api.github.com/repos/pkgcloud/pkgcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkgcloud/pkgcloud/merges","archive_url":"https://api.github.com/repos/pkgcloud/pkgcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkgcloud/pkgcloud/downloads","issues_url":"https://api.github.com/repos/pkgcloud/pkgcloud/issues{/number}","pulls_url":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/pkgcloud/pkgcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/pkgcloud/pkgcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkgcloud/pkgcloud/labels{/name}","releases_url":"https://api.github.com/repos/pkgcloud/pkgcloud/releases{/id}","created_at":"2011-12-02T13:39:31Z","updated_at":"2015-03-03T13:37:51Z","pushed_at":"2015-03-02T17:56:47Z","git_url":"git://github.com/pkgcloud/pkgcloud.git","ssh_url":"git@github.com:pkgcloud/pkgcloud.git","clone_url":"https://github.com/pkgcloud/pkgcloud.git","svn_url":"https://github.com/pkgcloud/pkgcloud","homepage":"http://github.com/pkgcloud/pkgcloud","size":15630,"stargazers_count":576,"watchers_count":576,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":159,"mirror_url":null,"open_issues_count":62,"forks":159,"open_issues":62,"watchers":576,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411"},"html":{"href":"https://github.com/pkgcloud/pkgcloud/pull/411"},"issue":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/issues/411"},"comments":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/issues/411/comments"},"review_comments":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411/comments"},"review_comment":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/pulls/411/commits"},"statuses":{"href":"https://api.github.com/repos/pkgcloud/pkgcloud/statuses/ebb931f9b9f585e8aea3561dfe01ba920662801b"}}}}