Skip to content

Expose public libraries and channels in standard API

Agate requested to merge list-public-channels into develop

This MR makes it possible to crawl public libraries and channels on a pod in a standard way:

  1. Adds a new federation__public_index setting which default to True and controls wether public libraries and channels are indexed and crawlable on a given pod
  2. Two new endpoints /federation/index/channels and /federation/index/libraries, which expose the corresponding data in ActivityPub OrderedCollection objects
  3. A new entry in our nodeinfo endpoint, which advertises the two previous endpoints, as follows:
"metadata": {
  "endpoints": {
    "knownNodes": "https://node1.funkwhale.test/api/v1/federation/domains",
    "channels": "https://node1.funkwhale.test/federation/index/channels",
    "libraries": "https://node1.funkwhale.test/federation/index/libraries"
  }
}

(I've moved the undocumented knownNodes endpoint here, for consistency.)

Once this is merged and deployed, it will be possible to build a search engine for the Funkwhale federation, or have pods discover content from their neighbours in an automatic way.

cc @Sporiff

Edited by Agate

Merge request reports