mirror of
https://github.com/yattee/yattee.git
synced 2025-12-21 20:20:15 +00:00
Editing playlists
This commit is contained in:
@@ -54,7 +54,7 @@ final class InvidiousAPI: Service {
|
||||
content.json.arrayValue.map(Playlist.init)
|
||||
}
|
||||
|
||||
configureTransformer("/auth/playlists", requestMethods: [.post]) { (content: Entity<Data>) -> Playlist in
|
||||
configureTransformer("/auth/playlists", requestMethods: [.post, .patch]) { (content: Entity<Data>) -> Playlist in
|
||||
// hacky, to verify if possible to get it in easier way
|
||||
Playlist(JSON(parseJSON: String(data: content.content, encoding: .utf8)!))
|
||||
}
|
||||
@@ -108,6 +108,10 @@ final class InvidiousAPI: Service {
|
||||
resource("/auth/playlists")
|
||||
}
|
||||
|
||||
func playlist(_ id: String) -> Resource {
|
||||
resource("/auth/playlists/\(id)")
|
||||
}
|
||||
|
||||
func search(_ query: SearchQuery) -> Resource {
|
||||
var resource = resource("/search")
|
||||
.withParam("q", searchQuery(query.query))
|
||||
|
||||
Reference in New Issue
Block a user