LibreTube/app/src/main/java/xyz/btcland/libretube/PipedApi.kt

24 lines
680 B
Kotlin
Raw Normal View History

2021-12-18 16:34:14 +05:30
package xyz.btcland.libretube
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
import xyz.btcland.libretube.obj.StreamItem
import xyz.btcland.libretube.obj.Streams
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,
@Query("filter") filer: String
): List<StreamItem>
@GET("suggestions")
suspend fun getSuggestions(@Query("query") query: String): List<String>
2021-12-18 16:34:14 +05:30
}