mirror of
https://github.com/subutux/rmapy.git
synced 2025-12-08 22:53:25 +00:00
Started working on the documentation
This commit is contained in:
@@ -6,6 +6,47 @@
|
|||||||
Welcome to rmapi's documentation!
|
Welcome to rmapi's documentation!
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
Some content
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
API Support
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
| ☑️ list files and directories
|
||||||
|
| ☑️ download a specific file
|
||||||
|
| ☑️ create a directory
|
||||||
|
| ☑️ move / rename a file or directory
|
||||||
|
| ☑️ upload a file
|
||||||
|
| ❎ delete a file or directory
|
||||||
|
| ❎ shell
|
||||||
|
| ❎ annotiation exports
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
installation
|
||||||
|
|
||||||
|
|
||||||
|
Quick start
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
quickstart
|
||||||
|
|
||||||
|
|
||||||
|
API Documentation
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
@@ -13,6 +54,7 @@ Welcome to rmapi's documentation!
|
|||||||
|
|
||||||
.. automodule:: rmapi
|
.. automodule:: rmapi
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|||||||
11
docs/source/installation.rst
Normal file
11
docs/source/installation.rst
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Pip
|
||||||
|
===
|
||||||
|
|
||||||
|
Like any other package, you can install rmapi using pip:
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
pip install rmapi
|
||||||
|
|
||||||
|
|
||||||
@@ -5,3 +5,5 @@ rmapipy
|
|||||||
:maxdepth: 4
|
:maxdepth: 4
|
||||||
|
|
||||||
rmapi
|
rmapi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
44
docs/source/quickstart.rst
Normal file
44
docs/source/quickstart.rst
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
quickstart
|
||||||
|
==========
|
||||||
|
|
||||||
|
If you previously used the go package `rmapi`_ ,the keys for authorization
|
||||||
|
are re-used because we use the same storage location & format.
|
||||||
|
|
||||||
|
If not, you'll need to register the client as a new device on `my remarkable`_.
|
||||||
|
|
||||||
|
|
||||||
|
.. _my remarkable: https://my.remarkable.com/connect/remarkable
|
||||||
|
|
||||||
|
.. _rmapi: https://github.com/juruen/rmapi
|
||||||
|
|
||||||
|
|
||||||
|
Registering the API CLient
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Registering the device is easy. Go to `my remarkable`_ to register a new device
|
||||||
|
and use the code you see on the webpage
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
|
||||||
|
from rmapi.api import Client
|
||||||
|
|
||||||
|
rmapi = Client()
|
||||||
|
# Shoud return False
|
||||||
|
rmapi.is_authenticated()
|
||||||
|
# This registers the client as a new device. The received device token is
|
||||||
|
# stored in the users directory in the file ~/.rmapi, the same as with the
|
||||||
|
# go rmapi client.
|
||||||
|
rmapi.register_device("fkgzzklrs")
|
||||||
|
# It's always a good idea to refresh the user token everytime you start
|
||||||
|
# a new session.
|
||||||
|
rmapi.refresh_token()
|
||||||
|
# Shoud return True
|
||||||
|
rmapi.is_authenticated()
|
||||||
|
|
||||||
|
Working with items
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The remarkable fs structure is flat containing metadata objects.
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
"""
|
||||||
|
.. note::
|
||||||
|
This is an unofficial api client for the Remarkable Cloud. Use at your own
|
||||||
|
risk.
|
||||||
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user