After getting a device token with the register method,
persist it and create api instances using remarkable.
Outside of registration, all relevant methods are in
RemarkableApi.
Example
A simple rename
import { register, remarkable } from"rmapi-js";
constcode = "..."// eight letter code from https://my.remarkable.com/device/browser/connect consttoken = awaitregister(code) // persist token constapi = awaitremarkable(token); const [first, ...rest] = api.listfiles(); // rename first file constapi.rename(first.hash, "new name");
The cloud api is essentially a collection of entries. Each entry has an id,
which is a uuid4 and a hash, which indicates it's current state, and changes
as the item mutates, where the id is constant. Most mutable operations take
the initial hash so that merge conflicts can be resolved. Each entry has a
number of properties, but a key is the parent, which represents its parent
in the file structure. This will be another document id, or one of two
special ids, "" (the empty string) for the root directory, or "trash" for the
trash.
Create and interact with reMarkable cloud.
After getting a device token with the
register
method, persist it and create api instances usingremarkable
. Outside of registration, all relevant methods are inRemarkableApi
.Example
A simple rename
Example
A simple upload
Remarks
The cloud api is essentially a collection of entries. Each entry has an id, which is a uuid4 and a hash, which indicates it's current state, and changes as the item mutates, where the id is constant. Most mutable operations take the initial hash so that merge conflicts can be resolved. Each entry has a number of properties, but a key is the
parent
, which represents its parent in the file structure. This will be another document id, or one of two special ids, "" (the empty string) for the root directory, or "trash" for the trash.