feat: support parse youtube video
This commit is contained in:
7 files changed
+133
-2
No files matched your search
@@ -48,4 +48,5 @@ data class Config(
|
||||
val apiSpaceKey: String,
|
||||
val apiRtastKey: String,
|
||||
val azureAppClientId: String,
|
||||
val youtubeDataApiKey: String,
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/10/15
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.entity.yt
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
data class YoutubeVideoResponse(
|
||||
val items: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
val snippet: Snippet,
|
||||
val statistics: Statistics
|
||||
)
|
||||
|
||||
data class Snippet(
|
||||
val title: String,
|
||||
val thumbnails: Thumbnails,
|
||||
val channelTitle: String,
|
||||
)
|
||||
|
||||
data class Thumbnails(
|
||||
@SerializedName("maxres")
|
||||
val maxRes: MaxRes
|
||||
)
|
||||
|
||||
data class MaxRes(
|
||||
val url: String,
|
||||
)
|
||||
|
||||
data class Statistics(
|
||||
val viewCount: String,
|
||||
val likeCount: String,
|
||||
val favoriteCount: String,
|
||||
val commentCount: String,
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user