Skip to content

Repository files navigation

jotta

Unofficial Jottacloud JavaScript API. The code works in the browser too, but due to CORS restrictions in the Jotta JFS API, it won't work from a browser and calls would need to be proxied via a (Node.js) backend.

Features

  • Standard authentication (personal login token)
  • Automatic token refresh
  • List files
  • Share files
  • Download files (streaming)
  • Thumbnails
  • Get customer info
  • Automatic retries (based on ky)

Usage

import makeApi from 'jotta';

// Create the API client
const api = makeApi({
  initialState,
  onStateUpdated: (newState) => {
    console.log('State updated', newState);
  },
  onAuthFailed: () => {
    console.warn('Please login again');
  },
});

For usage and examples, see examples.ts.

TODO

  • Implement more API calls. Currently read-only operations supported.
  • Implement Google Protobuf API (used by Jottacloud app)

Contributing

Release

npm version minor
npm publish
git push --follow-tags

Sources & inspiration

About

Unofficial Jottacloud JavaScript API

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages