{"action":"created","comment":{"url":"https://api.github.com/repos/plotly/plotly.py/pulls/comments/89549283","pull_request_review_id":10095171,"id":89549283,"diff_hunk":"@@ -1493,6 +1493,42 @@ def get_grid(grid_url, raw=False):\n         return json_res\n \n \n+def create_animations(figure, filename=None, sharing='public'):\n+    \"\"\"\n+    Put description here.\n+\n+    For parameter descriptions, see the doc string for `py.plot()`.\n+    `private` is not supported currently for param 'sharing'. Returns the\n+    url for the plot if response is ok.\n+    \"\"\"\n+    credentials = get_credentials()\n+    validate_credentials(credentials)\n+    username, api_key = credentials['username'], credentials['api_key']\n+    auth = HTTPBasicAuth(str(username), str(api_key))\n+    headers = {'Plotly-Client-Platform': 'python'}\n+\n+    json = {\n+        'figure': figure,\n+        'world_readable': 'true'\n+    }\n+\n+    # set filename if specified\n+    if filename:\n+        json['filename'] = filename\n+\n+    # set sharing\n+    if sharing == 'public':\n+        json['world_readable'] = 'true'\n+    elif sharing == 'private':\n+        json['world_readable'] = 'false'\n+\n+    api_url = _api_v2.api_url('plots')\n+    r = requests.post(api_url, auth=auth, headers=headers, json=json)\n+\n+    json_r = json.loads(r.text)","path":"plotly/plotly/plotly.py","position":124,"original_position":36,"commit_id":"fca8fedb1c975279d4ae264c17146ea998f07350","original_commit_id":"fca8fedb1c975279d4ae264c17146ea998f07350","user":{"login":"chriddyp","id":1280389,"avatar_url":"https://avatars.githubusercontent.com/u/1280389?v=3","gravatar_id":"","url":"https://api.github.com/users/chriddyp","html_url":"https://github.com/chriddyp","followers_url":"https://api.github.com/users/chriddyp/followers","following_url":"https://api.github.com/users/chriddyp/following{/other_user}","gists_url":"https://api.github.com/users/chriddyp/gists{/gist_id}","starred_url":"https://api.github.com/users/chriddyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriddyp/subscriptions","organizations_url":"https://api.github.com/users/chriddyp/orgs","repos_url":"https://api.github.com/users/chriddyp/repos","events_url":"https://api.github.com/users/chriddyp/events{/privacy}","received_events_url":"https://api.github.com/users/chriddyp/received_events","type":"User","site_admin":false},"body":"this can fail if the response wasn't JSON. we might want to do\r\n```\r\ntry:\r\n    parsed_response = r.json()\r\nexcept:\r\n    parsed_response = r.content\r\n```","created_at":"2016-11-24T22:14:58Z","updated_at":"2016-11-24T22:20:09Z","html_url":"https://github.com/plotly/plotly.py/pull/584#discussion_r89549283","pull_request_url":"https://api.github.com/repos/plotly/plotly.py/pulls/584","_links":{"self":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/comments/89549283"},"html":{"href":"https://github.com/plotly/plotly.py/pull/584#discussion_r89549283"},"pull_request":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/584"}}},"pull_request":{"url":"https://api.github.com/repos/plotly/plotly.py/pulls/584","id":89878628,"html_url":"https://github.com/plotly/plotly.py/pull/584","diff_url":"https://github.com/plotly/plotly.py/pull/584.diff","patch_url":"https://github.com/plotly/plotly.py/pull/584.patch","issue_url":"https://api.github.com/repos/plotly/plotly.py/issues/584","number":584,"state":"open","locked":false,"title":"Animations/Frames in Python API","user":{"login":"Kully","id":10369095,"avatar_url":"https://avatars.githubusercontent.com/u/10369095?v=3","gravatar_id":"","url":"https://api.github.com/users/Kully","html_url":"https://github.com/Kully","followers_url":"https://api.github.com/users/Kully/followers","following_url":"https://api.github.com/users/Kully/following{/other_user}","gists_url":"https://api.github.com/users/Kully/gists{/gist_id}","starred_url":"https://api.github.com/users/Kully/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kully/subscriptions","organizations_url":"https://api.github.com/users/Kully/orgs","repos_url":"https://api.github.com/users/Kully/repos","events_url":"https://api.github.com/users/Kully/events{/privacy}","received_events_url":"https://api.github.com/users/Kully/received_events","type":"User","site_admin":false},"body":"Relevant Issue: https://github.com/plotly/streambed/issues/8129\n","created_at":"2016-10-18T19:05:10Z","updated_at":"2016-11-24T22:20:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f635eb122052e538bf0b52412a75a1af3de76ae4","assignee":{"login":"Kully","id":10369095,"avatar_url":"https://avatars.githubusercontent.com/u/10369095?v=3","gravatar_id":"","url":"https://api.github.com/users/Kully","html_url":"https://github.com/Kully","followers_url":"https://api.github.com/users/Kully/followers","following_url":"https://api.github.com/users/Kully/following{/other_user}","gists_url":"https://api.github.com/users/Kully/gists{/gist_id}","starred_url":"https://api.github.com/users/Kully/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kully/subscriptions","organizations_url":"https://api.github.com/users/Kully/orgs","repos_url":"https://api.github.com/users/Kully/repos","events_url":"https://api.github.com/users/Kully/events{/privacy}","received_events_url":"https://api.github.com/users/Kully/received_events","type":"User","site_admin":false},"assignees":[{"login":"Kully","id":10369095,"avatar_url":"https://avatars.githubusercontent.com/u/10369095?v=3","gravatar_id":"","url":"https://api.github.com/users/Kully","html_url":"https://github.com/Kully","followers_url":"https://api.github.com/users/Kully/followers","following_url":"https://api.github.com/users/Kully/following{/other_user}","gists_url":"https://api.github.com/users/Kully/gists{/gist_id}","starred_url":"https://api.github.com/users/Kully/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kully/subscriptions","organizations_url":"https://api.github.com/users/Kully/orgs","repos_url":"https://api.github.com/users/Kully/repos","events_url":"https://api.github.com/users/Kully/events{/privacy}","received_events_url":"https://api.github.com/users/Kully/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/plotly/plotly.py/pulls/584/commits","review_comments_url":"https://api.github.com/repos/plotly/plotly.py/pulls/584/comments","review_comment_url":"https://api.github.com/repos/plotly/plotly.py/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plotly/plotly.py/issues/584/comments","statuses_url":"https://api.github.com/repos/plotly/plotly.py/statuses/fca8fedb1c975279d4ae264c17146ea998f07350","head":{"label":"plotly:animations-for-iqt2","ref":"animations-for-iqt2","sha":"fca8fedb1c975279d4ae264c17146ea998f07350","user":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":14579099,"name":"plotly.py","full_name":"plotly/plotly.py","owner":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plotly/plotly.py","description":"An interactive, browser-based graphing library for Python :sparkles:","fork":false,"url":"https://api.github.com/repos/plotly/plotly.py","forks_url":"https://api.github.com/repos/plotly/plotly.py/forks","keys_url":"https://api.github.com/repos/plotly/plotly.py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/plotly.py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/plotly.py/teams","hooks_url":"https://api.github.com/repos/plotly/plotly.py/hooks","issue_events_url":"https://api.github.com/repos/plotly/plotly.py/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/plotly.py/events","assignees_url":"https://api.github.com/repos/plotly/plotly.py/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/plotly.py/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/plotly.py/tags","blobs_url":"https://api.github.com/repos/plotly/plotly.py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/plotly.py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/plotly.py/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/plotly.py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/plotly.py/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/plotly.py/languages","stargazers_url":"https://api.github.com/repos/plotly/plotly.py/stargazers","contributors_url":"https://api.github.com/repos/plotly/plotly.py/contributors","subscribers_url":"https://api.github.com/repos/plotly/plotly.py/subscribers","subscription_url":"https://api.github.com/repos/plotly/plotly.py/subscription","commits_url":"https://api.github.com/repos/plotly/plotly.py/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/plotly.py/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/plotly.py/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/plotly.py/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/plotly.py/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/plotly.py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/plotly.py/merges","archive_url":"https://api.github.com/repos/plotly/plotly.py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/plotly.py/downloads","issues_url":"https://api.github.com/repos/plotly/plotly.py/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/plotly.py/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/plotly.py/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/plotly.py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/plotly.py/labels{/name}","releases_url":"https://api.github.com/repos/plotly/plotly.py/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/plotly.py/deployments","created_at":"2013-11-21T05:53:08Z","updated_at":"2016-11-24T12:00:37Z","pushed_at":"2016-11-24T21:52:52Z","git_url":"git://github.com/plotly/plotly.py.git","ssh_url":"git@github.com:plotly/plotly.py.git","clone_url":"https://github.com/plotly/plotly.py.git","svn_url":"https://github.com/plotly/plotly.py","homepage":"https://plot.ly/python/","size":12123,"stargazers_count":1666,"watchers_count":1666,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":404,"mirror_url":null,"open_issues_count":188,"forks":404,"open_issues":188,"watchers":1666,"default_branch":"master"}},"base":{"label":"plotly:master","ref":"master","sha":"4fbe779905952e6539aa52d2ef30fcd02725b669","user":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":14579099,"name":"plotly.py","full_name":"plotly/plotly.py","owner":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plotly/plotly.py","description":"An interactive, browser-based graphing library for Python :sparkles:","fork":false,"url":"https://api.github.com/repos/plotly/plotly.py","forks_url":"https://api.github.com/repos/plotly/plotly.py/forks","keys_url":"https://api.github.com/repos/plotly/plotly.py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/plotly.py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/plotly.py/teams","hooks_url":"https://api.github.com/repos/plotly/plotly.py/hooks","issue_events_url":"https://api.github.com/repos/plotly/plotly.py/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/plotly.py/events","assignees_url":"https://api.github.com/repos/plotly/plotly.py/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/plotly.py/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/plotly.py/tags","blobs_url":"https://api.github.com/repos/plotly/plotly.py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/plotly.py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/plotly.py/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/plotly.py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/plotly.py/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/plotly.py/languages","stargazers_url":"https://api.github.com/repos/plotly/plotly.py/stargazers","contributors_url":"https://api.github.com/repos/plotly/plotly.py/contributors","subscribers_url":"https://api.github.com/repos/plotly/plotly.py/subscribers","subscription_url":"https://api.github.com/repos/plotly/plotly.py/subscription","commits_url":"https://api.github.com/repos/plotly/plotly.py/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/plotly.py/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/plotly.py/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/plotly.py/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/plotly.py/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/plotly.py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/plotly.py/merges","archive_url":"https://api.github.com/repos/plotly/plotly.py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/plotly.py/downloads","issues_url":"https://api.github.com/repos/plotly/plotly.py/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/plotly.py/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/plotly.py/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/plotly.py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/plotly.py/labels{/name}","releases_url":"https://api.github.com/repos/plotly/plotly.py/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/plotly.py/deployments","created_at":"2013-11-21T05:53:08Z","updated_at":"2016-11-24T12:00:37Z","pushed_at":"2016-11-24T21:52:52Z","git_url":"git://github.com/plotly/plotly.py.git","ssh_url":"git@github.com:plotly/plotly.py.git","clone_url":"https://github.com/plotly/plotly.py.git","svn_url":"https://github.com/plotly/plotly.py","homepage":"https://plot.ly/python/","size":12123,"stargazers_count":1666,"watchers_count":1666,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":404,"mirror_url":null,"open_issues_count":188,"forks":404,"open_issues":188,"watchers":1666,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/584"},"html":{"href":"https://github.com/plotly/plotly.py/pull/584"},"issue":{"href":"https://api.github.com/repos/plotly/plotly.py/issues/584"},"comments":{"href":"https://api.github.com/repos/plotly/plotly.py/issues/584/comments"},"review_comments":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/584/comments"},"review_comment":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/584/commits"},"statuses":{"href":"https://api.github.com/repos/plotly/plotly.py/statuses/fca8fedb1c975279d4ae264c17146ea998f07350"}}}}
{"actor":{"display_login":"chriddyp"}}