We maintain two branch of c:geo.
mainlineakarelease(stable)nightly
The Api has a single URL: https://fdroid.cgeo.org/update-fdroid.php
It accept a POST request with two parameters:
SECRET_KEYto authenticateREPOto indicate which branch to update.
The REPO must be 'mainline' or 'nightly'.
If all tests passed, the update is triggered, and response delayed until the end of the command.
Response are in JSON format.
{
"status": 0,
"message": "Command complete."
}
Other return code are as follow:
- 0 => 'Command complete.'
- 1 => 'No SECRET_KEY found in POST parameters.'
- 2 => 'No REPO found in POST parameters. Value: mainline or nightly'
- 3 => 'Bad SECRET_KEY.'
- 4 => 'Bad REPO. Must be mainline or nightly'
- 5 => 'Failed to update the repo.'
$ time curl -s https://fdroid.cgeo.org/update-fdroid.php -d "SECRET_KEY=good" -d "REPO=nightly" | jshon
{
"status": 0,
"message": "Command complete."
}
real 0m22.387s
user 0m0.015s
sys 0m0.030s
$ curl -s https://fdroid.cgeo.org/update-fdroid.php -d "SECRET_KEY=bad" -d "REPO=nightly" | jshon
{
"status": 3,
"message": "Bad SECRET_KEY."
}