Skip to content

Script for updating cgeo fdroid repo

Notifications You must be signed in to change notification settings

GeoKretyMap/api-fdroid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Trigger Api for updating c:geo F-Droid mirror

We maintain two branch of c:geo.

  • mainline aka release (stable)
  • nightly

The Api

The Api has a single URL: https://fdroid.cgeo.org/update-fdroid.php

It accept a POST request with two parameters:

  • SECRET_KEY to authenticate
  • REPO to 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

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

Examples

$ 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."
}

About

Script for updating cgeo fdroid repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages