mirror of
https://github.com/czp3009/bilibili-api.git
synced 2025-02-19 20:50:28 +08:00
收藏夹的 API
This commit is contained in:
parent
1930a704a2
commit
cc94a8d0c3
@ -164,4 +164,64 @@ interface AppAPI {
|
||||
@Field("select_like") selectLike: Int = 0,
|
||||
@Field("upid") upId: Long? = 0
|
||||
): Deferred<AddCoinResponse>
|
||||
|
||||
/**
|
||||
* 查看某个用户的主页(也可以查看自己)
|
||||
*
|
||||
* @param vmId 欲查看的用户的 id
|
||||
*/
|
||||
@Suppress("SpellCheckingInspection")
|
||||
@GET("/x/v2/space")
|
||||
fun space(
|
||||
@Query("from") from: Int? = 0,
|
||||
@Query("ps") pageSize: Int = 10,
|
||||
@Query("vmid") vmId: Long
|
||||
): Deferred<Space>
|
||||
|
||||
/**
|
||||
* 收藏页面
|
||||
* 侧拉抽屉 -> 收藏
|
||||
*
|
||||
* @param vmId 所查看的用户的 id(看自己的收藏也要有该参数)
|
||||
*/
|
||||
@Suppress("SpellCheckingInspection")
|
||||
@GET("/x/v2/favorite")
|
||||
fun favoritePage(
|
||||
@Query("aid") aid: Long = 0,
|
||||
@Query("pn") pageNumber: Int = 1,
|
||||
@Query("ps") pageSize: Int = 20,
|
||||
@Query("vmid") vmId: Long
|
||||
): Deferred<FavoritePage>
|
||||
|
||||
/**
|
||||
* 收藏的视频
|
||||
* 侧拉抽屉 -> 收藏 -> 视频 -> (打开一个收藏夹)
|
||||
*
|
||||
* @param fid 收藏夹的 id, 在拉取收藏页面时获得
|
||||
* @param tid 不明确
|
||||
* @param vmId 用户 id
|
||||
*
|
||||
* @see favoritePage
|
||||
*/
|
||||
@Suppress("SpellCheckingInspection")
|
||||
@GET("/x/v2/favorite/video")
|
||||
fun favoriteVideo(
|
||||
@Query("fid") fid: Long,
|
||||
@Query("order") order: String = "ftime",
|
||||
@Query("pn") pageNumber: Int = 1,
|
||||
@Query("ps") pageSize: Int = 20,
|
||||
@Query("tid") tid: Long = 0,
|
||||
@Query("vmid") vmId: Long
|
||||
): Deferred<FavoriteVideo>
|
||||
|
||||
/**
|
||||
* 收藏的文章
|
||||
* 这个 API 的返回内容里没有总页数, 真实的客户端会直接访问下一页来确认当前页是不是最后一页
|
||||
* 侧拉抽屉 -> 收藏 -> 专栏
|
||||
*/
|
||||
@GET("/x/v2/favorite/article")
|
||||
fun favoriteArticle(
|
||||
@Query("pn") pageNumber: Int = 1,
|
||||
@Query("ps") pageSize: Int = 20
|
||||
): Deferred<FavoriteArticle>
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.hiczp.bilibili.api.app.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class FavoriteArticle(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 1
|
||||
@SerializedName("items")
|
||||
var items: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("banner_url")
|
||||
var bannerUrl: String, // https://i0.hdslb.com/bfs/article/97cddc6d048297aedcc5cc498cbfb090358567eb.jpg
|
||||
@SerializedName("favorite_time")
|
||||
var favoriteTime: Int, // 1551348963
|
||||
@SerializedName("goto")
|
||||
var goto: String, // article
|
||||
@SerializedName("id")
|
||||
var id: Long, // 2165049
|
||||
@SerializedName("image_urls")
|
||||
var imageUrls: List<String>,
|
||||
@SerializedName("name")
|
||||
var name: String, // 京八贱
|
||||
@SerializedName("param")
|
||||
var `param`: String, // 2165049
|
||||
@SerializedName("summary")
|
||||
var summary: String, // 相信不少玩家在完破了《荒野大镖客:救赎2》的单人剧情模式后,就开始了线上模式。近期官方推出的更新给大家带来了不少新内容,比如新的对决模式、竞速、衣物和表情动作等等,还强化了游戏内的通缉和小地图等系统,尝试给予玩家更加多样的体验。不过更新上线后所带来的改变反而激起了玩家的怒火,首当其冲的便是打猎相关的更动,在游戏中玩家可把肢解完毕的猎物尸体卖给肉贩,而经历了这次的更新后,多人线上模式这项打猎物品的价格直接被砍半,玩家也发现不少猎物的掉落物数量有减少的迹象,让不少喜爱悠闲打猎生活的玩家大感不满。猎人
|
||||
@SerializedName("template_id")
|
||||
var templateId: Int, // 4
|
||||
@SerializedName("title")
|
||||
var title: String, // 《荒野大镖客2》线上模式的近期更新引起玩家强烈不满,引发争议
|
||||
@SerializedName("uri")
|
||||
var uri: String // bilibili://article/2165049
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.hiczp.bilibili.api.app.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class FavoritePage(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("favorite")
|
||||
var favorite: Favorite,
|
||||
@SerializedName("tab")
|
||||
var tab: Tab
|
||||
) {
|
||||
data class Favorite(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 1
|
||||
@SerializedName("items")
|
||||
var items: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
/**
|
||||
* 如果该收藏夹最后一个视频被删除了, 那么将没有封面
|
||||
*/
|
||||
@SerializedName("cover")
|
||||
var cover: List<Cover>?, // null
|
||||
@SerializedName("cur_count")
|
||||
var curCount: Int, // 1
|
||||
@SerializedName("fid")
|
||||
var fid: Long, // 795158
|
||||
@SerializedName("media_id")
|
||||
var mediaId: Long, // 79515830
|
||||
@SerializedName("mid")
|
||||
var mid: Long, // 20293030
|
||||
@SerializedName("name")
|
||||
var name: String, // 默认收藏夹
|
||||
@SerializedName("state")
|
||||
var state: Int // 0
|
||||
) {
|
||||
data class Cover(
|
||||
@SerializedName("aid")
|
||||
var aid: Long, // 9498716
|
||||
@SerializedName("pic")
|
||||
var pic: String, // http://i2.hdslb.com/bfs/archive/3536b8de71da4dd7bf01200db1e6c710b5f4aa0e.png
|
||||
@SerializedName("type")
|
||||
var type: Int // 2
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
data class Tab(
|
||||
@SerializedName("albums")
|
||||
var albums: Boolean, // false
|
||||
@SerializedName("article")
|
||||
var article: Boolean, // true
|
||||
@SerializedName("audios")
|
||||
var audios: Boolean, // false
|
||||
@SerializedName("cinema")
|
||||
var cinema: Boolean, // true
|
||||
@SerializedName("clips")
|
||||
var clips: Boolean, // false
|
||||
@SerializedName("favorite")
|
||||
var favorite: Boolean, // true
|
||||
@SerializedName("menu")
|
||||
var menu: Boolean, // false
|
||||
@SerializedName("pgc_menu")
|
||||
var pgcMenu: Boolean, // false
|
||||
@SerializedName("product")
|
||||
var product: Boolean, // false
|
||||
@SerializedName("specil")
|
||||
var specil: Boolean, // false
|
||||
@SerializedName("ticket")
|
||||
var ticket: Boolean, // false
|
||||
@SerializedName("topic")
|
||||
var topic: Boolean // false
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.hiczp.bilibili.api.app.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class FavoriteVideo(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 1
|
||||
@SerializedName("items")
|
||||
var items: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("aid")
|
||||
var aid: Int, // 30702
|
||||
@SerializedName("danmaku")
|
||||
var danmaku: Int, // 19363
|
||||
@SerializedName("goto")
|
||||
var goto: String, // av
|
||||
@SerializedName("name")
|
||||
var name: String, // ⑨搬运君
|
||||
@SerializedName("param")
|
||||
var `param`: String, // 30702
|
||||
@SerializedName("pic")
|
||||
var pic: String, // http://i1.hdslb.com/bfs/archive/76a045020b6aaa830121132d4a6536d6b82660f4.jpg
|
||||
@SerializedName("play_num")
|
||||
var playNum: Long, // 371718
|
||||
@SerializedName("title")
|
||||
var title: String, // 【整理发布】妄想学生会
|
||||
@SerializedName("ugc_pay")
|
||||
var ugcPay: Long, // 0
|
||||
@SerializedName("uri")
|
||||
var uri: String // bilibili://video/30702
|
||||
)
|
||||
}
|
||||
}
|
500
src/main/kotlin/com/hiczp/bilibili/api/app/model/Space.kt
Normal file
500
src/main/kotlin/com/hiczp/bilibili/api/app/model/Space.kt
Normal file
@ -0,0 +1,500 @@
|
||||
package com.hiczp.bilibili.api.app.model
|
||||
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Space(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("album")
|
||||
var album: Album,
|
||||
/**
|
||||
* 投稿
|
||||
*/
|
||||
@SerializedName("archive")
|
||||
var archive: Archive,
|
||||
@SerializedName("article")
|
||||
var article: Article,
|
||||
@SerializedName("audios")
|
||||
var audios: Audios,
|
||||
@SerializedName("card")
|
||||
var card: Card,
|
||||
@SerializedName("clip")
|
||||
var clip: Clip,
|
||||
/**
|
||||
* 最近投币
|
||||
*/
|
||||
@SerializedName("coin_archive")
|
||||
var coinArchive: CoinArchive,
|
||||
@SerializedName("elec")
|
||||
var elec: Elec,
|
||||
@SerializedName("favourite")
|
||||
var favourite: Favourite,
|
||||
@SerializedName("images")
|
||||
var images: Images,
|
||||
/**
|
||||
* Ta推荐的视频
|
||||
*/
|
||||
@SerializedName("like_archive")
|
||||
var likeArchive: LikeArchive,
|
||||
@SerializedName("live")
|
||||
var live: Live,
|
||||
@SerializedName("medal")
|
||||
var medal: Int, // 1
|
||||
@SerializedName("relation")
|
||||
var relation: Int, // 1
|
||||
@SerializedName("season")
|
||||
var season: Season,
|
||||
@SerializedName("setting")
|
||||
var setting: Setting,
|
||||
@SerializedName("tab")
|
||||
var tab: Tab
|
||||
) {
|
||||
data class Archive(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 8
|
||||
@SerializedName("item")
|
||||
var item: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("author")
|
||||
var author: String, // hyx5020
|
||||
@SerializedName("cover")
|
||||
var cover: String, // http://i0.hdslb.com/bfs/archive/603e9b0d67400ce05199e0c8ff14cc4204c7e4e5.jpg
|
||||
@SerializedName("ctime")
|
||||
var ctime: Int, // 1475686898
|
||||
@SerializedName("danmaku")
|
||||
var danmaku: Int, // 2
|
||||
@SerializedName("duration")
|
||||
var duration: Int, // 3720
|
||||
@SerializedName("goto")
|
||||
var goto: String, // av
|
||||
@SerializedName("length")
|
||||
var length: String,
|
||||
@SerializedName("param")
|
||||
var `param`: String, // 6557595
|
||||
@SerializedName("play")
|
||||
var play: Int, // 246
|
||||
@SerializedName("title")
|
||||
var title: String, // 蓝色起源 New Shepard In-flight Escape Test
|
||||
@SerializedName("tname")
|
||||
var tname: String, // 趣味科普人文
|
||||
@SerializedName("ugc_pay")
|
||||
var ugcPay: Int, // 0
|
||||
@SerializedName("uri")
|
||||
var uri: String // bilibili://video/6557595
|
||||
)
|
||||
}
|
||||
|
||||
data class Favourite(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 0
|
||||
@SerializedName("item")
|
||||
var item: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("atten_count")
|
||||
var attenCount: Int, // 0
|
||||
@SerializedName("ctime")
|
||||
var ctime: Long, // 1451133174
|
||||
@SerializedName("cur_count")
|
||||
var curCount: Int, // 1
|
||||
@SerializedName("fid")
|
||||
var fid: Long, // 795158
|
||||
@SerializedName("max_count")
|
||||
var maxCount: Int, // 50000
|
||||
@SerializedName("media_id")
|
||||
var mediaId: Long, // 79515830
|
||||
@SerializedName("mid")
|
||||
var mid: Long, // 20293030
|
||||
@SerializedName("mtime")
|
||||
var mtime: Int, // 1544629663
|
||||
@SerializedName("name")
|
||||
var name: String, // 默认收藏夹
|
||||
@SerializedName("state")
|
||||
var state: Int // 0
|
||||
)
|
||||
}
|
||||
|
||||
data class Images(
|
||||
@SerializedName("imgUrl")
|
||||
var imgUrl: String
|
||||
)
|
||||
|
||||
data class Season(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 0
|
||||
@SerializedName("item")
|
||||
var item: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("attention")
|
||||
var attention: String, // 0
|
||||
@SerializedName("cover")
|
||||
var cover: String, // http://i0.hdslb.com/bfs/bangumi/de944b7c9306932d8dd3dcaeaf2eeec8670deec5.png
|
||||
@SerializedName("finish")
|
||||
var finish: Int, // 0
|
||||
@SerializedName("goto")
|
||||
var goto: String, // bangumi
|
||||
@SerializedName("index")
|
||||
var index: String,
|
||||
@SerializedName("is_finish")
|
||||
var isFinish: String,
|
||||
@SerializedName("is_started")
|
||||
var isStarted: Int, // 1
|
||||
@SerializedName("mtime")
|
||||
var mtime: Int, // 0
|
||||
@SerializedName("newest_ep_id")
|
||||
var newestEpId: String,
|
||||
@SerializedName("newest_ep_index")
|
||||
var newestEpIndex: String, // 8
|
||||
@SerializedName("param")
|
||||
var `param`: String, // 26284
|
||||
@SerializedName("title")
|
||||
var title: String, // 盾之勇者成名录
|
||||
@SerializedName("total_count")
|
||||
var totalCount: String, // 25
|
||||
@SerializedName("uri")
|
||||
var uri: String // http://bangumi.bilibili.com/anime/26284
|
||||
)
|
||||
}
|
||||
|
||||
data class Article(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 0
|
||||
@SerializedName("item")
|
||||
var item: List<JsonElement>,
|
||||
@SerializedName("lists")
|
||||
var lists: List<JsonElement>,
|
||||
@SerializedName("lists_count")
|
||||
var listsCount: Int // 0
|
||||
)
|
||||
|
||||
data class Album(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 0
|
||||
@SerializedName("has_more")
|
||||
var hasMore: Int, // 0
|
||||
@SerializedName("item")
|
||||
var item: List<JsonElement>,
|
||||
@SerializedName("next_offset")
|
||||
var nextOffset: Int // 0
|
||||
)
|
||||
|
||||
data class CoinArchive(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 1
|
||||
@SerializedName("item")
|
||||
var item: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("cover")
|
||||
var cover: String, // http://i0.hdslb.com/bfs/archive/0b49549eeefd58441ad88613fe460630182d1afe.jpg
|
||||
@SerializedName("ctime")
|
||||
var ctime: Int, // 1548875105
|
||||
@SerializedName("danmaku")
|
||||
var danmaku: Int, // 2
|
||||
@SerializedName("duration")
|
||||
var duration: Int, // 169
|
||||
@SerializedName("goto")
|
||||
var goto: String, // av
|
||||
@SerializedName("length")
|
||||
var length: String,
|
||||
@SerializedName("param")
|
||||
var `param`: String, // 42179433
|
||||
@SerializedName("play")
|
||||
var play: Int, // 3373
|
||||
@SerializedName("title")
|
||||
var title: String, // 《吹响吧!上低音号!》Dream Solister 上低音号四重奏
|
||||
@SerializedName("tname")
|
||||
var tname: String,
|
||||
@SerializedName("ugc_pay")
|
||||
var ugcPay: Int, // 0
|
||||
@SerializedName("uri")
|
||||
var uri: String // bilibili://video/42179433
|
||||
)
|
||||
}
|
||||
|
||||
data class Elec(
|
||||
@SerializedName("elec_num")
|
||||
var elecNum: Int, // 0
|
||||
@SerializedName("elec_set")
|
||||
var elecSet: ElecSet,
|
||||
@SerializedName("list")
|
||||
var list: List<JsonElement>,
|
||||
@SerializedName("show")
|
||||
var show: Boolean // true
|
||||
) {
|
||||
data class ElecSet(
|
||||
@SerializedName("elec_list")
|
||||
var elecList: List<Elec>,
|
||||
@SerializedName("elec_theme")
|
||||
var elecTheme: Int, // 0
|
||||
@SerializedName("integrity_rate")
|
||||
var integrityRate: Double, // 10.0
|
||||
@SerializedName("rmb_rate")
|
||||
var rmbRate: Double, // 10.0
|
||||
@SerializedName("round_mode")
|
||||
var roundMode: Int // 0
|
||||
) {
|
||||
data class Elec(
|
||||
@SerializedName("elec_num")
|
||||
var elecNum: Int, // 0
|
||||
@SerializedName("is_customize")
|
||||
var isCustomize: Int, // 1
|
||||
@SerializedName("max_elec")
|
||||
var maxElec: Int, // 99999
|
||||
@SerializedName("min_elec")
|
||||
var minElec: Int, // 20
|
||||
@SerializedName("title")
|
||||
var title: String // 自定义
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
data class Setting(
|
||||
@SerializedName("bangumi")
|
||||
var bangumi: Int, // 0
|
||||
@SerializedName("channel")
|
||||
var channel: Int, // 1
|
||||
@SerializedName("coins_video")
|
||||
var coinsVideo: Int, // 1
|
||||
@SerializedName("fav_video")
|
||||
var favVideo: Int, // 0
|
||||
@SerializedName("groups")
|
||||
var groups: Int, // 0
|
||||
@SerializedName("likes_video")
|
||||
var likesVideo: Int, // 1
|
||||
@SerializedName("played_game")
|
||||
var playedGame: Int // 0
|
||||
)
|
||||
|
||||
data class Card(
|
||||
@SerializedName("DisplayRank")
|
||||
var displayRank: String,
|
||||
@SerializedName("approve")
|
||||
var approve: Boolean, // false
|
||||
@SerializedName("article")
|
||||
var article: Int, // 0
|
||||
@SerializedName("attention")
|
||||
var attention: Int, // 113
|
||||
@SerializedName("attentions")
|
||||
var attentions: JsonElement?, // null
|
||||
@SerializedName("birthday")
|
||||
var birthday: String,
|
||||
@SerializedName("description")
|
||||
var description: String,
|
||||
@SerializedName("end_time")
|
||||
var endTime: Int, // 0
|
||||
@SerializedName("face")
|
||||
var face: String, // http://i0.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg
|
||||
@SerializedName("fans")
|
||||
var fans: Int, // 539
|
||||
@SerializedName("friend")
|
||||
var friend: Int, // 0
|
||||
@SerializedName("level_info")
|
||||
var levelInfo: LevelInfo,
|
||||
@SerializedName("mid")
|
||||
var mid: String, // 2866663
|
||||
@SerializedName("name")
|
||||
var name: String, // hyx5020
|
||||
@SerializedName("nameplate")
|
||||
var nameplate: Nameplate,
|
||||
@SerializedName("official_verify")
|
||||
var officialVerify: OfficialVerify,
|
||||
@SerializedName("pendant")
|
||||
var pendant: Pendant,
|
||||
@SerializedName("place")
|
||||
var place: String,
|
||||
@SerializedName("rank")
|
||||
var rank: String,
|
||||
@SerializedName("regtime")
|
||||
var regtime: Int, // 0
|
||||
@SerializedName("sex")
|
||||
var sex: String, // 保密
|
||||
@SerializedName("sign")
|
||||
var sign: String, // 简介?不存在的
|
||||
@SerializedName("silence")
|
||||
var silence: Int, // 0
|
||||
@SerializedName("silence_url")
|
||||
var silenceUrl: String,
|
||||
@SerializedName("spacesta")
|
||||
var spacesta: Int, // 0
|
||||
@SerializedName("vip")
|
||||
var vip: Vip
|
||||
) {
|
||||
data class Vip(
|
||||
@SerializedName("accessStatus")
|
||||
var accessStatus: Int, // 0
|
||||
@SerializedName("dueRemark")
|
||||
var dueRemark: String,
|
||||
@SerializedName("vipDueDate")
|
||||
var vipDueDate: Long, // 1623081600000
|
||||
@SerializedName("vipStatus")
|
||||
var vipStatus: Int, // 1
|
||||
@SerializedName("vipStatusWarn")
|
||||
var vipStatusWarn: String,
|
||||
@SerializedName("vipType")
|
||||
var vipType: Int // 2
|
||||
)
|
||||
|
||||
data class OfficialVerify(
|
||||
@SerializedName("desc")
|
||||
var desc: String,
|
||||
@SerializedName("role")
|
||||
var role: Int, // 0
|
||||
@SerializedName("title")
|
||||
var title: String,
|
||||
@SerializedName("type")
|
||||
var type: Int // -1
|
||||
)
|
||||
|
||||
data class Pendant(
|
||||
@SerializedName("expire")
|
||||
var expire: Int, // 0
|
||||
@SerializedName("image")
|
||||
var image: String,
|
||||
@SerializedName("name")
|
||||
var name: String,
|
||||
@SerializedName("pid")
|
||||
var pid: Int // 0
|
||||
)
|
||||
|
||||
data class Nameplate(
|
||||
@SerializedName("condition")
|
||||
var condition: String,
|
||||
@SerializedName("image")
|
||||
var image: String,
|
||||
@SerializedName("image_small")
|
||||
var imageSmall: String,
|
||||
@SerializedName("level")
|
||||
var level: String,
|
||||
@SerializedName("name")
|
||||
var name: String,
|
||||
@SerializedName("nid")
|
||||
var nid: Int // 0
|
||||
)
|
||||
|
||||
data class LevelInfo(
|
||||
@SerializedName("current_exp")
|
||||
var currentExp: Int, // 11224
|
||||
@SerializedName("current_level")
|
||||
var currentLevel: Int, // 5
|
||||
@SerializedName("current_min")
|
||||
var currentMin: Int, // 10800
|
||||
@SerializedName("next_exp")
|
||||
var nextExp: Int // 28800
|
||||
)
|
||||
}
|
||||
|
||||
data class Tab(
|
||||
@SerializedName("album")
|
||||
var album: Boolean, // false
|
||||
@SerializedName("archive")
|
||||
var archive: Boolean, // true
|
||||
@SerializedName("article")
|
||||
var article: Boolean, // false
|
||||
@SerializedName("audios")
|
||||
var audios: Boolean, // false
|
||||
@SerializedName("bangumi")
|
||||
var bangumi: Boolean, // false
|
||||
@SerializedName("clip")
|
||||
var clip: Boolean, // false
|
||||
@SerializedName("coin")
|
||||
var coin: Boolean, // true
|
||||
@SerializedName("community")
|
||||
var community: Boolean, // false
|
||||
@SerializedName("dynamic")
|
||||
var `dynamic`: Boolean, // true
|
||||
@SerializedName("favorite")
|
||||
var favorite: Boolean, // false
|
||||
@SerializedName("like")
|
||||
var like: Boolean, // true
|
||||
@SerializedName("mall")
|
||||
var mall: Boolean, // false
|
||||
@SerializedName("shop")
|
||||
var shop: Boolean // false
|
||||
)
|
||||
|
||||
data class Audios(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 0
|
||||
@SerializedName("item")
|
||||
var item: List<JsonElement>
|
||||
)
|
||||
|
||||
data class LikeArchive(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 7
|
||||
@SerializedName("item")
|
||||
var item: List<Item>
|
||||
) {
|
||||
data class Item(
|
||||
@SerializedName("cover")
|
||||
var cover: String, // http://i1.hdslb.com/bfs/archive/6e246c830b26591924984f0f9275eede61621d80.jpg
|
||||
@SerializedName("ctime")
|
||||
var ctime: Int, // 1527760833
|
||||
@SerializedName("danmaku")
|
||||
var danmaku: Int, // 11309
|
||||
@SerializedName("duration")
|
||||
var duration: Int, // 215
|
||||
@SerializedName("goto")
|
||||
var goto: String, // av
|
||||
@SerializedName("length")
|
||||
var length: String,
|
||||
@SerializedName("param")
|
||||
var `param`: String, // 24180113
|
||||
@SerializedName("play")
|
||||
var play: Int, // 1325557
|
||||
@SerializedName("title")
|
||||
var title: String, // 【洛天依/言和原创曲】反派死于话多 (真实童话 Act.3)【PV付】
|
||||
@SerializedName("tname")
|
||||
var tname: String,
|
||||
@SerializedName("ugc_pay")
|
||||
var ugcPay: Int, // 0
|
||||
@SerializedName("uri")
|
||||
var uri: String // bilibili://video/24180113
|
||||
)
|
||||
}
|
||||
|
||||
data class Live(
|
||||
@SerializedName("broadcast_type")
|
||||
var broadcastType: Int, // 0
|
||||
@SerializedName("cover")
|
||||
var cover: String, // http://i0.hdslb.com/bfs/live/af5786fa6d011c143fde5275c7af011f2c54a619.jpg
|
||||
@SerializedName("liveStatus")
|
||||
var liveStatus: Int, // 0
|
||||
@SerializedName("online")
|
||||
var online: Int, // 103
|
||||
@SerializedName("roomStatus")
|
||||
var roomStatus: Int, // 1
|
||||
@SerializedName("roomid")
|
||||
var roomid: Long, // 29434
|
||||
@SerializedName("roundStatus")
|
||||
var roundStatus: Int, // 0
|
||||
@SerializedName("title")
|
||||
var title: String, // 直播
|
||||
@SerializedName("url")
|
||||
var url: String // http://live.bilibili.com/29434
|
||||
)
|
||||
|
||||
data class Clip(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 0
|
||||
@SerializedName("has_more")
|
||||
var hasMore: Int, // 0
|
||||
@SerializedName("item")
|
||||
var item: List<JsonElement>,
|
||||
@SerializedName("next_offset")
|
||||
var nextOffset: Int // 0
|
||||
)
|
||||
}
|
||||
}
|
@ -211,7 +211,7 @@ interface MainAPI {
|
||||
@GET("/x/v2/reply/log")
|
||||
fun deleteLog(
|
||||
@Query("oid") oid: Long,
|
||||
@Query("pn") pn: Int = 1,
|
||||
@Query("pn") pageNumber: Int = 1,
|
||||
@Query("ps") pageSize: Int = 20,
|
||||
@Query("type") type: Int = 1
|
||||
): Deferred<DeleteLog>
|
||||
@ -233,7 +233,7 @@ interface MainAPI {
|
||||
): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 关注的分组
|
||||
* 查看关注分组
|
||||
* 默认分组永远是 0
|
||||
*/
|
||||
@GET("/x/relation/tag/m/tags")
|
||||
@ -264,4 +264,81 @@ interface MainAPI {
|
||||
@Field("fids") followIds: String,
|
||||
@Field("tagids") tagIds: String
|
||||
): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 收藏文章
|
||||
*
|
||||
* @param id 文章的 id
|
||||
*/
|
||||
@POST("/x/article/favorites/add")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun addFavoriteArticle(@Field("id") id: Long): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 点赞(文章)
|
||||
*
|
||||
* @param id 文章的 id
|
||||
* @param type 操作类型, 1 为点赞, 2 为取消点赞
|
||||
*/
|
||||
@POST("/x/article/like")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun articleLike(@Field("id") id: Long, @Field("type") type: Int): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 查看收藏夹分组
|
||||
*
|
||||
* @param aid 视频的唯一标识, 用于判断是否已经将当前视频加入收藏夹
|
||||
* @param vmId 用户 id
|
||||
*/
|
||||
@Suppress("SpellCheckingInspection")
|
||||
@GET("/x/v2/fav/folder")
|
||||
fun favoriteFolder(
|
||||
@Query("aid") aid: Long,
|
||||
@Query("vmid") vmId: Long
|
||||
): Deferred<FavoriteFolder>
|
||||
|
||||
/**
|
||||
* 创建收藏夹
|
||||
*
|
||||
* @param name 收藏夹名
|
||||
* @param public 是否公开, 0 为公开
|
||||
*/
|
||||
@POST("/x/v2/fav/folder/add")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun createFavoriteFolder(
|
||||
@Field("name") name: String,
|
||||
@Field("public") public: Int = 0
|
||||
): Deferred<CreateFavoriteFolderResponse>
|
||||
|
||||
/**
|
||||
* 收藏视频
|
||||
*
|
||||
* @param fid 收藏夹的 id, 可以有多个, 用逗号隔开. 例如 795158,3326376
|
||||
*/
|
||||
@POST("/x/v2/fav/video/add")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun addFavoriteVideo(
|
||||
@Field("aid") aid: Long,
|
||||
@Field("fid") fid: String,
|
||||
@Field("from") from: Int? = null
|
||||
): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 取消收藏视频
|
||||
*
|
||||
* @param fid 收藏夹的 id, 可以有多个, 同上
|
||||
*
|
||||
* @see addFavoriteVideo
|
||||
*/
|
||||
@POST("/x/v2/fav/video/del")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun deleteFavoriteVideo(
|
||||
@Field("aid") aid: Long,
|
||||
@Field("fid") fid: String
|
||||
): Deferred<CommonResponse>
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ data class BangumiPage(
|
||||
@SerializedName("is_new")
|
||||
var isNew: Int, // 0
|
||||
@SerializedName("item_id")
|
||||
var itemId: Int, // 34265
|
||||
var itemid: Long, // 34265
|
||||
@SerializedName("link")
|
||||
var link: String, // https://www.bilibili.com/blackboard/topic/activity-dm4qK4-BI.html
|
||||
@SerializedName("title")
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.hiczp.bilibili.api.main.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class CreateFavoriteFolderResponse(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("fid")
|
||||
var fid: Long // 3326376
|
||||
)
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.hiczp.bilibili.api.main.model
|
||||
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class DeleteLog(
|
||||
@ -14,7 +15,7 @@ data class DeleteLog(
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("logs")
|
||||
var logs: Any?, // null
|
||||
var logs: JsonElement?, // null
|
||||
@SerializedName("page")
|
||||
var page: Page,
|
||||
@SerializedName("reply_count")
|
||||
|
@ -0,0 +1,50 @@
|
||||
package com.hiczp.bilibili.api.main.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class FavoriteFolder(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: List<Data>,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("atten_count")
|
||||
var attenCount: Int, // 0
|
||||
@SerializedName("cover")
|
||||
var cover: List<Cover>,
|
||||
@SerializedName("ctime")
|
||||
var ctime: Long, // 1451133174
|
||||
@SerializedName("cur_count")
|
||||
var curCount: Int, // 1
|
||||
@SerializedName("favoured")
|
||||
var favoured: Int, // 0
|
||||
@SerializedName("fid")
|
||||
var fid: Long, // 795158
|
||||
@SerializedName("max_count")
|
||||
var maxCount: Int, // 50000
|
||||
@SerializedName("media_id")
|
||||
var mediaId: Long, // 79515830
|
||||
@SerializedName("mid")
|
||||
var mid: Long, // 20293030
|
||||
@SerializedName("mtime")
|
||||
var mtime: Long, // 1544629663
|
||||
@SerializedName("name")
|
||||
var name: String, // 默认收藏夹
|
||||
@SerializedName("state")
|
||||
var state: Int // 0
|
||||
) {
|
||||
data class Cover(
|
||||
@SerializedName("aid")
|
||||
var aid: Long, // 9498716
|
||||
@SerializedName("pic")
|
||||
var pic: String, // http://i2.hdslb.com/bfs/archive/3536b8de71da4dd7bf01200db1e6c710b5f4aa0e.png
|
||||
@SerializedName("type")
|
||||
var type: Int // 2
|
||||
)
|
||||
}
|
||||
}
|
@ -73,7 +73,7 @@ data class Recommend(
|
||||
@SerializedName("desc2")
|
||||
var desc2: String, // 295
|
||||
@SerializedName("item_id")
|
||||
var itemId: Int, // 10005816
|
||||
var itemid: Long, // 10005816
|
||||
@SerializedName("pic")
|
||||
var pic: String, // https://i0.hdslb.com/bfs/mall/mall/c3/f0/c3f029d8221c6ecc96bd1ab321034bc2.jpg
|
||||
@SerializedName("title")
|
||||
|
@ -621,7 +621,7 @@ data class Reply(
|
||||
@SerializedName("score")
|
||||
var score: Int, // 0
|
||||
@SerializedName("uid")
|
||||
var uid: Int // 7937795
|
||||
var uid: Long // 7937795
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ data class Season(
|
||||
@SerializedName("link")
|
||||
var link: String, // http://www.bilibili.com/bangumi/media/md134912/
|
||||
@SerializedName("media_id")
|
||||
var mediaId: Int, // 134912
|
||||
var mimediaId: Long, // 134912
|
||||
@SerializedName("mode")
|
||||
var mode: Int, // 2
|
||||
@SerializedName("new_ep")
|
||||
|
Loading…
Reference in New Issue
Block a user