{"action":"created","comment":{"url":"https://api.github.com/repos/haiwen/seafile-js/pulls/comments/211066835","pull_request_review_id":147421439,"id":211066835,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTA2NjgzNQ==","diff_hunk":"@@ -264,6 +264,41 @@ class SeafileAPI {\n     let source = CancelToken.source();\n     return source;\n   }\n+  \n+  //---- ShareLink API \n+  createShareLink(repoID, dirPath, password, expireDays) {\n+    const url = this.server + '/api/v2.1/share-links/';\n+    let form = new FormData();\n+    form.append('path', dirPath);\n+    form.append('repo_id', repoID);\n+    if (password) {\n+      form.append('password', password);\n+    }\n+    if (expireDays) {\n+      form.append('expire_days', expireDays);\n+    }\n+    return this._sendPostRequest(url, form);\n+  }\n+\n+  deleteShareLink(token) {\n+    const url = this.server + '/api/v2.1/share-links/' + token + '/';\n+    return this.req.delete(url);\n+  }\n \n+  ListAllLink() {","path":"src/seafile-api.js","position":25,"original_position":25,"commit_id":"5d1da1a696687de48d8e9361fe55ff776e347d04","original_commit_id":"5d1da1a696687de48d8e9361fe55ff776e347d04","user":{"login":"freeplant","id":109339,"node_id":"MDQ6VXNlcjEwOTMzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/109339?v=4","gravatar_id":"","url":"https://api.github.com/users/freeplant","html_url":"https://github.com/freeplant","followers_url":"https://api.github.com/users/freeplant/followers","following_url":"https://api.github.com/users/freeplant/following{/other_user}","gists_url":"https://api.github.com/users/freeplant/gists{/gist_id}","starred_url":"https://api.github.com/users/freeplant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeplant/subscriptions","organizations_url":"https://api.github.com/users/freeplant/orgs","repos_url":"https://api.github.com/users/freeplant/repos","events_url":"https://api.github.com/users/freeplant/events{/privacy}","received_events_url":"https://api.github.com/users/freeplant/received_events","type":"User","site_admin":false},"body":"listAllShareLinks","created_at":"2018-08-18T06:32:02Z","updated_at":"2018-08-18T06:32:16Z","html_url":"https://github.com/haiwen/seafile-js/pull/13#discussion_r211066835","pull_request_url":"https://api.github.com/repos/haiwen/seafile-js/pulls/13","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/haiwen/seafile-js/pulls/comments/211066835"},"html":{"href":"https://github.com/haiwen/seafile-js/pull/13#discussion_r211066835"},"pull_request":{"href":"https://api.github.com/repos/haiwen/seafile-js/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/haiwen/seafile-js/pulls/13","id":209296236,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5Mjk2MjM2","html_url":"https://github.com/haiwen/seafile-js/pull/13","diff_url":"https://github.com/haiwen/seafile-js/pull/13.diff","patch_url":"https://github.com/haiwen/seafile-js/pull/13.patch","issue_url":"https://api.github.com/repos/haiwen/seafile-js/issues/13","number":13,"state":"open","locked":false,"title":"add share link API","user":{"login":"Michael18811380328","id":37589122,"node_id":"MDQ6VXNlcjM3NTg5MTIy","avatar_url":"https://avatars3.githubusercontent.com/u/37589122?v=4","gravatar_id":"","url":"https://api.github.com/users/Michael18811380328","html_url":"https://github.com/Michael18811380328","followers_url":"https://api.github.com/users/Michael18811380328/followers","following_url":"https://api.github.com/users/Michael18811380328/following{/other_user}","gists_url":"https://api.github.com/users/Michael18811380328/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael18811380328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael18811380328/subscriptions","organizations_url":"https://api.github.com/users/Michael18811380328/orgs","repos_url":"https://api.github.com/users/Michael18811380328/repos","events_url":"https://api.github.com/users/Michael18811380328/events{/privacy}","received_events_url":"https://api.github.com/users/Michael18811380328/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-18T05:48:32Z","updated_at":"2018-08-18T06:32:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04d40dc8f1f94e130aca8605f4ac0ebf67a35b63","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/haiwen/seafile-js/pulls/13/commits","review_comments_url":"https://api.github.com/repos/haiwen/seafile-js/pulls/13/comments","review_comment_url":"https://api.github.com/repos/haiwen/seafile-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haiwen/seafile-js/issues/13/comments","statuses_url":"https://api.github.com/repos/haiwen/seafile-js/statuses/5d1da1a696687de48d8e9361fe55ff776e347d04","head":{"label":"haiwen:sharebtnnew","ref":"sharebtnnew","sha":"5d1da1a696687de48d8e9361fe55ff776e347d04","user":{"login":"haiwen","id":1948782,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDg3ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/1948782?v=4","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"repo":{"id":124641462,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ2NDE0NjI=","name":"seafile-js","full_name":"haiwen/seafile-js","owner":{"login":"haiwen","id":1948782,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDg3ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/1948782?v=4","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haiwen/seafile-js","description":"Seafile Javascript API","fork":false,"url":"https://api.github.com/repos/haiwen/seafile-js","forks_url":"https://api.github.com/repos/haiwen/seafile-js/forks","keys_url":"https://api.github.com/repos/haiwen/seafile-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haiwen/seafile-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haiwen/seafile-js/teams","hooks_url":"https://api.github.com/repos/haiwen/seafile-js/hooks","issue_events_url":"https://api.github.com/repos/haiwen/seafile-js/issues/events{/number}","events_url":"https://api.github.com/repos/haiwen/seafile-js/events","assignees_url":"https://api.github.com/repos/haiwen/seafile-js/assignees{/user}","branches_url":"https://api.github.com/repos/haiwen/seafile-js/branches{/branch}","tags_url":"https://api.github.com/repos/haiwen/seafile-js/tags","blobs_url":"https://api.github.com/repos/haiwen/seafile-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haiwen/seafile-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haiwen/seafile-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/haiwen/seafile-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haiwen/seafile-js/statuses/{sha}","languages_url":"https://api.github.com/repos/haiwen/seafile-js/languages","stargazers_url":"https://api.github.com/repos/haiwen/seafile-js/stargazers","contributors_url":"https://api.github.com/repos/haiwen/seafile-js/contributors","subscribers_url":"https://api.github.com/repos/haiwen/seafile-js/subscribers","subscription_url":"https://api.github.com/repos/haiwen/seafile-js/subscription","commits_url":"https://api.github.com/repos/haiwen/seafile-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/haiwen/seafile-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/haiwen/seafile-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/haiwen/seafile-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/haiwen/seafile-js/contents/{+path}","compare_url":"https://api.github.com/repos/haiwen/seafile-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haiwen/seafile-js/merges","archive_url":"https://api.github.com/repos/haiwen/seafile-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haiwen/seafile-js/downloads","issues_url":"https://api.github.com/repos/haiwen/seafile-js/issues{/number}","pulls_url":"https://api.github.com/repos/haiwen/seafile-js/pulls{/number}","milestones_url":"https://api.github.com/repos/haiwen/seafile-js/milestones{/number}","notifications_url":"https://api.github.com/repos/haiwen/seafile-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haiwen/seafile-js/labels{/name}","releases_url":"https://api.github.com/repos/haiwen/seafile-js/releases{/id}","deployments_url":"https://api.github.com/repos/haiwen/seafile-js/deployments","created_at":"2018-03-10T09:34:53Z","updated_at":"2018-08-16T02:36:10Z","pushed_at":"2018-08-18T05:48:33Z","git_url":"git://github.com/haiwen/seafile-js.git","ssh_url":"git@github.com:haiwen/seafile-js.git","clone_url":"https://github.com/haiwen/seafile-js.git","svn_url":"https://github.com/haiwen/seafile-js","homepage":null,"size":233,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"haiwen:master","ref":"master","sha":"c9f5bf7fae13ef623be93c976ce09573a025582a","user":{"login":"haiwen","id":1948782,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDg3ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/1948782?v=4","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"repo":{"id":124641462,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ2NDE0NjI=","name":"seafile-js","full_name":"haiwen/seafile-js","owner":{"login":"haiwen","id":1948782,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDg3ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/1948782?v=4","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haiwen/seafile-js","description":"Seafile Javascript API","fork":false,"url":"https://api.github.com/repos/haiwen/seafile-js","forks_url":"https://api.github.com/repos/haiwen/seafile-js/forks","keys_url":"https://api.github.com/repos/haiwen/seafile-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haiwen/seafile-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haiwen/seafile-js/teams","hooks_url":"https://api.github.com/repos/haiwen/seafile-js/hooks","issue_events_url":"https://api.github.com/repos/haiwen/seafile-js/issues/events{/number}","events_url":"https://api.github.com/repos/haiwen/seafile-js/events","assignees_url":"https://api.github.com/repos/haiwen/seafile-js/assignees{/user}","branches_url":"https://api.github.com/repos/haiwen/seafile-js/branches{/branch}","tags_url":"https://api.github.com/repos/haiwen/seafile-js/tags","blobs_url":"https://api.github.com/repos/haiwen/seafile-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haiwen/seafile-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haiwen/seafile-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/haiwen/seafile-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haiwen/seafile-js/statuses/{sha}","languages_url":"https://api.github.com/repos/haiwen/seafile-js/languages","stargazers_url":"https://api.github.com/repos/haiwen/seafile-js/stargazers","contributors_url":"https://api.github.com/repos/haiwen/seafile-js/contributors","subscribers_url":"https://api.github.com/repos/haiwen/seafile-js/subscribers","subscription_url":"https://api.github.com/repos/haiwen/seafile-js/subscription","commits_url":"https://api.github.com/repos/haiwen/seafile-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/haiwen/seafile-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/haiwen/seafile-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/haiwen/seafile-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/haiwen/seafile-js/contents/{+path}","compare_url":"https://api.github.com/repos/haiwen/seafile-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haiwen/seafile-js/merges","archive_url":"https://api.github.com/repos/haiwen/seafile-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haiwen/seafile-js/downloads","issues_url":"https://api.github.com/repos/haiwen/seafile-js/issues{/number}","pulls_url":"https://api.github.com/repos/haiwen/seafile-js/pulls{/number}","milestones_url":"https://api.github.com/repos/haiwen/seafile-js/milestones{/number}","notifications_url":"https://api.github.com/repos/haiwen/seafile-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haiwen/seafile-js/labels{/name}","releases_url":"https://api.github.com/repos/haiwen/seafile-js/releases{/id}","deployments_url":"https://api.github.com/repos/haiwen/seafile-js/deployments","created_at":"2018-03-10T09:34:53Z","updated_at":"2018-08-16T02:36:10Z","pushed_at":"2018-08-18T05:48:33Z","git_url":"git://github.com/haiwen/seafile-js.git","ssh_url":"git@github.com:haiwen/seafile-js.git","clone_url":"https://github.com/haiwen/seafile-js.git","svn_url":"https://github.com/haiwen/seafile-js","homepage":null,"size":233,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haiwen/seafile-js/pulls/13"},"html":{"href":"https://github.com/haiwen/seafile-js/pull/13"},"issue":{"href":"https://api.github.com/repos/haiwen/seafile-js/issues/13"},"comments":{"href":"https://api.github.com/repos/haiwen/seafile-js/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/haiwen/seafile-js/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/haiwen/seafile-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haiwen/seafile-js/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/haiwen/seafile-js/statuses/5d1da1a696687de48d8e9361fe55ff776e347d04"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"freeplant"}}