I would like to now what type of output f-droid server provides.
I’ve read somewhere that they also send json but I can’t find it anymore.
Also I would like to know if it is possible to format the output, add your own fields etc.
Is this possible and if so, where can I change this?
No, I found it by debugging the client app which receives the data in json format.
Also this post might be the one I needed, but I’m still not sure if the metadata files determine what I receive: https://f-droid.org/en/docs/Build_Metadata_Reference/
And is there somewhere a documentation on the format/structure used there, or does one need to reverse-engineer it? For example:
it’s a JSON (obviously) object with the properties repo, apps, requests, packages (that all?)
repo is an object with the properties … (well, this part is easy to reverse engineer)
apps is an array of apps, each item having the properties … and here it’s getting a bit difficult, as some of those properties are optional (e.g. localized and what might be in there)
requests is an object holding the arrays install and uninstall (apps suggested by the repo to be automatically installed/uninstalled) – but how do those arrays look like when filled? A guess would be it’s just package names.
packages are the available .apk files with their properties. Again, some of them seem to be optional (e.g. the uses-permission array is completely missing (not empty, missing) if an app doesn’t request any permission)
So this bullet-pointed list is just a very incomplete “quick glance”. I’m missing a complete reference (yes, I searched already, which is why I landed here). This reference would be of primary interest for folks building their own clients (like the WebIf of my repo, which currently is still based on the XML index). I’d say there must be a reference somewhere, or did you tackle the client (and website) blindly?
@Izzy There’s Coffee / twif-util · GitLab which works with repo index files. It’s not documentation as such, but there’s code, and there are at least two half linters in there, which unfortunately don’t make a whole linter together quite yet. It’s the result of all my research and questions up until now though, and as such may contain useful information.
About writing a doc, I think it makes more sense to just document the differences in Build_Metadata_Reference, then there is less to maintain. Most of the fields are the same between metadata files and index-v1.