{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/supply/pulls/comments/50786453","id":50786453,"diff_hunk":"@@ -165,38 +115,24 @@ def listing_for_language(language)\n     def apks_version_codes\n       ensure_active_edit!\n \n-      result = api_client.execute(\n-        api_method: android_publisher.edits.apks.list,\n-        parameters: {\n-          'editId' => current_edit.data.id,\n-          'packageName' => current_package_name\n-        },\n-        authorization: auth_client\n-      )\n-\n-      raise result.error_message.red if result.error? && result.status != 404\n+      result = android_publisher.list_apks(\n+        current_package_name,\n+        current_edit.id)\n \n-      return result.data.apks.collect(&:versionCode)\n+      return result.apks.collect(&:version_code)\n     end\n \n     # Get a list of all apk listings (changelogs) - returns the list\n     def apk_listings(apk_version_code)\n       ensure_active_edit!\n \n-      result = api_client.execute(\n-        api_method: android_publisher.edits.apklistings.list,\n-        parameters: {\n-          'apkVersionCode' => apk_version_code,\n-          'editId' => current_edit.data.id,\n-          'packageName' => current_package_name\n-        },\n-        authorization: auth_client\n-      )\n-\n-      raise result.error_message.red if result.error? && result.status != 404\n+      result = android_publisher.list_apk_listings(\n+        current_package_name,\n+        current_edit.id,\n+        apk_version_code)\n \n-      return result.data.listings.collect do |row|\n-        ApkListing.new(row.recentChanges, row.language, apk_version_code)\n+      return result.listings.collect do |row|","path":"lib/supply/client.rb","position":221,"original_position":221,"commit_id":"ba607cf7b9cf982f2c8e9ee6921fccffaff5cbd6","original_commit_id":"ba607cf7b9cf982f2c8e9ee6921fccffaff5cbd6","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer `map` over `collect`.","created_at":"2016-01-26T01:46:27Z","updated_at":"2016-01-26T01:46:27Z","html_url":"https://github.com/fastlane/supply/pull/46#discussion_r50786453","pull_request_url":"https://api.github.com/repos/fastlane/supply/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/fastlane/supply/pulls/comments/50786453"},"html":{"href":"https://github.com/fastlane/supply/pull/46#discussion_r50786453"},"pull_request":{"href":"https://api.github.com/repos/fastlane/supply/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/supply/pulls/46","id":57159375,"html_url":"https://github.com/fastlane/supply/pull/46","diff_url":"https://github.com/fastlane/supply/pull/46.diff","patch_url":"https://github.com/fastlane/supply/pull/46.patch","issue_url":"https://api.github.com/repos/fastlane/supply/issues/46","number":46,"state":"open","locked":false,"title":"WIP: update to newer google api client dependency","user":{"login":"lacostej","id":24282,"avatar_url":"https://avatars.githubusercontent.com/u/24282?v=3","gravatar_id":"","url":"https://api.github.com/users/lacostej","html_url":"https://github.com/lacostej","followers_url":"https://api.github.com/users/lacostej/followers","following_url":"https://api.github.com/users/lacostej/following{/other_user}","gists_url":"https://api.github.com/users/lacostej/gists{/gist_id}","starred_url":"https://api.github.com/users/lacostej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacostej/subscriptions","organizations_url":"https://api.github.com/users/lacostej/orgs","repos_url":"https://api.github.com/users/lacostej/repos","events_url":"https://api.github.com/users/lacostej/events{/privacy}","received_events_url":"https://api.github.com/users/lacostej/received_events","type":"User","site_admin":false},"body":"As noted under fastlane/supply/issues#31, there's a new API client for supply that might use less requests.\r\n\r\nI started migrating to the new client.\r\n\r\nI tested the setup, but not yet upload. Enough for today. Putting online in case someone wants to try it.","created_at":"2016-01-26T01:46:23Z","updated_at":"2016-01-26T01:46:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f439f52ba7bd91cc77e5d2fc019868c5d4602335","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/supply/pulls/46/commits","review_comments_url":"https://api.github.com/repos/fastlane/supply/pulls/46/comments","review_comment_url":"https://api.github.com/repos/fastlane/supply/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/supply/issues/46/comments","statuses_url":"https://api.github.com/repos/fastlane/supply/statuses/ba607cf7b9cf982f2c8e9ee6921fccffaff5cbd6","head":{"label":"lacostej:upgrade_google_api_client","ref":"upgrade_google_api_client","sha":"ba607cf7b9cf982f2c8e9ee6921fccffaff5cbd6","user":{"login":"lacostej","id":24282,"avatar_url":"https://avatars.githubusercontent.com/u/24282?v=3","gravatar_id":"","url":"https://api.github.com/users/lacostej","html_url":"https://github.com/lacostej","followers_url":"https://api.github.com/users/lacostej/followers","following_url":"https://api.github.com/users/lacostej/following{/other_user}","gists_url":"https://api.github.com/users/lacostej/gists{/gist_id}","starred_url":"https://api.github.com/users/lacostej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacostej/subscriptions","organizations_url":"https://api.github.com/users/lacostej/orgs","repos_url":"https://api.github.com/users/lacostej/repos","events_url":"https://api.github.com/users/lacostej/events{/privacy}","received_events_url":"https://api.github.com/users/lacostej/received_events","type":"User","site_admin":false},"repo":{"id":50370962,"name":"supply","full_name":"lacostej/supply","owner":{"login":"lacostej","id":24282,"avatar_url":"https://avatars.githubusercontent.com/u/24282?v=3","gravatar_id":"","url":"https://api.github.com/users/lacostej","html_url":"https://github.com/lacostej","followers_url":"https://api.github.com/users/lacostej/followers","following_url":"https://api.github.com/users/lacostej/following{/other_user}","gists_url":"https://api.github.com/users/lacostej/gists{/gist_id}","starred_url":"https://api.github.com/users/lacostej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacostej/subscriptions","organizations_url":"https://api.github.com/users/lacostej/orgs","repos_url":"https://api.github.com/users/lacostej/repos","events_url":"https://api.github.com/users/lacostej/events{/privacy}","received_events_url":"https://api.github.com/users/lacostej/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lacostej/supply","description":"Command line tool for updating Android apps and their metadata on the Google Play Store","fork":true,"url":"https://api.github.com/repos/lacostej/supply","forks_url":"https://api.github.com/repos/lacostej/supply/forks","keys_url":"https://api.github.com/repos/lacostej/supply/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lacostej/supply/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lacostej/supply/teams","hooks_url":"https://api.github.com/repos/lacostej/supply/hooks","issue_events_url":"https://api.github.com/repos/lacostej/supply/issues/events{/number}","events_url":"https://api.github.com/repos/lacostej/supply/events","assignees_url":"https://api.github.com/repos/lacostej/supply/assignees{/user}","branches_url":"https://api.github.com/repos/lacostej/supply/branches{/branch}","tags_url":"https://api.github.com/repos/lacostej/supply/tags","blobs_url":"https://api.github.com/repos/lacostej/supply/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lacostej/supply/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lacostej/supply/git/refs{/sha}","trees_url":"https://api.github.com/repos/lacostej/supply/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lacostej/supply/statuses/{sha}","languages_url":"https://api.github.com/repos/lacostej/supply/languages","stargazers_url":"https://api.github.com/repos/lacostej/supply/stargazers","contributors_url":"https://api.github.com/repos/lacostej/supply/contributors","subscribers_url":"https://api.github.com/repos/lacostej/supply/subscribers","subscription_url":"https://api.github.com/repos/lacostej/supply/subscription","commits_url":"https://api.github.com/repos/lacostej/supply/commits{/sha}","git_commits_url":"https://api.github.com/repos/lacostej/supply/git/commits{/sha}","comments_url":"https://api.github.com/repos/lacostej/supply/comments{/number}","issue_comment_url":"https://api.github.com/repos/lacostej/supply/issues/comments{/number}","contents_url":"https://api.github.com/repos/lacostej/supply/contents/{+path}","compare_url":"https://api.github.com/repos/lacostej/supply/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lacostej/supply/merges","archive_url":"https://api.github.com/repos/lacostej/supply/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lacostej/supply/downloads","issues_url":"https://api.github.com/repos/lacostej/supply/issues{/number}","pulls_url":"https://api.github.com/repos/lacostej/supply/pulls{/number}","milestones_url":"https://api.github.com/repos/lacostej/supply/milestones{/number}","notifications_url":"https://api.github.com/repos/lacostej/supply/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lacostej/supply/labels{/name}","releases_url":"https://api.github.com/repos/lacostej/supply/releases{/id}","deployments_url":"https://api.github.com/repos/lacostej/supply/deployments","created_at":"2016-01-25T18:20:14Z","updated_at":"2016-01-25T18:20:15Z","pushed_at":"2016-01-26T01:44:40Z","git_url":"git://github.com/lacostej/supply.git","ssh_url":"git@github.com:lacostej/supply.git","clone_url":"https://github.com/lacostej/supply.git","svn_url":"https://github.com/lacostej/supply","homepage":"https://fastlane.tools","size":111,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"fastlane:master","ref":"master","sha":"f3480c18ae43414bbb2a42bbf3b840e7231de189","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":42685466,"name":"supply","full_name":"fastlane/supply","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/supply","description":"Command line tool for updating Android apps and their metadata on the Google Play Store","fork":false,"url":"https://api.github.com/repos/fastlane/supply","forks_url":"https://api.github.com/repos/fastlane/supply/forks","keys_url":"https://api.github.com/repos/fastlane/supply/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/supply/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/supply/teams","hooks_url":"https://api.github.com/repos/fastlane/supply/hooks","issue_events_url":"https://api.github.com/repos/fastlane/supply/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/supply/events","assignees_url":"https://api.github.com/repos/fastlane/supply/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/supply/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/supply/tags","blobs_url":"https://api.github.com/repos/fastlane/supply/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/supply/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/supply/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/supply/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/supply/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/supply/languages","stargazers_url":"https://api.github.com/repos/fastlane/supply/stargazers","contributors_url":"https://api.github.com/repos/fastlane/supply/contributors","subscribers_url":"https://api.github.com/repos/fastlane/supply/subscribers","subscription_url":"https://api.github.com/repos/fastlane/supply/subscription","commits_url":"https://api.github.com/repos/fastlane/supply/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/supply/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/supply/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/supply/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/supply/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/supply/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/supply/merges","archive_url":"https://api.github.com/repos/fastlane/supply/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/supply/downloads","issues_url":"https://api.github.com/repos/fastlane/supply/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/supply/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/supply/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/supply/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/supply/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/supply/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/supply/deployments","created_at":"2015-09-17T22:31:48Z","updated_at":"2016-01-25T01:02:33Z","pushed_at":"2016-01-26T01:46:23Z","git_url":"git://github.com/fastlane/supply.git","ssh_url":"git@github.com:fastlane/supply.git","clone_url":"https://github.com/fastlane/supply.git","svn_url":"https://github.com/fastlane/supply","homepage":"https://fastlane.tools","size":130,"stargazers_count":166,"watchers_count":166,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":15,"forks":12,"open_issues":15,"watchers":166,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/supply/pulls/46"},"html":{"href":"https://github.com/fastlane/supply/pull/46"},"issue":{"href":"https://api.github.com/repos/fastlane/supply/issues/46"},"comments":{"href":"https://api.github.com/repos/fastlane/supply/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/supply/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/supply/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/supply/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/supply/statuses/ba607cf7b9cf982f2c8e9ee6921fccffaff5cbd6"}}}}