mirror of
https://github.com/haiwen/seafile-js.git
synced 2025-06-03 01:00:19 +00:00
Seafile Javascript API
src | ||
test | ||
.babelrc | ||
.eslintrc.js | ||
.gitignore | ||
.npmignore | ||
jest.config.js | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
readme.md |
About
This is JavaScript API for Seafile.
Usage
Install seafile-js package:
npm install seafile-js
In your project:
const { SeafileAPI } = require('seafile-js')
const server = 'xxx'
const username = 'xxx'
const password = 'xxx'
const seafileAPI = new SeafileAPI()
seafileAPI.init({ server, username, password })
seafileAPI.login().then((response) => {
seafileAPI.authPing().then((response) => {
console.log(response)
}).catch((err) => {
console.log('error', err);
})
})
.catch((err) => {
console.log('error',err.config)
})