seafile-api
seafile-api
is a small npm module for accessing the Seafile Web API and thus controlling a Seafile instance from within a Node.js application.
Though there are quite many API methods, at the moment this module just implements a small subset of the available functions.
Documentation
Installation
$ npm install seafile-api
Initialization
You will need a valid access token to make API requests. See the API docs for further information on how to obtain a token: Web API | Quick Start. At the moment, this module does not support obtainment of access tokens.
var SeafileAPI = ;var sf = 'https://cloud.seafile.com' 'accesstoken123456789';
Usage
See the official API docs for detailed information about the methods and used parameters. Default values are used if optional parameters are not set.
listAccounts(params, callback)
sf;
- All parameters are optional
getAccountInfo(email, callback)
sf;
createAccount(params, callback)
sf;
email
: requiredpassword
: requiredis_staff
: optionalis_active
: optional
updateAccount(params, callback)
sf;
email
: required- all other params are optional
deleteAccount(email, callback)
sf;
addGroupMember(options, callback)
sf;
user_name
: requiredgroup_id
: required
deleteGroupMember(options, callback)
sf;
user_name
: requiredgroup_id
: required
moveMultiple(options, callback)
sf;
src_repo
: requireddst_repo
: requiredfile_name
: required- all other params are optional
renameDirectory(options, callback)
sf;
repo_id
: requiredp
: requirednewname
: required
createDirectory(options, callback)
sf;
repo_id
: requiredp
: required
listDirEntries(options, callback)
sf;
repo_id
: required- all other params are optional