This project was inspired by the work of https://github.com/kevlened/remarkable-node, adding typing and new features like the upload of a document.
Unofficial reMarkable api wrapper for node.js based on these unofficial docs.
This module is typed for TypeScript, but you can still use JavaScript with it.
Installation
yarn add remarkable-typescript
npm install remarkable-typescript
Then, go to reMarkable's website to genereate a code to pair your reMarkable. This code is only available 5 minutes.
Example
import { Remarkable, ItemResponse } from 'remarkable-typescript';
const fs = require('fs');
(async () => {
const client = new Remarkable();
const deviceToken = await client.register({ code: 'created code' });
console.log(deviceToken);
await client.refreshToken();
const items = await client.getAllItems();
const item = await client.getItemWithId('some uuid');
await client.deleteItem('some uuid', 1);
const myPDF = fs.readFileSync('./my/PDF/location.pdf');
const pdfUploadedId = await client.uploadPDF('My PDF name', myPDF);
const zipFile = await client.downloadZip(pdfUploadedId);
const zipFileId = await client.uploadZip('My document name', ID: 'f831481c-7d2d-4776-922d-36e708d9d680', zipFile);
const epubDocId = await client.uploadEPUB('name of ePub document', ID: '181a124b-bbdf-4fdd-8310-64fa87bc9c7f', epubFileBuffer, );
const directoryId = await client.createDirectory('testDir2', id, ID: '702ba145-0a78-4e19-9324-6f8fb3da3c1a', );
})();
License
MIT