{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/comments/34994657","id":34994657,"diff_hunk":"@@ -504,6 +540,30 @@ var GiantSwarm = (function () {\n     },\n \n     /**\n+     * Get logs for an instance\n+     *\n+     * @param {String} [organizationName] Name of the organization\n+     * @param {Integer} [numLines] Number of lines to return. If null, 10 lines will be returned.\n+     * @param {Function} [successCallback] Callback receiving the statistics object as argument\n+     * @param {Function} [errorCallback] Optional callback to be called in case of an error, error object as argument\n+     */\n+    instanceLogs: function(organizationName, instanceId, numLines, successCallback, errorCallback) {\n+      this._validateStringParameters({\n+        organizationName: organizationName,\n+        instanceId: instanceId\n+      });\n+      if (numLines !== null && typeof numLines !== 'number') {\n+        throw new this.UserException(\"Parameter 'numLines' must be of type Number\");\n+      }\n+      var params = {};\n+      if (numLines !== null) {\n+        params.t = numLines;\n+      }\n+      var uri = '/v1/org/' + organizationName + '/instance/' + instanceId + '/logs';","path":"lib/client.js","position":null,"original_position":98,"commit_id":"f6a38bfff0bf81754c48c58cc148815832e20c58","original_commit_id":"8439a4d60f3a357ef8e8b56236dd6e9e46ed1958","user":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2015-07-20T13:38:15Z","updated_at":"2015-07-20T13:38:15Z","html_url":"https://github.com/giantswarm/giantswarm-js-client/pull/8#discussion_r34994657","pull_request_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/comments/34994657"},"html":{"href":"https://github.com/giantswarm/giantswarm-js-client/pull/8#discussion_r34994657"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8","id":40230478,"html_url":"https://github.com/giantswarm/giantswarm-js-client/pull/8","diff_url":"https://github.com/giantswarm/giantswarm-js-client/pull/8.diff","patch_url":"https://github.com/giantswarm/giantswarm-js-client/pull/8.patch","issue_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/8","number":8,"state":"open","locked":false,"title":"Instance logs","user":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"body":"The purpose of this change is to make instance logs accessible.\r\n\r\nThe API method for logs doesn't return JSON, so it's a bit different form most others. This requires a new internal `_simple_text_get_request` method.\r\n\r\nLogs can be accessed through the `instanceLogs()` method.","created_at":"2015-07-17T13:25:01Z","updated_at":"2015-07-20T13:38:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fd5ddc9427d8f42a5fdb2e6a12dfcb2ea3178de","assignee":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8/commits","review_comments_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8/comments","review_comment_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/8/comments","statuses_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/statuses/f6a38bfff0bf81754c48c58cc148815832e20c58","head":{"label":"giantswarm:instance-logs","ref":"instance-logs","sha":"f6a38bfff0bf81754c48c58cc148815832e20c58","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":37132077,"name":"giantswarm-js-client","full_name":"giantswarm/giantswarm-js-client","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/giantswarm-js-client","description":"JavaScript Client for the Giant Swarm API","fork":false,"url":"https://api.github.com/repos/giantswarm/giantswarm-js-client","forks_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/forks","keys_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/teams","hooks_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/events","assignees_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/tags","blobs_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/languages","stargazers_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/subscription","commits_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/merges","archive_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/downloads","issues_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/releases{/id}","created_at":"2015-06-09T12:58:00Z","updated_at":"2015-07-09T09:12:03Z","pushed_at":"2015-07-20T13:38:10Z","git_url":"git://github.com/giantswarm/giantswarm-js-client.git","ssh_url":"git@github.com:giantswarm/giantswarm-js-client.git","clone_url":"https://github.com/giantswarm/giantswarm-js-client.git","svn_url":"https://github.com/giantswarm/giantswarm-js-client","homepage":"","size":220,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"eba532edfed1ad72e64b7b88976f883c756d82d5","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":37132077,"name":"giantswarm-js-client","full_name":"giantswarm/giantswarm-js-client","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/giantswarm-js-client","description":"JavaScript Client for the Giant Swarm API","fork":false,"url":"https://api.github.com/repos/giantswarm/giantswarm-js-client","forks_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/forks","keys_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/teams","hooks_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/events","assignees_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/tags","blobs_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/languages","stargazers_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/subscription","commits_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/merges","archive_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/downloads","issues_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/giantswarm-js-client/releases{/id}","created_at":"2015-06-09T12:58:00Z","updated_at":"2015-07-09T09:12:03Z","pushed_at":"2015-07-20T13:38:10Z","git_url":"git://github.com/giantswarm/giantswarm-js-client.git","ssh_url":"git@github.com:giantswarm/giantswarm-js-client.git","clone_url":"https://github.com/giantswarm/giantswarm-js-client.git","svn_url":"https://github.com/giantswarm/giantswarm-js-client","homepage":"","size":220,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8"},"html":{"href":"https://github.com/giantswarm/giantswarm-js-client/pull/8"},"issue":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/8"},"comments":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/giantswarm-js-client/statuses/f6a38bfff0bf81754c48c58cc148815832e20c58"}}}}