Skip to content

Commit

Permalink
add totalCount to responses
Browse files Browse the repository at this point in the history
add for `offset` and `count` parameters that make sense

* Endpoints
  * getalbumlist
  * getalbumlist2
  * getnewestpodcasts
  * getsimilarsongs
  * getsimilarsongs2
  * getsongsbygenre
  * gettopsongs
  * search3

* Responses
  * albumList
  * albumList2
  * newestPodcasts
  * searchResult3
  * similarSongs
  * similarSongs2
  * songsByGenre
  * topSongs

Search3 responses prefix totalCount for each object type

add note for unknown, uncalculated, unsupported values

tag [OS]

Update searchResult3.md

Update songsByGenre.md
  • Loading branch information
lachlan-00 committed Oct 17, 2024
1 parent 0090f67 commit b956a6f
Show file tree
Hide file tree
Showing 16 changed files with 207 additions and 20 deletions.
3 changes: 2 additions & 1 deletion content/en/docs/Endpoints/getalbumlist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getAlbumList"
linkTitle: "getAlbumList"
linkTitle: "getAlbumList [OS]"
categories:
- Lists
description: >
Expand Down Expand Up @@ -42,6 +42,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
"serverVersion": "0.1.3 (tag)",
"openSubsonic": true
"albumList": {
"totalCount": 2,
"album": [
{
"id": "200000021",
Expand Down
3 changes: 2 additions & 1 deletion content/en/docs/Endpoints/getalbumlist2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getAlbumList2"
linkTitle: "getAlbumList2"
linkTitle: "getAlbumList2 [OS]"
categories:
- Lists
description: >
Expand Down Expand Up @@ -42,6 +42,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
"serverVersion": "0.1.3 (tag)",
"openSubsonic": true
"albumList2": {
"totalCount": 2,
"album": [
{
"id": "200000021",
Expand Down
57 changes: 54 additions & 3 deletions content/en/docs/Endpoints/getnewestpodcasts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getNewestPodcasts"
linkTitle: "getNewestPodcasts"
linkTitle: "getNewestPodcasts [OS]"
categories:
- Podcast
description: >
Expand Down Expand Up @@ -28,7 +28,58 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
{{< tabpane persistLang=false >}}
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
// TODO
{
"subsonic-response" : {
"status" : "ok",
"version" : "1.16.1",
"newestPodcasts" : {
"totalCount": 2,
"episode" : [ {
"id" : "19",
"parent" : "78",
"isDir" : false,
"title" : "Maria James inquest finding",
"album" : "Trace",
"artist" : "Podcast",
"coverArt" : "78",
"size" : 26734080,
"contentType" : "audio/mpeg",
"suffix" : "mp3",
"duration" : 1113,
"bitRate" : 192,
"playCount" : 0,
"created" : "2023-03-16T01:02:36.481Z",
"type" : "podcast",
"streamId" : "80",
"channelId" : "2",
"description" : "A Victorian Coroner has failed to name a killer in the 1980 cold case of Maria James. Her sons are devasted. But there's still hope, in leads yet to be chased by police.",
"status" : "completed",
"publishDate" : "2022-04-01T02:30:00.000Z"
}, {
"id" : "1",
"parent" : "74",
"isDir" : false,
"title" : "DEVIN TOWNSEND PODCAST #18 - NFT's! Good or bad? Devin discusses with A7X' Matt Shadows...",
"album" : "Devin Townsend Podcast",
"artist" : "Podcast",
"coverArt" : "74",
"size" : 70531702,
"contentType" : "audio/mpeg",
"suffix" : "mp3",
"duration" : 4408,
"bitRate" : 128,
"playCount" : 0,
"created" : "2023-03-16T00:56:16.783Z",
"type" : "podcast",
"streamId" : "76",
"channelId" : "1",
"description" : "People keep talking to me about NFTs...most people seem to hate them and hated that I was even mentioning them =). After I mentioned it on Twitter, Matt hit me up and offered to give me his perspective on them as his band is heavily involved. I watched videos sent to me about the downsides, and here is an example of the other side I suppose. This is just because I'm trying to wrap my head around it. I'm not planning to do NFTs, I just wanted to learn. Take with a grain of salt, and cheers to Matt for being a good sport =)",
"status" : "completed",
"publishDate" : "2022-02-01T12:00:45.000Z"
} ]
}
}
}
{{< /tab >}}
{{< tab header="Subsonic" lang="json" >}}
// TODO
Expand All @@ -37,4 +88,4 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `newestPodcasts` | [`newestPodcasts`](../../responses/newestpodcasts) | **Yes** | | The podacsts |
| `newestPodcasts` | [`newestPodcasts`](../../responses/newestpodcasts) | **Yes** | | The podcasts |
3 changes: 2 additions & 1 deletion content/en/docs/Endpoints/getsimilarsongs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getSimilarSongs"
linkTitle: "getSimilarSongs"
linkTitle: "getSimilarSongs [OS]"
categories:
- Browsing
description: >
Expand Down Expand Up @@ -103,6 +103,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
"status": "ok",
"version": "1.16.1",
"similarSongs": {
"totalCount": 2,
"song": [
{
"id": "300000060",
Expand Down
3 changes: 2 additions & 1 deletion content/en/docs/Endpoints/getsimilarsongs2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getSimilarSongs2"
linkTitle: "getSimilarSongs2"
linkTitle: "getSimilarSongs2 [OS]"
categories:
- Browsing
description: >
Expand Down Expand Up @@ -37,6 +37,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
"serverVersion": "0.1.3 (tag)",
"openSubsonic": true
"similarSongs2": {
"totalCount": 2,
"song": [
{
"id": "300000060",
Expand Down
62 changes: 60 additions & 2 deletions content/en/docs/Endpoints/getsongsbygenre.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getSongsByGenre"
linkTitle: "getSongsByGenre"
linkTitle: "getSongsByGenre [OS]"
categories:
- Lists
description: >
Expand Down Expand Up @@ -31,7 +31,65 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
{{< tabpane persistLang=false >}}
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
// TODO
{
"subsonic-response": {
"status": "ok",
"version": "1.16.1",
"type": "ampache",
"serverVersion": "6.6.0",
"songsByGenre": {
"totalCount": 2,
"song": [
{
"id": "300000054",
"parent": "200000002",
"title": "Red&GreenSmoke",
"isDir": false,
"isVideo": false,
"type": "music",
"albumId": "200000002",
"album": "Colorsmoke EP",
"artistId": "100000002",
"artist": "Synthetic",
"coverArt": "200000002",
"duration": 400,
"bitRate": 62,
"track": 5,
"year": 2007,
"genre": "Electronic",
"size": 3209468,
"discNumber": 1,
"suffix": "mp3",
"contentType": "audio/mpeg",
"path": "/media/music/Synthetic/Synthetic_-_Colorsmoke_EP-20k217-2007(1)/05-Synthetic_-_RedGreenSmokePM20k44khM_64kb.mp3"
},
{
"id": "300000055",
"parent": "200000002",
"title": "Red&GreenSmoke",
"isDir": false,
"isVideo": false,
"type": "music",
"albumId": "200000002",
"album": "Colorsmoke EP",
"artistId": "100000002",
"artist": "Synthetic",
"coverArt": "200000002",
"duration": 400,
"bitRate": 62,
"track": 5,
"year": 2007,
"genre": "Electronic",
"size": 3209886,
"discNumber": 1,
"suffix": "mp3",
"contentType": "audio/mpeg",
"path": "/media/music/Synthetic/Synthetic_-_Colorsmoke_EP-20k217-2007(1)/05-Synthetic_-_RedGreenSmokePM20k22khS_64kb.mp3"
}
]
}
}
}
{{< /tab >}}
{{< tab header="Subsonic" lang="json" >}}
// TODO
Expand Down
3 changes: 2 additions & 1 deletion content/en/docs/Endpoints/gettopsongs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "getTopSongs"
linkTitle: "getTopSongs"
linkTitle: "getTopSongs [OS]"
categories:
- Browsing
description: >
Expand Down Expand Up @@ -37,6 +37,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested
"serverVersion": "0.1.3 (tag)",
"openSubsonic": true
"topSongs": {
"totalCount": 2,
"song": [
{
"id": "300000060",
Expand Down
3 changes: 3 additions & 0 deletions content/en/docs/Endpoints/search3.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ A [`subsonic-response`](../../responses/subsonic-response) with a nested [`searc
"serverVersion": "0.1.3 (tag)",
"openSubsonic": true
"searchResult3": {
"totalArtistCount": 1,
"artist": [
{
"id": "37ec820ca7193e17040c98f7da7c4b51",
Expand All @@ -61,6 +62,7 @@ A [`subsonic-response`](../../responses/subsonic-response) with a nested [`searc
"artistImageUrl": "https://demo.org/image.jpg"
}
],
"totalAlbumCount": 1,
"album": [
{
"id": "ad0f112b6dcf83de5e9cae85d07f0d35",
Expand All @@ -78,6 +80,7 @@ A [`subsonic-response`](../../responses/subsonic-response) with a nested [`searc
"songCount": 8
}
],
"totalArtistCount": 1,
"song": [
{
"id": "082f435a363c32c57d5edb6a678a28d4",
Expand Down
6 changes: 4 additions & 2 deletions content/en/docs/Responses/albumList.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "albumList"
linkTitle: "albumList"
linkTitle: "albumList [OS]"
description: >
Album list.
---
Expand All @@ -9,6 +9,7 @@ description: >
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
{
"totalCount": 2,
"album": [
{
"id": "200000021",
Expand Down Expand Up @@ -87,4 +88,5 @@ description: >

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `album` | Array of [`Child`](../child) | No | | Artist albums|
| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `album` | Array of [`Child`](../child) | No | | Artist albums |
4 changes: 3 additions & 1 deletion content/en/docs/Responses/albumList2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "albumList2"
linkTitle: "albumList2"
linkTitle: "albumList2 [OS]"
description: >
Album list.
---
Expand All @@ -9,6 +9,7 @@ description: >
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
{
"totalCount": 2,
"album": [
{
"id": "200000021",
Expand Down Expand Up @@ -83,4 +84,5 @@ description: >

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `album` | Array of [`AlbumID3`](../albumid3) | No | | Artist albums|
4 changes: 3 additions & 1 deletion content/en/docs/Responses/newestPodcasts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "newestPodcasts"
linkTitle: "newestPodcasts"
linkTitle: "newestPodcasts [OS]"
description: >
NewestPodcasts.
---
Expand All @@ -17,3 +17,5 @@ description: >

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `episode` | Array of [`Child`](../child) | No | | Podcast Episode |
8 changes: 7 additions & 1 deletion content/en/docs/Responses/searchResult3.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "searchResult3"
linkTitle: "searchResult3"
linkTitle: "searchResult3 [OS]"
description: >
search3 result.
---
Expand All @@ -9,6 +9,7 @@ description: >
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
{
"totalArtistCount": 1,
"artist": [
{
"id": "37ec820ca7193e17040c98f7da7c4b51",
Expand All @@ -19,6 +20,7 @@ description: >
"artistImageUrl": "https://demo.org/image.jpg"
}
],
"totalAlbumCount": 1,
"album": [
{
"id": "ad0f112b6dcf83de5e9cae85d07f0d35",
Expand All @@ -36,6 +38,7 @@ description: >
"songCount": 8,
}
],
"totalSongCount": 1,
"song": [
{
"id": "082f435a363c32c57d5edb6a678a28d4",
Expand Down Expand Up @@ -133,6 +136,9 @@ description: >

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `totalArtistCount` | Int | No | **Yes** | Total item count for the request ignoring `artistCount` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `artist` | Array of [`ArtistID3`](../artistid3) | No | | Matching artists |
| `totalAlbumCount` | Int | No | **Yes** | Total item count for the request ignoring `albumCount` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `album` | Array of [`AlbumID3`](../albumid3) | No | | Matching albums |
| `totalSongCount` | Int | No | **Yes** | Total item count for the request ignoring `songCount` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `song` | Array of [`Child`](../child) | No | | Matching songs |
4 changes: 3 additions & 1 deletion content/en/docs/Responses/similarSongs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "similarSongs"
linkTitle: "similarSongs"
linkTitle: "similarSongs [OS]"
description: >
SimilarSongs list.
---
Expand All @@ -9,6 +9,7 @@ description: >
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
{
"totalCount": 2,
"song": [
{
"id": "300000060",
Expand Down Expand Up @@ -131,4 +132,5 @@ description: >

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `song` | Array of [`Child`](../child) | No | | List of songs |
4 changes: 3 additions & 1 deletion content/en/docs/Responses/similarSongs2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "similarSongs2"
linkTitle: "similarSongs2"
linkTitle: "similarSongs2 [OS]"
description: >
SimilarSongs2 list.
---
Expand All @@ -9,6 +9,7 @@ description: >
{{< tab header="**Example**:" disabled=true />}}
{{< tab header="OpenSubsonic" lang="json">}}
{
"totalCount": 2,
"song": [
{
"id": "300000060",
Expand Down Expand Up @@ -131,4 +132,5 @@ description: >

| Field | Type | Req. | OpenS. | Details |
| --- | --- | --- | --- | --- |
| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. |
| `song` | Array of [`Child`](../child) | No | | List of songs |
Loading

0 comments on commit b956a6f

Please sign in to comment.