@fatrex/nextdav
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Got

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

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

TODO

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

/@fatrex/nextdav/

    Package Sidebar

    Install

    npm i @fatrex/nextdav

    Weekly Downloads

    0

    Version

    0.3.0

    License

    ISC

    Unpacked Size

    52.6 kB

    Total Files

    17

    Last publish

    Collaborators

    • fatrex