{"action":"created","comment":{"url":"https://api.github.com/repos/tableau/server-client-python/pulls/comments/146723820","pull_request_review_id":71707969,"id":146723820,"diff_hunk":"@@ -118,19 +118,21 @@ def download(self, workbook_id, filepath=None, include_extract=True, no_extract=\n \n     # Get all views of workbook\n     @api(version=\"2.0\")\n-    def populate_views(self, workbook_item):\n+    def populate_views(self, workbook_item, usage=False):\n         if not workbook_item.id:\n             error = \"Workbook item missing ID. Workbook must be retrieved from server first.\"\n             raise MissingRequiredFieldError(error)\n \n         def view_fetcher():\n-            return self._get_views_for_workbook(workbook_item)\n+            return self._get_views_for_workbook(workbook_item, usage)\n \n         workbook_item._set_views(view_fetcher)\n         logger.info('Populated views for workbook (ID: {0}'.format(workbook_item.id))\n \n-    def _get_views_for_workbook(self, workbook_item):\n-        url = \"{0}/{1}/views\".format(self.baseurl, workbook_item.id)\n+    def _get_views_for_workbook(self, workbook_item, usage):\n+        url = \"{0}/{1}/views\".format(self.baseurl, workbook_item.id, usage)","path":"tableauserverclient/server/endpoint/workbooks_endpoint.py","position":20,"original_position":20,"commit_id":"05ea75cfe753dda2125e30b72ab97efefc11d0da","original_commit_id":"05ea75cfe753dda2125e30b72ab97efefc11d0da","user":{"login":"t8y8","id":4370533,"avatar_url":"https://avatars2.githubusercontent.com/u/4370533?v=4","gravatar_id":"","url":"https://api.github.com/users/t8y8","html_url":"https://github.com/t8y8","followers_url":"https://api.github.com/users/t8y8/followers","following_url":"https://api.github.com/users/t8y8/following{/other_user}","gists_url":"https://api.github.com/users/t8y8/gists{/gist_id}","starred_url":"https://api.github.com/users/t8y8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t8y8/subscriptions","organizations_url":"https://api.github.com/users/t8y8/orgs","repos_url":"https://api.github.com/users/t8y8/repos","events_url":"https://api.github.com/users/t8y8/events{/privacy}","received_events_url":"https://api.github.com/users/t8y8/received_events","type":"User","site_admin":false},"body":"`usage` doesn't need to be in the `.format`","created_at":"2017-10-24T23:52:13Z","updated_at":"2017-10-24T23:53:16Z","html_url":"https://github.com/tableau/server-client-python/pull/242#discussion_r146723820","pull_request_url":"https://api.github.com/repos/tableau/server-client-python/pulls/242","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/tableau/server-client-python/pulls/comments/146723820"},"html":{"href":"https://github.com/tableau/server-client-python/pull/242#discussion_r146723820"},"pull_request":{"href":"https://api.github.com/repos/tableau/server-client-python/pulls/242"}}},"pull_request":{"url":"https://api.github.com/repos/tableau/server-client-python/pulls/242","id":148510672,"html_url":"https://github.com/tableau/server-client-python/pull/242","diff_url":"https://github.com/tableau/server-client-python/pull/242.diff","patch_url":"https://github.com/tableau/server-client-python/pull/242.patch","issue_url":"https://api.github.com/repos/tableau/server-client-python/issues/242","number":242,"state":"open","locked":false,"title":"added ability to get usage statistics for views","user":{"login":"shinchris","id":10054801,"avatar_url":"https://avatars1.githubusercontent.com/u/10054801?v=4","gravatar_id":"","url":"https://api.github.com/users/shinchris","html_url":"https://github.com/shinchris","followers_url":"https://api.github.com/users/shinchris/followers","following_url":"https://api.github.com/users/shinchris/following{/other_user}","gists_url":"https://api.github.com/users/shinchris/gists{/gist_id}","starred_url":"https://api.github.com/users/shinchris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinchris/subscriptions","organizations_url":"https://api.github.com/users/shinchris/orgs","repos_url":"https://api.github.com/users/shinchris/repos","events_url":"https://api.github.com/users/shinchris/events{/privacy}","received_events_url":"https://api.github.com/users/shinchris/received_events","type":"User","site_admin":false},"body":"Issue #179.","created_at":"2017-10-24T20:55:41Z","updated_at":"2017-10-24T23:53:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f1b09a4556940d7543cb14b06f34465681a745a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tableau/server-client-python/pulls/242/commits","review_comments_url":"https://api.github.com/repos/tableau/server-client-python/pulls/242/comments","review_comment_url":"https://api.github.com/repos/tableau/server-client-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tableau/server-client-python/issues/242/comments","statuses_url":"https://api.github.com/repos/tableau/server-client-python/statuses/05ea75cfe753dda2125e30b72ab97efefc11d0da","head":{"label":"tableau:usage-stats","ref":"usage-stats","sha":"05ea75cfe753dda2125e30b72ab97efefc11d0da","user":{"login":"tableau","id":828667,"avatar_url":"https://avatars3.githubusercontent.com/u/828667?v=4","gravatar_id":"","url":"https://api.github.com/users/tableau","html_url":"https://github.com/tableau","followers_url":"https://api.github.com/users/tableau/followers","following_url":"https://api.github.com/users/tableau/following{/other_user}","gists_url":"https://api.github.com/users/tableau/gists{/gist_id}","starred_url":"https://api.github.com/users/tableau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tableau/subscriptions","organizations_url":"https://api.github.com/users/tableau/orgs","repos_url":"https://api.github.com/users/tableau/repos","events_url":"https://api.github.com/users/tableau/events{/privacy}","received_events_url":"https://api.github.com/users/tableau/received_events","type":"Organization","site_admin":false},"repo":{"id":62177327,"name":"server-client-python","full_name":"tableau/server-client-python","owner":{"login":"tableau","id":828667,"avatar_url":"https://avatars3.githubusercontent.com/u/828667?v=4","gravatar_id":"","url":"https://api.github.com/users/tableau","html_url":"https://github.com/tableau","followers_url":"https://api.github.com/users/tableau/followers","following_url":"https://api.github.com/users/tableau/following{/other_user}","gists_url":"https://api.github.com/users/tableau/gists{/gist_id}","starred_url":"https://api.github.com/users/tableau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tableau/subscriptions","organizations_url":"https://api.github.com/users/tableau/orgs","repos_url":"https://api.github.com/users/tableau/repos","events_url":"https://api.github.com/users/tableau/events{/privacy}","received_events_url":"https://api.github.com/users/tableau/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tableau/server-client-python","description":"A Python library for the Tableau Server REST API","fork":false,"url":"https://api.github.com/repos/tableau/server-client-python","forks_url":"https://api.github.com/repos/tableau/server-client-python/forks","keys_url":"https://api.github.com/repos/tableau/server-client-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tableau/server-client-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tableau/server-client-python/teams","hooks_url":"https://api.github.com/repos/tableau/server-client-python/hooks","issue_events_url":"https://api.github.com/repos/tableau/server-client-python/issues/events{/number}","events_url":"https://api.github.com/repos/tableau/server-client-python/events","assignees_url":"https://api.github.com/repos/tableau/server-client-python/assignees{/user}","branches_url":"https://api.github.com/repos/tableau/server-client-python/branches{/branch}","tags_url":"https://api.github.com/repos/tableau/server-client-python/tags","blobs_url":"https://api.github.com/repos/tableau/server-client-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tableau/server-client-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tableau/server-client-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/tableau/server-client-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tableau/server-client-python/statuses/{sha}","languages_url":"https://api.github.com/repos/tableau/server-client-python/languages","stargazers_url":"https://api.github.com/repos/tableau/server-client-python/stargazers","contributors_url":"https://api.github.com/repos/tableau/server-client-python/contributors","subscribers_url":"https://api.github.com/repos/tableau/server-client-python/subscribers","subscription_url":"https://api.github.com/repos/tableau/server-client-python/subscription","commits_url":"https://api.github.com/repos/tableau/server-client-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/tableau/server-client-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/tableau/server-client-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/tableau/server-client-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/tableau/server-client-python/contents/{+path}","compare_url":"https://api.github.com/repos/tableau/server-client-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tableau/server-client-python/merges","archive_url":"https://api.github.com/repos/tableau/server-client-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tableau/server-client-python/downloads","issues_url":"https://api.github.com/repos/tableau/server-client-python/issues{/number}","pulls_url":"https://api.github.com/repos/tableau/server-client-python/pulls{/number}","milestones_url":"https://api.github.com/repos/tableau/server-client-python/milestones{/number}","notifications_url":"https://api.github.com/repos/tableau/server-client-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tableau/server-client-python/labels{/name}","releases_url":"https://api.github.com/repos/tableau/server-client-python/releases{/id}","deployments_url":"https://api.github.com/repos/tableau/server-client-python/deployments","created_at":"2016-06-28T22:05:32Z","updated_at":"2017-10-13T15:30:08Z","pushed_at":"2017-10-24T21:19:36Z","git_url":"git://github.com/tableau/server-client-python.git","ssh_url":"git@github.com:tableau/server-client-python.git","clone_url":"https://github.com/tableau/server-client-python.git","svn_url":"https://github.com/tableau/server-client-python","homepage":"https://tableau.github.io/server-client-python","size":889,"stargazers_count":72,"watchers_count":72,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":38,"forks":46,"open_issues":38,"watchers":72,"default_branch":"master"}},"base":{"label":"tableau:development","ref":"development","sha":"262d32ffe221f4319a371279a4abd2e8b9437bfe","user":{"login":"tableau","id":828667,"avatar_url":"https://avatars3.githubusercontent.com/u/828667?v=4","gravatar_id":"","url":"https://api.github.com/users/tableau","html_url":"https://github.com/tableau","followers_url":"https://api.github.com/users/tableau/followers","following_url":"https://api.github.com/users/tableau/following{/other_user}","gists_url":"https://api.github.com/users/tableau/gists{/gist_id}","starred_url":"https://api.github.com/users/tableau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tableau/subscriptions","organizations_url":"https://api.github.com/users/tableau/orgs","repos_url":"https://api.github.com/users/tableau/repos","events_url":"https://api.github.com/users/tableau/events{/privacy}","received_events_url":"https://api.github.com/users/tableau/received_events","type":"Organization","site_admin":false},"repo":{"id":62177327,"name":"server-client-python","full_name":"tableau/server-client-python","owner":{"login":"tableau","id":828667,"avatar_url":"https://avatars3.githubusercontent.com/u/828667?v=4","gravatar_id":"","url":"https://api.github.com/users/tableau","html_url":"https://github.com/tableau","followers_url":"https://api.github.com/users/tableau/followers","following_url":"https://api.github.com/users/tableau/following{/other_user}","gists_url":"https://api.github.com/users/tableau/gists{/gist_id}","starred_url":"https://api.github.com/users/tableau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tableau/subscriptions","organizations_url":"https://api.github.com/users/tableau/orgs","repos_url":"https://api.github.com/users/tableau/repos","events_url":"https://api.github.com/users/tableau/events{/privacy}","received_events_url":"https://api.github.com/users/tableau/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tableau/server-client-python","description":"A Python library for the Tableau Server REST API","fork":false,"url":"https://api.github.com/repos/tableau/server-client-python","forks_url":"https://api.github.com/repos/tableau/server-client-python/forks","keys_url":"https://api.github.com/repos/tableau/server-client-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tableau/server-client-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tableau/server-client-python/teams","hooks_url":"https://api.github.com/repos/tableau/server-client-python/hooks","issue_events_url":"https://api.github.com/repos/tableau/server-client-python/issues/events{/number}","events_url":"https://api.github.com/repos/tableau/server-client-python/events","assignees_url":"https://api.github.com/repos/tableau/server-client-python/assignees{/user}","branches_url":"https://api.github.com/repos/tableau/server-client-python/branches{/branch}","tags_url":"https://api.github.com/repos/tableau/server-client-python/tags","blobs_url":"https://api.github.com/repos/tableau/server-client-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tableau/server-client-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tableau/server-client-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/tableau/server-client-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tableau/server-client-python/statuses/{sha}","languages_url":"https://api.github.com/repos/tableau/server-client-python/languages","stargazers_url":"https://api.github.com/repos/tableau/server-client-python/stargazers","contributors_url":"https://api.github.com/repos/tableau/server-client-python/contributors","subscribers_url":"https://api.github.com/repos/tableau/server-client-python/subscribers","subscription_url":"https://api.github.com/repos/tableau/server-client-python/subscription","commits_url":"https://api.github.com/repos/tableau/server-client-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/tableau/server-client-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/tableau/server-client-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/tableau/server-client-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/tableau/server-client-python/contents/{+path}","compare_url":"https://api.github.com/repos/tableau/server-client-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tableau/server-client-python/merges","archive_url":"https://api.github.com/repos/tableau/server-client-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tableau/server-client-python/downloads","issues_url":"https://api.github.com/repos/tableau/server-client-python/issues{/number}","pulls_url":"https://api.github.com/repos/tableau/server-client-python/pulls{/number}","milestones_url":"https://api.github.com/repos/tableau/server-client-python/milestones{/number}","notifications_url":"https://api.github.com/repos/tableau/server-client-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tableau/server-client-python/labels{/name}","releases_url":"https://api.github.com/repos/tableau/server-client-python/releases{/id}","deployments_url":"https://api.github.com/repos/tableau/server-client-python/deployments","created_at":"2016-06-28T22:05:32Z","updated_at":"2017-10-13T15:30:08Z","pushed_at":"2017-10-24T21:19:36Z","git_url":"git://github.com/tableau/server-client-python.git","ssh_url":"git@github.com:tableau/server-client-python.git","clone_url":"https://github.com/tableau/server-client-python.git","svn_url":"https://github.com/tableau/server-client-python","homepage":"https://tableau.github.io/server-client-python","size":889,"stargazers_count":72,"watchers_count":72,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":38,"forks":46,"open_issues":38,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tableau/server-client-python/pulls/242"},"html":{"href":"https://github.com/tableau/server-client-python/pull/242"},"issue":{"href":"https://api.github.com/repos/tableau/server-client-python/issues/242"},"comments":{"href":"https://api.github.com/repos/tableau/server-client-python/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/tableau/server-client-python/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/tableau/server-client-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tableau/server-client-python/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/tableau/server-client-python/statuses/05ea75cfe753dda2125e30b72ab97efefc11d0da"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"t8y8"}}