enabled capability to interact with rmfakecloud cloud servers #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the capability to check for other (well-configured) cloud servers.
One the first run the user is prompted for the server URL. Default is the official remarkable cloud.
Once that has been set everything continues as usual, the user must provide a one-time-code, etc.
From a technical perspective a few things have changed: all the constants in
const.py
likeDEVICE_TOKEN_URL
were split up intoDEFAULT_TOKEN_SERVER_URL
andDEVICE_TOKEN_PATH
.The
api.py
now usesself.config['device_token_url']
instead ofDEVICE_TOKEN_URL
. The value of these values is calculated after the initial prompt for the server url and saved in the config file (e.g.$HOME/.config/rmcl/config.json
).Analogously
USER_TOKEN_URL
andSERVICE_MGR_URL
where split up, calculated and put into the config dict.It might not be the most elegant solution, but it works for me (tested with
rmfakecloud
and the official cloud)