{"action":"created","comment":{"url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/comments/111508720","pull_request_review_id":32762534,"id":111508720,"diff_hunk":"@@ -26,11 +26,21 @@ class ShotgunAPI():\n     Public API\n     Callable methods from client. Every one of these methods can be called from the client.\n     \"\"\"\n-    public_api = [\"echo\", \"open\", \"executeToolkitCommand\", \"executeTankCommand\",\n-                  \"pickFileOrDirectory\", \"pickFilesOrDirectories\", \"version\",\n-                  \"getProjectActions\"]\n-\n-    def __init__(self, host, process_manager):\n+    PUBLIC_API_METHODS = [\n+        \"echo\",\n+        \"open\",\n+        \"executeToolkitCommand\",\n+        \"executeTankCommand\",\n+        \"pickFileOrDirectory\",\n+        \"pickFilesOrDirectories\",\n+        \"version\",\n+        \"getProjectActions\",\n+    ]\n+\n+    # Nothing for v1. This is used in v2.\n+    SYNCHRONOUS_METHODS = []","path":"python/tk_framework_desktopserver/shotgun/api_v1.py","position":36,"original_position":36,"commit_id":"8b97bcb3933689a9867e24b23ae86330d4b63449","original_commit_id":"8b97bcb3933689a9867e24b23ae86330d4b63449","user":{"login":"thebeeland","id":4913787,"avatar_url":"https://avatars3.githubusercontent.com/u/4913787?v=3","gravatar_id":"","url":"https://api.github.com/users/thebeeland","html_url":"https://github.com/thebeeland","followers_url":"https://api.github.com/users/thebeeland/followers","following_url":"https://api.github.com/users/thebeeland/following{/other_user}","gists_url":"https://api.github.com/users/thebeeland/gists{/gist_id}","starred_url":"https://api.github.com/users/thebeeland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebeeland/subscriptions","organizations_url":"https://api.github.com/users/thebeeland/orgs","repos_url":"https://api.github.com/users/thebeeland/repos","events_url":"https://api.github.com/users/thebeeland/events{/privacy}","received_events_url":"https://api.github.com/users/thebeeland/received_events","type":"User","site_admin":false},"body":"internal ticket 42071 for polish","created_at":"2017-04-13T23:45:14Z","updated_at":"2017-04-13T23:45:14Z","html_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver/pull/17#discussion_r111508720","pull_request_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/comments/111508720"},"html":{"href":"https://github.com/shotgunsoftware/tk-framework-desktopserver/pull/17#discussion_r111508720"},"pull_request":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17","id":115653201,"html_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver/pull/17","diff_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver/pull/17.diff","patch_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver/pull/17.patch","issue_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/17","number":17,"state":"open","locked":false,"title":"For 40784: Adds websockets protocol v2.","user":{"login":"thebeeland","id":4913787,"avatar_url":"https://avatars3.githubusercontent.com/u/4913787?v=3","gravatar_id":"","url":"https://api.github.com/users/thebeeland","html_url":"https://github.com/thebeeland","followers_url":"https://api.github.com/users/thebeeland/followers","following_url":"https://api.github.com/users/thebeeland/following{/other_user}","gists_url":"https://api.github.com/users/thebeeland/gists{/gist_id}","starred_url":"https://api.github.com/users/thebeeland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebeeland/subscriptions","organizations_url":"https://api.github.com/users/thebeeland/orgs","repos_url":"https://api.github.com/users/thebeeland/repos","events_url":"https://api.github.com/users/thebeeland/events{/privacy}","received_events_url":"https://api.github.com/users/thebeeland/received_events","type":"User","site_admin":false},"body":"This is more expansive than just 40784, and covers all desktopserver changes made thus far for websockets v2.\r\n\r\nThe ShotgunAPI has been broken out into v1 and v2 variants, and a factory function is provided to choose and instantiate the correct API for a given protocol version. The v1 API is almost entirely untouched, other than having been moved into a new location.\r\n\r\nThe v2 API provides `get_actions` and `execute_action` public RPC methods. All caching-related logic is managed by `get_actions`. All command execution is handled by `execute_action`.\r\n\r\nThe cache is populated by way of a subprocess that bootstraps SGTK into the tk-shotgun engine. A list of engine commands is pulled from the engine, munged a bit, and then cached into an sqlite database along with a unique identifier built from the pipeline configuration URI and entity type. A contents state hash is computed from a list of entities queried from the site (all Software entities, by default) and, if the pipeline config is mutable, the modtimes of all yml files found within.\r\n\r\nCommands are run via a subprocess that bootstraps into the tk-shotgun engine and calling the associated engine command's callback.","created_at":"2017-04-12T23:00:14Z","updated_at":"2017-04-13T23:45:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afe665cf8a1d1c0dc7d59bcb6c779f38a8eb5171","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17/commits","review_comments_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17/comments","review_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/17/comments","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/statuses/8b97bcb3933689a9867e24b23ae86330d4b63449","head":{"label":"shotgunsoftware:develop/websockets","ref":"develop/websockets","sha":"8b97bcb3933689a9867e24b23ae86330d4b63449","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars2.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":27185714,"name":"tk-framework-desktopserver","full_name":"shotgunsoftware/tk-framework-desktopserver","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars2.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver","description":"A framework that provides a server to run local commands.","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/deployments","created_at":"2014-11-26T16:30:33Z","updated_at":"2017-04-10T17:19:25Z","pushed_at":"2017-04-13T05:46:06Z","git_url":"git://github.com/shotgunsoftware/tk-framework-desktopserver.git","ssh_url":"git@github.com:shotgunsoftware/tk-framework-desktopserver.git","clone_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver.git","svn_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver","homepage":"","size":8306,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"shotgunsoftware:develop/zero_config","ref":"develop/zero_config","sha":"8fe23ca2b6ef0bd3ca591b0d59c41f843ebbe4bb","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars2.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":27185714,"name":"tk-framework-desktopserver","full_name":"shotgunsoftware/tk-framework-desktopserver","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars2.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver","description":"A framework that provides a server to run local commands.","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/releases{/id}","deployments_url":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/deployments","created_at":"2014-11-26T16:30:33Z","updated_at":"2017-04-10T17:19:25Z","pushed_at":"2017-04-13T05:46:06Z","git_url":"git://github.com/shotgunsoftware/tk-framework-desktopserver.git","ssh_url":"git@github.com:shotgunsoftware/tk-framework-desktopserver.git","clone_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver.git","svn_url":"https://github.com/shotgunsoftware/tk-framework-desktopserver","homepage":"","size":8306,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17"},"html":{"href":"https://github.com/shotgunsoftware/tk-framework-desktopserver/pull/17"},"issue":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/17"},"comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/shotgunsoftware/tk-framework-desktopserver/statuses/8b97bcb3933689a9867e24b23ae86330d4b63449"}}}}
{"actor":{"display_login":"thebeeland"}}