JSPM

owncloud-sdk

1.0.0-683
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 974
  • Score
    100M100P100Q100277F
  • License MIT

ownCloud client library for JavaScript

Package Exports

  • owncloud-sdk

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (owncloud-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status codecov docs

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

Install

$ npm install owncloud-sdk

Usage

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

Example Projects

ownCloud Phoenix

ownCloud Phoenix will be the next generation Web frontend for ownCloud. It uses owncloud-sdk.

All Methods Available

Full API documentation is available at docs

Building the Documentation

JSDocs

To build the jsdocs, type this command and follow the instructions on the terminal :

$ yarn run docs

Unit tests

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

Team


Noveen Sachdeva

Vincent Petry

Thomas Müller

GSoC'17