{"action":"created","comment":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/48841242","id":48841242,"diff_hunk":"@@ -87,3 +89,45 @@ func (cs *clientSuite) TestClientPackages(c *check.C) {\n \t\t},\n \t})\n }\n+\n+const (\n+\tappID = \"chatroom.ogra\"\n+)\n+\n+func (cs *clientSuite) TestClientPackageCallsEndpoint(c *check.C) {\n+\t_, _ = cs.cli.Package(appID)\n+\tc.Check(cs.req.Method, check.Equals, \"GET\")\n+\tc.Check(cs.req.URL.Path, check.Equals, fmt.Sprintf(\"/1.0/packages/%s\", appID))\n+}\n+\n+func (cs *clientSuite) TestClientPackage(c *check.C) {\n+\tcs.rsp = `{\n+\t\t\"type\": \"sync\",\n+\t\t\"result\": {\n+\t\t\t\"description\": \"WebRTC Video chat server for Snappy\",\n+\t\t\t\"download_size\": \"6930947\",\n+\t\t\t\"icon\": \"/1.0/icons/chatroom.ogra/icon\",\n+\t\t\t\"installed_size\": \"18976651\",\n+\t\t\t\"name\": \"chatroom\",\n+\t\t\t\"origin\": \"ogra\",\n+\t\t\t\"resource\": \"/1.0/packages/chatroom.ogra\",\n+\t\t\t\"status\": \"active\",\n+\t\t\t\"type\": \"app\",\n+\t\t\t\"vendor\": \"\",\n+\t\t\t\"version\": \"0.1-8\"\n+\t\t}\n+\t}`\n+\tpkg, err := cs.cli.Package(appID)\n+\tc.Check(err, check.IsNil)","path":"client/packages_test.go","position":42,"original_position":42,"commit_id":"9097b9fd31469b550a73709d527928d8ebdf5207","original_commit_id":"9097b9fd31469b550a73709d527928d8ebdf5207","user":{"login":"niemeyer","id":378683,"avatar_url":"https://avatars.githubusercontent.com/u/378683?v=3","gravatar_id":"","url":"https://api.github.com/users/niemeyer","html_url":"https://github.com/niemeyer","followers_url":"https://api.github.com/users/niemeyer/followers","following_url":"https://api.github.com/users/niemeyer/following{/other_user}","gists_url":"https://api.github.com/users/niemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/niemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niemeyer/subscriptions","organizations_url":"https://api.github.com/users/niemeyer/orgs","repos_url":"https://api.github.com/users/niemeyer/repos","events_url":"https://api.github.com/users/niemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/niemeyer/received_events","type":"User","site_admin":false},"body":"This should be an Assert.. if this fails, the rest of the test is not interesting and reduces the clarity of the error when debugging.","created_at":"2016-01-05T12:49:13Z","updated_at":"2016-01-05T12:49:13Z","html_url":"https://github.com/ubuntu-core/snappy/pull/278#discussion_r48841242","pull_request_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278","_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/48841242"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/278#discussion_r48841242"},"pull_request":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278"}}},"pull_request":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278","id":54952127,"html_url":"https://github.com/ubuntu-core/snappy/pull/278","diff_url":"https://github.com/ubuntu-core/snappy/pull/278.diff","patch_url":"https://github.com/ubuntu-core/snappy/pull/278.patch","issue_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/278","number":278,"state":"open","locked":false,"title":"Get package details from snapd API","user":{"login":"stevenwilkin","id":45121,"avatar_url":"https://avatars.githubusercontent.com/u/45121?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenwilkin","html_url":"https://github.com/stevenwilkin","followers_url":"https://api.github.com/users/stevenwilkin/followers","following_url":"https://api.github.com/users/stevenwilkin/following{/other_user}","gists_url":"https://api.github.com/users/stevenwilkin/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenwilkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenwilkin/subscriptions","organizations_url":"https://api.github.com/users/stevenwilkin/orgs","repos_url":"https://api.github.com/users/stevenwilkin/repos","events_url":"https://api.github.com/users/stevenwilkin/events{/privacy}","received_events_url":"https://api.github.com/users/stevenwilkin/received_events","type":"User","site_admin":false},"body":"Retrieve an individual `Package` from the `snapd` API","created_at":"2016-01-04T08:24:23Z","updated_at":"2016-01-05T12:49:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e70a8a784b8f9cb99620a93a2e3df492a005501","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278/commits","review_comments_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278/comments","review_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/278/comments","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/9097b9fd31469b550a73709d527928d8ebdf5207","head":{"label":"stevenwilkin:get-package-from-snapd-api","ref":"get-package-from-snapd-api","sha":"9097b9fd31469b550a73709d527928d8ebdf5207","user":{"login":"stevenwilkin","id":45121,"avatar_url":"https://avatars.githubusercontent.com/u/45121?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenwilkin","html_url":"https://github.com/stevenwilkin","followers_url":"https://api.github.com/users/stevenwilkin/followers","following_url":"https://api.github.com/users/stevenwilkin/following{/other_user}","gists_url":"https://api.github.com/users/stevenwilkin/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenwilkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenwilkin/subscriptions","organizations_url":"https://api.github.com/users/stevenwilkin/orgs","repos_url":"https://api.github.com/users/stevenwilkin/repos","events_url":"https://api.github.com/users/stevenwilkin/events{/privacy}","received_events_url":"https://api.github.com/users/stevenwilkin/received_events","type":"User","site_admin":false},"repo":{"id":48114645,"name":"snappy","full_name":"stevenwilkin/snappy","owner":{"login":"stevenwilkin","id":45121,"avatar_url":"https://avatars.githubusercontent.com/u/45121?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenwilkin","html_url":"https://github.com/stevenwilkin","followers_url":"https://api.github.com/users/stevenwilkin/followers","following_url":"https://api.github.com/users/stevenwilkin/following{/other_user}","gists_url":"https://api.github.com/users/stevenwilkin/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenwilkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenwilkin/subscriptions","organizations_url":"https://api.github.com/users/stevenwilkin/orgs","repos_url":"https://api.github.com/users/stevenwilkin/repos","events_url":"https://api.github.com/users/stevenwilkin/events{/privacy}","received_events_url":"https://api.github.com/users/stevenwilkin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenwilkin/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":true,"url":"https://api.github.com/repos/stevenwilkin/snappy","forks_url":"https://api.github.com/repos/stevenwilkin/snappy/forks","keys_url":"https://api.github.com/repos/stevenwilkin/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenwilkin/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenwilkin/snappy/teams","hooks_url":"https://api.github.com/repos/stevenwilkin/snappy/hooks","issue_events_url":"https://api.github.com/repos/stevenwilkin/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/stevenwilkin/snappy/events","assignees_url":"https://api.github.com/repos/stevenwilkin/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/stevenwilkin/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/stevenwilkin/snappy/tags","blobs_url":"https://api.github.com/repos/stevenwilkin/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenwilkin/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenwilkin/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenwilkin/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenwilkin/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenwilkin/snappy/languages","stargazers_url":"https://api.github.com/repos/stevenwilkin/snappy/stargazers","contributors_url":"https://api.github.com/repos/stevenwilkin/snappy/contributors","subscribers_url":"https://api.github.com/repos/stevenwilkin/snappy/subscribers","subscription_url":"https://api.github.com/repos/stevenwilkin/snappy/subscription","commits_url":"https://api.github.com/repos/stevenwilkin/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenwilkin/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenwilkin/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenwilkin/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenwilkin/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/stevenwilkin/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenwilkin/snappy/merges","archive_url":"https://api.github.com/repos/stevenwilkin/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenwilkin/snappy/downloads","issues_url":"https://api.github.com/repos/stevenwilkin/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/stevenwilkin/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenwilkin/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenwilkin/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenwilkin/snappy/labels{/name}","releases_url":"https://api.github.com/repos/stevenwilkin/snappy/releases{/id}","created_at":"2015-12-16T14:19:55Z","updated_at":"2015-12-16T14:19:57Z","pushed_at":"2016-01-05T12:37:21Z","git_url":"git://github.com/stevenwilkin/snappy.git","ssh_url":"git@github.com:stevenwilkin/snappy.git","clone_url":"https://github.com/stevenwilkin/snappy.git","svn_url":"https://github.com/stevenwilkin/snappy","homepage":null,"size":23840,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"ubuntu-core:master","ref":"master","sha":"96af0dc1e60649675647e94983377a5cdc5a73f3","user":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snappy","full_name":"ubuntu-core/snappy","owner":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu-core/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":false,"url":"https://api.github.com/repos/ubuntu-core/snappy","forks_url":"https://api.github.com/repos/ubuntu-core/snappy/forks","keys_url":"https://api.github.com/repos/ubuntu-core/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu-core/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu-core/snappy/teams","hooks_url":"https://api.github.com/repos/ubuntu-core/snappy/hooks","issue_events_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu-core/snappy/events","assignees_url":"https://api.github.com/repos/ubuntu-core/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu-core/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu-core/snappy/tags","blobs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu-core/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu-core/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu-core/snappy/languages","stargazers_url":"https://api.github.com/repos/ubuntu-core/snappy/stargazers","contributors_url":"https://api.github.com/repos/ubuntu-core/snappy/contributors","subscribers_url":"https://api.github.com/repos/ubuntu-core/snappy/subscribers","subscription_url":"https://api.github.com/repos/ubuntu-core/snappy/subscription","commits_url":"https://api.github.com/repos/ubuntu-core/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu-core/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu-core/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu-core/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu-core/snappy/merges","archive_url":"https://api.github.com/repos/ubuntu-core/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu-core/snappy/downloads","issues_url":"https://api.github.com/repos/ubuntu-core/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu-core/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu-core/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu-core/snappy/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu-core/snappy/releases{/id}","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-01-04T16:00:51Z","pushed_at":"2016-01-05T12:37:22Z","git_url":"git://github.com/ubuntu-core/snappy.git","ssh_url":"git@github.com:ubuntu-core/snappy.git","clone_url":"https://github.com/ubuntu-core/snappy.git","svn_url":"https://github.com/ubuntu-core/snappy","homepage":null,"size":24485,"stargazers_count":44,"watchers_count":44,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":32,"forks":21,"open_issues":32,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/278"},"issue":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/278"},"comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/ubuntu-core/snappy/statuses/9097b9fd31469b550a73709d527928d8ebdf5207"}}}}