NGnius (Graham) 8d53da61f0 Merge branch 'master' of https://git.exmods.org/rxsm/rxsm-server | 5 years ago | |
---|---|---|
rxsmserver | 5 years ago | |
scripts | 5 years ago | |
.gitignore | 5 years ago | |
LICENSE | 5 years ago | |
README.md | 5 years ago | |
requirements.txt | 5 years ago |
RXSM update server for storing and retrieving updates.
This is a single file application; all server functionality is stored in rxsmserver/__init__.py
.
/db
GET request to download the sqlite database. The database stores version information and a daily hit counter (requests to
/update
per day). This is publicly accessibly by design, for transparency.
/update
POST request to check for updates.
The body of the request must be a JSON like
{'version':'[version number]', 'platform':'[platform]'}
The response will be a JSON like
{'status':200, 'reason':'Ok', 'url':'[url to download latest version]', 'out-of-date':true/false}
The status and reason may be different, and url and out-of-date may not be included if the request is invalid or an error occurs.
/release
POST request to create/update a new release. This is password-protected to prevent users from adding malicious code into releases.
The body of the request must be a JSON like
{'token':'[server password]', 'version':'[version number]', 'platform':'[platform]', 'url':'[url to download version]'}
The response will be a JSON like
{'status':200, 'reason':'Version created successfully'}
The status and reason may be different, especially if the request is invalid or an error occurs.