VidiDin-Android/app/src/main/java/com/gamedog/vididin/api/YoutubeApi.kt

48 lines
1.3 KiB
Kotlin
Raw Normal View History

2025-11-18 05:30:49 +00:00
package com.gamedog.vididin.feature.home.api
import com.gamedog.vididin.beans.ResYoutubeChannel
import com.gamedog.vididin.beans.ResYoutubePlayList
import retrofit2.http.GET
import retrofit2.http.Query
import java.net.URLEncoder
interface YoutubeApi {
/**
* Youtube channel list
*/
@GET("/youtube/v3/channels")
suspend fun getChannelList(
@Query("part") part: String="snippet",
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
@Query("channelId") channelId: String="UCbTLwN10NoCU4WDzLf1JMOA",
): ResYoutubeChannel
/**
* Youtube play list
*/
@GET("/youtube/v3/playlists")
suspend fun getPlayList(
@Query("part") part: String="snippet",
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
@Query("channelId") channelId: String="UCbTLwN10NoCU4WDzLf1JMOA",
): ResYoutubePlayList
@GET("/youtube/v3/playlistItems")
suspend fun getVideoList(
@Query("part") part: String= URLEncoder.encode("id", "UTF-8"),
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
@Query("playlistId") channelId: String="PLcVfz1-_0rj_KFKlQeW2ZJnWTSjgc-9Jp",
//@Query("pageToken") pageToken: String=""
): ResYoutubePlayList
}