{"action":"created","comment":{"url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/comments/55232252","id":55232252,"diff_hunk":"@@ -98,6 +103,31 @@ def import_data():\n                            lastfm_username=lastfm_username)\n \n \n+@user_bp.route(\"/export\")\n+@login_required\n+def export_data():\n+    filename = request.args.get(\"filename\")","path":"webserver/views/user.py","position":19,"original_position":19,"commit_id":"59cdd0f3c58a78977fd230b361cd7fbbf9ed6eb4","original_commit_id":"8f1b7b2bfdd2904aa84b10b9696f576642ece298","user":{"login":"pinkeshbadjatiya","id":14854424,"avatar_url":"https://avatars.githubusercontent.com/u/14854424?v=3","gravatar_id":"","url":"https://api.github.com/users/pinkeshbadjatiya","html_url":"https://github.com/pinkeshbadjatiya","followers_url":"https://api.github.com/users/pinkeshbadjatiya/followers","following_url":"https://api.github.com/users/pinkeshbadjatiya/following{/other_user}","gists_url":"https://api.github.com/users/pinkeshbadjatiya/gists{/gist_id}","starred_url":"https://api.github.com/users/pinkeshbadjatiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinkeshbadjatiya/subscriptions","organizations_url":"https://api.github.com/users/pinkeshbadjatiya/orgs","repos_url":"https://api.github.com/users/pinkeshbadjatiya/repos","events_url":"https://api.github.com/users/pinkeshbadjatiya/events{/privacy}","received_events_url":"https://api.github.com/users/pinkeshbadjatiya/received_events","type":"User","site_admin":false},"body":"We can actually just export the data, but providing user an option to give file name won't be a bad idea.","created_at":"2016-03-07T16:47:53Z","updated_at":"2016-03-07T16:47:53Z","html_url":"https://github.com/metabrainz/listenbrainz-server/pull/70#discussion_r55232252","pull_request_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/comments/55232252"},"html":{"href":"https://github.com/metabrainz/listenbrainz-server/pull/70#discussion_r55232252"},"pull_request":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70","id":61922866,"html_url":"https://github.com/metabrainz/listenbrainz-server/pull/70","diff_url":"https://github.com/metabrainz/listenbrainz-server/pull/70.diff","patch_url":"https://github.com/metabrainz/listenbrainz-server/pull/70.patch","issue_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues/70","number":70,"state":"open","locked":false,"title":"Fix [LB-13] | Export Listens","user":{"login":"pinkeshbadjatiya","id":14854424,"avatar_url":"https://avatars.githubusercontent.com/u/14854424?v=3","gravatar_id":"","url":"https://api.github.com/users/pinkeshbadjatiya","html_url":"https://github.com/pinkeshbadjatiya","followers_url":"https://api.github.com/users/pinkeshbadjatiya/followers","following_url":"https://api.github.com/users/pinkeshbadjatiya/following{/other_user}","gists_url":"https://api.github.com/users/pinkeshbadjatiya/gists{/gist_id}","starred_url":"https://api.github.com/users/pinkeshbadjatiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinkeshbadjatiya/subscriptions","organizations_url":"https://api.github.com/users/pinkeshbadjatiya/orgs","repos_url":"https://api.github.com/users/pinkeshbadjatiya/repos","events_url":"https://api.github.com/users/pinkeshbadjatiya/events{/privacy}","received_events_url":"https://api.github.com/users/pinkeshbadjatiya/received_events","type":"User","site_admin":false},"body":"Fix for <b><a href=\"http://tickets.musicbrainz.org/browse/LB-13\">LB-13</a></b>\r\nListen export to json file.\r\n![Screenshot](http://i.imgur.com/J1GfWsa.png)","created_at":"2016-03-07T14:20:51Z","updated_at":"2016-03-07T16:47:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"396adf3e7dc52f412e08465d6b157f88da617f1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70/commits","review_comments_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70/comments","review_comment_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues/70/comments","statuses_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/statuses/59cdd0f3c58a78977fd230b361cd7fbbf9ed6eb4","head":{"label":"pinkeshbadjatiya:export-listens","ref":"export-listens","sha":"59cdd0f3c58a78977fd230b361cd7fbbf9ed6eb4","user":{"login":"pinkeshbadjatiya","id":14854424,"avatar_url":"https://avatars.githubusercontent.com/u/14854424?v=3","gravatar_id":"","url":"https://api.github.com/users/pinkeshbadjatiya","html_url":"https://github.com/pinkeshbadjatiya","followers_url":"https://api.github.com/users/pinkeshbadjatiya/followers","following_url":"https://api.github.com/users/pinkeshbadjatiya/following{/other_user}","gists_url":"https://api.github.com/users/pinkeshbadjatiya/gists{/gist_id}","starred_url":"https://api.github.com/users/pinkeshbadjatiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinkeshbadjatiya/subscriptions","organizations_url":"https://api.github.com/users/pinkeshbadjatiya/orgs","repos_url":"https://api.github.com/users/pinkeshbadjatiya/repos","events_url":"https://api.github.com/users/pinkeshbadjatiya/events{/privacy}","received_events_url":"https://api.github.com/users/pinkeshbadjatiya/received_events","type":"User","site_admin":false},"repo":{"id":53163472,"name":"listenbrainz-server","full_name":"pinkeshbadjatiya/listenbrainz-server","owner":{"login":"pinkeshbadjatiya","id":14854424,"avatar_url":"https://avatars.githubusercontent.com/u/14854424?v=3","gravatar_id":"","url":"https://api.github.com/users/pinkeshbadjatiya","html_url":"https://github.com/pinkeshbadjatiya","followers_url":"https://api.github.com/users/pinkeshbadjatiya/followers","following_url":"https://api.github.com/users/pinkeshbadjatiya/following{/other_user}","gists_url":"https://api.github.com/users/pinkeshbadjatiya/gists{/gist_id}","starred_url":"https://api.github.com/users/pinkeshbadjatiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinkeshbadjatiya/subscriptions","organizations_url":"https://api.github.com/users/pinkeshbadjatiya/orgs","repos_url":"https://api.github.com/users/pinkeshbadjatiya/repos","events_url":"https://api.github.com/users/pinkeshbadjatiya/events{/privacy}","received_events_url":"https://api.github.com/users/pinkeshbadjatiya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pinkeshbadjatiya/listenbrainz-server","description":"Server for the ListenBrainz project","fork":true,"url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server","forks_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/forks","keys_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/teams","hooks_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/events","assignees_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/tags","blobs_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/languages","stargazers_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/subscription","commits_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/merges","archive_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/downloads","issues_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/releases{/id}","deployments_url":"https://api.github.com/repos/pinkeshbadjatiya/listenbrainz-server/deployments","created_at":"2016-03-04T20:28:41Z","updated_at":"2016-03-04T20:28:42Z","pushed_at":"2016-03-07T16:18:59Z","git_url":"git://github.com/pinkeshbadjatiya/listenbrainz-server.git","ssh_url":"git@github.com:pinkeshbadjatiya/listenbrainz-server.git","clone_url":"https://github.com/pinkeshbadjatiya/listenbrainz-server.git","svn_url":"https://github.com/pinkeshbadjatiya/listenbrainz-server","homepage":"https://listenbrainz.org/","size":1045,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"metabrainz:master","ref":"master","sha":"45a2bd079a7da386d07f87294f53cbd78676226a","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":41960013,"name":"listenbrainz-server","full_name":"metabrainz/listenbrainz-server","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/listenbrainz-server","description":"Server for the ListenBrainz project","fork":false,"url":"https://api.github.com/repos/metabrainz/listenbrainz-server","forks_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/forks","keys_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/teams","hooks_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/events","assignees_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/tags","blobs_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/languages","stargazers_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/subscription","commits_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/merges","archive_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/downloads","issues_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/releases{/id}","deployments_url":"https://api.github.com/repos/metabrainz/listenbrainz-server/deployments","created_at":"2015-09-05T12:30:49Z","updated_at":"2016-03-01T20:38:47Z","pushed_at":"2016-03-07T16:19:10Z","git_url":"git://github.com/metabrainz/listenbrainz-server.git","ssh_url":"git@github.com:metabrainz/listenbrainz-server.git","clone_url":"https://github.com/metabrainz/listenbrainz-server.git","svn_url":"https://github.com/metabrainz/listenbrainz-server","homepage":"https://listenbrainz.org/","size":1056,"stargazers_count":53,"watchers_count":53,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":10,"forks":12,"open_issues":10,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70"},"html":{"href":"https://github.com/metabrainz/listenbrainz-server/pull/70"},"issue":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues/70"},"comments":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/listenbrainz-server/statuses/59cdd0f3c58a78977fd230b361cd7fbbf9ed6eb4"}}}}