Add collections#237
Conversation
✅ Deploy Preview for opensubsonic ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
dd5e95a to
1ca35ee
Compare
|
It must be an extension, markdown first before openAPI. With that said your API does not work for the ordered part, arrays of content per type does not allow mixed content ordering, the solution also does not properly handle duplicates and moving stuff. Should be an array of items with mediaType mediaId probably. |
|
@Tolriq thanks for the comment. I will provide the markdown docs soon. You are right, the per-type arrays are wrong, I was confused by the existing semantics for parameters in the GET versions of I've also added the extension comments and errors for the new endpoints |
|
Hey @Tolriq. I am reworking the proposal and would appreciate some input. I see that many of the older endpoints that manipulate data have a very particular way of using HTTP methods, e.g. {
"items": [
{"type": "song", "id": "1"},
{"type": "album", "id": "5"}
]
}would require a pretty weird encoding that is - as far as I have checked - not well specified, or at least very convoluted. I wonder if it makes sense to
I see that you went with this approach in a recent change, so at least there is a precedent of not following the legacy Subsonic approaches. |
|
New endpoints should use json it was added for that and move away from the limitation of original API. |
bb3a55a to
f2a365c
Compare
Add the concept of a collection with basic CRUD functionality. A collection is an ordered list of items - songs, artist, albums, playlists (other types can be added in the future). Users can create, modify and delete collections. The proposed endpoints and schemas closely follow those for playlists, however, items don't have to be just songs. Additionally, the `updateCollection` endpoint has a more elaborate mechanism for adding, removing and moving items around via the `add`, `remove`, and `move` parameters respectively. The request payloads - where applicable - should be formatted as JSON.
|
I've modified the proposal a bit and also added the markdown pages, now it's |
|
collection should support everything which i think would be
if you're going to enforce PUT and DELETE why add separate endpoints? it would only make sense if you were going to allow GET on all endpoints as well. everything could just be on a collection endpoint if we are moving extensions to this style |
|
There's no PUT and DELETE in the rest of the API there's no reason to introduce that now. For collections, I do not see why it should contain bookmark or users or share. |
|
okay then take it out of the delete requirement for the endpoint https://github.com/opensubsonic/open-subsonic-api/pull/237/changes#diff-431be3340a9769c0f1c11bf62185826558cf6b1eb4de14bb6103e0f0db672539R14 bookmarks are just entries so they can be skipped but shares and users are unique enough to stay for me. they're not as useful but it would be good to support everything possible |
|
Shares can expire so does not make sense. Users are on most servers not visible from other users so also does not make sense. |
|
okay then don't add them |
- genre - internet radio station - podcast episode - podcast
|
I've added the following types:
Didn't add videos because they are not well defined in the API, would rather leave this as future work. As a necessity, updated the Also updated the HTTP method usage to only use GET and POST, in line with the rest of the API. |
Follows the discussion in #73.
Add the concept of a collection with basic CRUD functionality. A collection is an ordered list of items - songs, artist, albums, playlists (other types can be added in the future). Users can create, modify and delete collections.
The proposed endpoints and schemas closely follow those for playlists, however, items don't have to be just songs. Additionally, the
updateCollectionendpoint has a more elaborate mechanism for adding, removing and moving items around via theadd,remove, andmoveparameters respectively.New methods:
getCollectionsgetCollectioncreateCollectionupdateCollectiondeleteCollectionThe existing methods and responses all stay the same.
There are no clear contribution guidelines, so sorry if I opened the PR prematurely without clarifying the details in the discussion. I figured that it's easier to discuss the proposal against a more concrete OpenAPI implementation.
Open questions: