From 473cc1be258c2828527e4468ce52c50e9fb48521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 15 Nov 2023 10:01:00 +0000 Subject: [PATCH] Move information to metadata, reformat genres Part-of: --- docs/specs/nodeinfo21/index.md | 53 +++++++++++++++++---------- docs/specs/nodeinfo21/schema.yml | 61 ++++++++++++++++++++------------ 2 files changed, 74 insertions(+), 40 deletions(-) diff --git a/docs/specs/nodeinfo21/index.md b/docs/specs/nodeinfo21/index.md index 4927170ca..57219f733 100644 --- a/docs/specs/nodeinfo21/index.md +++ b/docs/specs/nodeinfo21/index.md @@ -67,22 +67,22 @@ The NodeInfo endpoint must contain all mandatory elements listed in the specific `content.local` (Object) : An object containing a summary of local content -`content.local.artists` (number) +`content.local.artists` (Number) : The number of artists associated with local uploads on the pod -`content.local.releases` (number) +`content.local.releases` (Number) : The number of albums or series associated with local uploads on the pod -`content.local.recordings` (number) +`content.local.recordings` (Number) : The number of tracks or episodes associated with local uploads on the pod -`content.local.hoursOfContent` (number) +`content.local.hoursOfContent` (Number) : The total number of hours of content associated with local uploads on the pod -`content.topMusicCategories` (Array\) +`content.topMusicCategories` (Array\<{ `name`: String, `count`: Number}>) : The top three music genres and the number of uploads tagged with them -`content.topPodcastCategories` (Array\) +`content.topPodcastCategories` (Array\<{ `name`: String, `count`: Number}>) : The top three podcast categories and the number of uploads tagged with them `languages` (Array\) @@ -97,6 +97,15 @@ The NodeInfo endpoint must contain all mandatory elements listed in the specific `federation.followingInstances` (Number) : The number of Funkwhale pods that publicly follow the target pod +`usage.listenings` (Number) +: The total number of listenings on the pod + +`usage.downloads` (Number) +: The total number of downloads (streams) the pod has served + +`usage.favorites.tracks` (Number) +: The total number of track favorites recorded on the pod. + `features` (Array\) : A list of enabled features @@ -134,12 +143,7 @@ Example response: "activeMonth": 0 }, "localPosts": 0, - "localComments": 0, - "listenings": 0, - "downloads": 0, - "favorites": { - "tracks": 0 - } + "localComments": 0 }, "metadata": { "actorId": "string", @@ -168,24 +172,30 @@ Example response: }, "topMusicCategories": [ { - "rock": 1256 + "name": "rock", + "count": 1256 }, { - "jazz": 604 + "name": "jazz", + "count": 604 }, { - "classical": 308 + "name": "classical", + "count": 308 } ], "topPodcastCategories": [ { - "comedy": 12 + "name": "comedy", + "count": 12 }, { - "politics": 4 + "name": "politics", + "count": 4 }, { - "nature": 1 + "name": "nature", + "count": 1 } ], "federation": { @@ -193,6 +203,13 @@ Example response: "followingInstances": 0 } }, + "usage": { + "listenings": 0, + "downloads": 0, + "favorites": { + "tracks": 0 + } + }, "features": [ "channels", "podcasts", diff --git a/docs/specs/nodeinfo21/schema.yml b/docs/specs/nodeinfo21/schema.yml index 0210a2593..fa5fc2411 100644 --- a/docs/specs/nodeinfo21/schema.yml +++ b/docs/specs/nodeinfo21/schema.yml @@ -444,18 +444,6 @@ components: localComments: type: integer minimum: 0 - listenings: - type: integer - minimum: 0 - downloads: - type: integer - minimum: 0 - favorites: - type: object - properties: - tracks: - type: integer - minimum: 0 metadata: type: object properties: @@ -524,22 +512,36 @@ components: type: array items: type: object - additionalProperties: - type: integer + properties: + name: + type: string + count: + type: integer + minimum: 0 example: - - "rock": 1256 - - "jazz": 604 - - "classical": 308 + - name: "rock" + count: 1256 + - name: "jazz" + count: 604 + - name: "classical" + count: 308 topPodcastCategories: type: array items: type: object - additionalProperties: - type: integer + properties: + name: + type: string + count: + type: integer + minimum: 0 example: - - "comedy": 12 - - "politics": 4 - - "nature": 1 + - name: "comedy" + count: 12 + - name: "politics" + count: 4 + - name: "nature" + count: 1 federation: type: object properties: @@ -547,6 +549,21 @@ components: type: integer followingInstances: type: integer + usage: + type: object + properties: + listenings: + type: integer + minimum: 0 + downloads: + type: integer + minimum: 0 + favorites: + type: object + properties: + tracks: + type: integer + minimum: 0 features: type: array items: