jotta
v1.1.0
Published
Unofficial Jottacloud JavaScript API
Downloads
12
Readme
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-tagsSources & inspiration
- https://www.google.com/search?q=%22jfs.jottacloud.com%22
- https://www.google.com/search?q=jottacloud+api
- https://rclone.org/jottacloud/
- https://github.com/rclone/rclone/blob/fd1665ae939bf45be102323967c8bcfc60a71635/backend/jottacloud/jottacloud.go
- https://github.com/albertony/jafs/blob/69577d3d0b7108bb97f4cb8a3d2c70d434f2d3e4/JottacloudFileSystem/JaFS.cs
- https://docs.jottacloud.com/en/collections/178055-our-command-line-tool
