Managing Favorites sections

This commit is contained in:
Arkadiusz Fal
2021-11-01 22:56:18 +01:00
parent f11125a399
commit 8df452752a
35 changed files with 665 additions and 203 deletions

View File

@@ -60,6 +60,10 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
resource(baseURL: account.url, path: "channel/\(id)")
}
func channelVideos(_ id: String) -> Resource {
channel(id)
}
func channelPlaylist(_ id: String) -> Resource? {
resource(baseURL: account.url, path: "playlists/\(id)")
}
@@ -94,6 +98,7 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
func channelSubscription(_: String) -> Resource? { nil }
func playlist(_: String) -> Resource? { nil }
func playlistVideo(_: String, _: String) -> Resource? { nil }
func playlistVideos(_: String) -> Resource? { nil }

View File

@@ -6,6 +6,7 @@ protocol VideosAPI {
var signedIn: Bool { get }
func channel(_ id: String) -> Resource
func channelVideos(_ id: String) -> Resource
func trending(country: Country, category: TrendingCategory?) -> Resource
func search(_ query: SearchQuery) -> Resource
func searchSuggestions(query: String) -> Resource
@@ -20,6 +21,7 @@ protocol VideosAPI {
func channelSubscription(_ id: String) -> Resource?
func playlist(_ id: String) -> Resource?
func playlistVideo(_ playlistID: String, _ videoID: String) -> Resource?
func playlistVideos(_ id: String) -> Resource?