Started working on the documentation

This commit is contained in:
Stijn Van Campenhout
2019-09-18 21:45:56 +02:00
parent 94913db57e
commit d70f777da4
5 changed files with 104 additions and 0 deletions

View File

@@ -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
================== ==================

View File

@@ -0,0 +1,11 @@
Pip
===
Like any other package, you can install rmapi using pip:
.. code-block:: bash
pip install rmapi

View File

@@ -5,3 +5,5 @@ rmapipy
:maxdepth: 4 :maxdepth: 4
rmapi rmapi

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

View File

@@ -0,0 +1,5 @@
"""
.. note::
This is an unofficial api client for the Remarkable Cloud. Use at your own
risk.
"""