seafile-js 0.2.223 → 0.2.224

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/seafile-api.js +30 -27
  2. package/package.json +1 -1
@@ -384,21 +384,24 @@ var SeafileAPI = /*#__PURE__*/function () {
384
384
  }
385
385
 
386
386
  //---- share operation
387
-
388
- // share-link
389
387
  }, {
390
- key: "listUserShareLinks",
391
- value: function listUserShareLinks() {
388
+ key: "listShareLinks",
389
+ value: function listShareLinks(_ref3) {
390
+ var repoID = _ref3.repoID,
391
+ path = _ref3.path,
392
+ page = _ref3.page,
393
+ perPage = _ref3.perPage;
392
394
  var url = this.server + '/api/v2.1/share-links/';
393
- return this.req.get(url);
394
- }
395
- }, {
396
- key: "getShareLink",
397
- value: function getShareLink(repoID, filePath) {
398
- //list folder(file) links
399
- var path = encodeURIComponent(filePath);
400
- var url = this.server + '/api/v2.1/share-links/?repo_id=' + repoID + '&path=' + path;
401
- return this.req.get(url);
395
+ var params = {};
396
+ if (repoID && path) {
397
+ params.repo_id = repoID;
398
+ params.path = path;
399
+ }
400
+ params.page = page || 1;
401
+ params.per_page = perPage || 25;
402
+ return this.req.get(url, {
403
+ params: params
404
+ });
402
405
  }
403
406
  }, {
404
407
  key: "createMultiShareLink",
@@ -1101,15 +1104,15 @@ var SeafileAPI = /*#__PURE__*/function () {
1101
1104
  }, {
1102
1105
  key: "listDir",
1103
1106
  value: function listDir(repoID, dirPath) {
1104
- var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
1105
- _ref3$recursive = _ref3.recursive,
1106
- recursive = _ref3$recursive === void 0 ? false : _ref3$recursive,
1107
- _ref3$type = _ref3.type,
1108
- type = _ref3$type === void 0 ? '' : _ref3$type,
1109
- _ref3$with_thumbnail = _ref3.with_thumbnail,
1110
- with_thumbnail = _ref3$with_thumbnail === void 0 ? false : _ref3$with_thumbnail,
1111
- _ref3$with_parents = _ref3.with_parents,
1112
- with_parents = _ref3$with_parents === void 0 ? false : _ref3$with_parents;
1107
+ var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
1108
+ _ref4$recursive = _ref4.recursive,
1109
+ recursive = _ref4$recursive === void 0 ? false : _ref4$recursive,
1110
+ _ref4$type = _ref4.type,
1111
+ type = _ref4$type === void 0 ? '' : _ref4$type,
1112
+ _ref4$with_thumbnail = _ref4.with_thumbnail,
1113
+ with_thumbnail = _ref4$with_thumbnail === void 0 ? false : _ref4$with_thumbnail,
1114
+ _ref4$with_parents = _ref4.with_parents,
1115
+ with_parents = _ref4$with_parents === void 0 ? false : _ref4$with_parents;
1113
1116
  /*
1114
1117
  * opts: `{recursive: true}`, `{'with_thumbnail': true}`
1115
1118
  */
@@ -2825,11 +2828,11 @@ var SeafileAPI = /*#__PURE__*/function () {
2825
2828
  }
2826
2829
  }, {
2827
2830
  key: "updateUserInfo",
2828
- value: function updateUserInfo(_ref4) {
2829
- var name = _ref4.name,
2830
- telephone = _ref4.telephone,
2831
- contact_email = _ref4.contact_email,
2832
- list_in_address_book = _ref4.list_in_address_book;
2831
+ value: function updateUserInfo(_ref5) {
2832
+ var name = _ref5.name,
2833
+ telephone = _ref5.telephone,
2834
+ contact_email = _ref5.contact_email,
2835
+ list_in_address_book = _ref5.list_in_address_book;
2833
2836
  var url = this.server + '/api/v2.1/user/';
2834
2837
  var data = {};
2835
2838
  if (name != undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.223",
3
+ "version": "0.2.224",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {