{"action":"created","comment":{"url":"https://api.github.com/repos/ably/ably-python/pulls/comments/43176429","id":43176429,"diff_hunk":"@@ -170,79 +179,54 @@ def create_token_request(self, key_name=None, key_secret=None,\n         if query_time is None:\n             query_time = self.auth_options.query_time\n \n-        if not token_params.get(\"timestamp\"):\n+        if not timestamp:\n             if query_time:\n-                token_params[\"timestamp\"] = self.ably.time()\n+                timestamp = self.ably.time()\n             else:\n-                token_params[\"timestamp\"] = self._timestamp()\n+                timestamp = self._timestamp()\n+\n+        token_request[\"timestamp\"] = int(timestamp)\n \n-        token_params[\"timestamp\"] = int(token_params[\"timestamp\"])\n+        token_request['ttl'] = ttl or TokenDetails.DEFAULTS['ttl'] * 1000","path":"ably/rest/auth.py","position":214,"original_position":214,"commit_id":"5a4b069a9c5cbe1892d70ddb68b91fd5b076167a","original_commit_id":"5a4b069a9c5cbe1892d70ddb68b91fd5b076167a","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"body":"Yup, I did the same in Ruby, I think this is right as it's more idiomatic for Python","created_at":"2015-10-27T19:50:31Z","updated_at":"2015-10-27T19:50:31Z","html_url":"https://github.com/ably/ably-python/pull/46#discussion_r43176429","pull_request_url":"https://api.github.com/repos/ably/ably-python/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/ably/ably-python/pulls/comments/43176429"},"html":{"href":"https://github.com/ably/ably-python/pull/46#discussion_r43176429"},"pull_request":{"href":"https://api.github.com/repos/ably/ably-python/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/ably/ably-python/pulls/46","id":48141062,"html_url":"https://github.com/ably/ably-python/pull/46","diff_url":"https://github.com/ably/ably-python/pull/46.diff","patch_url":"https://github.com/ably/ably-python/pull/46.patch","issue_url":"https://api.github.com/repos/ably/ably-python/issues/46","number":46,"state":"closed","locked":false,"title":"Changes to auth to fit specs.","user":{"login":"aericson","id":692542,"avatar_url":"https://avatars.githubusercontent.com/u/692542?v=3","gravatar_id":"","url":"https://api.github.com/users/aericson","html_url":"https://github.com/aericson","followers_url":"https://api.github.com/users/aericson/followers","following_url":"https://api.github.com/users/aericson/following{/other_user}","gists_url":"https://api.github.com/users/aericson/gists{/gist_id}","starred_url":"https://api.github.com/users/aericson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aericson/subscriptions","organizations_url":"https://api.github.com/users/aericson/orgs","repos_url":"https://api.github.com/users/aericson/repos","events_url":"https://api.github.com/users/aericson/events{/privacy}","received_events_url":"https://api.github.com/users/aericson/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-19T23:43:23Z","updated_at":"2015-10-27T19:50:31Z","closed_at":"2015-10-22T22:12:00Z","merged_at":"2015-10-22T22:12:00Z","merge_commit_sha":"ee115ceb3c3b45c7ff43f50697b77e0cd475a6bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ably/ably-python/pulls/46/commits","review_comments_url":"https://api.github.com/repos/ably/ably-python/pulls/46/comments","review_comment_url":"https://api.github.com/repos/ably/ably-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/ably-python/issues/46/comments","statuses_url":"https://api.github.com/repos/ably/ably-python/statuses/5a4b069a9c5cbe1892d70ddb68b91fd5b076167a","head":{"label":"vintasoftware:auth","ref":"auth","sha":"5a4b069a9c5cbe1892d70ddb68b91fd5b076167a","user":{"login":"vintasoftware","id":5529080,"avatar_url":"https://avatars.githubusercontent.com/u/5529080?v=3","gravatar_id":"","url":"https://api.github.com/users/vintasoftware","html_url":"https://github.com/vintasoftware","followers_url":"https://api.github.com/users/vintasoftware/followers","following_url":"https://api.github.com/users/vintasoftware/following{/other_user}","gists_url":"https://api.github.com/users/vintasoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/vintasoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vintasoftware/subscriptions","organizations_url":"https://api.github.com/users/vintasoftware/orgs","repos_url":"https://api.github.com/users/vintasoftware/repos","events_url":"https://api.github.com/users/vintasoftware/events{/privacy}","received_events_url":"https://api.github.com/users/vintasoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":39962285,"name":"ably-python","full_name":"vintasoftware/ably-python","owner":{"login":"vintasoftware","id":5529080,"avatar_url":"https://avatars.githubusercontent.com/u/5529080?v=3","gravatar_id":"","url":"https://api.github.com/users/vintasoftware","html_url":"https://github.com/vintasoftware","followers_url":"https://api.github.com/users/vintasoftware/followers","following_url":"https://api.github.com/users/vintasoftware/following{/other_user}","gists_url":"https://api.github.com/users/vintasoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/vintasoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vintasoftware/subscriptions","organizations_url":"https://api.github.com/users/vintasoftware/orgs","repos_url":"https://api.github.com/users/vintasoftware/repos","events_url":"https://api.github.com/users/vintasoftware/events{/privacy}","received_events_url":"https://api.github.com/users/vintasoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vintasoftware/ably-python","description":"Python REST client for Ably real-time messaging service","fork":true,"url":"https://api.github.com/repos/vintasoftware/ably-python","forks_url":"https://api.github.com/repos/vintasoftware/ably-python/forks","keys_url":"https://api.github.com/repos/vintasoftware/ably-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vintasoftware/ably-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vintasoftware/ably-python/teams","hooks_url":"https://api.github.com/repos/vintasoftware/ably-python/hooks","issue_events_url":"https://api.github.com/repos/vintasoftware/ably-python/issues/events{/number}","events_url":"https://api.github.com/repos/vintasoftware/ably-python/events","assignees_url":"https://api.github.com/repos/vintasoftware/ably-python/assignees{/user}","branches_url":"https://api.github.com/repos/vintasoftware/ably-python/branches{/branch}","tags_url":"https://api.github.com/repos/vintasoftware/ably-python/tags","blobs_url":"https://api.github.com/repos/vintasoftware/ably-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vintasoftware/ably-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vintasoftware/ably-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/vintasoftware/ably-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vintasoftware/ably-python/statuses/{sha}","languages_url":"https://api.github.com/repos/vintasoftware/ably-python/languages","stargazers_url":"https://api.github.com/repos/vintasoftware/ably-python/stargazers","contributors_url":"https://api.github.com/repos/vintasoftware/ably-python/contributors","subscribers_url":"https://api.github.com/repos/vintasoftware/ably-python/subscribers","subscription_url":"https://api.github.com/repos/vintasoftware/ably-python/subscription","commits_url":"https://api.github.com/repos/vintasoftware/ably-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/vintasoftware/ably-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/vintasoftware/ably-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/vintasoftware/ably-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/vintasoftware/ably-python/contents/{+path}","compare_url":"https://api.github.com/repos/vintasoftware/ably-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vintasoftware/ably-python/merges","archive_url":"https://api.github.com/repos/vintasoftware/ably-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vintasoftware/ably-python/downloads","issues_url":"https://api.github.com/repos/vintasoftware/ably-python/issues{/number}","pulls_url":"https://api.github.com/repos/vintasoftware/ably-python/pulls{/number}","milestones_url":"https://api.github.com/repos/vintasoftware/ably-python/milestones{/number}","notifications_url":"https://api.github.com/repos/vintasoftware/ably-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vintasoftware/ably-python/labels{/name}","releases_url":"https://api.github.com/repos/vintasoftware/ably-python/releases{/id}","created_at":"2015-07-30T17:05:44Z","updated_at":"2015-07-31T18:47:53Z","pushed_at":"2015-10-24T01:59:25Z","git_url":"git://github.com/vintasoftware/ably-python.git","ssh_url":"git@github.com:vintasoftware/ably-python.git","clone_url":"https://github.com/vintasoftware/ably-python.git","svn_url":"https://github.com/vintasoftware/ably-python","homepage":null,"size":715,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"ably:master","ref":"master","sha":"75d81f178393277527400700c62da2b098fa9d19","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":27377485,"name":"ably-python","full_name":"ably/ably-python","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-python","description":"Python REST client for Ably real-time messaging service","fork":false,"url":"https://api.github.com/repos/ably/ably-python","forks_url":"https://api.github.com/repos/ably/ably-python/forks","keys_url":"https://api.github.com/repos/ably/ably-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-python/teams","hooks_url":"https://api.github.com/repos/ably/ably-python/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-python/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-python/events","assignees_url":"https://api.github.com/repos/ably/ably-python/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-python/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-python/tags","blobs_url":"https://api.github.com/repos/ably/ably-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-python/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-python/languages","stargazers_url":"https://api.github.com/repos/ably/ably-python/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-python/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-python/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-python/subscription","commits_url":"https://api.github.com/repos/ably/ably-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-python/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-python/merges","archive_url":"https://api.github.com/repos/ably/ably-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-python/downloads","issues_url":"https://api.github.com/repos/ably/ably-python/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-python/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-python/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-python/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-python/releases{/id}","created_at":"2014-12-01T12:00:59Z","updated_at":"2015-07-30T18:46:10Z","pushed_at":"2015-10-26T18:47:18Z","git_url":"git://github.com/ably/ably-python.git","ssh_url":"git@github.com:ably/ably-python.git","clone_url":"https://github.com/ably/ably-python.git","svn_url":"https://github.com/ably/ably-python","homepage":null,"size":674,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/ably-python/pulls/46"},"html":{"href":"https://github.com/ably/ably-python/pull/46"},"issue":{"href":"https://api.github.com/repos/ably/ably-python/issues/46"},"comments":{"href":"https://api.github.com/repos/ably/ably-python/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/ably-python/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/ably-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/ably-python/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/ably/ably-python/statuses/5a4b069a9c5cbe1892d70ddb68b91fd5b076167a"}}}}