{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/comments/23128718","id":23128718,"diff_hunk":"@@ -113,7 +113,11 @@ define(function(require) {\n             var metadata = values[0];\n             var contents = values[1];\n             var model = files_resource_to_contents_model(path, metadata);\n-            model['content'] = notebook_model.notebook_from_file_contents(contents);\n+            if(metadata.mimetyme == drive_utils.NOTEBOOK_MIMETYPE){","path":"jupyterdrive/gdrive/drive-contents.js","position":5,"original_position":5,"commit_id":"60178ef0a94eab1e5caeb4a6950f8794a5c472e8","original_commit_id":"60178ef0a94eab1e5caeb4a6950f8794a5c472e8","user":{"login":"KesterTong","id":5741341,"avatar_url":"https://avatars.githubusercontent.com/u/5741341?v=3","gravatar_id":"","url":"https://api.github.com/users/KesterTong","html_url":"https://github.com/KesterTong","followers_url":"https://api.github.com/users/KesterTong/followers","following_url":"https://api.github.com/users/KesterTong/following{/other_user}","gists_url":"https://api.github.com/users/KesterTong/gists{/gist_id}","starred_url":"https://api.github.com/users/KesterTong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KesterTong/subscriptions","organizations_url":"https://api.github.com/users/KesterTong/orgs","repos_url":"https://api.github.com/users/KesterTong/repos","events_url":"https://api.github.com/users/KesterTong/events{/privacy}","received_events_url":"https://api.github.com/users/KesterTong/received_events","type":"User","site_admin":false},"body":"on detecting the type (notebook vs text file):  We've already done this in ```file_resource_to_contents_model```.  ```model.type``` stores the file type.  But in this case the ```get``` function requires specifying the type anyway (is this optional?)\r\n\r\nYou might consider adding an optional parameter named ```type``` to ```file_resource_to_contents_model``` so that when the caller specifies the type, it will use the type specified by the user, and otherwise it will detect the file type.","created_at":"2015-01-17T21:37:29Z","updated_at":"2015-01-17T21:37:29Z","html_url":"https://github.com/jupyter/jupyter-drive/pull/56#discussion_r23128718","pull_request_url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/comments/23128718"},"html":{"href":"https://github.com/jupyter/jupyter-drive/pull/56#discussion_r23128718"},"pull_request":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56","id":27557564,"html_url":"https://github.com/jupyter/jupyter-drive/pull/56","diff_url":"https://github.com/jupyter/jupyter-drive/pull/56.diff","patch_url":"https://github.com/jupyter/jupyter-drive/pull/56.patch","issue_url":"https://api.github.com/repos/jupyter/jupyter-drive/issues/56","number":56,"state":"open","locked":false,"title":"Allow creation and edition of text-files with google drive.","user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"body":"Not perfect yet, but still figuring out things. ","created_at":"2015-01-17T14:49:42Z","updated_at":"2015-01-17T21:37:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36cace3dd4a855d0013a5186fca52ddf94a8c67a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56/commits","review_comments_url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56/comments","review_comment_url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jupyter/jupyter-drive/issues/56/comments","statuses_url":"https://api.github.com/repos/jupyter/jupyter-drive/statuses/60178ef0a94eab1e5caeb4a6950f8794a5c472e8","head":{"label":"Carreau:textfile","ref":"textfile","sha":"60178ef0a94eab1e5caeb4a6950f8794a5c472e8","user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"repo":{"id":26858562,"name":"jupyter-drive","full_name":"Carreau/jupyter-drive","owner":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Carreau/jupyter-drive","description":"Google drive for jupyter notebooks","fork":true,"url":"https://api.github.com/repos/Carreau/jupyter-drive","forks_url":"https://api.github.com/repos/Carreau/jupyter-drive/forks","keys_url":"https://api.github.com/repos/Carreau/jupyter-drive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Carreau/jupyter-drive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Carreau/jupyter-drive/teams","hooks_url":"https://api.github.com/repos/Carreau/jupyter-drive/hooks","issue_events_url":"https://api.github.com/repos/Carreau/jupyter-drive/issues/events{/number}","events_url":"https://api.github.com/repos/Carreau/jupyter-drive/events","assignees_url":"https://api.github.com/repos/Carreau/jupyter-drive/assignees{/user}","branches_url":"https://api.github.com/repos/Carreau/jupyter-drive/branches{/branch}","tags_url":"https://api.github.com/repos/Carreau/jupyter-drive/tags","blobs_url":"https://api.github.com/repos/Carreau/jupyter-drive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Carreau/jupyter-drive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Carreau/jupyter-drive/git/refs{/sha}","trees_url":"https://api.github.com/repos/Carreau/jupyter-drive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Carreau/jupyter-drive/statuses/{sha}","languages_url":"https://api.github.com/repos/Carreau/jupyter-drive/languages","stargazers_url":"https://api.github.com/repos/Carreau/jupyter-drive/stargazers","contributors_url":"https://api.github.com/repos/Carreau/jupyter-drive/contributors","subscribers_url":"https://api.github.com/repos/Carreau/jupyter-drive/subscribers","subscription_url":"https://api.github.com/repos/Carreau/jupyter-drive/subscription","commits_url":"https://api.github.com/repos/Carreau/jupyter-drive/commits{/sha}","git_commits_url":"https://api.github.com/repos/Carreau/jupyter-drive/git/commits{/sha}","comments_url":"https://api.github.com/repos/Carreau/jupyter-drive/comments{/number}","issue_comment_url":"https://api.github.com/repos/Carreau/jupyter-drive/issues/comments/{number}","contents_url":"https://api.github.com/repos/Carreau/jupyter-drive/contents/{+path}","compare_url":"https://api.github.com/repos/Carreau/jupyter-drive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Carreau/jupyter-drive/merges","archive_url":"https://api.github.com/repos/Carreau/jupyter-drive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Carreau/jupyter-drive/downloads","issues_url":"https://api.github.com/repos/Carreau/jupyter-drive/issues{/number}","pulls_url":"https://api.github.com/repos/Carreau/jupyter-drive/pulls{/number}","milestones_url":"https://api.github.com/repos/Carreau/jupyter-drive/milestones{/number}","notifications_url":"https://api.github.com/repos/Carreau/jupyter-drive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Carreau/jupyter-drive/labels{/name}","releases_url":"https://api.github.com/repos/Carreau/jupyter-drive/releases{/id}","created_at":"2014-11-19T11:35:31Z","updated_at":"2014-11-19T11:35:31Z","pushed_at":"2015-01-17T17:36:03Z","git_url":"git://github.com/Carreau/jupyter-drive.git","ssh_url":"git@github.com:Carreau/jupyter-drive.git","clone_url":"https://github.com/Carreau/jupyter-drive.git","svn_url":"https://github.com/Carreau/jupyter-drive","homepage":null,"size":491,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"jupyter:master","ref":"master","sha":"4619f5f5c64937c587abc599a76e3745fdec01af","user":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"repo":{"id":25882864,"name":"jupyter-drive","full_name":"jupyter/jupyter-drive","owner":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter/jupyter-drive","description":"Google drive for jupyter notebooks","fork":false,"url":"https://api.github.com/repos/jupyter/jupyter-drive","forks_url":"https://api.github.com/repos/jupyter/jupyter-drive/forks","keys_url":"https://api.github.com/repos/jupyter/jupyter-drive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter/jupyter-drive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter/jupyter-drive/teams","hooks_url":"https://api.github.com/repos/jupyter/jupyter-drive/hooks","issue_events_url":"https://api.github.com/repos/jupyter/jupyter-drive/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter/jupyter-drive/events","assignees_url":"https://api.github.com/repos/jupyter/jupyter-drive/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter/jupyter-drive/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter/jupyter-drive/tags","blobs_url":"https://api.github.com/repos/jupyter/jupyter-drive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter/jupyter-drive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter/jupyter-drive/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter/jupyter-drive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter/jupyter-drive/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter/jupyter-drive/languages","stargazers_url":"https://api.github.com/repos/jupyter/jupyter-drive/stargazers","contributors_url":"https://api.github.com/repos/jupyter/jupyter-drive/contributors","subscribers_url":"https://api.github.com/repos/jupyter/jupyter-drive/subscribers","subscription_url":"https://api.github.com/repos/jupyter/jupyter-drive/subscription","commits_url":"https://api.github.com/repos/jupyter/jupyter-drive/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter/jupyter-drive/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter/jupyter-drive/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter/jupyter-drive/issues/comments/{number}","contents_url":"https://api.github.com/repos/jupyter/jupyter-drive/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter/jupyter-drive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter/jupyter-drive/merges","archive_url":"https://api.github.com/repos/jupyter/jupyter-drive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter/jupyter-drive/downloads","issues_url":"https://api.github.com/repos/jupyter/jupyter-drive/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter/jupyter-drive/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter/jupyter-drive/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter/jupyter-drive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter/jupyter-drive/labels{/name}","releases_url":"https://api.github.com/repos/jupyter/jupyter-drive/releases{/id}","created_at":"2014-10-28T18:04:55Z","updated_at":"2015-01-17T21:13:51Z","pushed_at":"2015-01-17T21:13:51Z","git_url":"git://github.com/jupyter/jupyter-drive.git","ssh_url":"git@github.com:jupyter/jupyter-drive.git","clone_url":"https://github.com/jupyter/jupyter-drive.git","svn_url":"https://github.com/jupyter/jupyter-drive","homepage":null,"size":816,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":12,"forks":5,"open_issues":12,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56"},"html":{"href":"https://github.com/jupyter/jupyter-drive/pull/56"},"issue":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/issues/56"},"comments":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter/jupyter-drive/statuses/60178ef0a94eab1e5caeb4a6950f8794a5c472e8"}}}}