巴西地区 推荐列表 默认值
This commit is contained in:
parent
162ad5288a
commit
5ce3547a71
|
|
@ -19,6 +19,7 @@ interface YoutubeApi {
|
||||||
@Query("part") part: String="snippet",
|
@Query("part") part: String="snippet",
|
||||||
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
|
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
|
||||||
@Query("channelId") channelId: String="UCbTLwN10NoCU4WDzLf1JMOA",
|
@Query("channelId") channelId: String="UCbTLwN10NoCU4WDzLf1JMOA",
|
||||||
|
@Query("videoEmbeddable") videoEmbeddable: Boolean=true,
|
||||||
): ResYoutubeChannel
|
): ResYoutubeChannel
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -34,15 +35,32 @@ interface YoutubeApi {
|
||||||
|
|
||||||
|
|
||||||
@GET("/youtube/v3/playlistItems")
|
@GET("/youtube/v3/playlistItems")
|
||||||
suspend fun getVideoList(
|
suspend fun getVideoList1(
|
||||||
@Query("part") part: String= URLEncoder.encode("id", "UTF-8"),
|
@Query("part") part: String= URLEncoder.encode("id", "UTF-8"),
|
||||||
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
|
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
|
||||||
@Query("playlistId") channelId: String="PLcVfz1-_0rj_KFKlQeW2ZJnWTSjgc-9Jp",
|
@Query("playlistId") channelId: String="PLcVfz1-_0rj_KFKlQeW2ZJnWTSjgc-9Jp",
|
||||||
|
@Query("videoEmbeddable") videoEmbeddable: Boolean=true,
|
||||||
|
//@Query("pageToken") pageToken: String=""
|
||||||
|
): ResYoutubePlayList
|
||||||
|
|
||||||
|
@GET("/youtube/v3/videos")
|
||||||
|
suspend fun getVideoList(
|
||||||
|
@Query("part") part: String= URLEncoder.encode("id", "UTF-8"),
|
||||||
|
@Query("key") key: String="AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY",
|
||||||
|
@Query("chart") chart: String="mostPopular",
|
||||||
|
@Query("regionCode") regionCode: String="BR",
|
||||||
|
@Query("maxResults") maxResults: Int=10,
|
||||||
|
@Query("videoEmbeddable") videoEmbeddable: Boolean=true,
|
||||||
//@Query("pageToken") pageToken: String=""
|
//@Query("pageToken") pageToken: String=""
|
||||||
): ResYoutubePlayList
|
): ResYoutubePlayList
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
https://www.googleapis.com/youtube/v3/videos?part=id&chart=mostPopular®ionCode=BR&maxResults=10&key=AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY
|
||||||
|
https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&chart=mostPopular®ionCode=BR&maxResults=10&key=AIzaSyBm9k2lS_j7Fdd43NEPkcfikJRotup5DMY
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -182,7 +182,8 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
|
||||||
if (mVideoData != null && !mVideoData?.id.isNullOrEmpty()) {
|
if (mVideoData != null && !mVideoData?.id.isNullOrEmpty()) {
|
||||||
youTubePlayer.loadOrCueVideo(
|
youTubePlayer.loadOrCueVideo(
|
||||||
lifecycle,
|
lifecycle,
|
||||||
mVideoData!!.id, 0f
|
mVideoData!!.id,
|
||||||
|
0f
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue