2022-02-01 21:22:06 +05:30
|
|
|
package com.github.libretube
|
2021-12-18 16:34:14 +05:30
|
|
|
|
2022-02-06 18:40:27 +05:30
|
|
|
import com.github.libretube.obj.*
|
2021-12-18 16:34:14 +05:30
|
|
|
import retrofit2.http.GET
|
|
|
|
import retrofit2.http.Path
|
|
|
|
import retrofit2.http.Query
|
|
|
|
|
|
|
|
interface PipedApi {
|
|
|
|
@GET("trending")
|
|
|
|
suspend fun getTrending(@Query("region") region: String): List<StreamItem>
|
|
|
|
|
|
|
|
@GET("streams/{videoId}")
|
|
|
|
suspend fun getStreams(@Path("videoId") videoId: String): Streams
|
2021-12-28 01:37:07 +05:30
|
|
|
|
|
|
|
@GET("search")
|
|
|
|
suspend fun getSearchResults(
|
|
|
|
@Query("q") searchQuery: String,
|
2021-12-28 23:41:51 +05:30
|
|
|
@Query("filter") filter: String
|
|
|
|
): SearchResult
|
2021-12-28 01:37:07 +05:30
|
|
|
|
|
|
|
@GET("suggestions")
|
|
|
|
suspend fun getSuggestions(@Query("query") query: String): List<String>
|
2022-02-05 00:25:05 +05:30
|
|
|
|
|
|
|
@GET("channel/{channelId}")
|
|
|
|
suspend fun getChannel(@Path("channelId") channelId: String): Channel
|
2022-02-05 19:39:50 +05:30
|
|
|
|
|
|
|
@GET("nextpage/channel/{channelId}")
|
|
|
|
suspend fun getChannelNextPage(@Path("channelId") channelId: String, @Query("nextpage") nextPage: String): Channel
|
2022-02-06 18:40:27 +05:30
|
|
|
|
|
|
|
@GET("playlists/{playlistId}")
|
|
|
|
suspend fun getPlaylist(@Path("playlistId") playlistId: String): Playlist
|
|
|
|
|
|
|
|
@GET("nextpage/playlists/{playlistId}")
|
|
|
|
suspend fun getPlaylistNextPage(@Path("playlistId") playlistId: String, @Query("nextpage") nextPage: String): Playlist
|
|
|
|
|
2021-12-18 16:34:14 +05:30
|
|
|
}
|