{"action":"created","comment":{"url":"https://api.github.com/repos/thenakliman/dockyard/pulls/comments/58748664","id":58748664,"diff_hunk":"@@ -0,0 +1,162 @@\n+from dockyard.common import utils, link\n+\n+import json\n+from pecan.core import redirect\n+\n+class Container(object):\n+    def __init__(self):\n+        pass\n+\n+    def list(self, name_id=None, query_params=None):\n+        if name_id:\n+            url = ('/containers/%s/json' % (name_id))\n+        else:\n+            url = '/containers/json'\n+\n+        if query_params:\n+            url = ('%s?%s' % (url, query_params))\n+\n+        return utils.dispatch_get_request(url, 'http').data\n+\n+    def changes(self, name_id=None):\n+        url = (('/containers/%s/changes') % (name_id))\n+        return utils.dispatch_get_request(url, 'http').data\n+\n+    def resize(self, _id, **kwargs):\n+        url = (('/containers/%s/changes') % (_id))\n+\n+        if kwargs:\n+            query = link.make_query_url(kwargs)\n+            url = ('%s?%s' % (url, query ))\n+\n+        return utils.dispatch_get_request(url, 'http').data\n+\n+    def export(self, name_id=None):\n+        url = (('/containers/%s/export') % (name_id))\n+        redirect(utils.get_link(url, 'http'))\n+        # return str(utils.dispatch_get_request(url, 'http').data)\n+\n+    def top(self, name_id=None, query_params=None):\n+        url = (('/containers/%s/top') % (name_id))\n+\n+        if query_params:\n+            url = ('%s?%s' % (url, query_params))\n+\n+        return utils.dispatch_get_request(url, 'http').data\n+\n+    def stats(self, _id):\n+        url = ('/containers/%s/stats' % (_id))\n+        redirect(utils.get_link(url, 'http'))\n+        # return utils.dispatch_get_request(url, 'http')\n+\n+    def archive(self, _id, query_params=None):\n+        url = ('/containers/%s/archive' % (_id))\n+        \n+        if query_params:\n+            url = (\"%s?%s\" % (url, query_params))","path":"dockyard/common/container/container.py","position":56,"original_position":56,"commit_id":"215a1a563a2c6c9eb91c3b5c762f898946a5204b","original_commit_id":"215a1a563a2c6c9eb91c3b5c762f898946a5204b","user":{"login":"karelyatin","id":17830093,"avatar_url":"https://avatars.githubusercontent.com/u/17830093?v=3","gravatar_id":"","url":"https://api.github.com/users/karelyatin","html_url":"https://github.com/karelyatin","followers_url":"https://api.github.com/users/karelyatin/followers","following_url":"https://api.github.com/users/karelyatin/following{/other_user}","gists_url":"https://api.github.com/users/karelyatin/gists{/gist_id}","starred_url":"https://api.github.com/users/karelyatin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelyatin/subscriptions","organizations_url":"https://api.github.com/users/karelyatin/orgs","repos_url":"https://api.github.com/users/karelyatin/repos","events_url":"https://api.github.com/users/karelyatin/events{/privacy}","received_events_url":"https://api.github.com/users/karelyatin/received_events","type":"User","site_admin":false},"body":"pass query_params in method only","created_at":"2016-04-06T17:38:04Z","updated_at":"2016-04-06T17:38:04Z","html_url":"https://github.com/thenakliman/dockyard/pull/5#discussion_r58748664","pull_request_url":"https://api.github.com/repos/thenakliman/dockyard/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/thenakliman/dockyard/pulls/comments/58748664"},"html":{"href":"https://github.com/thenakliman/dockyard/pull/5#discussion_r58748664"},"pull_request":{"href":"https://api.github.com/repos/thenakliman/dockyard/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/thenakliman/dockyard/pulls/5","id":65173826,"html_url":"https://github.com/thenakliman/dockyard/pull/5","diff_url":"https://github.com/thenakliman/dockyard/pull/5.diff","patch_url":"https://github.com/thenakliman/dockyard/pull/5.patch","issue_url":"https://api.github.com/repos/thenakliman/dockyard/issues/5","number":5,"state":"open","locked":false,"title":"Basic Structure","user":{"login":"thenakliman","id":10421430,"avatar_url":"https://avatars.githubusercontent.com/u/10421430?v=3","gravatar_id":"","url":"https://api.github.com/users/thenakliman","html_url":"https://github.com/thenakliman","followers_url":"https://api.github.com/users/thenakliman/followers","following_url":"https://api.github.com/users/thenakliman/following{/other_user}","gists_url":"https://api.github.com/users/thenakliman/gists{/gist_id}","starred_url":"https://api.github.com/users/thenakliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenakliman/subscriptions","organizations_url":"https://api.github.com/users/thenakliman/orgs","repos_url":"https://api.github.com/users/thenakliman/repos","events_url":"https://api.github.com/users/thenakliman/events{/privacy}","received_events_url":"https://api.github.com/users/thenakliman/received_events","type":"User","site_admin":false},"body":"basic request forwarding to docker server from the client","created_at":"2016-04-04T16:28:14Z","updated_at":"2016-04-06T17:38:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c278bbe10069a4fc06982c1cc7662be90164774c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thenakliman/dockyard/pulls/5/commits","review_comments_url":"https://api.github.com/repos/thenakliman/dockyard/pulls/5/comments","review_comment_url":"https://api.github.com/repos/thenakliman/dockyard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thenakliman/dockyard/issues/5/comments","statuses_url":"https://api.github.com/repos/thenakliman/dockyard/statuses/215a1a563a2c6c9eb91c3b5c762f898946a5204b","head":{"label":"thenakliman:feature_scheduler","ref":"feature_scheduler","sha":"215a1a563a2c6c9eb91c3b5c762f898946a5204b","user":{"login":"thenakliman","id":10421430,"avatar_url":"https://avatars.githubusercontent.com/u/10421430?v=3","gravatar_id":"","url":"https://api.github.com/users/thenakliman","html_url":"https://github.com/thenakliman","followers_url":"https://api.github.com/users/thenakliman/followers","following_url":"https://api.github.com/users/thenakliman/following{/other_user}","gists_url":"https://api.github.com/users/thenakliman/gists{/gist_id}","starred_url":"https://api.github.com/users/thenakliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenakliman/subscriptions","organizations_url":"https://api.github.com/users/thenakliman/orgs","repos_url":"https://api.github.com/users/thenakliman/repos","events_url":"https://api.github.com/users/thenakliman/events{/privacy}","received_events_url":"https://api.github.com/users/thenakliman/received_events","type":"User","site_admin":false},"repo":{"id":53862106,"name":"dockyard","full_name":"thenakliman/dockyard","owner":{"login":"thenakliman","id":10421430,"avatar_url":"https://avatars.githubusercontent.com/u/10421430?v=3","gravatar_id":"","url":"https://api.github.com/users/thenakliman","html_url":"https://github.com/thenakliman","followers_url":"https://api.github.com/users/thenakliman/followers","following_url":"https://api.github.com/users/thenakliman/following{/other_user}","gists_url":"https://api.github.com/users/thenakliman/gists{/gist_id}","starred_url":"https://api.github.com/users/thenakliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenakliman/subscriptions","organizations_url":"https://api.github.com/users/thenakliman/orgs","repos_url":"https://api.github.com/users/thenakliman/repos","events_url":"https://api.github.com/users/thenakliman/events{/privacy}","received_events_url":"https://api.github.com/users/thenakliman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thenakliman/dockyard","description":"","fork":false,"url":"https://api.github.com/repos/thenakliman/dockyard","forks_url":"https://api.github.com/repos/thenakliman/dockyard/forks","keys_url":"https://api.github.com/repos/thenakliman/dockyard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thenakliman/dockyard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thenakliman/dockyard/teams","hooks_url":"https://api.github.com/repos/thenakliman/dockyard/hooks","issue_events_url":"https://api.github.com/repos/thenakliman/dockyard/issues/events{/number}","events_url":"https://api.github.com/repos/thenakliman/dockyard/events","assignees_url":"https://api.github.com/repos/thenakliman/dockyard/assignees{/user}","branches_url":"https://api.github.com/repos/thenakliman/dockyard/branches{/branch}","tags_url":"https://api.github.com/repos/thenakliman/dockyard/tags","blobs_url":"https://api.github.com/repos/thenakliman/dockyard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thenakliman/dockyard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thenakliman/dockyard/git/refs{/sha}","trees_url":"https://api.github.com/repos/thenakliman/dockyard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thenakliman/dockyard/statuses/{sha}","languages_url":"https://api.github.com/repos/thenakliman/dockyard/languages","stargazers_url":"https://api.github.com/repos/thenakliman/dockyard/stargazers","contributors_url":"https://api.github.com/repos/thenakliman/dockyard/contributors","subscribers_url":"https://api.github.com/repos/thenakliman/dockyard/subscribers","subscription_url":"https://api.github.com/repos/thenakliman/dockyard/subscription","commits_url":"https://api.github.com/repos/thenakliman/dockyard/commits{/sha}","git_commits_url":"https://api.github.com/repos/thenakliman/dockyard/git/commits{/sha}","comments_url":"https://api.github.com/repos/thenakliman/dockyard/comments{/number}","issue_comment_url":"https://api.github.com/repos/thenakliman/dockyard/issues/comments{/number}","contents_url":"https://api.github.com/repos/thenakliman/dockyard/contents/{+path}","compare_url":"https://api.github.com/repos/thenakliman/dockyard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thenakliman/dockyard/merges","archive_url":"https://api.github.com/repos/thenakliman/dockyard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thenakliman/dockyard/downloads","issues_url":"https://api.github.com/repos/thenakliman/dockyard/issues{/number}","pulls_url":"https://api.github.com/repos/thenakliman/dockyard/pulls{/number}","milestones_url":"https://api.github.com/repos/thenakliman/dockyard/milestones{/number}","notifications_url":"https://api.github.com/repos/thenakliman/dockyard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thenakliman/dockyard/labels{/name}","releases_url":"https://api.github.com/repos/thenakliman/dockyard/releases{/id}","deployments_url":"https://api.github.com/repos/thenakliman/dockyard/deployments","created_at":"2016-03-14T14:16:35Z","updated_at":"2016-03-14T16:36:12Z","pushed_at":"2016-04-04T16:42:51Z","git_url":"git://github.com/thenakliman/dockyard.git","ssh_url":"git@github.com:thenakliman/dockyard.git","clone_url":"https://github.com/thenakliman/dockyard.git","svn_url":"https://github.com/thenakliman/dockyard","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"feature_scheduler"}},"base":{"label":"thenakliman:develop","ref":"develop","sha":"13be67100e7d686bd40c6918074ef2c1e76074d0","user":{"login":"thenakliman","id":10421430,"avatar_url":"https://avatars.githubusercontent.com/u/10421430?v=3","gravatar_id":"","url":"https://api.github.com/users/thenakliman","html_url":"https://github.com/thenakliman","followers_url":"https://api.github.com/users/thenakliman/followers","following_url":"https://api.github.com/users/thenakliman/following{/other_user}","gists_url":"https://api.github.com/users/thenakliman/gists{/gist_id}","starred_url":"https://api.github.com/users/thenakliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenakliman/subscriptions","organizations_url":"https://api.github.com/users/thenakliman/orgs","repos_url":"https://api.github.com/users/thenakliman/repos","events_url":"https://api.github.com/users/thenakliman/events{/privacy}","received_events_url":"https://api.github.com/users/thenakliman/received_events","type":"User","site_admin":false},"repo":{"id":53862106,"name":"dockyard","full_name":"thenakliman/dockyard","owner":{"login":"thenakliman","id":10421430,"avatar_url":"https://avatars.githubusercontent.com/u/10421430?v=3","gravatar_id":"","url":"https://api.github.com/users/thenakliman","html_url":"https://github.com/thenakliman","followers_url":"https://api.github.com/users/thenakliman/followers","following_url":"https://api.github.com/users/thenakliman/following{/other_user}","gists_url":"https://api.github.com/users/thenakliman/gists{/gist_id}","starred_url":"https://api.github.com/users/thenakliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenakliman/subscriptions","organizations_url":"https://api.github.com/users/thenakliman/orgs","repos_url":"https://api.github.com/users/thenakliman/repos","events_url":"https://api.github.com/users/thenakliman/events{/privacy}","received_events_url":"https://api.github.com/users/thenakliman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thenakliman/dockyard","description":"","fork":false,"url":"https://api.github.com/repos/thenakliman/dockyard","forks_url":"https://api.github.com/repos/thenakliman/dockyard/forks","keys_url":"https://api.github.com/repos/thenakliman/dockyard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thenakliman/dockyard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thenakliman/dockyard/teams","hooks_url":"https://api.github.com/repos/thenakliman/dockyard/hooks","issue_events_url":"https://api.github.com/repos/thenakliman/dockyard/issues/events{/number}","events_url":"https://api.github.com/repos/thenakliman/dockyard/events","assignees_url":"https://api.github.com/repos/thenakliman/dockyard/assignees{/user}","branches_url":"https://api.github.com/repos/thenakliman/dockyard/branches{/branch}","tags_url":"https://api.github.com/repos/thenakliman/dockyard/tags","blobs_url":"https://api.github.com/repos/thenakliman/dockyard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thenakliman/dockyard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thenakliman/dockyard/git/refs{/sha}","trees_url":"https://api.github.com/repos/thenakliman/dockyard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thenakliman/dockyard/statuses/{sha}","languages_url":"https://api.github.com/repos/thenakliman/dockyard/languages","stargazers_url":"https://api.github.com/repos/thenakliman/dockyard/stargazers","contributors_url":"https://api.github.com/repos/thenakliman/dockyard/contributors","subscribers_url":"https://api.github.com/repos/thenakliman/dockyard/subscribers","subscription_url":"https://api.github.com/repos/thenakliman/dockyard/subscription","commits_url":"https://api.github.com/repos/thenakliman/dockyard/commits{/sha}","git_commits_url":"https://api.github.com/repos/thenakliman/dockyard/git/commits{/sha}","comments_url":"https://api.github.com/repos/thenakliman/dockyard/comments{/number}","issue_comment_url":"https://api.github.com/repos/thenakliman/dockyard/issues/comments{/number}","contents_url":"https://api.github.com/repos/thenakliman/dockyard/contents/{+path}","compare_url":"https://api.github.com/repos/thenakliman/dockyard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thenakliman/dockyard/merges","archive_url":"https://api.github.com/repos/thenakliman/dockyard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thenakliman/dockyard/downloads","issues_url":"https://api.github.com/repos/thenakliman/dockyard/issues{/number}","pulls_url":"https://api.github.com/repos/thenakliman/dockyard/pulls{/number}","milestones_url":"https://api.github.com/repos/thenakliman/dockyard/milestones{/number}","notifications_url":"https://api.github.com/repos/thenakliman/dockyard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thenakliman/dockyard/labels{/name}","releases_url":"https://api.github.com/repos/thenakliman/dockyard/releases{/id}","deployments_url":"https://api.github.com/repos/thenakliman/dockyard/deployments","created_at":"2016-03-14T14:16:35Z","updated_at":"2016-03-14T16:36:12Z","pushed_at":"2016-04-04T16:42:51Z","git_url":"git://github.com/thenakliman/dockyard.git","ssh_url":"git@github.com:thenakliman/dockyard.git","clone_url":"https://github.com/thenakliman/dockyard.git","svn_url":"https://github.com/thenakliman/dockyard","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"feature_scheduler"}},"_links":{"self":{"href":"https://api.github.com/repos/thenakliman/dockyard/pulls/5"},"html":{"href":"https://github.com/thenakliman/dockyard/pull/5"},"issue":{"href":"https://api.github.com/repos/thenakliman/dockyard/issues/5"},"comments":{"href":"https://api.github.com/repos/thenakliman/dockyard/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/thenakliman/dockyard/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/thenakliman/dockyard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thenakliman/dockyard/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/thenakliman/dockyard/statuses/215a1a563a2c6c9eb91c3b5c762f898946a5204b"}}}}