Seafile Javascript API
Go to file
2024-11-12 12:13:24 +08:00
src removed APIs for 'org admin' (#422) 2024-11-12 12:13:24 +08:00
test update version 2023-11-23 10:24:56 +08:00
.babelrc fix readme and test (#389) 2023-12-26 14:51:04 +08:00
.eslintrc.js Update dependency (#342) 2022-12-21 13:28:19 +08:00
.gitignore add library transfer to department api (#398) 2024-04-25 12:07:40 +08:00
.npmignore Update version 2018-10-19 16:04:53 +08:00
jest.config.js fix readme and test (#389) 2023-12-26 14:51:04 +08:00
LICENSE Initial commit 2018-03-10 17:34:54 +08:00
package-lock.json updated version to 0.2.237 2024-11-11 10:38:22 +08:00
package.json updated version to 0.2.237 2024-11-11 10:38:22 +08:00
readme.md fix readme and test (#389) 2023-12-26 14:51:04 +08:00

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)
})