0.3.0 • Published 2 months ago

@fatrex/nextdav v0.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

A WebDav client for Node.js


Installation

As simple as

npm add @fatrex/nextdav

Usage

import nextdav from 'nextdav';

// Create a client with your server username and password (ie: Nextcloud webdav server)
const client = new nextdav(
  'http://webdavhost.test',
  'yourusername', // If any
  'yourpassword', // If any
);

// Retrieve collections(directories) and files lists
const response = await client.getCollectionContents('/');
if (response) {
  const [collections, files] = response;
}

This lib is using Roarr as a debugging library. If you want to print debug logs you must prepend your starting script with ROARR_LOG=true

Tests

  • Client connect to server with auth
  • Client connect to server without auth
  • Client retrieves collections list
  • Client retrieves files list

TODO

  • Base client instance
  • Files and folders retrieval
  • Files download
  • Files upload
  • Files update and locks