Use this light-weight JS library with a promise based interface for seamless communication with your ownCloud instance.
Supports only browser JS but requires Javascript techniques like webpack to compile it properly
For Node.js please have a look at this tag
$ npm install owncloud-sdk
const owncloud = require('owncloud-sdk');
let oc = new owncloud({
baseUrl: config.owncloudURL,
auth: {
basic: {
username: config.username,
password: config.password
}
}
});
// Login
oc.login().then(status => {
// STUFF
}).catch(error => {
// HANDLE ERROR
});
// Share File With Link
oc.shares.shareFileWithLink('linkToYourFile').then(shareInfo => {
console.log("Link is : " + shareInfo.getLink());
}).catch(error => {
// HANDLE ERROR
});
// List all files
oc.files.list('/path/to/file/folder').then(files => {
console.log(files);
}).catch(error => {
console.log(error);
});
ownCloud Phoenix will be the next generation Web frontend for ownCloud. It uses owncloud-sdk.
Full API documentation is available at
To build the jsdocs, type this command and follow the instructions on the terminal :
$ yarn build:docs
The following command will run all unit tests. Before running the command, make sure you have edited the owncloud/test/config.json
file accordingly.
$ yarn test
Noveen Sachdeva |
Vincent Petry |
Thomas Müller |