rmapi-js
    Preparing search index...

      rmapi-js

      Create and interact with reMarkable cloud.

      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, or it's interior RawRemarkableApi (for lower level functions).

      A simple rename

      import { register, remarkable } from "rmapi-js";

      const code = "..." // eight letter code from https://my.remarkable.com/device/browser/connect
      const token = await register(code)
      // persist token
      const api = await remarkable(token);
      // list all items (documents and collections)
      const [first, ...rest] = await api.listItems();
      // rename first item
      const entry = await api.rename(first, "new name");

      A simple upload

      import { remarkable } from "rmapi-js";

      const api = await remarkable(...);
      const entry = await api.putEpub("document name", epubBuffer);

      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 property 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.

      Detailed information about the low-level storage an apis can be found in RawRemarkableApi.

      Additionally, this entire api was reverse engineered, so some things are only [speculative], or entirely [unknown]. If something breaks, please file an issue!

      Classes

      GenerationError
      HashNotFoundError
      ResponseError
      ValidationError

      Interfaces

      AuthOptions
      AuthorIdsBlock
      CollectionContent
      CollectionEntry
      CPageNumberValue
      CPagePage
      CPages
      CPageStringValue
      CPageUUID
      CrdtId
      DeviceScreen
      DocumentContent
      DocumentMetadata
      DocumentType
      Entries
      EntryCommon
      FolderOptions
      GlyphRange
      ItemRef
      KeyboardMetadata
      LegacyCollectionContent
      LegacyDocumentContent
      LwwValue
      Metadata
      MigrationInfoBlock
      PageInfoBlock
      PageTag
      PutDocumentOptions
      PutOptions
      RawEntry
      RawRemarkableApi
      Rectangle
      RegisterOptions
      RemarkableApi
      RemarkableOptions
      RemarkableSessionOptions
      RmLayer
      RmLine
      RmPageV5
      RmPoint
      RmScene
      RmSceneLayer
      RmV6Line
      RmV6Point
      RmV6Text
      RootTextBlock
      SceneGlyphItemBlock
      SceneGroupItemBlock
      SceneInfoBlock
      SceneItem
      SceneLineItemBlock
      SceneTextItemBlock
      SceneTombstoneItemBlock
      SceneTreeBlock
      Tag
      TemplateContent
      TemplateType
      TreeNodeBlock
      UnknownBlock

      Type Aliases

      BackgroundFilter
      Content
      DeviceModel
      Entry
      FileType
      Orientation
      RmBlock
      RmBrush
      RmPage
      RmSceneItem
      RmV6TextValue
      RmVersion
      SchemaVersion
      TextAlignment
      UploadMimeType
      ZoomMode

      Variables

      deviceScreens
      END_MARKER
      rmColors
      ROOT_ID

      Functions

      auth
      crdtKey
      decodeBrush
      parseRmScene
      register
      remarkable
      session