Code cleanup & Refactoring

This commit is contained in:
Stijn Van Campenhout
2019-12-26 15:16:30 +01:00
parent 3f0e0e36a2
commit 506b34d40a
8 changed files with 91 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
quickstart
quick start
==========
If you previously used the go package `rmapi`_ ,the keys for authorization
@@ -12,7 +12,7 @@ If not, you'll need to register the client as a new device on `my remarkable`_.
.. _rmapi: https://github.com/juruen/rmapi
Registering the API CLient
Registering the API Client
~~~~~~~~~~~~~~~~~~~~~~~~~~
Registering the device is easy. Go to `my remarkable`_ to register a new device
@@ -25,16 +25,16 @@ and use the code you see on the webpage
from rmapy.api import Client
rmapy = Client()
# Shoud return False
# Should return False
rmapy.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.
rmapy.register_device("fkgzzklrs")
# It's always a good idea to refresh the user token everytime you start
# It's always a good idea to refresh the user token every time you start
# a new session.
rmapy.refresh_token()
# Shoud return True
# Should return True
rmapy.is_authenticated()
Working with items