Move information to metadata, reformat genres

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2629>
This commit is contained in:
Ciarán Ainsworth 2023-11-15 10:01:00 +00:00 committed by Marge
parent 3d5381760f
commit 473cc1be25
2 changed files with 74 additions and 40 deletions

View File

@ -67,22 +67,22 @@ The NodeInfo endpoint must contain all mandatory elements listed in the specific
`content.local` (Object) `content.local` (Object)
: An object containing a summary of local content : 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 : 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 : 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 : 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 : The total number of hours of content associated with local uploads on the pod
`content.topMusicCategories` (Array\<Object\>) `content.topMusicCategories` (Array\<{ `name`: String, `count`: Number}>)
: The top three music genres and the number of uploads tagged with them : The top three music genres and the number of uploads tagged with them
`content.topPodcastCategories` (Array\<Object\>) `content.topPodcastCategories` (Array\<{ `name`: String, `count`: Number}>)
: The top three podcast categories and the number of uploads tagged with them : The top three podcast categories and the number of uploads tagged with them
`languages` (Array\<String\>) `languages` (Array\<String\>)
@ -97,6 +97,15 @@ The NodeInfo endpoint must contain all mandatory elements listed in the specific
`federation.followingInstances` (Number) `federation.followingInstances` (Number)
: The number of Funkwhale pods that publicly follow the target pod : 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\<String\>) `features` (Array\<String\>)
: A list of enabled features : A list of enabled features
@ -134,12 +143,7 @@ Example response:
"activeMonth": 0 "activeMonth": 0
}, },
"localPosts": 0, "localPosts": 0,
"localComments": 0, "localComments": 0
"listenings": 0,
"downloads": 0,
"favorites": {
"tracks": 0
}
}, },
"metadata": { "metadata": {
"actorId": "string", "actorId": "string",
@ -168,24 +172,30 @@ Example response:
}, },
"topMusicCategories": [ "topMusicCategories": [
{ {
"rock": 1256 "name": "rock",
"count": 1256
}, },
{ {
"jazz": 604 "name": "jazz",
"count": 604
}, },
{ {
"classical": 308 "name": "classical",
"count": 308
} }
], ],
"topPodcastCategories": [ "topPodcastCategories": [
{ {
"comedy": 12 "name": "comedy",
"count": 12
}, },
{ {
"politics": 4 "name": "politics",
"count": 4
}, },
{ {
"nature": 1 "name": "nature",
"count": 1
} }
], ],
"federation": { "federation": {
@ -193,6 +203,13 @@ Example response:
"followingInstances": 0 "followingInstances": 0
} }
}, },
"usage": {
"listenings": 0,
"downloads": 0,
"favorites": {
"tracks": 0
}
},
"features": [ "features": [
"channels", "channels",
"podcasts", "podcasts",

View File

@ -444,18 +444,6 @@ components:
localComments: localComments:
type: integer type: integer
minimum: 0 minimum: 0
listenings:
type: integer
minimum: 0
downloads:
type: integer
minimum: 0
favorites:
type: object
properties:
tracks:
type: integer
minimum: 0
metadata: metadata:
type: object type: object
properties: properties:
@ -524,22 +512,36 @@ components:
type: array type: array
items: items:
type: object type: object
additionalProperties: properties:
type: integer name:
type: string
count:
type: integer
minimum: 0
example: example:
- "rock": 1256 - name: "rock"
- "jazz": 604 count: 1256
- "classical": 308 - name: "jazz"
count: 604
- name: "classical"
count: 308
topPodcastCategories: topPodcastCategories:
type: array type: array
items: items:
type: object type: object
additionalProperties: properties:
type: integer name:
type: string
count:
type: integer
minimum: 0
example: example:
- "comedy": 12 - name: "comedy"
- "politics": 4 count: 12
- "nature": 1 - name: "politics"
count: 4
- name: "nature"
count: 1
federation: federation:
type: object type: object
properties: properties:
@ -547,6 +549,21 @@ components:
type: integer type: integer
followingInstances: followingInstances:
type: integer 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: features:
type: array type: array
items: items: