diff --git a/README.md b/README.md index 57a850f..ce3090c 100644 --- a/README.md +++ b/README.md @@ -1,483 +1,490 @@ -# Bilibili API 调用库 -该项目提供 Bilibili API 的 Java 调用, 协议来自 Bilibili Android APP 的逆向工程以及截包分析. +# Bilibili API JVM 调用库 +该项目提供 Bilibili API 的 JVM 调用, 协议来自 Bilibili Android APP 的逆向工程以及截包分析. -由于B站即使更新客户端, 也会继续兼容以前的旧版本客户端, 所以短期内不用担心 API 失效的问题. - -对于一些 Bilibili Android APP 上没有的功能, 可以先[将 token 转换为 cookie](#sso), 然后再去调用 Bilibili Web API. - -# API 不完全 -由于本项目还在开发初期, 大量 API 没有完成, 所以很可能没有你想要的 API. - -欢迎提交 issue 或者 Merge Request. - -# 添加依赖 -## Gradle - - compile group: 'com.hiczp', name: 'bilibili-api', version: '0.0.20' - -# 名词解释 -B站不少参数都是瞎取的, 并且不统一, 经常混用, 以下给出一些常见参数对应的含义 - -| 参数 | 含义 | -| :--- | :--- | -| mid | 用户 ID(与 userId 含义一致, 经常被混用) | -| userId | 用户 ID, 用户在B站的唯一标识, 数字 | -| uid | 用户 ID, 与 userId 同义 | -| userid | 注意这里是全小写, 它的值可能是 'bili_1178318619', 这个东西是没用的, B站并不用这个作为用户唯一标识 | -| showRoomId | 直播间 URL (Web)上的房间号(可能是一个很小的数字, 低于 1000) | -| roomId | 直播间的真实 ID(直播房间号在 1000 以下的房间, 真实 ID 是另外一个数字) | -| cid | 直播间 ID(URL 上的短房间号以及真实房间号都叫 cid) | -| ruid | 直播间房主的用户 ID | -| rcost | 该房间内消费的瓜子数量 | - -(上表仅供其他开发者参照, 本调用库中已经封装为 Java 标准全写小驼峰命名法, 例如 userId, roomId, roomUserId) +使用一台虚拟的 `Pixel 2` 设备来截取数据包, 一些固定参数可能与真实设备不一致. # 使用 -## RESTFul API -由于B站 API 设计清奇, 一些显然不需要登录的 API 也需要登录, 所以所有 API 尽可能登陆后访问以免失败. +```groovy +compile group: 'com.hiczp', name: 'bilibili-api', version: '0.1.0' +``` -### 登录 -使用账户名和密码作为登录参数 +# 技术说明 +`BilibiliClient` 类表示一个模拟的客户端, 实例化此类即表示打开了 Bilibili APP. - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - LoginResponseEntity loginResponseEntity = bilibiliAPI.login(String username, String password); +所有调用从这个类开始, 包括登陆以及访问其他各种 API. -IOException 在网络故障时抛出 +使用协程来实现异步, 由于 [kotlin coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html) 为编译器实现, 因此并非所有 JVM 语言都能正确调用 `suspend` 方法. -LoginException 在用户名密码不匹配时抛出 +本项目尽可能的兼容其他 JVM 语言和 Android, 不要问, 问就没测试过. -CaptchaMismatchException 在验证码不正确时抛出, 见下文 [验证码问题](#验证码问题) 一节 +`BilibiliClient` 实例化时会记录一些信息, 例如初始化的事件, 用于更逼真的模拟真实客户端发送的请求. 因此请不要每次都实例化一个新的 `BilibiliClient` 实例, 而应该保存其引用. -login 方法的返回值为 LoginResponseEntity 类型, 使用 +一个客户端下各种不同类型的 API (代理类)都是惰性初始化的, 并且只初始化一次, 因此不需要保存 API 的引用, 例如以下代码是被推荐的: - BilibiliAccount bilibiliAccount = loginResponseEntity.toBilibiliAccount(); - -来获得一个 BilibiliAccount 实例, 其中包含了 OAuth2 的用户凭证, 如果有需要, 可以将其持久化保存. - -将一个登陆状态恢复出来(从之前保存的 BilibiliAccount 实例)使用如下代码 - - BilibiliAPI bilibiliAPI = new BilibiliAPI(BilibiliAccount bilibiliAccount); - -注意, 如果这个 BilibiliAccount 实例含有的 accessToken 是错误的或者过期的, 需要鉴权的 API 将全部 401. - -### 刷新 Token -OAuth2 的重要凭证有两个, token 与 refreshToken, token 到期之后, 并不需要再次用用户名密码登录一次, 仅需要用 refreshToken 刷新一次 token 即可(会得到新的 token 和 refreshToken, refreshToken 的有效期不是无限的. B站的 refreshToken 有效期不明确). - - bilibiliAPI.refreshToken(); - -IOException 在网络故障时抛出 - -LoginException 在 token 错误,或者 refreshToken 错误或过期时抛出. - -refreshToken 操作在正常情况下将在服务器返回 401(实际上 B站 不用 401 来表示未登录)时自动进行, 因此 BilibiliAPI 内部持有的 BilibiliAccount 的实例的内容可能会发生改变, 如果需要在应用关闭时持久化用户 token, 需要这样来取得最后的 BilibiliAccount 状态 - - BilibiliAccount bilibiliAccount = bilibiliAPI.getBilibiliAccount(); - -### 登出 - - bilibiliAPI.logout(); - -IOException 在网络故障时抛出 - -LoginException 在 accessToken 错误或过期时抛出 - -### 验证码问题 -当对一个账户在短时间内(时长不明确)尝试多次错误的登录(密码错误)后, 再尝试登录该账号, 会被要求验证码. - -此时登录操作会抛出 CaptchaMismatchException 异常, 表示必须调用另一个接口 - - public LoginResponseEntity login(String username, - String password, - String captcha, - String cookie) throws IOException, LoginException, CaptchaMismatchException - -这个接口将带 captcha 参数地去登录, 注意这里还有一个 cookie 参数. - -下面先给出一段正确使用该接口的代码, 随后会解释其步骤 - - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - try { - bilibiliAPI.login(username, password); - } catch (CaptchaMismatchException e) { //如果该账号现在需要验证码来进行登录, 就会抛出异常 - cookie = "sid=123456"; //自己造一个 cookie 或者从服务器取得 - Response response = bilibiliAPI.getCaptchaService() - .getCaptcha(cookie) - .execute(); - InputStream inputStream = response.body().byteStream(); - String captcha = letUserInputCaptcha(inputStream); //让用户根据图片输入验证码 - bilibiliAPI.login( - username, - password, - captcha, - cookie - ); +```kotlin +runBlocking { + val bilibiliClient = BilibiliClient().apply { + login(username, password) } + val myInfo = bilibiliClient.appAPI.myInfo().await() + val reply = bilibiliClient.mainAPI.reply(oid = 44154463).await() +} +``` -验证码是通过访问 https://passport.bilibili.com/captcha 这个地址获得的. +如果一个请求的返回内容中的 `code`(code 是 BODY 的内容, 并非 HttpStatus) 不为 0, 将抛出异常 `BilibiliApiException`, 通过以下代码来获取服务器原始返回的 `code`: -访问这个地址需要带有一个 cookie, cookie 里面要有 "sid=xxx", 然后服务端会记录下对应关系, 也就是 sid xxx 对应验证码 yyy, 然后就可以验证了. +```kotlin +val code = bilibiliApiException.commonResponse.code +``` -我们会发现, 访问任何 passport.bilibili.com 下面的地址, 都会被分发一个 cookie, 里面带有 sid 的值. 我们访问 /captcha 也会被分发一个 cookie, 但是这个通过访问 captcha 而被分发得到的 cookie 和访问得到的验证码图片, 没有对应关系. 推测是因为 cookie 的发放在请求进入甚至模块运行完毕后才进行. +一个错误返回的原始 `JSON` 如下所示: -所以我们如果不带 cookie 去访问 /captcha, 我们这样拿到的由 /captcha 返回的 cookie 和 验证码, 是不匹配的. +```json +{ + "code": -629, + "message": "用户名与密码不匹配", + "ts": 1550730464 +} +``` -所以我们要先从其他地方获取一个 cookie. +每种不同的 API 在错误时返回的 `code` 丰富多彩(确信), 可能是正数也可能是负数, 可能上万也可能是个位数, 不要问, 问就是你菜. -我们可以用 /api/oauth2/getKey(获取加密密码用的 hash 和公钥) 来获取一个 cookie +# 登录和登出 +(Bilibili oauth2 v3) - String cookie = bilibiliAPI.getPassportService() - .getKey() - .execute() - .headers() - .get("Set-cookie"); +登陆和登出均为异步方法, 需要在协程上下文中执行(接下去不会特地强调这一点). -/captcha 不验证 cookie 正确性, 我们可以直接使用假的 cookie (比如 123456)对其发起验证码请求, 它会记录下这个假的 cookie 和 验证码 的对应关系, 一样能验证成功. 但是不推荐这么做. - -简单地说, 只要我们是带 cookie 访问 /captcha 的, 那么我们得到的验证码, 是和这个 cookie 绑定的. 我们接下去用这个 cookie 和 这个验证码的值 去进行带验证码的登录, 就可以成功登陆. - -至于验证码怎么处理, 可以显示给最终用户, 让用户来输入, 或者用一些预训练模型自动识别验证码. - -这个带验证码的登录接口也会继续抛出 CaptchaMismatchException, 如果验证码输入错误的话. - -### SSO -通过 SSO API 可以将 accessToken 转为 cookie, 用 cookie 就可以访问 B站 的 Web API. - -B站客户端内置的 WebView 就是通过这种方式来工作的(WebView 访问页面时, 处于登录状态). - -首先, 我们需要登录 - - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - bilibiliAPI.login(String username, String password); - -通过 - - bilibiliAPI.toCookies(); - -来得到对应的 cookies, 类型为 Map>, key 为 domain(可能是通配类型的, 例如 ".bilibili.com"), value 为此 domain 对应的 cookies. - -如果只想得到用于进行 SSO 操作的那条 URL, 可以这么做 - - String goUrl = "https://account.bilibili.com/account/home"; - bilibiliAPI.getSsoUrl(goUrl); - -返回值是一个 HttpUrl, 里面 url 的值差不多是这样的 - - https://passport.bilibili.com/api/login/sso?access_key=c3bf6002bd2e539f5bfce56308f14789&appkey=1d8b6e7d45233436&build=515000&gourl=https%3A%2F%2Faccount.bilibili.com%2Faccount%2Fhome&mobi_app=android&platform=android&ts=1520079995&sign=654e2d00aa827aa1d7acef6fbeb9ee70 - -如果 access_key 是正确的话, 这个 url 访问一下就登录 B站 了. - -如果想跟 B站 客户端一样弄一个什么内嵌 WebView 的话, 这个 API 就可以派上用场(只需要在 WebView 初始化完毕后让 WebView 去访问这个 url, 就登陆了)(goUrl 可以是任意值, 全部的 302 重定向完成后将进入这个地址, 如果 goUrl 不存在或为空则将跳转到B站首页). - -### Web API -上文讲到, 通过 SSO API, 可以将 token 转为 cookie, 在本项目中, Web API 封装在 BilibiliWebAPI 中, 可以通过如下方式得到一个已经登录了的 BilibiliWebAPI 实例 - - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - bilibiliAPI.login(String username, String password); - BilibiliWebAPI bilibiliWebAPI = bilibiliAPI.getBilibiliWebAPI(); - -IOException 在网络错误时抛出(获取 cookie 时需要进行网络请求) - -如果将之前的 bilibiliAPI.toCookies() 的返回值(cookiesMap)持久化了下来的话, 下次可以通过以下方式直接获得一个已经登录了的 BilibiliWebAPI 实例(注意, cookie 没有 refreshToken 机制, 过期不会自动刷新, 因此不推荐持久化 cookie) - - Map> cookiesMap = bilibiliAPI.toCookies(); - //序列化后存储 - //... - //反序列化后得到上次存储的 cookiesMap - BilibiliWebAPI bilibiliWebAPI = new BilibiliWebAPI(cookiesMap); - -有了 BilibiliWebAPI 实例之后, 通过类似以下代码的形式来获取对应的 Service, API 调用方法和基于 Token 方式的 API 一致 - - LiveService liveService = bilibiliWebAPI.getLiveService(); - -(这个 LiveService 是 Web API 里的 LiveService) - -由于 Web API 是有状态的, 每个 BilibiliWebAPI 内部维护的 CookieJar 是同一个, 一些验证有关的 API 可能会改变 cookie. - -通过以下代码来获得一个 BilibiliWebAPI 中目前持有的 CookieJar 的引用 - - bilibiliWebAPI.getCookieJar(); - -### API 调用示例 -打印一个直播间的历史弹幕 - - long roomId = 3; - new BilibiliAPI() - .getLiveService() - .getHistoryBulletScreens(roomId) - .execute() - .body() - .getData() - .getRoom() - .forEach(liveHistoryBulletScreenEntity -> - System.out.printf("[%s]%s: %s\n", - liveHistoryBulletScreenEntity.getTimeline(), - liveHistoryBulletScreenEntity.getNickname(), - liveHistoryBulletScreenEntity.getText()) - ); - -签到 - - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - bilibiliAPI.login(username, password); - bilibiliAPI.getLiveService() - .getSignInfo() - .execute(); - -发送一条弹幕到指定直播间 - - long roomId = 3; - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - bilibiliAPI.login(username, password); - - bilibiliAPI.getLiveService() - .sendBulletScreen( - new BulletScreenEntity( - roomId, - bilibiliAPI.getBilibiliAccount().getUserId(), //实际上并不需要包含 mid 就可以正常发送弹幕, 但是真实的 Android 客户端确实发送了 mid - "这是自动发送的弹幕" - ) - ) - .execute(); - -(如果要调用需要鉴权的 API, 需要先登录) - -API 文档 - -//TODO 文档编写中 - -## Socket -### 获取直播间实时弹幕 - - long roomId = 3; - EventLoopGroup eventLoopGroup = new NioEventLoopGroup(); - LiveClient liveClient = new BilibiliAPI() - .getLiveClient(eventLoopGroup, roomId) - .registerListener(new MyListener()) - .connect(); - -.connect() 会抛出 IOException 当网络故障时. - -(connect 是阻塞的) - -使用 .getLiveClient() 前可以先登录也可以不登陆直接用, 如果 API 已经登录, 那么进房数据包中会带有用户ID, 尚不明确有什么作用, 可能与一些统计有关. - -多个 LiveClient 可以复用同一个 EventLoopGroup. - -(connect 方法运行结束只代表 socket 确实是连上了, 但是服务器还没有响应进房请求数据包) - -(当服务器响应进房请求数据包时才代表真的连上了, 此时会有一个连接成功的事件, 见下文) - -事件机制使用 Google Guava EventBus 实现, 监听器不需要继承任何类或者接口. - - public class MyListener { - @Subscribe - public void onConnectSucceed(ConnectSucceedEvent connectSucceedEvent) { - //do something - } - - @Subscribe - public void onConnectionClose(ConnectionCloseEvent connectionCloseEvent) { - //do something - } - - @Subscribe - public void onDanMuMsg(DanMuMsgPackageEvent danMuMsgPackageEvent) { - DanMuMsgEntity danMuMsgEntity = danMuMsgPackageEvent.getEntity(); - System.out.pintf("%s: %s\n", danMuMsgEntity.getUsername(), danMuMsgEntity.getMessage()); - } +```kotlin +runBlocking { + BilibiliClient().run { + login(username, password) + logout() } +} +``` -如果持续 40 秒(心跳包为 30 秒)没有收到任何消息, 将视为掉线, 会跟服务器主动断开连接一样(这通常是发送了服务器无法读取的数据包)触发一次 ConnectionCloseEvent. +`login` 方法返回一个 `LoginResponse` 实例, 下次可以直接赋值到没有登陆的 `BilibiliClient` 实例中来恢复登陆状态. - liveClient.closeChannel(); +```kotlin +BilibiliClient().apply { + this.loginResponse = loginResponse +} +``` -即可阻塞关闭连接. +`LoginResponse` 继承 `Serializable`, 可被序列化(JVM 序列化). - liveClient.closeChannelAsync(); +可能的错误返回有两种: -即可异步关闭连接. + -629 用户名与密码不匹配 + -105 验证码错误 - eventLoopGroup.shutdownGracefully(); +如果仅使用用户名与密码进行登陆并且得到了 `-105` 的结果, 那么说明需要验证码(通常是由于多次错误的登陆尝试导致的). -即可关闭事件循环, 结束 Nio 工作线程(所有使用这个 EventLoopGroup 的 LiveClient 也将在此时被关闭). +原始返回如下所示 -如果需要在直播间发送弹幕可以直接使用如下代码(需要先登录) + {"ts":1550569982,"code":-105,"data":{"url":"https://passport.bilibili.com/register/verification.html?success=1>=b6e5b7fad7ecd37f465838689732e788&challenge=9a67afa4d42ede71a93aeaaa54a4b6fe&ct=1&hash=105af2e7cc6ea829c4a95205f2371dc5"},"message":"验证码错误!"} - String message = "这是一条弹幕"; - liveClient.sendBulletScreen(message); +自行访问 `commonResponse.data.obj.url.string` 打开一个极验弹窗, 完成滑动验证码后再次调用登陆接口: -所有的事件(有些数据包我也不知道它里面的一些值是什么含义, /record 目录下面有抓取到的 Json, 可以用来查看): +```kotlin +login(username, password, challenge, secCode, validate) +``` -| 事件 | 抛出条件 | 含义 | -| :--- | :--- | :--- | -| ActivityEventPackageEvent | 收到 ACTIVITY_EVENT 数据包 | 活动事件 | -| ChangeRoomInfoPackageEvent | 收到 CHANGE_ROOM_INFO 数据包 | 更换房间背景图片 | -| ComboEndPackageEvent | 收到 COMBO_END 数据包 | 礼物连发结束 | -| ComboSendPackageEvent | 收到 COMBO_SEND 数据包 | 礼物连发开始 | -| ConnectionCloseEvent | 连接断开(主动或被动) | | -| ConnectSucceedEvent | 进房成功 | | -| CutOffPackageEvent | 收到 CUT_OFF 数据包 | 被 B站 管理员强制中断 | -| DanMuMsgPackageEvent | 收到 DANMU_MSG 数据包 | 弹幕消息 | -| EntryEffectPackageEvent | 收到 ENTRY_EFFECT 数据包 | 尚不明确 | -| EventCmdPackageEvent | 收到 EVENT_CMD 数据包 | 尚不明确 | -| GuardBuyPackageEvent | 收到 GUARD_BUY 数据包 | 船票购买 | -| GuardLotteryStartPackageEvent | 收到 GUARD_LOTTERY_START 数据包 | 船票购买后的抽奖活动 | -| GuardMsgPackageEvent | 收到 GUARD_MSG 数据包 | 舰队消息(登船) | -| LivePackageEvent | 收到 LIVE 数据包 | 开始直播 | -| NoticeMsgPackageEvent | 收到 NOTICE_MSG 数据包 | 获得大奖的通知消息 | -| PkAgainPackageEvent | 收到 PK_AGAIN 数据包 | 下面几个都是 PK 有关的事件 | -| PkClickAgainPackageEvent | 收到 PK_CLICK_AGAIN 数据包 | -| PkEndPackageEvent | 收到 PK_END 数据包 | -| PkInviteFailPackageEvent | 收到 PK_INVITE_FAIL 数据包 | -| PkInviteInitPackageEvent | 收到 PK_INVITE_INIT 数据包 | -| PkInviteSwitchClosePackageEvent | 收到 PK_INVITE_SWITCH_CLOSE 数据包 | -| PkInviteSwitchOpenPackageEvent | 收到 PK_INVITE_SWITCH_OPEN 数据包 | -| PkMatchPackageEvent | 收到 PK_MATCH 数据包 | -| PkMicEndPackageEvent | 收到 PK_MIC_END 数据包 | -| PkPrePackageEvent | 收到 PK_PRE 数据包 | -| PkProcessPackageEvent | 收到 PK_PROCESS 数据包 | -| PkSettlePackageEvent | 收到 PK_SETTLE 数据包 | -| PkStartPackageEvent | 收到 PK_START 数据包 | -| PreparingPackageEvent | 收到 PREPARING 数据包 | 停止直播 | -| RaffleEndPackageEvent | 收到 RAFFLE_END 数据包 | 抽奖结束(小奖, 通常是不定期活动) | -| RaffleStartPackageEvent | 收到 RAFFLE_START 数据包 | 抽奖开始(小奖) | -| ReceiveDataPackageDebugEvent | 该事件用于调试, 收到任何 Data 数据包时都会触发 | | -| RoomAdminsPackageEvent | 收到 ROOM_ADMINS 数据包 | 房管变更 | -| RoomBlockMsgPackageEvent | 收到 ROOM_BLOCK_MSG 数据包 | 房间黑名单(房间管理员添加了一个用户到黑名单) | -| RoomLockPackageEvent | 收到 ROOM_LOCK 数据包 | 房间被封 | -| RoomRankPackageEvent | 收到 ROOM_RANK 数据包 | 小时榜 | -| RoomShieldPackageEvent | 收到 ROOM_SHIELD 数据包 | 房间屏蔽 | -| RoomSilentOffPackageEvent | 收到 ROOM_SILENT_OFF 数据包 | 房间结束禁言 | -| RoomSilentOnPackageEvent | 收到 ROOM_SILENT_ON 数据包 | 房间开启了禁言(禁止某一等级以下的用户发言) | -| SendGiftPackageEvent | 收到 SEND_GIFT 数据包 | 送礼 | -| SendHeartBeatPackageEvent | 每次发送心跳包后触发一次 | | -| SpecialGiftPackageEvent | 收到 SPECIAL_GIFT 数据包 | 节奏风暴(20 倍以下的)(只在对应房间内有, 不会全站广播) | -| SysGiftPackageEvent | 收到 SYS_GIFT 数据包 | 系统礼物(20 倍以上节奏风暴, 活动抽奖等) | -| SysMsgPackageEvent | 收到 SYS_MSG 数据包 | 系统消息(小电视等) | -| TVEndPackageEvent | 收到 TV_END 数据包 | 小电视抽奖结束(大奖的获得者信息) | -| TVStartPackageEvent | 收到 TV_START 数据包 | 小电视抽奖开始 | -| UnknownPackageEvent | B站新增了新种类的数据包, 出现此情况请提交 issue | | -| ViewerCountPackageEvent | 收到 房间人数 数据包(不是 Json) | | -| WarningPackageEvent | 收到 WARNING 数据包 | 警告信息 | -| WelcomeActivityPackageEvent | 收到 WELCOME_ACTIVITY 数据包 | 欢迎(活动) | -| WelcomePackageEvent | 收到 WELCOME 数据包 | 欢迎(通常是 VIP) | -| WelcomeGuardPackageEvent | 收到 WELCOME_GUARD 数据包 | 欢迎(舰队) | -| WishBottlePackageEvent | 收到 WISH_BOTTLE 数据包 | 许愿瓶 | +`challenge` 为本次极验的唯一标识(在一开始给出的 url 中) -事件里面可以取到解析好的 POJO, 然后可以从里面取数据, 见上面的监听器示例. +`validate` 为极验返回值 -# 特别说明 -## DANMU_MSG 中的各个字段含义 -在直播间实时弹幕推送流中, 存在一种类型为 DANMU_MSG 的数据包, 它里面存储的 JSON, 全部都是 JsonArray, 并且每个元素类型不一样, 含义不一样. +`secCode` 为 `"$validate|jordan"` -简单地说, 这个 JSON 完全无法自描述而且很多字段猜不到是什么含义, 它的示例见 /record 文件夹(还有一份带备注的版本, 里面记录了已经猜出的字段含义). +(注意, 极验会根据滑动的轨迹来识别人机, 所以要为最终用户打开一个 WebView 来进行真人操作而不能自动完成. 极验最终返回的是一个 jsonp, 里面包含以上三个参数, 详见极验接入文档). -已经猜出的字段, 可以直接从 DanMuMsgEntity 里面用对应的方法取得, 对于没有猜出的字段, 需要类似这样来获取: +注意, `BilibiliClient` 不能严格保证线程安全, 如果在登出的同时进行登录操作可能引发错误(想要这么做的人一定脑子瓦特了). - int something = danMuMsgEntity.getInfo().get(0).getAsJsonArray().get(2).getAsInt(); +登陆后, 可以访问全部 API(注意, 有一些明显不需要登录的 API 也有可能需要登录). -如果你可以明确其中的字段含义, 欢迎提交 issue. +由于各种需要登陆的 API 在未登录时返回的 `code` 并不统一, 因此没有办法做自动 `token` 刷新, 自己看着办. -## 直播间 ID 问题 -一个直播间, 我们用浏览器去访问它, 他可能是这样的 +在真实的客户端上, 每次一打开 APP 就会访问[个人信息 API](#获取个人信息)来确定 `token` 是否仍然可用, 这就是 B站 自己的解决方案. - http://live.bilibili.com/3 - -我们可能会以为后面的 3 就是这个直播间的 room_id, 其实并不是. +# 访问 API +不要问文档, 用自动补全(心)来感受. 以下给出几个示例 -我们能直接看到的这个号码, 其实是 show_room_id. +## 获取个人信息 +(首先要登陆) -所有直播间号码小于 1000 的直播间, show_room_id 和 room_id 是不相等的(room_id 在不少 API 里又叫 cid). +```kotlin +val myInfo = bilibiliClient.appAPI.myInfo().await() +``` -一些 API 能提供自动跳转功能, 也就是用这个 show_room_id 作为参数, 返回的信息是跳转到对应的 room_id 之后的返回信息. +返回用户 ID, vip 信息等. -简单地说, 一些 API 用 show_room_id 作为参数可以正常工作, 而另一些不能. 所以尽可能使用 room_id 作为参数来调用 API. +## 搜索 +当我们想看某些内容时, 我们会首先使用搜索功能, 例如 -room_id 的获取要通过 +```kotlin +val searchResult = bilibiliClient.appAPI.search(keyword = "刀剑神域").await() +``` - http://api.live.bilibili.com/AppRoom/index?room_id=3&platform=android +实际上这对应客户端上的 搜索 -> 综合. -其中, response.data.room_id 就是其真实的 room_id, 例子中的这个直播间的真实 room_id 为 23058 +如果要搜索番剧则使用 `bilibiliClient.appAPI.searchBangumi`. -在代码中我们这样做 +同理, 搜索直播, 用户, 影视, 专栏分别使用 `searchLive`, `searchUser`, `searchMovie`, `searchArticle`. - long showRoomId = 3; - long roomId = bilibiliAPI.getLiveService() - .getRoomInfo(showRoomId) - .execute() - .body() - .getData() - .getRoomId(); +所有的搜索都使用 `pageNumber` 参数来控制翻页(从 1 开始). -由此, 我们获得了直播间的真实 room_id, 用它访问其他 API 就不会出错了. +## 获取视频播放地址 +获取视频实际播放地址的 API 比较特殊, 被单独分了出来, 示例如下 -## 服务器返回非 0 返回值时 -当服务器返回的 JSON 中的 code 字段非 0 时(有错误发生), 该 JSON 可能是由服务端过滤器统一返回的, 因此其 JSON 格式(字段类型)将和实体类不一样, 此时会导致 JsonParseErrorException. +```kotlin +val videoPlayUrl = bilibiliClient.playerAPI.videoPlayUrl(aid = 41517911, cid = 72913641).await() +``` -为了让调用代码不需要写很多 try catch, 因此当服务器返回的 code 非 0 时, 封装好的 OkHttpClientInterceptor 将把 data 字段变为 null(发生错误时, data 字段没有实际有效的数据). +`aid` 即 av 号, 只能表示视频播放的那个页面, 如果一个视频有多个 `p`, 那么每个 `p` 都有单独的 `cid`. -因此只需要判断 code 是否是 0 即可知道 API 是否成功执行, 不需要异常捕获. +在 Web 端, URL 通常是这样的 -(B站所有 API 无论是否执行成功, HttpStatus 都是 200, 判断 HTTP 状态码是无用的, 必须通过 JSON 中的 code 字段来知道 API 是否执行成功). + https://www.bilibili.com/video/av44541340/?p=2 -# 测试 -测试前需要先设置用户名和密码, 在 src/test/resources 目录下, 找到 config-template.json, 将其复制一份到同目录下并命名为 config.json 然后填写其中的字段即可. +实际上就是选择了该 `aid` 下的第二个 `cid`(注意, 参数里使用的 `cid` 不是这个 p 的序号, 它也是一个很长的数字). -本项目使用 JUnit 作为单元测试框架. 命令行只需要执行 +简单的来说, `aid` 和 `cid` 加在一起才能表示一个视频流(为什么 `cid` 不能直接表示一个视频我也不知道). - gradle test +因此无论是获取视频播放地址, 还是获取弹幕列表, 都要同时传入 `aid` 与 `cid`. -如果要在 IDEA 上进行测试, 需要运行 test 目录中的 RuleSuite 类(在 IDEA 中打开这个类, 点击行号上的重叠的两个向右箭头图标). +而 `cid` 在哪里获得呢, 如下所示 -# 继续开发 -如果您想加入到开发中, 欢迎提交 Merge Request. +```kotlin +val view = bilibiliClient.appAPI.view(aid = 41517911).await() +``` -本项目的 Http 请求全部使用 Retrofit 完成, 因此请求的地址和参数需要放在接口中统一管理, 如果您对 Retrofit 不是很熟悉, 可以看[这篇文章](http://square.github.io/retrofit/). +该接口返回对一个视频页面的描述信息(甚至包含广告和推荐), 客户端根据这些信息生成视频页面. -服务器返回值将被 Gson 转换为 Java POJO(Entity), 通过[这篇文章](https://github.com/google/gson/blob/master/UserGuide.md)来了解 Gson. +其中 `data.cid` 为默认 `p` 的 `cid`. `data.pages[n].cid` 为每个 `p` 的 `cid`. 如果只有一个 `p` 那么说明视频没有分 `p`. -POJO 使用 IDEA 插件 [GsonFormat](https://plugins.jetbrains.com/plugin/7654-gsonformat) 自动化生成, 而非手动编写, 并且尽可能避免对自动生成的结果进行修改以免导致可能出现混淆或含义不明确的情况. +请求视频地址将访问如下结构的内容 -(插件必须开启 "use SerializedName" 选项从而保证字段名符合小驼峰命名法) - -由于 B站 一些 JSON 是瞎鸡巴来的, 比如可能出现以下这种情况 - - "list": [ - { - "name": "value", +```json +{ + "code": 0, + "data": { + "accept_description": [ + "高清 1080P+", + "高清 1080P", + "高清 720P", + "清晰 480P", + "流畅 360P" + ], + "accept_format": "hdflv2,flv,flv720,flv480,flv360", + "accept_quality": [ + 112, + 80, + 64, + 32, + 16 + ], + "dash": { + "audio": [ + { + "bandwidth": 319173, + "base_url": "http://upos-hz-mirrorks3u.acgvideo.com/upgcxcode/18/58/77995818/77995818-1-30280.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8xNEVE5XREto8GuFGv2U7SuxI72X6fTr859IB_&deadline=1551113319&gen=playurl&nbs=1&oi=3670888782&os=ks3u&platform=android&trid=925269b941bf4883ac9ec92c6ab5af4e&uipk=5&upsig=33273eaf403739d9f51304509f55589e", + "codecid": 0, + "id": 30280 + }, + { + "bandwidth": 67326, + "base_url": "http://upos-hz-mirrorkodou.acgvideo.com/upgcxcode/18/58/77995818/77995818-1-30216.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8xNEVE5XREto8GuFGv2U7SuxI72X6fTr859IB_&deadline=1551113319&gen=playurl&nbs=1&oi=3670888782&os=kodou&platform=android&trid=925269b941bf4883ac9ec92c6ab5af4e&uipk=5&upsig=3d1f9b836430bb8033b2f318faf42f9b", + "codecid": 0, + "id": 30216 + } + ], + "video": [ + { + "bandwidth": 376693, + "base_url": "http://upos-hz-mirrorks3u.acgvideo.com/upgcxcode/18/58/77995818/77995818-1-30015.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8xNEVE5XREto8GuFGv2U7SuxI72X6fTr859IB_&deadline=1551113319&gen=playurl&nbs=1&oi=3670888782&os=ks3u&platform=android&trid=925269b941bf4883ac9ec92c6ab5af4e&uipk=5&upsig=82bc845bce9f22b731b062bf83fa000f", + "codecid": 7, + "id": 16 + }, + ... + { + "bandwidth": 2615324, + "base_url": "http://upos-hz-mirrorcosu.acgvideo.com/upgcxcode/18/58/77995818/77995818-1-30080.m4s?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8xNEVE5XREto8GuFGv2U7SuxI72X6fTr859IB_&deadline=1551113319&dynamic=1&gen=playurl&oi=3670888782&os=cosu&platform=android&rate=0&trid=925269b941bf4883ac9ec92c6ab5af4e&uipk=5&uipv=5&um_deadline=1551113319&um_sign=22fef3c0efa0d23388429f6926fad298&upsig=c4768c036beb667ba4648369770f8de8", + "codecid": 7, + "id": 80 + } + ] }, - ... - ] + "fnval": 16, + "fnver": 0, + "format": "flv480", + "from": "local", + "quality": 32, + "result": "suee", + "seek_param": "start", + "seek_type": "offset", + "timelength": 175332, + "video_codecid": 7, + "video_project": true + }, + "message": "0", + "ttl": 1 +} +``` -此时自动生成的类型将是 +(由于内容太长, 去除了一部分内容) - List lists +注意, 视频下载地址有好几个(以上返回内容中被折叠成了两个), 但是实际上他们都是一样的内容, 只是清晰度不同. `data.dash.video.id` 实际上代表 `data.accept_quality`. -因此必须要为内层元素指定一个具有语义的名称, 例如 Name, 此时类型变为 +视频和音频是分开的, 视频和音频都返回 `m4s` 文件, 将其合并即可得到完整的 `mp4` 文件. - List names +`data.quality` 指默认选择的清晰度, 通常情况下移动网络会自动选择 `32`, 即 "清晰 480P"(在 `data.accept_description` 中对应). -API 尽可能按照 UI 位置来排序, 例如 +对于番剧来说, 也使用 `aid` 与 `cid` 来获得播放地址 - 侧拉抽屉 -> 直播中心 -> 我的关注 +```kotlin +val bangumiPlayUrl = bilibiliClient.playerAPI.bangumiPlayUrl(aid = 42714241, cid = 74921228).await() +``` -这是 "直播中心" 页面的第一个可点击控件, 那么下一个 API 或 API 组就应该是第二个可点击组件 "观看历史". +返回内容差不多是一个原理, 这里就不赘述了. -和 UI 不对应的 API, 按照执行顺序排序, 例如进入直播间会按顺序访问一系列 API, 这些 API 就按照时间顺序排序. +如何获得番剧的 `aid` 与 `cid` 呢. 我们都知道, 实际上番剧那个页面的唯一标识是 "季", 同一个番的不同 "季" 其实是不同的东西. -对于不知道怎么排的 API, 瞎鸡巴排就好了. +我们在番剧搜索页面可以得到番剧的 `season`, 这代表了一个番剧的某一季的页面. + +然后我们用 `season` 来打开番剧页面. + +```kotlin +val season = bilibiliClient.mainAPI.season(seasonId = 25617).await() +``` + +返回值中的 `result.seasons[n].season_id` 为该番所有季的 id(包含用来作为查询条件的 `seasonId`). + +该 API 还可以用 `episodeId` 作为查询条件, 即以集为条件打开一个番剧页面(会跳转到对应的季). + +返回值中的 `result.episodes` 包含了当前所选择的季的全部集的 `aid` 与 `cid`. + +## 查看视频下面的评论 +看完了视频当然要看一下傻吊网友都在说些什么. 使用以下 API 获取一个视频的评论. + +```kotlin +val reply = bilibiliClient.mainAPI.reply(oid = 44154463).await() +``` + +这里的 `oid` 指 `aid`(其他一些 API 中 `oid` 也可能指 `cid` 详见方法上面的注释). + +评论是不分 `p` 的, 所有评论都是在一起的. + +可以额外使用一个 `next` 参数来指定返回的起始楼层(即翻页). + +楼层是越翻越小的, 所以 `next` 也要越来越小. + +看到了傻吊网友们的评论是不够的, 我们还想看到杠精与其隔着屏幕对喷的场景, 因此我们要获取评论的子评论, 即评论的评论 + +```kotlin +val childReply = bilibiliClient.mainAPI.childReply(oid = 16622855, root = 1405602348).await() +``` + +其中的 `root` 表示根评论的 id. + +每个评论都有自己的 `replyId`, `parentId` 以及 `rootId`. + +假如一个人在一个评论的子评论里发布了一个评论并且 at 了其他人发的评论, 那么其 `parentId` 是他所 at 的评论, 其 `rootId` 为所在的根评论. + +如果不满足对应的层级逻辑关系(例如本身为根评论), `parentId` 或 `rootId` 可能为 0. + +用额外的 `minId` 参数来指定返回的起始子楼层. + +注意, 子楼层是越翻越大的. + +如果一个根评论下面有很多个喷子在互喷, 会导致看不清, 客户端上有一个按钮 "查看对话" 就是解决这个问题的. + +```kotlin +val chatList = bilibiliClient.mainAPI.chatList(oid = 34175504, root = 1136310360, dialog = 1136351035).await() +``` + +`root` 为根评论 ID, `dialog` 为父评论 ID. + +用 `minFloor` 控制分页, 原理同上. + +番剧下面的评论用一样的方式获取. + +## 获得一个视频的弹幕 +看评论自然不够刺激, 我们想看到弹幕! + +获取弹幕非常简单 + +```kotlin +val danmakuFile = bilibiliClient.danmakuAPI.list(aid = 810872, oid = 1176840).await() +``` + +弹幕是一个文件, 可能非常大, 里面是二进制内容. + +为了解析弹幕, 我们要用到另一个类 + +```kotlin +val (flagMap, danmakuList) = DanmakuParser.parser(danmakuFile.byteStream()) +``` + +`flagMap` 类型为 `Map` 键和值分别表示 弹幕ID 与 弹幕等级. + +弹幕等级在区间 \[1, 10\] 内, 低于客户端设置的 "弹幕云屏蔽等级" 的弹幕将不会显示出来. + +`danmakuList` 类型为 `List`, 内含所有解析得到的弹幕. + +使用以下代码来输出全部弹幕的内容 + +```kotlin +danmakuList.forEach { + println(it.content) +} +``` + +注意, 弹幕的解析是惰性的, `danmakuList` 是一个 `Sequence`. 如果同时持有很多未用完的 `danmakuList` 的引用可能会造成大量内存浪费. + +客户端的弹幕屏蔽设置是对弹幕中的 `user` 属性做的. 而实际上 `danmaku.user` 是一个字符串. + +这个字符串是 用户ID 的 `CRC32` 的校验和. + +众所周知, 一切 hash 算法都有冲突的问题. 这也就意味着, 屏蔽一个用户的同时可能屏蔽掉了多个与该用户 hash 值相同的用户. + +在另一方面, 通过这个 `CRC32` 校验和进行用户 ID 反查, 将查询到多个可能的用户, 因此无法完全确定一条弹幕到底是哪个用户发送的. + +如果想获得发送这条弹幕的所有可能的用户的 ID, 可以通过以下方法: + +```kotlin +val possibleUserIds = danmaku.calculatePossibleUserIds() +``` + +返回一个 `List`, 内容为所有可能的用户 ID(至少有一个). + +注意, 第一次使用 `CRC反查` 功能将花费大约 `300ms` 来生成彩虹表, 如果想手动初始化请使用以下代码 + +```kotlin +Crc32Cracker +``` + +(`Crc32Cracker` 是一个惰性初始化的单例) + +通常情况下, 一次 `CRC反查` 耗时大约 `1ms`. + +由于这是一个比较耗时的操作, 请不要每条弹幕都如此操作(相比较 6000 条弹幕的解析只需要 `150ms`). + +番剧的弹幕同理. + +## 发送视频弹幕 +光看不发憋着慌, 我们来发送一条视频弹幕: + +```kotlin +bilibiliClient.mainAPI.sendDanmaku(aid = 40675923, cid = 71438168, progress = 2297, message = "2333").await() +``` + +其中 `progress` 是播放器时间, 其他观众将看到你的弹幕在视频的此处出现, 单位为毫秒. + +`message` 应该是有长度限制的, 但是没有测过. + +如果不确定视频的长度, 需要从[视频播放地址的 API](#获取视频播放地址) 中的 `data.timelength` 来获得, 单位也是毫秒. + +## 获取直播弹幕 +刚进入直播间时, 立即看到的十条弹幕实际上是最近的历史弹幕, 通过以下方式来获取 + +```kotlin +bilibiliClient.liveAPI.roomMessage(roomId).await() +``` + +接下来的弹幕都是实时弹幕, 直播间实时弹幕通过 `Websocket` 来推送. + +```kotlin +val job = bilibiliClient.liveClient(roomId = 3) { + onConnect = { + println("Connected") + } + + onPopularityPacket = { _, popularity -> + println("Current popularity: $popularity") + } + + onCommandPacket = { _, jsonObject -> + println(jsonObject) + } + + onClose = { _, closeReason -> + println(closeReason) + } +}.launch() +``` + +服务器推送的 `Message` 有两种, 一种是 `人气值` 数据, 另一种是 `Command` 数据. + +`Command` 数据包用于控制客户端渲染何种内容. 弹幕, 送礼, 系统公告等全部都是由 `Command` 数据包控制的, 其本体为一个 `JsonObject`. + +例如一个弹幕数据是这样的(`cmd` 字段的值为 `DANMU_MSG`): + +```json +{"cmd":"DANMU_MSG","info":[[0,1,25,16777215,1553417856,1553414245,0,"9e539d78",0,0,0],"记得存档!",[3432444,"喵的叫一声",0,0,0,10000,1,""],[6,"日常","奶粉の日常",35399,5805790,""],[22,0,5805790,">50000"],["",""],0,0,null,{"ts":1553417856,"ct":"87255D9C"}]} +``` + +`Welcome` 的数据是这样的 +```json +{"cmd":"WELCOME","data":{"uid":110208099,"uname":"霸刀宋壹i","is_admin":false,"svip":1}} +``` + +各种 `Command` 数据包的结构经常改变, 因此不提供实体类. + +由于 `DANMU_MSG` 的数据结构太过意识流, 因此提供了额外的辅助工具来方便地解析它. + +`DanmakuMessage` 是一个 `inline class` 请不要对其进行太过复杂的操作. + +```kotlin +onCommandPacket = { _, jsonObject -> + val cmd by jsonObject.byString + println( + if (cmd == "DANMU_MSG") { + with(DanmakuMessage(jsonObject)) { + "${if (fansMedalInfo.isNotEmpty()) "[$fansMedalName $fansMedalLevel] " else ""}[UL$userLevel] $nickname: $message" + } + } else { + jsonObject.toString() + } + ) +} +``` + +输出: + +``` +[甜甜天 7] [UL25] czp3009: 233 +``` + +更多 `Command` 数据包的数据结构详见本项目的 [/record/直播弹幕](record/直播弹幕) 文件夹. + +注意, `onPopularityPacket`, `onCommandPacket` 这些回调不能进行耗时操作. + +关闭连接 + +```kotlin +job.cancel() +``` + +## 发送直播弹幕 +在直播间里发送弹幕也非常简单(必须先登陆) + +```kotlin +liveClient.sendMessage("我上我也行").await() +``` + +注意, 除了弹幕超长(普通用户为 20 个 Unicode 字符, 老爷, 会员可以额外加长)会导致抛出异常, 其他情况都会正常返回(`code` 为 0). + +完全正常返回时(弹幕正确的被发送了), 返回内容中的 `message` 为一个空字符串. + +如果不为空字符串, 则表示不完全正常 + +例如返回内容的 `message` 为 "msg repeat" 则表示短时间重复发送相同的弹幕而被服务器拒绝, 但是返回的 `code` 确实是 0. + +其他情况诸如包含特殊字符, 包含不文明词语等均会导致不完全正常的返回. + +正常返回时, 就算不完全正常, 客户端也会将这条弹幕显示到屏幕上, 如果不是完全正常的, 那么这条弹幕就只有自己能看见(刷新后也会消失). + +需要额外判断返回的 `message` 是否为空字符串来确认这条弹幕有没有被正确发送. # License GPL V3 diff --git a/build.gradle b/build.gradle index 8dc3c69..ef7fade 100644 --- a/build.gradle +++ b/build.gradle @@ -1,109 +1,150 @@ +buildscript { + ext { + kotlin_version = '1.3.21' + kotlin_coroutines_version = '1.1.1' + ktor_version = '1.1.3' + jvm_target = JavaVersion.VERSION_1_8 + } + + repositories { + gradlePluginPortal() + } + + dependencies { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + group = 'com.hiczp' -version = '0.0.22' -description = 'Bilibili android client API library written in Java' +version = '0.1.0' +description = 'Bilibili Android client API library for Kotlin' -apply plugin: 'idea' -apply plugin: 'java' -apply plugin: 'maven' +apply plugin: 'kotlin' +apply plugin: 'maven-publish' apply plugin: 'signing' -sourceCompatibility = 1.8 - repositories { mavenCentral() + mavenLocal() } +//kotlin +dependencies { + // https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8 + compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8' + // https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core + compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: kotlin_coroutines_version +} +compileKotlin { + kotlinOptions { + jvmTarget = jvm_target + freeCompilerArgs = ["-Xjvm-default=enable", "-Xuse-experimental=kotlin.Experimental", "-XXLanguage:+InlineClasses"] + } +} +compileTestKotlin { + kotlinOptions.jvmTarget = jvm_target +} + +//logging +dependencies { + // https://mvnrepository.com/artifact/io.github.microutils/kotlin-logging + compile group: 'io.github.microutils', name: 'kotlin-logging', version: '1.6.25' + // https://mvnrepository.com/artifact/org.slf4j/slf4j-simple + testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.26' +} + +//http dependencies { // https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit - compile group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.4.0' + compile group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.5.0' // https://mvnrepository.com/artifact/com.squareup.retrofit2/converter-gson - compile group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.4.0' - // https://mvnrepository.com/artifact/com.google.code.gson/gson - compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5' + compile group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.5.0' + // https://mvnrepository.com/artifact/com.github.salomonbrys.kotson/kotson + compile group: 'com.github.salomonbrys.kotson', name: 'kotson', version: '2.5.0' + // https://mvnrepository.com/artifact/com.jakewharton.retrofit/retrofit2-kotlin-coroutines-adapter + compile group: 'com.jakewharton.retrofit', name: 'retrofit2-kotlin-coroutines-adapter', version: '0.9.2' // https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor - compile group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.11.0' - // https://mvnrepository.com/artifact/org.slf4j/slf4j-api - compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' - // https://mvnrepository.com/artifact/io.netty/netty-all - compile group: 'io.netty', name: 'netty-all', version: '4.1.29.Final' - // https://mvnrepository.com/artifact/com.google.guava/guava - compile group: 'com.google.guava', name: 'guava', version: '26.0-jre' + compile group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.14.0' } +//ktor dependencies { - // https://mvnrepository.com/artifact/junit/junit - testCompile group: 'junit', name: 'junit', version: '4.12' - // https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 - testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25' + // https://mvnrepository.com/artifact/io.ktor/ktor-client-websocket + compile group: 'io.ktor', name: 'ktor-client-websocket', version: ktor_version + // https://mvnrepository.com/artifact/io.ktor/ktor-client-cio + compile group: 'io.ktor', name: 'ktor-client-cio', version: ktor_version } -task sourcesJar(type: Jar, dependsOn: classes) { - description 'Package source code to jar,' - classifier = 'sources' +//checksum +dependencies { + // https://mvnrepository.com/artifact/com.hiczp/crc32-crack + compile group: 'com.hiczp', name: 'crc32-crack', version: '1.0' +} + +//unit test +dependencies { + // https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter + testCompile group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.4.1' +} + +task sourcesJar(type: Jar) { from sourceSets.main.allSource + archiveClassifier = 'sources' } -task javadocJar(type: Jar, dependsOn: javadoc) { - description 'Package javadoc to jar,' - classifier = 'javadoc' +task javadocJar(type: Jar) { from javadoc + archiveClassifier = 'javadoc' } -artifacts { - archives sourcesJar - archives javadocJar -} - -signing { - required { gradle.taskGraph.hasTask(uploadArchives) } - sign configurations.archives -} - -uploadArchives { +publishing { repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> - signing.signPom(deployment) + maven { + url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + credentials { + username = project.properties.ossUsername + password = project.properties.ossPassword } + } + } - if (!project.hasProperty('ossUsername')) { - ext.ossUsername = '' - } - if (!project.hasProperty('ossPassword')) { - ext.ossPassword = '' - } - repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { - authentication(userName: ossUsername, password: ossPassword) - } + publications { + mavenJava(MavenPublication) { + from components.java + artifact sourcesJar + artifact javadocJar - pom.project { - name project.name - description project.description - url 'https://github.com/czp3009/bilibili-api' - - scm { - connection 'scm:git@github.com:czp3009/bilibili-api.git' - developerConnection 'scm:git@github.com:czp3009/bilibili-api.git' - url 'git@github.com:czp3009/bilibili-api.git' - } + pom { + name = project.name + description = project.description + url = 'https://github.com/czp3009/bilibili-api' licenses { license { - name 'GNU GENERAL PUBLIC LICENSE Version 3' - url 'https://www.gnu.org/licenses/gpl-3.0.txt' + name = 'GNU GENERAL PUBLIC LICENSE Version 3' + url = 'https://www.gnu.org/licenses/gpl-3.0.txt' } } developers { developer { - id 'czp' - //noinspection SpellCheckingInspection - name 'ZhiPeng Chen' - email 'czp3009@gmail.com' - url 'https://www.hiczp.com/' + id = 'czp3009' + name = 'czp3009' + email = 'czp3009@gmail.com' + url = 'https://www.hiczp.com' } } + + scm { + connection = 'scm:git:git://github.com/czp3009/bilibili-api.git' + developerConnection = 'scm:git:ssh://github.com/czp3009/bilibili-api.git' + url = 'https://github.com/czp3009/bilibili-api' + } } } } } + +signing { + sign publishing.publications.mavenJava +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 01b8bf6..28861d2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 311ac9f..b9d51f3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-all.zip diff --git a/record/bullet_screen_stream_json/ACITIVITY_EVENT.json b/record/bullet_screen_stream_json/ACITIVITY_EVENT.json deleted file mode 100644 index a4e40fd..0000000 --- a/record/bullet_screen_stream_json/ACITIVITY_EVENT.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "cmd": "ACTIVITY_EVENT", - "data": { - "keyword": "newspring_2018", - "type": "cracker", - "limit": 300000, - "progress": 158912 - } -} diff --git a/record/bullet_screen_stream_json/CHANGE_ROOM_INFO.json b/record/bullet_screen_stream_json/CHANGE_ROOM_INFO.json deleted file mode 100644 index 99f0ac9..0000000 --- a/record/bullet_screen_stream_json/CHANGE_ROOM_INFO.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "CHANGE_ROOM_INFO", - "background": "http://static.hdslb.com/live-static/images/bg/4.jpg" -} diff --git a/record/bullet_screen_stream_json/COMBO_END.json b/record/bullet_screen_stream_json/COMBO_END.json deleted file mode 100644 index d3a1a3d..0000000 --- a/record/bullet_screen_stream_json/COMBO_END.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "cmd": "COMBO_END", - "data": { - "uname": "打死安迷修-雷狮", - "r_uname": "Jinko_神子", - "combo_num": 1, - "price": 200, - "gift_name": "flag", - "gift_id": 20002, - "start_time": 1527929335, - "end_time": 1527929335 - } -} diff --git a/record/bullet_screen_stream_json/COMBO_SEND.json b/record/bullet_screen_stream_json/COMBO_SEND.json deleted file mode 100644 index 78169c0..0000000 --- a/record/bullet_screen_stream_json/COMBO_SEND.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "cmd": "COMBO_SEND", - "data": { - "uid": 33012231, - "uname": "我就是讨厌你这样", - "combo_num": 3, - "gift_name": "凉了", - "gift_id": 20010, - "action": "赠送" - } -} diff --git a/record/bullet_screen_stream_json/CUT_OFF.json b/record/bullet_screen_stream_json/CUT_OFF.json deleted file mode 100644 index a0118f3..0000000 --- a/record/bullet_screen_stream_json/CUT_OFF.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cmd": "CUT_OFF", - "msg": "禁播游戏", - "roomid": 8446134 -} diff --git a/record/bullet_screen_stream_json/DANMU_MSG(with comment).json b/record/bullet_screen_stream_json/DANMU_MSG(with comment).json deleted file mode 100644 index f53c016..0000000 --- a/record/bullet_screen_stream_json/DANMU_MSG(with comment).json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "info": [ - //弹幕基本属性 - [ - 0, - //pool - 1, - //mode - 25, - //fontSize - 16777215, - //color - 1510498713, - //弹幕发送时间 - "1510498712", - //用户进房时间(Android 客户端发送的弹幕, 这个值会是随机数) - 0, - "8a0f75dc", - 0 - ], - "网易云音乐库在当前直播间已停留0天0时39分41秒", - //发送者有关信息 - [ - 39042255, - //发送者 ID - "夏沫丶琉璃浅梦", - //发送者用户名 - 0, - //是否是管理员 - 1, - //是否是 VIP - 0, - //是否是 svip - 10000, - 1, - "" - ], - //发送者的粉丝勋章有关信息(没有粉丝勋章的发送者, 这个 JsonArray 将是空的) - [ - 13, - //勋章等级 - "夏沫", - //勋章名称 - "乄夏沫丶", - //勋章对应的主播的名字 - "1547306", - //勋章对应的主播的直播间 - 16746162, - "" - ], - //用户经验有关信息 - [ - 41, - //发送者的观众等级 - 0, - 16746162, - 6603 - //排名 - ], - //用户头衔有关信息(里面有两个元素, 但是总是一样的, 不知道为什么) - [ - "title-131-1", - "title-131-1" - ], - 0, - 0, - { - "uname_color": "" - } - ], - "cmd": "DANMU_MSG" -} diff --git a/record/bullet_screen_stream_json/DANMU_MSG.json b/record/bullet_screen_stream_json/DANMU_MSG.json deleted file mode 100644 index 08f4d88..0000000 --- a/record/bullet_screen_stream_json/DANMU_MSG.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "info": [ - [ - 0, - 1, - 25, - 16777215, - 1510498713, - "1510498712", - 0, - "8a0f75dc", - 0 - ], - "网易云音乐库在当前直播间已停留0天0时39分41秒", - [ - 39042255, - "夏沫丶琉璃浅梦", - 0, - 1, - 0, - 10000, - 1, - "" - ], - [ - 13, - "夏沫", - "乄夏沫丶", - "1547306", - 16746162, - "" - ], - [ - 41, - 0, - 16746162, - 6603 - ], - [], - 0, - 0, - { - "uname_color": "" - } - ], - "cmd": "DANMU_MSG" -} diff --git a/record/bullet_screen_stream_json/ENTRY_EFFECT.json b/record/bullet_screen_stream_json/ENTRY_EFFECT.json deleted file mode 100644 index df1e693..0000000 --- a/record/bullet_screen_stream_json/ENTRY_EFFECT.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "cmd": "ENTRY_EFFECT", - "data": { - "id": 3, - "uid": 9359447, - "target_id": 275592903, - "show_avatar": 1, - "copy_writing": "欢迎 \u003c%藏拙当成玉%\u003e 进入房间", - "highlight_color": "#FFF100", - "basemap_url": "http://i0.hdslb.com/bfs/live/d208b9654b93a70b4177e1aa7e2f0343f8a5ff1a.png", - "effective_time": 1, - "priority": 50, - "privilege_type": 0, - "face": "http://i1.hdslb.com/bfs/face/12cb1ea6eea79667e3fb722bbd8995bb96f4cd6f.jpg" - } -} diff --git a/record/bullet_screen_stream_json/EVENT_CMD.json b/record/bullet_screen_stream_json/EVENT_CMD.json deleted file mode 100644 index fb1bed7..0000000 --- a/record/bullet_screen_stream_json/EVENT_CMD.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "roomid": 234024, - "cmd": "EVENT_CMD", - "data": { - "event_type": "flower_rain-16915", - "event_img": "http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/activity/lover_2018/raffle.png" - } -} diff --git a/record/bullet_screen_stream_json/GUARD_BUY.json b/record/bullet_screen_stream_json/GUARD_BUY.json deleted file mode 100644 index 0ae435d..0000000 --- a/record/bullet_screen_stream_json/GUARD_BUY.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "GUARD_BUY", - "data": { - "uid": 4561799, - "username": "微笑The迪妮莎", - "guard_level": 1, - "num": 1 - }, - "roomid": "5279" -} diff --git a/record/bullet_screen_stream_json/GUARD_LOTTERY_START.json b/record/bullet_screen_stream_json/GUARD_LOTTERY_START.json deleted file mode 100644 index b145335..0000000 --- a/record/bullet_screen_stream_json/GUARD_LOTTERY_START.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "cmd": "GUARD_LOTTERY_START", - "data": { - "id": 396410, - "roomid": 56998, - "message": "ちゆき蝙蝠公主 在【56998】购买了舰长,请前往抽奖", - "type": "guard", - "privilege_type": 3, - "link": "https://live.bilibili.com/56998", - "lottery": { - "id": 396410, - "sender": { - "uid": 11206312, - "uname": "ちゆき蝙蝠公主", - "face": "http://i0.hdslb.com/bfs/face/06d0d58131100acf13d75d3c092b1a58d41b0129.jpg" - }, - "keyword": "guard", - "time": 1200, - "status": 1, - "mobile_display_mode": 2, - "mobile_static_asset": "", - "mobile_animation_asset": "" - } - } -} diff --git a/record/bullet_screen_stream_json/GUARD_MSG.json b/record/bullet_screen_stream_json/GUARD_MSG.json deleted file mode 100644 index 441140e..0000000 --- a/record/bullet_screen_stream_json/GUARD_MSG.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "GUARD_MSG", - "msg": "乘客 :?想不想joice:? 成功购买1313366房间总督船票1张,欢迎登船!" -} diff --git a/record/bullet_screen_stream_json/LIVE.json b/record/bullet_screen_stream_json/LIVE.json deleted file mode 100644 index 0d9684b..0000000 --- a/record/bullet_screen_stream_json/LIVE.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "LIVE", - "roomid": "1110317" -} diff --git a/record/bullet_screen_stream_json/NOTICE_MSG.json b/record/bullet_screen_stream_json/NOTICE_MSG.json deleted file mode 100644 index 85d6d2a..0000000 --- a/record/bullet_screen_stream_json/NOTICE_MSG.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "cmd": "NOTICE_MSG", - "full": { - "head_icon": "", - "is_anim": 1, - "tail_icon": "", - "background": "#33ffffff", - "color": "#33ffffff", - "highlight": "#33ffffff", - "border": "#33ffffff", - "time": 10 - }, - "half": { - "head_icon": "", - "is_anim": 0, - "tail_icon": "", - "background": "#33ffffff", - "color": "#33ffffff", - "highlight": "#33ffffff", - "border": "#33ffffff", - "time": 8 - }, - "roomid": "11415406", - "real_roomid": "0", - "msg_common": "恭喜\u003c%汤圆老师%\u003e获得大奖\u003c%23333x银瓜子%\u003e, 感谢\u003c%林发发爱林小兔%\u003e的赠送", - "msg_self": "恭喜\u003c%汤圆老师%\u003e获得大奖\u003c%23333x银瓜子%\u003e, 感谢\u003c%林发发爱林小兔%\u003e的赠送", - "link_url": "http://live.bilibili.com/0", - "msg_type": 4 -} diff --git a/record/bullet_screen_stream_json/PK_AGAIN.json b/record/bullet_screen_stream_json/PK_AGAIN.json deleted file mode 100644 index a9233ee..0000000 --- a/record/bullet_screen_stream_json/PK_AGAIN.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "cmd": "PK_AGAIN", - "pk_id": 60672, - "pk_status": 400, - "data": { - "new_pk_id": 60678, - "init_id": 10817769, - "match_id": 1489926, - "escape_all_time": 10, - "escape_time": 10, - "is_portrait": false, - "uname": "穆阿是给你的mua", - "face": "http://i0.hdslb.com/bfs/face/07fa1057b60afe74cdd477f123c6ccf460ee8f2c.jpg", - "uid": 38105366 - }, - "roomid": 1489926 -} diff --git a/record/bullet_screen_stream_json/PK_CLICK_AGAIN.json b/record/bullet_screen_stream_json/PK_CLICK_AGAIN.json deleted file mode 100644 index 8010ed5..0000000 --- a/record/bullet_screen_stream_json/PK_CLICK_AGAIN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pk_status": 400, - "pk_id": 60672, - "cmd": "PK_CLICK_AGAIN", - "roomid": 1489926 -} diff --git a/record/bullet_screen_stream_json/PK_END.json b/record/bullet_screen_stream_json/PK_END.json deleted file mode 100644 index 009151b..0000000 --- a/record/bullet_screen_stream_json/PK_END.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "PK_END", - "pk_id": 8797, - "pk_status": 400, - "data": { - "init_id": 8049573, - "match_id": 1409458, - "punish_topic": "惩罚:模仿面筋哥" - } -} diff --git a/record/bullet_screen_stream_json/PK_INVITE_FAIL.json b/record/bullet_screen_stream_json/PK_INVITE_FAIL.json deleted file mode 100644 index b36e04e..0000000 --- a/record/bullet_screen_stream_json/PK_INVITE_FAIL.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "PK_INVITE_FAIL", - "pk_invite_status": 1100 -} diff --git a/record/bullet_screen_stream_json/PK_INVITE_INIT.json b/record/bullet_screen_stream_json/PK_INVITE_INIT.json deleted file mode 100644 index d6c83c6..0000000 --- a/record/bullet_screen_stream_json/PK_INVITE_INIT.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "cmd": "PK_INVITE_INIT", - "pk_invite_status": 200, - "invite_id": 408, - "face": "http://i0.hdslb.com/bfs/face/e1ad4df39e95180e990fdd565b216662bdb2503c.jpg", - "uname": "Tocci椭奇", - "area_name": "视频聊天", - "user_level": 24, - "master_level": 31, - "roomid": 883802 -} diff --git a/record/bullet_screen_stream_json/PK_INVITE_SWITCH_CLOSE.json b/record/bullet_screen_stream_json/PK_INVITE_SWITCH_CLOSE.json deleted file mode 100644 index 44e8320..0000000 --- a/record/bullet_screen_stream_json/PK_INVITE_SWITCH_CLOSE.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "PK_INVITE_SWITCH_CLOSE", - "roomid": 1938890 -} diff --git a/record/bullet_screen_stream_json/PK_INVITE_SWITCH_OPEN.json b/record/bullet_screen_stream_json/PK_INVITE_SWITCH_OPEN.json deleted file mode 100644 index b9227c9..0000000 --- a/record/bullet_screen_stream_json/PK_INVITE_SWITCH_OPEN.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "PK_INVITE_SWITCH_OPEN", - "roomid": 9615419 -} diff --git a/record/bullet_screen_stream_json/PK_MATCH.json b/record/bullet_screen_stream_json/PK_MATCH.json deleted file mode 100644 index 040a219..0000000 --- a/record/bullet_screen_stream_json/PK_MATCH.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "cmd": "PK_MATCH", - "pk_status": 100, - "pk_id": 3596, - "data": { - "init_id": 9615419, - "match_id": 10185039, - "escape_time": 5, - "is_portrait": false, - "uname": "茉莉艿", - "face": "http://i2.hdslb.com/bfs/face/3f2833a3ac598d9757ba33b79ec219cf941bdda8.jpg", - "uid": 18963076 - }, - "roomid": 9615419 -} diff --git a/record/bullet_screen_stream_json/PK_MIC_END.json b/record/bullet_screen_stream_json/PK_MIC_END.json deleted file mode 100644 index 88aebe2..0000000 --- a/record/bullet_screen_stream_json/PK_MIC_END.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "cmd": "PK_MIC_END", - "pk_id": 3596, - "pk_status": 1300, - "data": { - "type": 0 - } -} diff --git a/record/bullet_screen_stream_json/PK_PRE.json b/record/bullet_screen_stream_json/PK_PRE.json deleted file mode 100644 index e40f3ac..0000000 --- a/record/bullet_screen_stream_json/PK_PRE.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "cmd": "PK_PRE", - "pk_id": 3597, - "pk_status": 200, - "data": { - "init_id": 9615419, - "match_id": 10185039, - "count_down": 5, - "pk_topic": "模仿游戏角色让对方猜", - "pk_pre_time": 1529476609, - "pk_start_time": 1529476614, - "pk_end_time": 1529476914, - "end_time": 1529477034 - } -} diff --git a/record/bullet_screen_stream_json/PK_PROCESS.json b/record/bullet_screen_stream_json/PK_PROCESS.json deleted file mode 100644 index 62f1517..0000000 --- a/record/bullet_screen_stream_json/PK_PROCESS.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "cmd": "PK_PROCESS", - "pk_id": 8798, - "pk_status": 300, - "data": { - "uid": 0, - "init_votes": 30, - "match_votes": 20, - "user_votes": 0 - }, - "roomid": 346075 -} diff --git a/record/bullet_screen_stream_json/PK_SETTLE.json b/record/bullet_screen_stream_json/PK_SETTLE.json deleted file mode 100644 index 1fd27b1..0000000 --- a/record/bullet_screen_stream_json/PK_SETTLE.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "cmd": "PK_SETTLE", - "pk_id": 8806, - "pk_status": 400, - "data": { - "pk_id": 8806, - "init_info": { - "uid": 7799328, - "init_id": 10979759, - "uname": "筱宇淅淅", - "face": "http://i0.hdslb.com/bfs/face/e16515ac39329aa125bb8de5bb1fa9455f06337c.jpg", - "votes": 0, - "is_winner": false - }, - "match_info": { - "uid": 18654316, - "match_id": 430063, - "uname": "卖丸子尕害羞", - "face": "http://i1.hdslb.com/bfs/face/1c579a244ec0c66bbb6e2ad6c770a2a498268735.jpg", - "votes": 129, - "is_winner": true, - "vip_type": 0, - "exp": { - "color": 5805790, - "user_level": 31, - "master_level": { - "level": 26, - "color": 10512625 - } - }, - "vip": { - "vip": 0, - "svip": 0 - }, - "face_frame": "", - "badge": { - "url": "http://i0.hdslb.com/bfs/live/74b2f9a48ce14d752dd27559c4a0df297243a3fd.png", - "desc": "bilibili直播签约主播\r\n", - "position": 3 - } - }, - "best_user": { - "uid": 31459309, - "uname": "七友球球", - "face": "http://i1.hdslb.com/bfs/face/09406a4fe632dda9d523da14f3e3735ee02efbab.jpg", - "vip_type": 0, - "exp": { - "color": 6406234, - "user_level": 19, - "master_level": { - "level": 1, - "color": 6406234 - } - }, - "vip": { - "vip": 0, - "svip": 0 - }, - "privilege_type": 0, - "face_frame": "", - "badge": { - "url": "", - "desc": "", - "position": 0 - } - }, - "punish_topic": "惩罚:模仿一款表情包" - } -} diff --git a/record/bullet_screen_stream_json/PK_START.json b/record/bullet_screen_stream_json/PK_START.json deleted file mode 100644 index 9fa98bc..0000000 --- a/record/bullet_screen_stream_json/PK_START.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "PK_START", - "pk_id": 3597, - "pk_status": 300, - "data": { - "init_id": 9615419, - "match_id": 10185039, - "pk_topic": "模仿游戏角色让对方猜" - } -} diff --git a/record/bullet_screen_stream_json/PREPARING.json b/record/bullet_screen_stream_json/PREPARING.json deleted file mode 100644 index 2cfea1e..0000000 --- a/record/bullet_screen_stream_json/PREPARING.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cmd": "PREPARING", - "roomid": "1110317" -} diff --git a/record/bullet_screen_stream_json/RAFFLE_END.json b/record/bullet_screen_stream_json/RAFFLE_END.json deleted file mode 100644 index c132aa3..0000000 --- a/record/bullet_screen_stream_json/RAFFLE_END.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "cmd": "RAFFLE_END", - "roomid": 521429, - "data": { - "raffleId": 16897, - "type": "flower_rain", - "from": "鷺沢怜人", - "fromFace": "http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg", - "win": { - "uname": "nbqgd", - "face": "http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg", - "giftId": 115, - "giftName": "桃花", - "giftNum": 66 - } - } -} diff --git a/record/bullet_screen_stream_json/RAFFLE_START.json b/record/bullet_screen_stream_json/RAFFLE_START.json deleted file mode 100644 index 340117b..0000000 --- a/record/bullet_screen_stream_json/RAFFLE_START.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "RAFFLE_START", - "roomid": 234024, - "data": { - "raffleId": 16915, - "type": "flower_rain", - "from": "爱吃喵姐的鱼", - "time": 60 - } -} diff --git a/record/bullet_screen_stream_json/ROOM_ADMINS.json b/record/bullet_screen_stream_json/ROOM_ADMINS.json deleted file mode 100644 index e44f830..0000000 --- a/record/bullet_screen_stream_json/ROOM_ADMINS.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "cmd": "ROOM_ADMINS", - "uids": [ - 4561799, - 432672, - 2179804, - 7928207, - 94380, - 1626161, - 3168349, - 13182672 - ], - "roomid": 5279 -} diff --git a/record/bullet_screen_stream_json/ROOM_BLOCK_MSG.json b/record/bullet_screen_stream_json/ROOM_BLOCK_MSG.json deleted file mode 100644 index e09eb15..0000000 --- a/record/bullet_screen_stream_json/ROOM_BLOCK_MSG.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cmd": "ROOM_BLOCK_MSG", - "uid": "60244207", - "uname": "承包rose", - "roomid": 5279 -} diff --git a/record/bullet_screen_stream_json/ROOM_LOCK.json b/record/bullet_screen_stream_json/ROOM_LOCK.json deleted file mode 100644 index 2e2a152..0000000 --- a/record/bullet_screen_stream_json/ROOM_LOCK.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cmd": "ROOM_LOCK", - "expire": "2018-03-15 10:24:18", - "roomid": 6477301 -} diff --git a/record/bullet_screen_stream_json/ROOM_RANK.json b/record/bullet_screen_stream_json/ROOM_RANK.json deleted file mode 100644 index ca793dd..0000000 --- a/record/bullet_screen_stream_json/ROOM_RANK.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "ROOM_RANK", - "data": { - "roomid": 1241012, - "rank_desc": "小时榜 182", - "color": "#FB7299", - "h5_url": "https://live.bilibili.com/p/eden/rank-h5-current?anchor_uid\u003d35577726", - "timestamp": 1527148082 - } -} diff --git a/record/bullet_screen_stream_json/ROOM_SHIELD(1).json b/record/bullet_screen_stream_json/ROOM_SHIELD(1).json deleted file mode 100644 index 623612a..0000000 --- a/record/bullet_screen_stream_json/ROOM_SHIELD(1).json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "cmd": "ROOM_SHIELD", - "type": 1, - "user": "", - "keyword": "", - "roomid": 234024 -} diff --git a/record/bullet_screen_stream_json/ROOM_SHIELD.json b/record/bullet_screen_stream_json/ROOM_SHIELD.json deleted file mode 100644 index 5df5508..0000000 --- a/record/bullet_screen_stream_json/ROOM_SHIELD.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "cmd": "ROOM_SHIELD", - "type": 1, - "user": [], - "keyword": [ - "暗号", - "摄像头", - "色相头" - ], - "roomid": 505447 -} diff --git a/record/bullet_screen_stream_json/ROOM_SILENT_OFF.json b/record/bullet_screen_stream_json/ROOM_SILENT_OFF.json deleted file mode 100644 index d6e61a0..0000000 --- a/record/bullet_screen_stream_json/ROOM_SILENT_OFF.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cmd": "ROOM_SILENT_OFF", - "data": [], - "roomid": "29434" -} diff --git a/record/bullet_screen_stream_json/SEND_GIFT.json b/record/bullet_screen_stream_json/SEND_GIFT.json deleted file mode 100644 index 95be84d..0000000 --- a/record/bullet_screen_stream_json/SEND_GIFT.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "cmd": "SEND_GIFT", - "data": { - "giftName": "节奏风暴", - "num": 1, - "uname": "爱上熹", - "rcost": 569788, - "uid": 230845505, - "top_list": [ - { - "uid": 288348879, - "uname": "我爱我家一生", - "face": "http://i1.hdslb.com/bfs/face/dd52e4f2dfe881751816e45522f504f10458b514.jpg", - "rank": 1, - "score": 1852300, - "guard_level": 0, - "isSelf": 0 - }, - { - "uid": 287551243, - "uname": "熹上城的专属天使菲", - "face": "http://i1.hdslb.com/bfs/face/c3ef04ba6c267c41067cd7708b7abd60c0c5c49f.jpg", - "rank": 2, - "score": 1245200, - "guard_level": 3, - "isSelf": 0 - }, - { - "uid": 32416351, - "uname": "镜子。。", - "face": "http://i1.hdslb.com/bfs/face/08c54c2c97434811a99e9d070d621ccbb5d3f2c4.jpg", - "rank": 3, - "score": 332862, - "guard_level": 3, - "isSelf": 0 - } - ], - "timestamp": 1520992553, - "giftId": 39, - "giftType": 0, - "action": "赠送", - "super": 1, - "super_gift_num": 1, - "price": 100000, - "rnd": "1980508331", - "newMedal": 0, - "newTitle": 0, - "medal": { - "medalId": "95723", - "medalName": "布丁诶", - "level": 1 - }, - "title": "", - "beatId": "4", - "biz_source": "live", - "metadata": "", - "remain": 0, - "gold": 88570, - "silver": 127492, - "eventScore": 0, - "eventNum": 0, - "smalltv_msg": [], - "specialGift": { - "id": "316221038798", - "time": 90, - "hadJoin": 0, - "num": 1, - "content": "你们城里人真会玩", - "action": "start", - "storm_gif": "http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901" - }, - "notice_msg": [], - "capsule": { - "normal": { - "coin": 166, - "change": 10, - "progress": { - "now": 3630, - "max": 10000 - } - }, - "colorful": { - "coin": 2, - "change": 0, - "progress": { - "now": 0, - "max": 5000 - } - }, - "move": 1 - }, - "addFollow": 0, - "effect_block": 0, - "coin_type": "gold", - "total_coin": 100000 - } -} diff --git a/record/bullet_screen_stream_json/SPECIAL_GIFT(节奏风暴开始).json b/record/bullet_screen_stream_json/SPECIAL_GIFT(节奏风暴开始).json deleted file mode 100644 index 3288759..0000000 --- a/record/bullet_screen_stream_json/SPECIAL_GIFT(节奏风暴开始).json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "cmd": "SPECIAL_GIFT", - "data": { - "39": { - "id": 214692, - "time": 90, - "hadJoin": 0, - "num": 1, - "content": "前方高能预警,注意这不是演习", - "action": "start", - "storm_gif": "http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901" - } - } -} diff --git a/record/bullet_screen_stream_json/SPECIAL_GIFT(节奏风暴结束).json b/record/bullet_screen_stream_json/SPECIAL_GIFT(节奏风暴结束).json deleted file mode 100644 index d0bfd31..0000000 --- a/record/bullet_screen_stream_json/SPECIAL_GIFT(节奏风暴结束).json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "cmd": "SPECIAL_GIFT", - "data": { - "39": { - "id": 214692, - "time": 0, - "hadJoin": 0, - "num": 0, - "action": "end" - } - } -} diff --git a/record/bullet_screen_stream_json/SYS_GIFT(普通礼物,不可抽奖).json b/record/bullet_screen_stream_json/SYS_GIFT(普通礼物,不可抽奖).json deleted file mode 100644 index cf55e8d..0000000 --- a/record/bullet_screen_stream_json/SYS_GIFT(普通礼物,不可抽奖).json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "cmd": "SYS_GIFT", - "msg": "jjhghhfgh:? 在蜜桃姐姐w的:?直播间7813816:?内赠送:?6:?共450个", - "msg_text": "jjhghhfgh在蜜桃姐姐w的直播间7813816内赠送亿圆共450个", - "roomid": 0, - "real_roomid": 0, - "giftId": 0, - "msgTips": 0 -} diff --git a/record/bullet_screen_stream_json/SYS_GIFT(活动礼物).json b/record/bullet_screen_stream_json/SYS_GIFT(活动礼物).json deleted file mode 100644 index 8ba9948..0000000 --- a/record/bullet_screen_stream_json/SYS_GIFT(活动礼物).json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "cmd": "SYS_GIFT", - "msg": "【情怀家的尹蓝ovo】在直播间【147191】洒下漫天花雨,快来拾撷桃花,邂逅你的缘分!", - "msg_text": "【情怀家的尹蓝ovo】在直播间【147191】洒下漫天花雨,快来拾撷桃花,邂逅你的缘分!", - "tips": "【情怀家的尹蓝ovo】在直播间【147191】洒下漫天花雨,快来拾撷桃花,邂逅你的缘分!", - "url": "http://live.bilibili.com/147191", - "roomid": 147191, - "real_roomid": 147191, - "giftId": 116, - "msgTips": 0 -} diff --git a/record/bullet_screen_stream_json/SYS_GIFT(节奏风暴).json b/record/bullet_screen_stream_json/SYS_GIFT(节奏风暴).json deleted file mode 100644 index c56d79e..0000000 --- a/record/bullet_screen_stream_json/SYS_GIFT(节奏风暴).json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "SYS_GIFT", - "msg": "十四不落:? 在直播间 :?590:? 使用了 20 倍节奏风暴,大家快去跟风领取奖励吧!", - "tips": "【十四不落】在直播间【590】使用了 20 倍节奏风暴,大家快去跟风领取奖励吧!", - "url": "http://live.bilibili.com/590", - "roomid": 847617, - "real_roomid": 0, - "giftId": 39, - "msgTips": 1 -} diff --git a/record/bullet_screen_stream_json/SYS_MSG.json b/record/bullet_screen_stream_json/SYS_MSG.json deleted file mode 100644 index f3e5c02..0000000 --- a/record/bullet_screen_stream_json/SYS_MSG.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "cmd": "SYS_MSG", - "msg": "【天南地狗-】:?在直播间:?【531】:?赠送 小电视一个,请前往抽奖", - "msg_text": "【天南地狗-】:?在直播间:?【531】:?赠送 小电视一个,请前往抽奖", - "rep": 1, - "styleType": 2, - "url": "http://live.bilibili.com/531", - "roomid": 531, - "real_roomid": 22237, - "rnd": 1520992662, - "tv_id": "40478" -} diff --git a/record/bullet_screen_stream_json/TV_END.json b/record/bullet_screen_stream_json/TV_END.json deleted file mode 100644 index 00ce340..0000000 --- a/record/bullet_screen_stream_json/TV_END.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "cmd": "TV_END", - "data": { - "id": "39077", - "uname": "かこゆきこvew", - "sname": "是你的苏苏吖", - "giftName": "10W银瓜子", - "mobileTips": "恭喜 かこゆきこvew 获得10W银瓜子", - "raffleId": "39077", - "type": "small_tv", - "from": "是你的苏苏吖", - "fromFace": "http://i0.hdslb.com/bfs/face/147f137d24138d1cfec5443d98ac8b03c4332398.jpg", - "win": { - "uname": "かこゆきこvew", - "face": "http://i0.hdslb.com/bfs/face/4d63bd62322e7f3ef38723a91440bc6930626d9f.jpg", - "giftName": "银瓜子", - "giftId": "silver", - "giftNum": 100000 - } - } -} diff --git a/record/bullet_screen_stream_json/TV_START.json b/record/bullet_screen_stream_json/TV_START.json deleted file mode 100644 index 6abdc17..0000000 --- a/record/bullet_screen_stream_json/TV_START.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "cmd": "TV_START", - "data": { - "id": "40072", - "dtime": 180, - "msg": { - "cmd": "SYS_MSG", - "msg": "【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖", - "msg_text": "【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖", - "rep": 1, - "styleType": 2, - "url": "http://live.bilibili.com/102", - "roomid": 102, - "real_roomid": 5279, - "rnd": 12987955, - "tv_id": "40072" - }, - "raffleId": 40072, - "type": "small_tv", - "from": "杰宝Yvan生命倒计时", - "time": 180 - } -} diff --git a/record/bullet_screen_stream_json/WARNING.json b/record/bullet_screen_stream_json/WARNING.json deleted file mode 100644 index 5c0abbc..0000000 --- a/record/bullet_screen_stream_json/WARNING.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cmd": "WARNING", - "msg": "违反直播分区规范,请立即更换至游戏区", - "roomid": 1365604 -} diff --git a/record/bullet_screen_stream_json/WELCOME.json b/record/bullet_screen_stream_json/WELCOME.json deleted file mode 100644 index 0ed3e89..0000000 --- a/record/bullet_screen_stream_json/WELCOME.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "WELCOME", - "data": { - "uid": 18625858, - "uname": "\u662f\u767d\u8272\u70e4\u6f06", - "isadmin": 0, - "svip": 1 - }, - "roomid": 39189 -} diff --git a/record/bullet_screen_stream_json/WELCOME_ACTIVITY.json b/record/bullet_screen_stream_json/WELCOME_ACTIVITY.json deleted file mode 100644 index 38ebeee..0000000 --- a/record/bullet_screen_stream_json/WELCOME_ACTIVITY.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "cmd": "WELCOME_ACTIVITY", - "data": { - "uid": 49427998, - "uname": "起个名真tm费事", - "type": "forever_love", - "display_mode": 1 - } -} diff --git a/record/bullet_screen_stream_json/WELCOME_GUARD.json b/record/bullet_screen_stream_json/WELCOME_GUARD.json deleted file mode 100644 index 473fe09..0000000 --- a/record/bullet_screen_stream_json/WELCOME_GUARD.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "cmd": "WELCOME_GUARD", - "data": { - "uid": 23598108, - "username": "lovevael", - "guard_level": 3, - "water_god": 0 - }, - "roomid": 43001 -} diff --git a/record/bullet_screen_stream_json/WISH_BOTTLE.json b/record/bullet_screen_stream_json/WISH_BOTTLE.json deleted file mode 100644 index 6e29313..0000000 --- a/record/bullet_screen_stream_json/WISH_BOTTLE.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "cmd": "WISH_BOTTLE", - "data": { - "action": "update", - "id": 1832, - "wish": { - "id": 1832, - "uid": 110631, - "type": 1, - "type_id": 7, - "wish_limit": 99999, - "wish_progress": 14381, - "status": 1, - "content": "女装直播", - "ctime": "2018-01-12 17:25:58", - "count_map": [ - 1, - 3, - 5 - ] - } - } -} diff --git a/record/直播弹幕/COMBO_END.json b/record/直播弹幕/COMBO_END.json new file mode 100644 index 0000000..99998c8 --- /dev/null +++ b/record/直播弹幕/COMBO_END.json @@ -0,0 +1,14 @@ +{ + "cmd": "COMBO_END", + "data": { + "uname": "by_a_second", + "r_uname": "黑桐谷歌", + "combo_num": 3, + "price": 3000, + "gift_name": "给代打的礼物", + "gift_id": 30051, + "start_time": 1553410146, + "end_time": 1553410148, + "guard_level": 0 + } +} \ No newline at end of file diff --git a/record/直播弹幕/COMBO_SEND.json b/record/直播弹幕/COMBO_SEND.json new file mode 100644 index 0000000..1d62672 --- /dev/null +++ b/record/直播弹幕/COMBO_SEND.json @@ -0,0 +1,12 @@ +{ + "cmd": "COMBO_SEND", + "data": { + "uid": 16811396, + "uname": "by_a_second", + "combo_num": 3, + "gift_name": "给代打的礼物", + "gift_id": 30051, + "action": "赠送", + "combo_id": "gift:combo_id:16811396:43536:30051:1553410146.471" + } +} \ No newline at end of file diff --git a/record/直播弹幕/DANMU_MSG.json b/record/直播弹幕/DANMU_MSG.json new file mode 100644 index 0000000..f5e71f6 --- /dev/null +++ b/record/直播弹幕/DANMU_MSG.json @@ -0,0 +1,54 @@ +{ + "cmd": "DANMU_MSG", + "info": [ + [ + 0, + 1, + 25, + 16750592, + 1553368447, + 1772673920, + 0, + "169cc1f9", + 0, + 0, + 0 + ], + "这头衔永久的?", + [ + 9973581, + "丧糕菌", + 0, + 1, + 1, + 10000, + 1, + "" + ], + [ + 17, + "丧病", + "扎双马尾的丧尸", + 48499, + 16752445, + "" + ], + [ + 42, + 0, + 16746162, + 13011 + ], + [ + "title-198-1", + "title-198-1" + ], + 0, + 0, + null, + { + "ts": 1553368447, + "ct": "98688F2F" + } + ] +} \ No newline at end of file diff --git a/record/直播弹幕/ENTRY_EFFECT.json b/record/直播弹幕/ENTRY_EFFECT.json new file mode 100644 index 0000000..7f1b44b --- /dev/null +++ b/record/直播弹幕/ENTRY_EFFECT.json @@ -0,0 +1,22 @@ +{ + "cmd": "ENTRY_EFFECT", + "data": { + "id": 4, + "uid": 3007159, + "target_id": 43536, + "mock_effect": 0, + "face": "https://i0.hdslb.com/bfs/face/7c071f180a20512eba29e80bb13d1c8a3fe3916a.jpg", + "privilege_type": 3, + "copy_writing": "欢迎舰长 <%goodby...%> 进入直播间", + "copy_color": "", + "highlight_color": "#E6FF00", + "priority": 70, + "basemap_url": "https://i0.hdslb.com/bfs/live/1fa3cc06258e16c0ac4c209e2645fda3c2791894.png", + "show_avatar": 1, + "effective_time": 2, + "web_basemap_url": "", + "web_effective_time": 0, + "web_effect_close": 0, + "web_close_time": 0 + } +} \ No newline at end of file diff --git a/record/直播弹幕/GUARD_BUY.json b/record/直播弹幕/GUARD_BUY.json new file mode 100644 index 0000000..0e2bc98 --- /dev/null +++ b/record/直播弹幕/GUARD_BUY.json @@ -0,0 +1,14 @@ +{ + "cmd": "GUARD_BUY", + "data": { + "uid": 1781654, + "username": "renbye", + "guard_level": 3, + "num": 1, + "price": 198000, + "gift_id": 10003, + "gift_name": "舰长", + "start_time": 1553429698, + "end_time": 1553429698 + } +} \ No newline at end of file diff --git a/record/直播弹幕/GUARD_LOTTERY_START.json b/record/直播弹幕/GUARD_LOTTERY_START.json new file mode 100644 index 0000000..285d2cf --- /dev/null +++ b/record/直播弹幕/GUARD_LOTTERY_START.json @@ -0,0 +1,27 @@ +{ + "cmd": "GUARD_LOTTERY_START", + "data": { + "id": 955580, + "roomid": 1029, + "message": "renbye 在【1029】购买了舰长,请前往抽奖", + "type": "guard", + "privilege_type": 3, + "link": "https://live.bilibili.com/1029", + "payflow_id": "gds_74e19a449c1fdaaa73_201903", + "lottery": { + "id": 955580, + "sender": { + "uid": 1781654, + "uname": "renbye", + "face": "http://i1.hdslb.com/bfs/face/0b7a8be6e5d2a89a7de7ccd211a529599f03284e.jpg" + }, + "keyword": "guard", + "privilege_type": 3, + "time": 1200, + "status": 1, + "mobile_display_mode": 2, + "mobile_static_asset": "", + "mobile_animation_asset": "" + } + } +} \ No newline at end of file diff --git a/record/直播弹幕/GUARD_MSG.json b/record/直播弹幕/GUARD_MSG.json new file mode 100644 index 0000000..e46ed06 --- /dev/null +++ b/record/直播弹幕/GUARD_MSG.json @@ -0,0 +1,9 @@ +{ + "cmd": "GUARD_MSG", + "msg": "用户 :?鱼仔是橙子的小祖宗:? 在主播 鱼仔一点都不困 的直播间开通了总督", + "msg_new": "<%鱼仔是橙子的小祖宗%> 在 <%鱼仔一点都不困%> 的房间开通了总督并触发了抽奖,点击前往TA的房间去抽奖吧", + "url": "https://live.bilibili.com/46744", + "roomid": 46744, + "buy_type": 1, + "broadcast_type": 0 +} \ No newline at end of file diff --git a/record/直播弹幕/NOTICE_MSG.json b/record/直播弹幕/NOTICE_MSG.json new file mode 100644 index 0000000..502bd92 --- /dev/null +++ b/record/直播弹幕/NOTICE_MSG.json @@ -0,0 +1,37 @@ +{ + "cmd": "NOTICE_MSG", + "full": { + "head_icon": "http://i0.hdslb.com/bfs/live/b29add66421580c3e680d784a827202e512a40a0.webp", + "tail_icon": "http://i0.hdslb.com/bfs/live/822da481fdaba986d738db5d8fd469ffa95a8fa1.webp", + "head_icon_fa": "http://i0.hdslb.com/bfs/live/49869a52d6225a3e70bbf1f4da63f199a95384b2.png", + "tail_icon_fa": "http://i0.hdslb.com/bfs/live/38cb2a9f1209b16c0f15162b0b553e3b28d9f16f.png", + "head_icon_fan": 24, + "tail_icon_fan": 4, + "background": "#66A74EFF", + "color": "#FFFFFFFF", + "highlight": "#FDFF2FFF", + "time": 20 + }, + "half": { + "head_icon": "http://i0.hdslb.com/bfs/live/ec9b374caec5bd84898f3780a10189be96b86d4e.png", + "tail_icon": "", + "background": "#85B971FF", + "color": "#FFFFFFFF", + "highlight": "#FDFF2FFF", + "time": 15 + }, + "side": { + "head_icon": "http://i0.hdslb.com/bfs/live/e41c7e12b1e08724d2ab2f369515132d30fe1ef7.png", + "background": "#F4FDE8FF", + "color": "#79B48EFF", + "highlight": "#388726FF", + "border": "#A9DA9FFF" + }, + "roomid": 12124934, + "real_roomid": 12124934, + "msg_common": "全区广播:<%小苏棠の大脸猫脸大%>送给<%小苏棠i%>1个小电视飞船,点击前往TA的房间去抽奖吧", + "msg_self": "全区广播:<%小苏棠の大脸猫脸大%>送给<%小苏棠i%>1个小电视飞船,快来抽奖吧", + "link_url": "http://live.bilibili.com/12124934?live_lottery_type=1&broadcast_type=0&from=28003&extra_jump_from=28003", + "msg_type": 2, + "shield_uid": -1 +} \ No newline at end of file diff --git a/record/直播弹幕/ROOM_BLOCK_MSG.json b/record/直播弹幕/ROOM_BLOCK_MSG.json new file mode 100644 index 0000000..5236cb0 --- /dev/null +++ b/record/直播弹幕/ROOM_BLOCK_MSG.json @@ -0,0 +1,11 @@ +{ + "cmd": "ROOM_BLOCK_MSG", + "uid": 8305711, + "uname": "RMT0v0", + "data": { + "uid": 8305711, + "uname": "RMT0v0", + "operator": 1 + }, + "roomid": 1029 +} \ No newline at end of file diff --git a/record/直播弹幕/ROOM_RANK.json b/record/直播弹幕/ROOM_RANK.json new file mode 100644 index 0000000..d3768c4 --- /dev/null +++ b/record/直播弹幕/ROOM_RANK.json @@ -0,0 +1,11 @@ +{ + "cmd": "ROOM_RANK", + "data": { + "roomid": 1029, + "rank_desc": "单机小时榜 13", + "color": "#FB7299", + "h5_url": "https://live.bilibili.com/p/html/live-app-rankcurrent/index.html?is_live_half_webview=1&hybrid_half_ui=1,5,85p,70p,FFE293,0,30,100,10;2,2,320,100p,FFE293,0,30,100,0;4,2,320,100p,FFE293,0,30,100,0;6,5,65p,60p,FFE293,0,30,100,10;5,5,55p,60p,FFE293,0,30,100,10;3,5,85p,70p,FFE293,0,30,100,10;7,5,65p,60p,FFE293,0,30,100,10;&anchor_uid=43536&rank_type=master_realtime_area_hour&area_hour=1&area_v2_id=245&area_v2_parent_id=6", + "web_url": "https://live.bilibili.com/blackboard/room-current-rank.html?rank_type=master_realtime_area_hour&area_hour=1&area_v2_id=245&area_v2_parent_id=6", + "timestamp": 1553409901 + } +} \ No newline at end of file diff --git a/record/直播弹幕/ROOM_REAL_TIME_MESSAGE_UPDATE.json b/record/直播弹幕/ROOM_REAL_TIME_MESSAGE_UPDATE.json new file mode 100644 index 0000000..bcfcf5b --- /dev/null +++ b/record/直播弹幕/ROOM_REAL_TIME_MESSAGE_UPDATE.json @@ -0,0 +1,7 @@ +{ + "cmd": "ROOM_REAL_TIME_MESSAGE_UPDATE", + "data": { + "roomid": 23058, + "fans": 300958 + } +} \ No newline at end of file diff --git a/record/bullet_screen_stream_json/ROOM_SILENT_ON.json b/record/直播弹幕/ROOM_SILENT_ON.json similarity index 52% rename from record/bullet_screen_stream_json/ROOM_SILENT_ON.json rename to record/直播弹幕/ROOM_SILENT_ON.json index c17efff..acfa7ce 100644 --- a/record/bullet_screen_stream_json/ROOM_SILENT_ON.json +++ b/record/直播弹幕/ROOM_SILENT_ON.json @@ -2,8 +2,8 @@ "cmd": "ROOM_SILENT_ON", "data": { "type": "level", - "level": 1, - "second": 1520424615 + "level": 20, + "second": -1 }, - "roomid": 5279 -} + "roomid": 1029 +} \ No newline at end of file diff --git a/record/直播弹幕/SEND_GIFT.json b/record/直播弹幕/SEND_GIFT.json new file mode 100644 index 0000000..7d530bf --- /dev/null +++ b/record/直播弹幕/SEND_GIFT.json @@ -0,0 +1,44 @@ +{ + "cmd": "SEND_GIFT", + "data": { + "giftName": "辣条", + "num": 62, + "uname": "萌萌哒熊宝宝", + "face": "http://i0.hdslb.com/bfs/face/33570159b6bf28e01249b80d3f9f05fa117779c1.jpg", + "guard_level": 0, + "rcost": 123266565, + "uid": 10007727, + "top_list": [], + "timestamp": 1553369191, + "giftId": 1, + "giftType": 0, + "action": "喂食", + "super": 0, + "super_gift_num": 0, + "price": 100, + "rnd": "940348243", + "newMedal": 0, + "newTitle": 0, + "medal": [], + "title": "", + "beatId": "", + "biz_source": "live", + "metadata": "", + "remain": 0, + "gold": 0, + "silver": 0, + "eventScore": 0, + "eventNum": 0, + "smalltv_msg": [], + "specialGift": null, + "notice_msg": [], + "capsule": null, + "addFollow": 0, + "effect_block": 1, + "coin_type": "silver", + "total_coin": 6200, + "effect": 0, + "tag_image": "", + "user_count": 0 + } +} \ No newline at end of file diff --git a/record/直播弹幕/SYS_MSG.json b/record/直播弹幕/SYS_MSG.json new file mode 100644 index 0000000..03fd406 --- /dev/null +++ b/record/直播弹幕/SYS_MSG.json @@ -0,0 +1,14 @@ +{ + "cmd": "SYS_MSG", + "msg": "小苏棠の大脸猫脸大:?送给:?小苏棠i:?1个小电视飞船,点击前往TA的房间去抽奖吧", + "msg_text": "小苏棠の大脸猫脸大:?送给:?小苏棠i:?1个小电视飞船,点击前往TA的房间去抽奖吧", + "msg_common": "全区广播:<%小苏棠の大脸猫脸大%>送给<%小苏棠i%>1个小电视飞船,点击前往TA的房间去抽奖吧", + "msg_self": "全区广播:<%小苏棠の大脸猫脸大%>送给<%小苏棠i%>1个小电视飞船,快来抽奖吧", + "rep": 1, + "styleType": 2, + "url": "http://live.bilibili.com/12124934", + "roomid": 12124934, + "real_roomid": 12124934, + "rnd": 1553410466, + "broadcast_type": 0 +} \ No newline at end of file diff --git a/record/直播弹幕/USER_TOAST_MSG.json b/record/直播弹幕/USER_TOAST_MSG.json new file mode 100644 index 0000000..d90fee2 --- /dev/null +++ b/record/直播弹幕/USER_TOAST_MSG.json @@ -0,0 +1,10 @@ +{ + "cmd": "USER_TOAST_MSG", + "data": { + "op_type": 1, + "uid": 1781654, + "username": "renbye", + "guard_level": 3, + "is_show": 0 + } +} \ No newline at end of file diff --git a/record/直播弹幕/WELCOME.json b/record/直播弹幕/WELCOME.json new file mode 100644 index 0000000..1835122 --- /dev/null +++ b/record/直播弹幕/WELCOME.json @@ -0,0 +1,9 @@ +{ + "cmd": "WELCOME", + "data": { + "uid": 3173595, + "uname": "百杜Paido", + "is_admin": false, + "svip": 1 + } +} \ No newline at end of file diff --git a/record/直播弹幕/WELCOME_GUARD.json b/record/直播弹幕/WELCOME_GUARD.json new file mode 100644 index 0000000..b1e439a --- /dev/null +++ b/record/直播弹幕/WELCOME_GUARD.json @@ -0,0 +1,8 @@ +{ + "cmd": "WELCOME_GUARD", + "data": { + "uid": 3007159, + "username": "goodbyecaroline", + "guard_level": 3 + } +} \ No newline at end of file diff --git a/record/视频弹幕/danmaku.xml b/record/视频弹幕/danmaku.xml new file mode 100644 index 0000000..1915530 --- /dev/null +++ b/record/视频弹幕/danmaku.xml @@ -0,0 +1,132 @@ + + + + 77932184 + 0 + 196000 + 1 + 1 + 0 + 0 + + + + + + + + + + + 硬核劈柴 + 2222 + 神奇的三哥,没有什么是他们顶不了的 + 这水是甜的吧 + 真 逃生 + 非常优秀 + 中国,赞 + 逃离生活的窗 + 嘴冲? + 口冲 + 自取其乳 + 666 + 这脖子 + 这脖子是铁打的吧 + 333 + 666啊 + 四倍体草莓 + 高层建筑通云梯的窗台 + 3338 + 哈哈 + 你告诉我哪里有这么高的云梯 + 逃离生活窗 + 自重最少三百公斤的玩意顶在头上还能单手爬楼梯,这是人能做到的吗 + 前功尽弃系列 + 深圳会展中心? + 求这女孩的的体重 马上 + 蘸糖墩儿 + 我们家的 + 牛逼 + 卧槽 + 生活重来窗 + 糖墩儿那个,我们是老乡 + 卧槽 + 上化佛他们能顶么? + 九星虹梅 + 6666 + 快看 是岳云鹏 + 军人nb + 这是练什么,你们成天笑印度人,敢不敢把这个给印度人看 + 一辈子单身 + 这tm成了灵芝了 + 要坚强 + 草莓:我控制不住我的生长 + 铁头功 + 站军姿,身体要前倾 + 牛逼 + 这个上初中时被班主任罚站,就是在台阶上用脚尖站 + 小腿肚子疼 + 江科炸出来 + 一句卧槽行天下 + 禁止自娱自乐 + 一句卧槽行走天下 + 这个是真的难受!!! + 还有卧槽 + 逃出升天 + 我也这么站过 + 除了牛逼还可以说盖帽 + 半挂 + 一个下去一排倒 + 强迫症不能忍 + 硬核劈材 + 我们也这么站过 + 卧槽 + 我大江科 + 功亏一篑 + 我只会说:卧槽 + 亲媳妇 + 手炉? + 甜辣口的 + 这个是高手 + 逃离生命 + 摩托精? + 公的 + 想看三哥顶汽车 + 好了,站5个小时 + 逃离生活的窗户 + 众所周知,逃生=逃出生天=逃出,生天 + 金字塔是不是他们顶上去的 + 腰间盘突出了解一下 + 俺也一样 + 可以说 卧槽 + 我了个大草 + 兄弟帽子不错 + 梯子牛逼 + 老子最讨厌女人了!滚! + 还有这种操作!? + 被谁淹没不知所措 + 奈何本人无文化,一句卧槽走天下 + 好心酸。 + 我顶不住 + 她有一个大胆的想法 + 那个不是西葫芦么。。西葫芦甜的??? + 舒服 + 牛了个逼 + 还可以说卧槽 + 还可以说卧槽 + 他说弯腰下去继续蘸酱么? + + 牛逼 + 水瓜 + 模型出了点问题 + 逃出生天 + 阿三是真牛逼… + 回首掏 惨不忍睹 + 帅啊 + 这孩子的弹跳力惊人 + 这是高手 + 这是高手 + 吉尼斯记录三哥就顶的车 + 这是高手 + 八倍体草莓 + diff --git a/record/视频弹幕/list.so b/record/视频弹幕/list.so new file mode 100644 index 0000000..cf76698 Binary files /dev/null and b/record/视频弹幕/list.so differ diff --git a/src/main/java/com/hiczp/bilibili/api/BaseUrlDefinition.java b/src/main/java/com/hiczp/bilibili/api/BaseUrlDefinition.java deleted file mode 100644 index f6342e2..0000000 --- a/src/main/java/com/hiczp/bilibili/api/BaseUrlDefinition.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.hiczp.bilibili.api; - -public class BaseUrlDefinition { - public static final String PASSPORT = "https://passport.bilibili.com/"; - public static final String LIVE = "https://api.live.bilibili.com/"; -} diff --git a/src/main/java/com/hiczp/bilibili/api/BilibiliAPI.java b/src/main/java/com/hiczp/bilibili/api/BilibiliAPI.java deleted file mode 100644 index ce999e5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/BilibiliAPI.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.hiczp.bilibili.api; - -import com.hiczp.bilibili.api.interceptor.*; -import com.hiczp.bilibili.api.live.LiveService; -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.passport.CaptchaService; -import com.hiczp.bilibili.api.passport.PassportService; -import com.hiczp.bilibili.api.passport.SsoService; -import com.hiczp.bilibili.api.passport.entity.InfoEntity; -import com.hiczp.bilibili.api.passport.entity.LoginResponseEntity; -import com.hiczp.bilibili.api.passport.entity.LogoutResponseEntity; -import com.hiczp.bilibili.api.passport.entity.RefreshTokenResponseEntity; -import com.hiczp.bilibili.api.passport.exception.CaptchaMismatchException; -import com.hiczp.bilibili.api.provider.*; -import com.hiczp.bilibili.api.web.BilibiliWebAPI; -import com.hiczp.bilibili.api.web.BrowserProperties; -import com.hiczp.bilibili.api.web.cookie.SimpleCookieJar; -import io.netty.channel.EventLoopGroup; -import okhttp3.*; -import okhttp3.logging.HttpLoggingInterceptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import retrofit2.Retrofit; -import retrofit2.converter.gson.GsonConverterFactory; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.security.auth.login.LoginException; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.time.Instant; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; - -public class BilibiliAPI implements BilibiliServiceProvider, BilibiliCaptchaProvider, BilibiliSsoProvider, BilibiliWebAPIProvider, LiveClientProvider { - private static final Logger LOGGER = LoggerFactory.getLogger(BilibiliAPI.class); - - private final Long apiInitTime = Instant.now().getEpochSecond(); //记录当前类被实例化的时间 - private final BilibiliClientProperties bilibiliClientProperties; - private final BilibiliAccount bilibiliAccount; - - private Boolean autoRefreshToken = true; - - //用于阻止进行多次错误的 refreshToken 操作 - private String invalidToken; - private String invalidRefreshToken; - - private PassportService passportService; - private CaptchaService captchaService; - private LiveService liveService; - - private BilibiliWebAPI bilibiliWebAPI; - - public BilibiliAPI() { - this.bilibiliClientProperties = BilibiliClientProperties.defaultSetting(); - this.bilibiliAccount = BilibiliAccount.emptyInstance(); - } - - public BilibiliAPI(BilibiliClientProperties bilibiliClientProperties) { - this.bilibiliClientProperties = bilibiliClientProperties; - this.bilibiliAccount = BilibiliAccount.emptyInstance(); - } - - public BilibiliAPI(BilibiliSecurityContext bilibiliSecurityContext) { - this.bilibiliClientProperties = BilibiliClientProperties.defaultSetting(); - this.bilibiliAccount = new BilibiliAccount(bilibiliSecurityContext); - } - - public BilibiliAPI(BilibiliClientProperties bilibiliClientProperties, BilibiliSecurityContext bilibiliSecurityContext) { - this.bilibiliClientProperties = bilibiliClientProperties; - this.bilibiliAccount = new BilibiliAccount(bilibiliSecurityContext); - } - - @Override - public PassportService getPassportService() { - if (passportService == null) { - passportService = getPassportService(Collections.emptyList(), HttpLoggingInterceptor.Level.BASIC); - } - return passportService; - } - - public PassportService getPassportService(@Nonnull List interceptors, @Nonnull HttpLoggingInterceptor.Level logLevel) { - OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder(); - - //TODO 不明确客户端访问 passport.bilibili.com 时使用的 UA - okHttpClientBuilder - .addInterceptor(new AddFixedHeadersInterceptor( - "Buvid", bilibiliClientProperties.getBuvId(), - "User-Agent", "bili-universal/6560 CFNetwork/894 Darwin/17.4.0" //这是 IOS 的 UA - )) - .addInterceptor(new AddDynamicHeadersInterceptor( - () -> "Display-ID", () -> String.format("%s-%d", bilibiliAccount.getUserId() == null ? bilibiliClientProperties.getBuvId() : bilibiliAccount.getUserId(), apiInitTime) - )) - .addInterceptor(new AddFixedParamsInterceptor( - "build", bilibiliClientProperties.getBuild(), - "mobi_app", "android", - "platform", "android" - )) - .addInterceptor(new AddDynamicParamsInterceptor( - () -> "ts", () -> Long.toString(Instant.now().getEpochSecond()) - )) - .addInterceptor(new AddAppKeyInterceptor(bilibiliClientProperties)) - .addInterceptor(new SortParamsAndSignInterceptor(bilibiliClientProperties)) - .addInterceptor(new ErrorResponseConverterInterceptor()); - - interceptors.forEach(okHttpClientBuilder::addInterceptor); - - okHttpClientBuilder - .addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); - - return new Retrofit.Builder() - .baseUrl(BaseUrlDefinition.PASSPORT) - .addConverterFactory(GsonConverterFactory.create()) - .client(okHttpClientBuilder.build()) - .build() - .create(PassportService.class); - } - - @Override - public LiveService getLiveService() { - if (liveService == null) { - liveService = getLiveService(Collections.emptyList(), HttpLoggingInterceptor.Level.BASIC); - } - return liveService; - } - - public LiveService getLiveService(@Nonnull List interceptors, @Nonnull HttpLoggingInterceptor.Level logLevel) { - OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder(); - - okHttpClientBuilder - .addInterceptor(new AddFixedHeadersInterceptor( - "Buvid", bilibiliClientProperties.getBuvId(), - "User-Agent", String.format("Mozilla/5.0 BiliDroid/%s (bbcallen@gmail.com)", bilibiliClientProperties.getSimpleVersion()), - "Device-ID", bilibiliClientProperties.getHardwareId() - )) - .addInterceptor(new AddDynamicHeadersInterceptor( - //Display-ID 的值在未登录前为 Buvid-客户端启动时间, 在登录后为 mid-客户端启动时间 - () -> "Display-ID", () -> String.format("%s-%d", bilibiliAccount.getUserId() == null ? bilibiliClientProperties.getBuvId() : bilibiliAccount.getUserId(), apiInitTime) - )) - .addInterceptor(new AddFixedParamsInterceptor( - "_device", "android", - "_hwid", bilibiliClientProperties.getHardwareId(), - "actionKey", "appkey", - "build", bilibiliClientProperties.getBuild(), - "mobi_app", "android", - "platform", "android", - "scale", bilibiliClientProperties.getScale(), - "src", "google", - "version", bilibiliClientProperties.getVersion() - )) - .addInterceptor(new AddDynamicParamsInterceptor( - () -> "ts", () -> Long.toString(Instant.now().getEpochSecond()), - () -> "trace_id", () -> new SimpleDateFormat("yyyyMMddHHmm000ss").format(new Date()) - )) - .addInterceptor(new AddAppKeyInterceptor(bilibiliClientProperties)) - .addInterceptor(new AutoRefreshTokenInterceptor( - this, - ServerErrorCode.Common.UNAUTHORIZED, - ServerErrorCode.Live.USER_NO_LOGIN, - ServerErrorCode.Live.PLEASE_LOGIN, - ServerErrorCode.Live.PLEASE_LOGIN0, - ServerErrorCode.Live.NO_LOGIN - )) - .addInterceptor(new AddAccessKeyInterceptor(bilibiliAccount)) - .addInterceptor(new SortParamsAndSignInterceptor(bilibiliClientProperties)) - .addInterceptor(new ErrorResponseConverterInterceptor()); - - interceptors.forEach(okHttpClientBuilder::addInterceptor); - - okHttpClientBuilder - .addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); - - return new Retrofit.Builder() - .baseUrl(BaseUrlDefinition.LIVE) - .addConverterFactory(GsonConverterFactory.create()) - .client(okHttpClientBuilder.build()) - .build() - .create(LiveService.class); - } - - @Override - public CaptchaService getCaptchaService() { - if (captchaService == null) { - captchaService = getCaptchaService(Collections.emptyList(), HttpLoggingInterceptor.Level.BASIC); - } - return captchaService; - } - - public CaptchaService getCaptchaService(@Nonnull List interceptors, @Nonnull HttpLoggingInterceptor.Level logLevel) { - OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder(); - interceptors.forEach(okHttpClientBuilder::addInterceptor); - okHttpClientBuilder.addInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); - - return new Retrofit.Builder() - .baseUrl(BaseUrlDefinition.PASSPORT) - .client(okHttpClientBuilder.build()) - .build() - .create(CaptchaService.class); - } - - public SsoService getSsoService() { - return getSsoService(new SimpleCookieJar()); - } - - //sso 需要保存 cookie, 不对 SsoService 进行缓存 - @Override - public SsoService getSsoService(CookieJar cookieJar) { - return getSsoService(cookieJar, Collections.emptyList(), HttpLoggingInterceptor.Level.BASIC); - } - - public SsoService getSsoService(@Nonnull CookieJar cookieJar, @Nonnull List interceptors, @Nonnull HttpLoggingInterceptor.Level logLevel) { - OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder(); - - okHttpClientBuilder - .cookieJar(cookieJar) - .addInterceptor(new AddFixedParamsInterceptor( - "build", bilibiliClientProperties.getBuild(), - "mobi_app", "android", - "platform", "android" - )) - .addInterceptor(new AddDynamicParamsInterceptor( - () -> "ts", () -> Long.toString(Instant.now().getEpochSecond()) - )) - .addInterceptor(new AddAccessKeyInterceptor(bilibiliAccount)) - .addInterceptor(new AddAppKeyInterceptor(bilibiliClientProperties)) - .addInterceptor(new SortParamsAndSignInterceptor(bilibiliClientProperties)); - - interceptors.forEach(okHttpClientBuilder::addInterceptor); - - okHttpClientBuilder - .addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); - - return new Retrofit.Builder() - .baseUrl(BaseUrlDefinition.PASSPORT) - .client(okHttpClientBuilder.build()) - .build() - .create(SsoService.class); - } - - @Override - public HttpUrl getSsoUrl(@Nullable String goUrl) { - CancelRequestInterceptor cancelRequestInterceptor = new CancelRequestInterceptor(); - try { - getSsoService(new SimpleCookieJar(), Collections.singletonList(cancelRequestInterceptor), HttpLoggingInterceptor.Level.BASIC) - .sso(goUrl) - .execute(); - } catch (IOException ignored) { - - } - return cancelRequestInterceptor.getRequest().url(); - } - - @Override - public Map> toCookies() throws IOException { - //用这个地址是因为这个地址一定不会改变(在 B站 未来的更新中)并且很省流量 - return toCookies(BaseUrlDefinition.PASSPORT + "api/oauth2/getKey"); - } - - public Map> toCookies(@Nullable String goUrl) throws IOException { - SimpleCookieJar simpleCookieJar = new SimpleCookieJar(); - getSsoService(simpleCookieJar).sso(goUrl).execute(); - return simpleCookieJar.getCookiesMap(); - } - - @Override - public BilibiliWebAPI getBilibiliWebAPI() throws IOException { - return getBilibiliWebAPI(BrowserProperties.defaultSetting()); - } - - public BilibiliWebAPI getBilibiliWebAPI(BrowserProperties browserProperties) throws IOException { - if (bilibiliWebAPI == null) { - bilibiliWebAPI = new BilibiliWebAPI(browserProperties, toCookies()); - } - return bilibiliWebAPI; - } - - public LoginResponseEntity login(@Nonnull String username, @Nonnull String password) throws IOException, LoginException, CaptchaMismatchException { - return login(username, password, null, null); - } - - public synchronized LoginResponseEntity login(@Nonnull String username, - @Nonnull String password, - String captcha, - String cookie) throws IOException, LoginException, CaptchaMismatchException { - LOGGER.info("Login attempting with username '{}'", username); - LoginResponseEntity loginResponseEntity = BilibiliSecurityHelper.login( - this, - username, - password, - captcha, - cookie - ); - //判断返回值 - switch (loginResponseEntity.getCode()) { - case ServerErrorCode.Common.OK: { - - } - break; - case ServerErrorCode.Passport.USERNAME_OR_PASSWORD_INVALID: { - throw new LoginException("username or password invalid"); - } - case ServerErrorCode.Passport.CANT_DECRYPT_RSA_PASSWORD: { - throw new LoginException("password error or hash expired"); - } - case ServerErrorCode.Passport.CAPTCHA_NOT_MATCH: { - throw new CaptchaMismatchException("captcha mismatch"); - } - default: { - throw new IOException(loginResponseEntity.getMessage()); - } - } - bilibiliAccount.copyFrom(loginResponseEntity.toBilibiliAccount()); - bilibiliWebAPI = null; - LOGGER.info("Login succeed with username: {}", username); - return loginResponseEntity; - } - - public synchronized RefreshTokenResponseEntity refreshToken() throws IOException, LoginException { - if (isCurrentTokenAndRefreshTokenInvalid()) { - throw new LoginException("access token or refresh token not been set yet or invalid"); - } - - LOGGER.info("RefreshToken attempting with userId '{}'", bilibiliAccount.getUserId()); - RefreshTokenResponseEntity refreshTokenResponseEntity = BilibiliSecurityHelper.refreshToken( - this, - bilibiliAccount.getAccessToken(), - bilibiliAccount.getRefreshToken() - ); - switch (refreshTokenResponseEntity.getCode()) { - case ServerErrorCode.Common.OK: { - - } - break; - case ServerErrorCode.Passport.NO_LOGIN: { - markCurrentTokenAndRefreshTokenInvalid(); - throw new LoginException("access token invalid"); - } - case ServerErrorCode.Passport.REFRESH_TOKEN_NOT_MATCH: { - markCurrentTokenAndRefreshTokenInvalid(); - throw new LoginException("access token and refresh token mismatch"); - } - default: { - throw new IOException(refreshTokenResponseEntity.getMessage()); - } - } - bilibiliAccount.copyFrom(refreshTokenResponseEntity.toBilibiliAccount()); - bilibiliWebAPI = null; - LOGGER.info("RefreshToken succeed with userId: {}", bilibiliAccount.getUserId()); - return refreshTokenResponseEntity; - } - - public synchronized LogoutResponseEntity logout() throws IOException, LoginException { - LOGGER.info("Logout attempting with userId '{}'", bilibiliAccount.getUserId()); - Long userId = bilibiliAccount.getUserId(); - LogoutResponseEntity logoutResponseEntity = BilibiliSecurityHelper.logout(this, bilibiliAccount.getAccessToken()); - switch (logoutResponseEntity.getCode()) { - case ServerErrorCode.Common.OK: { - - } - break; - case ServerErrorCode.Passport.NO_LOGIN: { - throw new LoginException("access token invalid"); - } - default: { - throw new IOException(logoutResponseEntity.getMessage()); - } - } - bilibiliAccount.reset(); - LOGGER.info("Logout succeed with userId: {}", userId); - return logoutResponseEntity; - } - - public InfoEntity getAccountInfo() throws IOException, LoginException { - InfoEntity infoEntity = getPassportService() - .getInfo(bilibiliAccount.getAccessToken()) - .execute() - .body(); - switch (infoEntity.getCode()) { - case ServerErrorCode.Common.OK: { - - } - break; - case ServerErrorCode.Passport.NO_LOGIN: { - throw new LoginException("no login"); - } - default: { - throw new IOException(infoEntity.getMessage()); - } - } - - return infoEntity; - } - - /** - * 2018-05-11 现在用假的房间 Id 也能正常连接弹幕推送服务器 - * - * @param eventLoopGroup 用于连接弹幕推送服务器的 EventLoop - * @param roomId 房间 ID, 可以是真 ID 也可以是假 ID - * @param isRealRoomId 使用的 roomId 是否是真 ID - * @return LiveClient 实例 - */ - @Override - public LiveClient getLiveClient(EventLoopGroup eventLoopGroup, long roomId, boolean isRealRoomId) { - return bilibiliAccount.getUserId() == null ? - new LiveClient(this, eventLoopGroup, roomId, isRealRoomId) : - new LiveClient(this, eventLoopGroup, roomId, isRealRoomId, bilibiliAccount.getUserId()); - } - - private void markCurrentTokenAndRefreshTokenInvalid() { - invalidToken = bilibiliAccount.getAccessToken(); - invalidRefreshToken = bilibiliAccount.getRefreshToken(); - } - - public boolean isCurrentTokenAndRefreshTokenInvalid() { - //如果 accessToken 或 refreshToken 没有被设置或者已经尝试过并明确他们是无效的 - return bilibiliAccount.getAccessToken() == null || - bilibiliAccount.getRefreshToken() == null || - (bilibiliAccount.getAccessToken().equals(invalidToken) && bilibiliAccount.getRefreshToken().equals(invalidRefreshToken)); - } - - public BilibiliClientProperties getBilibiliClientProperties() { - return bilibiliClientProperties; - } - - public BilibiliAccount getBilibiliAccount() { - return bilibiliAccount; - } - - public boolean isAutoRefreshToken() { - return autoRefreshToken; - } - - public BilibiliAPI setAutoRefreshToken(boolean autoRefreshToken) { - this.autoRefreshToken = autoRefreshToken; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/BilibiliAccount.java b/src/main/java/com/hiczp/bilibili/api/BilibiliAccount.java deleted file mode 100644 index eb66c4c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/BilibiliAccount.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.hiczp.bilibili.api; - -public class BilibiliAccount implements BilibiliSecurityContext { - private String accessToken; - private String refreshToken; - private Long userId; - private Long expirationTime; - private Long loginTime; - - private BilibiliAccount() { - - } - - public BilibiliAccount(String accessToken, String refreshToken, Long userId, Long expirationTime, Long loginTime) { - this.accessToken = accessToken; - this.refreshToken = refreshToken; - this.userId = userId; - this.expirationTime = expirationTime; - this.loginTime = loginTime; - } - - public BilibiliAccount(BilibiliSecurityContext bilibiliSecurityContext) { - copyFrom(bilibiliSecurityContext); - } - - public static BilibiliAccount emptyInstance() { - return new BilibiliAccount(); - } - - public BilibiliAccount copyFrom(BilibiliSecurityContext bilibiliSecurityContext) { - this.accessToken = bilibiliSecurityContext.getAccessToken(); - this.refreshToken = bilibiliSecurityContext.getRefreshToken(); - this.userId = bilibiliSecurityContext.getUserId(); - this.expirationTime = bilibiliSecurityContext.getExpirationTime(); - this.loginTime = bilibiliSecurityContext.getLoginTime(); - return this; - } - - public BilibiliAccount reset() { - this.accessToken = null; - this.refreshToken = null; - this.userId = null; - this.expirationTime = null; - this.loginTime = null; - return this; - } - - @Override - public String getAccessToken() { - return accessToken; - } - - public BilibiliAccount setAccessToken(String accessToken) { - this.accessToken = accessToken; - return this; - } - - @Override - public String getRefreshToken() { - return refreshToken; - } - - public BilibiliAccount setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - @Override - public Long getUserId() { - return userId; - } - - public BilibiliAccount setUserId(Long userId) { - this.userId = userId; - return this; - } - - @Override - public Long getExpirationTime() { - return expirationTime; - } - - public BilibiliAccount setExpirationTime(Long expirationTime) { - this.expirationTime = expirationTime; - return this; - } - - @Override - public Long getLoginTime() { - return loginTime; - } - - public BilibiliAccount setLoginTime(Long loginTime) { - this.loginTime = loginTime; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/BilibiliClientProperties.java b/src/main/java/com/hiczp/bilibili/api/BilibiliClientProperties.java deleted file mode 100644 index 54eb164..0000000 --- a/src/main/java/com/hiczp/bilibili/api/BilibiliClientProperties.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.hiczp.bilibili.api; - -import javax.annotation.Nonnull; - -public class BilibiliClientProperties { - private String appKey = "1d8b6e7d45233436"; - private String appSecret = "560c52ccd288fed045859ed18bffd973"; - private String hardwareId = "JxdyESFAJkcjEicQbBBsCTlbal5uX2Y"; - private String scale = "xxhdpi"; - private String version = "5.15.0.515000"; - private String simpleVersion; - private String build; - private String buvId = "JxdyESFAJkcjEicQbBBsCTlbal5uX2Yinfoc"; - - private BilibiliClientProperties() { - onVersionChange(); - } - - public static BilibiliClientProperties defaultSetting() { - return new BilibiliClientProperties(); - } - - private void onVersionChange() { - int lastIndexOfDot = version.lastIndexOf("."); - this.simpleVersion = version.substring(0, lastIndexOfDot); - this.build = version.substring(lastIndexOfDot + 1); - } - - public String getAppKey() { - return appKey; - } - - public BilibiliClientProperties setAppKey(String appKey) { - this.appKey = appKey; - return this; - } - - public String getAppSecret() { - return appSecret; - } - - public BilibiliClientProperties setAppSecret(String appSecret) { - this.appSecret = appSecret; - return this; - } - - public String getHardwareId() { - return hardwareId; - } - - public BilibiliClientProperties setHardwareId(String hardwareId) { - this.hardwareId = hardwareId; - return this; - } - - public String getScale() { - return scale; - } - - public BilibiliClientProperties setScale(String scale) { - this.scale = scale; - return this; - } - - public String getVersion() { - return version; - } - - public BilibiliClientProperties setVersion(@Nonnull String version) { - this.version = version; - onVersionChange(); - return this; - } - - public String getSimpleVersion() { - return simpleVersion; - } - - public String getBuild() { - return build; - } - - public String getBuvId() { - return buvId; - } - - public BilibiliClientProperties setBuvId(String buvId) { - this.buvId = buvId; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/BilibiliSecurityContext.java b/src/main/java/com/hiczp/bilibili/api/BilibiliSecurityContext.java deleted file mode 100644 index d672f98..0000000 --- a/src/main/java/com/hiczp/bilibili/api/BilibiliSecurityContext.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hiczp.bilibili.api; - -public interface BilibiliSecurityContext { - String getAccessToken(); - - String getRefreshToken(); - - Long getUserId(); - - Long getExpirationTime(); - - Long getLoginTime(); -} diff --git a/src/main/java/com/hiczp/bilibili/api/BilibiliSecurityHelper.java b/src/main/java/com/hiczp/bilibili/api/BilibiliSecurityHelper.java deleted file mode 100644 index 0df7cc9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/BilibiliSecurityHelper.java +++ /dev/null @@ -1,199 +0,0 @@ -package com.hiczp.bilibili.api; - -import com.hiczp.bilibili.api.passport.entity.KeyEntity; -import com.hiczp.bilibili.api.passport.entity.LoginResponseEntity; -import com.hiczp.bilibili.api.passport.entity.LogoutResponseEntity; -import com.hiczp.bilibili.api.passport.entity.RefreshTokenResponseEntity; -import com.hiczp.bilibili.api.provider.BilibiliServiceProvider; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.crypto.BadPaddingException; -import javax.crypto.Cipher; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; -import java.io.IOException; -import java.math.BigInteger; -import java.security.*; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import java.util.Arrays; -import java.util.Base64; -import java.util.List; -import java.util.stream.Collectors; - -public class BilibiliSecurityHelper { - /** - * 加密一个明文密码 - * - * @param bilibiliServiceProvider BilibiliServiceProvider 实例 - * @param password 明文密码 - * @return 密文密码 - * @throws IOException 网络错误 - */ - private static String cipherPassword(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, - @Nonnull String password) throws IOException { - KeyEntity keyEntity = bilibiliServiceProvider.getPassportService().getKey().execute().body(); - //服务器返回异常错误码 - if (keyEntity.getCode() != 0) { - throw new IOException(keyEntity.getMessage()); - } - //构造无备注的 RSA 公钥字符串 - String rsaPublicKeyString = Arrays.stream(keyEntity.getData().getKey().split("\n")) - .filter(string -> !string.startsWith("-")) - .collect(Collectors.joining()); - //解析 RSA 公钥 - PublicKey publicKey; - try { - X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.getDecoder().decode(rsaPublicKeyString.getBytes())); - publicKey = KeyFactory.getInstance("RSA").generatePublic(x509EncodedKeySpec); - } catch (NoSuchAlgorithmException e) { - throw new Error(e); - } catch (InvalidKeySpecException e) { - throw new IOException("get broken RSA public key"); - } - //加密密码 - String cipheredPassword; - try { - Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); - cipher.init(Cipher.ENCRYPT_MODE, publicKey); - cipheredPassword = new String( - Base64.getEncoder().encode( - cipher.doFinal((keyEntity.getData().getHash() + password).getBytes()) - ) - ); - } catch (NoSuchAlgorithmException | NoSuchPaddingException | IllegalBlockSizeException | BadPaddingException e) { - throw new Error(e); - } catch (InvalidKeyException e) { - throw new IOException("get broken RSA public key"); - } - return cipheredPassword; - } - - /** - * 计算 sign - * - * @param nameAndValues 传入值为 name1=value1 形式, 传入值必须已经排序. value 必须已经经过 URLEncode - * @param appSecret APP 密钥 - * @return sign - */ - public static String calculateSign(@Nonnull List nameAndValues, @Nonnull String appSecret) { - return calculateSign(nameAndValues.stream().collect(Collectors.joining("&")), appSecret); - } - - /** - * 计算 sign - * - * @param encodedQuery 已经经过 URLEncode 处理的 Query 参数字符串 - * @param appSecret APP 密钥 - * @return sign - */ - public static String calculateSign(@Nonnull String encodedQuery, @Nonnull String appSecret) { - try { - MessageDigest messageDigest = MessageDigest.getInstance("MD5"); - messageDigest.update((encodedQuery + appSecret).getBytes()); - String md5 = new BigInteger(1, messageDigest.digest()).toString(16); - //md5 不满 32 位时左边加 0 - return ("00000000000000000000000000000000" + md5).substring(md5.length()); - } catch (NoSuchAlgorithmException e) { - throw new Error(e); - } - } - - /** - * 向一个 Query 参数字符串中添加 sign - * - * @param nameAndValues 传入值为 name1=value1 形式, 传入值必须已经排序. value 必须已经经过 URLEncode - * @param appSecret APP 密钥 - * @return 添加了 sign 的 Query 参数字符串 - */ - public static String addSignToQuery(@Nonnull List nameAndValues, @Nonnull String appSecret) { - return addSignToQuery(nameAndValues.stream().collect(Collectors.joining("&")), appSecret); - } - - /** - * 向一个 Query 参数字符串中添加 sign - * - * @param encodedQuery 已经经过 URLEncode 处理的 Query 参数字符串 - * @param appSecret APP 密钥 - * @return 添加了 sign 的 Query 参数字符串 - */ - public static String addSignToQuery(@Nonnull String encodedQuery, @Nonnull String appSecret) { - return encodedQuery + String.format("&%s=%s", "sign", calculateSign(encodedQuery, appSecret)); - } - - /** - * 登录 - * - * @param bilibiliServiceProvider BilibiliServiceProvider 实例 - * @param username 用户名 - * @param password 明文密码 - * @return 返回值包含有 token 与 refreshToken - * @throws IOException 网络错误 - */ - public static LoginResponseEntity login(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, - @Nonnull String username, - @Nonnull String password) throws IOException { - return login(bilibiliServiceProvider, username, password, null, null); - } - - /** - * 带验证码的登录 - * 在一段时间内使用错误的密码尝试登录多次, 再次使用这个 IP 地址登录这个账号会被要求验证码 - * - * @param bilibiliServiceProvider BilibiliServiceProvider 实例 - * @param username 用户名 - * @param password 明文密码 - * @param captcha 验证码 - * @param cookie 与验证码对应的 cookies - * @return 返回值包含有 token 与 refreshToken - * @throws IOException 网络错误 - * @see com.hiczp.bilibili.api.passport.CaptchaService - */ - public static LoginResponseEntity login(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, - @Nonnull String username, - @Nonnull String password, - @Nullable String captcha, - @Nullable String cookie) throws IOException { - return bilibiliServiceProvider.getPassportService() - .login( - username, - cipherPassword(bilibiliServiceProvider, password), - captcha, - cookie - ).execute() - .body(); - } - - /** - * 刷新 Token - * - * @param bilibiliServiceProvider BilibiliServiceProvider 实例 - * @param accessToken token - * @param refreshToken refreshToken - * @return 返回值包含一个新的 token 与 refreshToken - * @throws IOException 网络错误 - */ - public static RefreshTokenResponseEntity refreshToken(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, - @Nonnull String accessToken, - @Nonnull String refreshToken) throws IOException { - return bilibiliServiceProvider.getPassportService().refreshToken(accessToken, refreshToken) - .execute() - .body(); - } - - /** - * 注销 - * - * @param bilibiliServiceProvider BilibiliServiceProvider 实例 - * @param accessToken token - * @return 返回 0 表示成功 - * @throws IOException 网络错误 - */ - public static LogoutResponseEntity logout(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, - @Nonnull String accessToken) throws IOException { - return bilibiliServiceProvider.getPassportService().logout(accessToken) - .execute() - .body(); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/ServerErrorCode.java b/src/main/java/com/hiczp/bilibili/api/ServerErrorCode.java deleted file mode 100644 index e7d2f2f..0000000 --- a/src/main/java/com/hiczp/bilibili/api/ServerErrorCode.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.hiczp.bilibili.api; - -/** - * 不知道为什么错误码都要加负号 - * 根据推断, 负数错误码表示是 APP 专用的 API, 正数错误码表示是 Web API 或者共用的 API - */ -public class ServerErrorCode { - /** - * 服务网关上鉴权失败的话, 会返回这些标准错误码 - * B站 后台设计很混乱, 不是所有鉴权都在服务网关上完成 - */ - public static class Common { - public static final int API_SIGN_INVALID = -3; - public static final int OK = 0; - /** - * 参数错误或已达 API 每日访问限制(比如银瓜子换硬币每日只能访问一次) - */ - public static final int BAD_REQUEST = -400; - public static final int UNAUTHORIZED = -401; - public static final int FORBIDDEN = -403; - public static final int NOT_FOUND = -404; - /** - * 一些 API 在参数错误的情况下也会引起 -500 - */ - public static final int INTERNAL_SERVER_ERROR = -500; - } - - /** - * 现在 access token 错误统一返回 -101 - */ - public static class Passport { - /** - * "access_key not found" - */ - public static final int NO_LOGIN = -101; - /** - * 短时间内进行多次错误的登录将被要求输入验证码 - */ - public static final int CAPTCHA_NOT_MATCH = -105; - /** - * 用户名不存在 - */ - public static final int USERNAME_OR_PASSWORD_INVALID = -629; - /** - * 密码不可解密或者密码错误 - */ - public static final int CANT_DECRYPT_RSA_PASSWORD = -662; - /** - * B站换了错误码, 现在 "access_key not found." 对应 -101 - */ - @Deprecated - public static final int ACCESS_TOKEN_NOT_FOUND = -901; - /** - * refreshToken 与 token 不匹配 - */ - public static final int REFRESH_TOKEN_NOT_MATCH = -903; - } - - /** - * 一些 API 未登录时返回 3, 一些返回 -101, 还有一些返回 401, 在网关上鉴权的 API 返回 -401, 甚至有一些 API 返回 32205 这种奇怪的错误码 - */ - public static class Live { - /** - * "invalid params" - */ - public static final int INVALID_PARAMS = 1; - /** - * "user no login" - */ - public static final int USER_NO_LOGIN = 3; - /** - * "请登录" - */ - public static final int PLEASE_LOGIN = 401; - /** - * "每天最多能兑换 1 个" - */ - public static final int FORBIDDEN = 403; - /** - * 送礼物时房间号与用户号不匹配 - * "只能送给主播(591)" - */ - public static final int ONLY_CAN_SEND_TO_HOST = 200012; - /** - * 赠送一个不存在的礼物 - * "获取包裹数据失败" - */ - public static final int GET_BAG_DATA_FAIL = 200019; - /** - * "请登录" - */ - public static final int PLEASE_LOGIN0 = 32205; - /** - * "message": "invalid request" - * "data": "bad token" - */ - public static final int INVALID_REQUEST = 65530; - /** - * "请先登录" - */ - public static final int NO_LOGIN = -101; - /** - * 访问的房间号不存在 - * "message": "Document is not exists." - */ - public static final int DOCUMENT_IS_NOT_EXISTS = -404; - /** - * 搜索时, 关键字字数过少或过多 - * "关键字不能小于2个字节或大于50字节" - */ - public static final int KEYWORD_CAN_NOT_LESS_THAN_2_BYTES_OR_GREATER_THAN_50_BYTES = -609; - /** - * 已经领取过这个宝箱 - */ - public static final int THIS_SILVER_TASK_ALREADY_TOOK = -903; - /** - * 今天所有的宝箱已经领完 - */ - public static final int NO_MORE_SILVER_TASK = -10017; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/exception/UserCancelRequestException.java b/src/main/java/com/hiczp/bilibili/api/exception/UserCancelRequestException.java deleted file mode 100644 index 39cb0f9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/exception/UserCancelRequestException.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hiczp.bilibili.api.exception; - -import java.io.IOException; - -public class UserCancelRequestException extends IOException { - public UserCancelRequestException() { - - } - - public UserCancelRequestException(String message) { - super(message); - } - - public UserCancelRequestException(String message, Throwable cause) { - super(message, cause); - } - - public UserCancelRequestException(Throwable cause) { - super(cause); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AddAccessKeyInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AddAccessKeyInterceptor.java deleted file mode 100644 index f33f103..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AddAccessKeyInterceptor.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.google.common.base.Strings; -import com.hiczp.bilibili.api.BilibiliSecurityContext; -import okhttp3.HttpUrl; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; - -public class AddAccessKeyInterceptor implements Interceptor { - private BilibiliSecurityContext bilibiliSecurityContext; - - public AddAccessKeyInterceptor(BilibiliSecurityContext bilibiliSecurityContext) { - this.bilibiliSecurityContext = bilibiliSecurityContext; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - HttpUrl.Builder httpUrlBuilder = request.url().newBuilder(); - String accessKey = bilibiliSecurityContext.getAccessToken(); - if (!Strings.isNullOrEmpty(accessKey)) { - httpUrlBuilder.removeAllQueryParameters("access_key") - .addQueryParameter("access_key", accessKey); - } - return chain.proceed(request.newBuilder().url(httpUrlBuilder.build()).build()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AddAppKeyInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AddAppKeyInterceptor.java deleted file mode 100644 index 1256de8..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AddAppKeyInterceptor.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.hiczp.bilibili.api.BilibiliClientProperties; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; - -public class AddAppKeyInterceptor implements Interceptor { - private BilibiliClientProperties bilibiliClientDefinition; - - public AddAppKeyInterceptor(BilibiliClientProperties bilibiliClientDefinition) { - this.bilibiliClientDefinition = bilibiliClientDefinition; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - return chain.proceed(request.newBuilder().url( - request.url().newBuilder() - .addQueryParameter("appkey", bilibiliClientDefinition.getAppKey()) - .build() - ).build()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AddDynamicHeadersInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AddDynamicHeadersInterceptor.java deleted file mode 100644 index d5ee178..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AddDynamicHeadersInterceptor.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; -import java.util.function.Supplier; - -public class AddDynamicHeadersInterceptor implements Interceptor { - private Supplier[] headerAndValues; - - @SafeVarargs - public AddDynamicHeadersInterceptor(Supplier... headerAndValues) { - if (headerAndValues.length % 2 != 0) { - throw new IllegalArgumentException("Header must have value"); - } - this.headerAndValues = headerAndValues; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request.Builder requestBuilder = chain.request().newBuilder(); - for (int i = 0; i < headerAndValues.length; i += 2) { - requestBuilder.addHeader(headerAndValues[i].get(), headerAndValues[i + 1].get()); - } - return chain.proceed(requestBuilder.build()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AddDynamicParamsInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AddDynamicParamsInterceptor.java deleted file mode 100644 index 968c4c5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AddDynamicParamsInterceptor.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import okhttp3.HttpUrl; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; -import java.util.function.Supplier; - -public class AddDynamicParamsInterceptor implements Interceptor { - private Supplier[] paramAndValues; - - @SafeVarargs - public AddDynamicParamsInterceptor(Supplier... paramAndValues) { - if (paramAndValues.length % 2 != 0) { - throw new IllegalArgumentException("Parameter must have value"); - } - this.paramAndValues = paramAndValues; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - HttpUrl.Builder httpUrlBuilder = request.url().newBuilder(); - for (int i = 0; i < paramAndValues.length; i += 2) { - httpUrlBuilder.addQueryParameter(paramAndValues[i].get(), paramAndValues[i + 1].get()); - } - return chain.proceed(request.newBuilder().url(httpUrlBuilder.build()).build()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AddFixedHeadersInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AddFixedHeadersInterceptor.java deleted file mode 100644 index 92fb7c3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AddFixedHeadersInterceptor.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; - -public class AddFixedHeadersInterceptor implements Interceptor { - private String[] headerAndValues; - - public AddFixedHeadersInterceptor(String... headerAndValues) { - if (headerAndValues.length % 2 != 0) { - throw new IllegalArgumentException("Header must have value"); - } - this.headerAndValues = headerAndValues; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request.Builder requestBuilder = chain.request().newBuilder(); - for (int i = 0; i < headerAndValues.length; i += 2) { - requestBuilder.addHeader(headerAndValues[i], headerAndValues[i + 1]); - } - return chain.proceed(requestBuilder.build()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AddFixedParamsInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AddFixedParamsInterceptor.java deleted file mode 100644 index 230b3e2..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AddFixedParamsInterceptor.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import okhttp3.HttpUrl; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; - -public class AddFixedParamsInterceptor implements Interceptor { - private String[] paramAndValues; - - public AddFixedParamsInterceptor(String... paramAndValues) { - if (paramAndValues.length % 2 != 0) { - throw new IllegalArgumentException("Parameter must have value"); - } - this.paramAndValues = paramAndValues; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - HttpUrl.Builder httpUrlBuilder = request.url().newBuilder(); - for (int i = 0; i < paramAndValues.length; i += 2) { - httpUrlBuilder.addQueryParameter(paramAndValues[i], paramAndValues[i + 1]); - } - return chain.proceed(request.newBuilder().url(httpUrlBuilder.build()).build()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/AutoRefreshTokenInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/AutoRefreshTokenInterceptor.java deleted file mode 100644 index ff6279d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/AutoRefreshTokenInterceptor.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.ServerErrorCode; -import okhttp3.Interceptor; -import okhttp3.Response; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.stream.IntStream; - -/** - * 自动刷新 token - * 如果一次请求的返回值表示鉴权失败, 会尝试刷新一次 token 然后自动重放请求 - * 刷新 token 的行为将只发生一次, 如果刷新 token 失败, 下次请求的时候不会再次执行刷新 token 操作而会直接返回原本的返回内容 - */ -public class AutoRefreshTokenInterceptor implements Interceptor { - private static final Logger LOGGER = LoggerFactory.getLogger(AutoRefreshTokenInterceptor.class); - - private BilibiliAPI bilibiliAPI; - private int[] codes; - - public AutoRefreshTokenInterceptor(BilibiliAPI bilibiliAPI, int... codes) { - this.bilibiliAPI = bilibiliAPI; - this.codes = codes; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Response response = chain.proceed(chain.request()); - - if (!bilibiliAPI.isAutoRefreshToken()) { - return response; - } - - JsonObject jsonObject = InterceptorHelper.getJsonInBody(response); - JsonElement codeElement = jsonObject.get("code"); - if (codeElement == null) { - return response; - } - int codeValue = codeElement.getAsInt(); - if (codeValue == ServerErrorCode.Common.OK) { - return response; - } - - if (IntStream.of(codes).noneMatch(code -> code == codeValue)) { - return response; - } - - if (bilibiliAPI.isCurrentTokenAndRefreshTokenInvalid()) { - return response; - } - - try { - bilibiliAPI.refreshToken(); - response = chain.proceed(chain.request()); - } catch (Exception e) { - LOGGER.error("refresh token failed: {}", e.getMessage()); - } - - return response; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/CancelRequestInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/CancelRequestInterceptor.java deleted file mode 100644 index fbf7693..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/CancelRequestInterceptor.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.hiczp.bilibili.api.exception.UserCancelRequestException; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; - -/** - * 这个拦截器用于取消请求 - * 如果需要让数据经过其他拦截器处理, 但是不想发生真实的网络请求, 就可以使用这个 - * - * @see UserCancelRequestException - */ -public class CancelRequestInterceptor implements Interceptor { - private Request request; - - @Override - public Response intercept(Chain chain) throws IOException { - request = chain.request(); - throw new UserCancelRequestException(); - } - - public Request getRequest() { - return request; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/ErrorResponseConverterInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/ErrorResponseConverterInterceptor.java deleted file mode 100644 index f276d2c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/ErrorResponseConverterInterceptor.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.google.gson.*; -import com.hiczp.bilibili.api.ServerErrorCode; -import okhttp3.Interceptor; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - -/** - * 错误返回码内容转换拦截器 - * 由于服务器返回错误时的 data 字段类型不固定, 会导致 json 反序列化出错. - * 该拦截器将在返回的 code 不为 0 时, 将 response 转换为包含一个空 data 的 json 字符串. - */ -public class ErrorResponseConverterInterceptor implements Interceptor { - private static final Logger LOGGER = LoggerFactory.getLogger(ErrorResponseConverterInterceptor.class); - private static final Gson GSON = new Gson(); - - @Override - public Response intercept(Chain chain) throws IOException { - Response response = chain.proceed(chain.request()); - ResponseBody responseBody = response.body(); - - JsonObject jsonObject = InterceptorHelper.getJsonInBody(response); - JsonElement code = jsonObject.get("code"); - //code 字段不存在 - if (code == null || code.isJsonNull()) { - return response; - } - //code 为 0 - try { - if (code.getAsInt() == ServerErrorCode.Common.OK) { - return response; - } - } catch (NumberFormatException e) { //如果 code 不是数字的话直接返回 - return response; - } - - //打印 body - LOGGER.error("Get error response below: \n{}", - new GsonBuilder() - .setPrettyPrinting() - .create() - .toJson(jsonObject) - ); - //data 字段不存在 - if (jsonObject.get("data") == null) { - return response; - } - jsonObject.add("data", JsonNull.INSTANCE); - return response.newBuilder() - .body(ResponseBody.create( - responseBody.contentType(), - GSON.toJson(jsonObject)) - ).build(); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/InterceptorHelper.java b/src/main/java/com/hiczp/bilibili/api/interceptor/InterceptorHelper.java deleted file mode 100644 index b6805e6..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/InterceptorHelper.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import okhttp3.Response; -import okhttp3.ResponseBody; -import okio.Buffer; -import okio.BufferedSource; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -class InterceptorHelper { - private static final JsonParser JSON_PARSER = new JsonParser(); - - static JsonObject getJsonInBody(Response response) throws IOException { - ResponseBody responseBody = response.body(); - BufferedSource bufferedSource = responseBody.source(); - bufferedSource.request(Long.MAX_VALUE); - Buffer buffer = bufferedSource.buffer(); - return JSON_PARSER.parse( - //必须要 clone 一次, 否则将导致流关闭 - buffer.clone().readString(StandardCharsets.UTF_8) - ).getAsJsonObject(); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/interceptor/SortParamsAndSignInterceptor.java b/src/main/java/com/hiczp/bilibili/api/interceptor/SortParamsAndSignInterceptor.java deleted file mode 100644 index 74d57b9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/interceptor/SortParamsAndSignInterceptor.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.hiczp.bilibili.api.interceptor; - -import com.hiczp.bilibili.api.BilibiliClientProperties; -import com.hiczp.bilibili.api.BilibiliSecurityHelper; -import okhttp3.HttpUrl; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -public class SortParamsAndSignInterceptor implements Interceptor { - private BilibiliClientProperties bilibiliClientProperties; - - public SortParamsAndSignInterceptor(BilibiliClientProperties bilibiliClientProperties) { - this.bilibiliClientProperties = bilibiliClientProperties; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - HttpUrl httpUrl = request.url(); - List nameAndValues = new ArrayList<>(httpUrl.querySize() + 1); - httpUrl.queryParameterNames().stream() - .filter(parameterName -> !parameterName.equals("sign")) - .forEach(name -> - httpUrl.queryParameterValues(name).forEach(value -> { - try { - nameAndValues.add(String.format("%s=%s", name, URLEncoder.encode(value, StandardCharsets.UTF_8.toString()))); - } catch (UnsupportedEncodingException e) { - throw new Error(e); - } - } - ) - ); - Collections.sort(nameAndValues); - return chain.proceed( - request.newBuilder() - .url(httpUrl.newBuilder() - .encodedQuery(BilibiliSecurityHelper.addSignToQuery(nameAndValues, bilibiliClientProperties.getAppSecret())) - .build() - ).build() - ); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/LiveService.java b/src/main/java/com/hiczp/bilibili/api/live/LiveService.java deleted file mode 100644 index a752db6..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/LiveService.java +++ /dev/null @@ -1,635 +0,0 @@ -package com.hiczp.bilibili.api.live; - -import com.hiczp.bilibili.api.BilibiliClientProperties; -import com.hiczp.bilibili.api.live.entity.*; -import retrofit2.Call; -import retrofit2.http.*; - -/** - * 常见参数含义 - * mid: 用户 id, 也可能是指主播的用户 id - * cid: 房间 id, 可以指 room_id 也可以指 show_room_id, 推荐所有 API 都使用 room_id 进行访问 - */ -public interface LiveService { - /** - * 获取弹幕设置 - * - * @param type 必须是 "all", 否则返回的所有字段的值都是 0 - */ - @GET("AppRoom/danmuConfig") - Call getBulletScreenConfig(@Query("type") String type); - - /** - * 获取弹幕设置的快捷调用 - */ - default Call getBulletScreenConfig() { - return getBulletScreenConfig("all"); - } - - /** - * 获得房间的历史弹幕(十条) - * - * @param roomId 房间号 - */ - @GET("AppRoom/msg") - Call getHistoryBulletScreens(@Query("room_id") long roomId); - - /** - * 获取直播间信息 - * 登录后访问该 API 将在服务器新增一条直播间观看历史 - * - * 2018-05-11 现在用假的房间 ID 也能获得正确的信息 - * - * @param roomId 房间号 - */ - @GET("AppRoom/index") - Call getRoomInfo(@Query("room_id") long roomId); - - /** - * 获得是否关注了一个主播 - * - * @param hostUserId 主播的用户 ID - * @return 未登录时返回 401 - */ - @POST("feed/v1/feed/isFollowed") - Call isFollowed(@Query("follow") long hostUserId); - - //TODO sendDaily - //该 API 意义不明 - @GET("AppBag/sendDaily") - Call sendDaily(); - - /** - * 获得所有礼物的列表 - */ - @GET("AppIndex/getAllItem") - Call getAllItem(); - - /** - * 查看可用的小电视抽奖 - * - * @param roomId 房间号 - * @return 当目标房间没有可用的小电视抽奖时返回 -400 - */ - @GET("AppSmallTV/index") - Call getAppSmallTV(@Query("roomid") long roomId); - - /** - * 参与小电视抽奖 - * 房间号必须与小电视号对应 - * SYS_MSG 里面取得的小电视编号是一个字符串, 实际上它肯定是一个数字 - * - * @param roomId 房间号 - * @param tvId 小电视号 - * @return 目标小电视不存在时(房间号与小电视号不匹配时也视为不存在)返回 -400 "不存在小电视信息" - */ - @POST("AppSmallTV/join") - Call joinAppSmallTV(@Query("roomid") long roomId, @Query("id") String tvId); - - /** - * 通过 getAppSmallTV 取得的小电视编号是一个数字 - * - * @param roomId 房间号 - * @param tvId 小电视号 - */ - default Call joinAppSmallTV(long roomId, long tvId) { - return joinAppSmallTV(roomId, String.valueOf(tvId)); - } - - /** - * 获得小电视抽奖结果(不访问这个 API, 奖励也会自动进入背包) - * - * @param tvId 小电视号 - * @return 返回内容中的 status 为 0 时, 表示返回正常开奖结果, 1 为没有参与抽奖或小电视已过期, 2 为正在开奖过程中 - */ - @GET("AppSmallTV/getReward") - Call getAppSmallTVReward(@Query("id") long tvId); - - /** - * 获得所有头衔的列表 - * 这里的 Title 是头衔的意思 - */ - @GET("appUser/getTitle") - Call getTitle(); - - //TODO 查看房间里是否有节奏风暴 - @GET("SpecialGift/room/{roomId}") - Call getSpecialGift(@Path("roomId") long roomId); - //TODO 参与节奏风暴抽奖 - //TODO 查看节奏风暴奖励 - - /** - * 获取自己的用户信息(live 站的个人信息, 非总站) - * - * @return 未登录时返回 3 - */ - @GET("mobile/getUser") - Call getUserInfo(); - - /** - * 获取一个直播间的流地址(flv) - * - * @param cid 必须用实际的 room_id, 不能使用 show_room_id, 否则得不到 playUrl. 实际 room_id 要首先通过 getRoomInfo() 获取 - * @param outputType 为固定值 "json", 否则返回一个空的 JsonArray (以前是返回一个 XML) - */ - @GET("api/playurl") - Call getPlayUrl(@Query("cid") long cid, @Query("otype") String outputType); - - /** - * 获取直播间推流地址的快捷调用 - * - * @param cid 房间号 - */ - default Call getPlayUrl(long cid) { - return getPlayUrl(cid, "json"); - } - - /** - * 获取当前这段时间的活动(不定期活动, 每次持续几周)和信仰任务 - * - * @param roomId 房间号 - */ - @GET("activity/v1/Common/mobileActivity") - Call getMobileActivity(@Query("roomid") long roomId); - - /** - * 获取用户的信仰任务列表 - * - * @return 2018-02 现在只有 double_watch_task 这个任务是有效的 - */ - @GET("activity/v1/task/user_tasks") - Call getUserTasks(); - - /** - * 领取一个信仰任务 - * - * @param taskId 任务名 - * @return 任务未完成或者已领取返回 -400 - */ - @POST("activity/v1/task/receive_award") - Call receiveUserTaskAward(@Query("task_id") String taskId); - - /** - * 领取 double_watch_task 任务的奖励 - */ - default Call receiveDoubleWatchTaskAward() { - return receiveUserTaskAward("double_watch_task"); - } - - //TODO 查看一个房间是否有活动抽奖 - //TODO 参与活动抽奖 - //TODO 查看活动抽奖奖励 - - /** - * 发送一个 Restful 心跳包, 五分钟一次. 这被用于统计观看直播的时间, 可以提升观众等级 - * 2018-03-06 开始, 只有老爷才能通过观看直播获得经验 - * - * @param roomId 房间号 - * @param scale 屏幕大小 - * @return 未登录时返回 3 - */ - @POST("mobile/userOnlineHeart") - @FormUrlEncoded - Call sendOnlineHeart(@Field("room_id") long roomId, @Field("scale") String scale); - - /** - * 发送心跳包的快捷调用 - * - * @param roomId 房间号 - */ - default Call sendOnlineHeart(long roomId) { - return sendOnlineHeart(roomId, BilibiliClientProperties.defaultSetting().getScale()); - } - - /** - * 发送一条弹幕 - * - * @param roomId 房间号 - * @param userId 自己的用户 ID - * @param message 内容 - * @param random 随机数 - * @param mode 弹幕模式 - * @param pool 弹幕池 - * @param type 必须为 "json" - * @param color 颜色 - * @param fontSize 字体大小 - * @param playTime 播放时间 - * @see BulletScreenEntity - */ - @POST("api/sendmsg") - @FormUrlEncoded - Call sendBulletScreen(@Field("cid") long roomId, - @Field("mid") long userId, - @Field("msg") String message, - @Field("rnd") long random, - @Field("mode") int mode, - @Field("pool") int pool, - @Field("type") String type, - @Field("color") int color, - @Field("fontsize") int fontSize, - @Field("playTime") String playTime); - - /** - * 发送弹幕的快捷调用 - * - * @param bulletScreenEntity 弹幕实体类 - */ - default Call sendBulletScreen(BulletScreenEntity bulletScreenEntity) { - return sendBulletScreen( - bulletScreenEntity.getRoomId(), - bulletScreenEntity.getUserId(), - bulletScreenEntity.getMessage(), - bulletScreenEntity.getRandom(), - bulletScreenEntity.getMode(), - bulletScreenEntity.getPool(), - bulletScreenEntity.getType(), - bulletScreenEntity.getColor(), - bulletScreenEntity.getFontSize(), - bulletScreenEntity.getPlayTime() - ); - } - - /** - * 获取下一个宝箱任务的信息 - */ - @GET("mobile/freeSilverCurrentTask") - Call getFreeSilverCurrentTask(); - - /** - * 领取宝箱 - */ - @GET("mobile/freeSilverAward") - Call getFreeSilverAward(); - - /** - * 查看自己的背包(礼物) - */ - @GET("AppBag/playerBag") - Call getPlayerBag(); - - /** - * 查看哪些礼物是活动礼物, 在客户端上, 活动礼物会有一个右上角标记 "活动" - * - * @param roomId 房间号 - */ - @GET("AppRoom/activityGift") - Call getActivityGifts(@Query("room_id") long roomId); - - /** - * 送礼物 - * - * @param giftId 礼物 ID - * @param number 数量 - * @param roomUserId 主播的用户 ID - * @param roomId 房间号 - * @param timeStamp 时间戳 - * @param bagId 礼物在自己背包里的 ID - * @param random 随机数 - * @return roomUserId 与 roomId 不匹配时返回 200012 - * bagId 错误时(背包里没有这个礼物)返回 200019 - */ - @POST("AppBag/send") - @FormUrlEncoded - Call sendGift(@Field("giftId") long giftId, - @Field("num") long number, - @Field("ruid") long roomUserId, - @Field("roomid") long roomId, - @Field("timestamp") long timeStamp, - @Field("bag_id") long bagId, - @Field("rnd") long random); - - /** - * 送礼物的快捷调用 - * - * @param giftEntity 礼物实体类 - */ - default Call sendGift(GiftEntity giftEntity) { - return sendGift( - giftEntity.getGiftId(), - giftEntity.getNumber(), - giftEntity.getRoomUserId(), - giftEntity.getRoomId(), - giftEntity.getTimeStamp(), - giftEntity.getBagId(), - giftEntity.getRandom() - ); - } - - /** - * 获得礼物榜(七日榜) - * - * @param roomId 房间号 - */ - @GET("AppRoom/getGiftTop") - Call getGiftTop(@Query("room_id") int roomId); - - /** - * "直播" 页面(这个页面对应的后台数据, 包括 banner, 推荐主播, 各种分区的推荐等) - * - * @param device 这个 API 会读取 "_device"(固定参数) 或者 "device" 来判断平台, 只需要有一个就能正常工作, 客户端上是两个都有, 且值都为 "android" - */ - @GET("room/v1/AppIndex/getAllList") - Call getAllList(@Query("device") String device); - - /** - * 获取 "直播" 页面数据的快捷调用 - */ - default Call getAllList() { - return getAllList("android"); - } - - /** - * 刷新 "推荐主播" 区域, 必须有 device, platform, scala - * scala 为 xxhdpi 时返回 12 个, 客户端显示六个, 刷新两次后再次访问该 API - * 该 API 返回的内容结构与 getAllList 返回的内容中的 recommend_data 字段是一样的 - * 该 API 返回的 banner_data 是在普通分区的推荐的上面的那个 banner, 在新版 APP 中, 点击这个 banner 会固定的跳转到 bilibili 相簿的 画友 标签页 - * - * @param device 设备类型 - */ - @GET("room/v1/AppIndex/recRefresh") - Call recommendRefresh(@Query("device") String device); - - /** - * 刷新 "推荐主播" 区域 的快捷调用 - */ - default Call recommendRefresh() { - return recommendRefresh("android"); - } - - /** - * 获取对应分类和状态的直播间 - * - * @param areaId 分区 ID - * @param categoryId 不明确其含义 - * @param parentAreaId 父分区 ID - * @param sortType 排序方式 - * @param page 页码, 可以为 null(第一页) - */ - @GET("room/v1/Area/getRoomList") - Call getRoomList( - @Query("area_id") int areaId, - @Query("cate_id") int categoryId, - @Query("parent_area_id") int parentAreaId, - @Query("sort_type") String sortType, - @Query("page") Long page - ); - - /** - * 直播页面 下面的 普通分区(复数) 的刷新, 一次会返回 20 个结果, 客户端显示 6 个, 数据用完了之后再次访问该 API - * - * @param parentAreaId 父分区 ID - */ - default Call getRoomList(int parentAreaId) { - return getRoomList(0, 0, parentAreaId, "dynamic", null); - } - - /** - * 直播 -> 某个分区 -> 查看更多 - * 获取该页面上方的分类标签 - * - * @param parentAreaId 父分区 ID - */ - @GET("room/v1/Area/getList") - Call getAreaList(@Query("parent_id") int parentAreaId); - - /** - * 获取该页面下的的直播间(areaId 为 0 表示选择了 "全部"(上方的分类标签), areaId 如果和 parentAreaId 不匹配将返回空的 data 字段) - * - * @param areaId 分区 ID - * @param parentAreaId 父分区 ID - * @param page 页码 - */ - default Call getRoomList(int areaId, int parentAreaId, long page) { - return getRoomList(areaId, 0, parentAreaId, "online", page); - } - - /** - * 直播 -> 全部直播(直播页面的最下面的一个按钮) - * - * @param areaId 分区 ID - * @param page 页码 - * @param sort 分类 - */ - @GET("mobile/rooms") - Call getRooms(@Query("area_id") int areaId, @Query("page") int page, @Query("sort") String sort); - - /** - * 推荐直播 - * - * @param page 页码 - */ - default Call getSuggestionRooms(int page) { - return getRooms(0, page, "suggestion"); - } - - /** - * 最热直播 - * - * @param page 页码 - */ - default Call getHottestRooms(int page) { - return getRooms(0, page, "hottest"); - } - - /** - * 最新直播 - * - * @param page 页码 - */ - default Call getLatestRooms(int page) { - return getRooms(0, page, "latest"); - } - - /** - * 视频轮播 - * - * @param page 页码 - */ - default Call getRoundRooms(int page) { - return getRooms(0, page, "roundroom"); - } - - /** - * live 站的搜索("直播" 页面) - * - * @param keyword 关键字 - * @param page 页码 - * @param pageSize 页容量 - * @param type 为 room 时只返回 房间 的搜索结果, 为 user 时只返回 用户 的搜索结果, all 时 房间 与 用户 的搜索结果都有 - */ - @GET("AppSearch/index") - Call search(@Query("keyword") String keyword, @Query("page") long page, @Query("pagesize") long pageSize, @Query("type") String type); - - /** - * 搜索的快捷调用 - * - * @param keyword 关键字 - * @param page 页码 - * @param pageSize 页容量 - */ - default Call search(String keyword, long page, long pageSize) { - return search(keyword, page, pageSize, "all"); - } - - /** - * 侧拉抽屉 -> 直播中心 -> 右上角日历图标 - * 签到(live 站签到, 非总站(虽然我也不知道总站有没有签到功能)) - * - * @return 无论是否已经签到, 返回的 code 都是 0. 除了字符串比对, 要想知道是否已经签到要通过 getUserInfo().getIsSign() - */ - @GET("AppUser/getSignInfo") - Call getSignInfo(); - - /** - * 侧拉抽屉 -> 直播中心 -> 我的关注 - * 获得关注列表 - * 未登录时返回 32205 - * - * @param page 页码 - * @param pageSize 页容量 - */ - @GET("AppFeed/index") - Call getFollowedHosts(@Query("page") long page, @Query("pagesize") long pageSize); - - /** - * 侧拉抽屉 -> 直播中心 -> 观看历史 - * - * @param page 页码 - * @param pageSize 页容量 - */ - @GET("AppUser/history") - Call getHistory(@Query("page") long page, @Query("pagesize") long pageSize); - - /** - * 佩戴中心 - * 侧拉抽屉 -> 直播中心 -> 佩戴中心 -> 粉丝勋章 - * 获得用户拥有的粉丝勋章 - */ - @GET("AppUser/medal") - Call getMyMedalList(); - - /** - * 佩戴粉丝勋章 - * - * @param medalId 勋章 ID - */ - @POST("AppUser/wearMedal") - Call wearMedal(@Query("medal_id") int medalId); - - /** - * 取消佩戴粉丝勋章(取消佩戴当前佩戴着的粉丝勋章) - * URL 上的 canel 不是拼写错误, 它原本就是这样的 - */ - @GET("AppUser/canelMedal") - Call cancelMedal(); - - /** - * 侧拉抽屉 -> 直播中心 -> 佩戴中心 -> 我的头衔 - * 获得用户拥有的头衔 - */ - @GET("appUser/myTitleList") - Call getMyTitleList(); - - /** - * 获得当前佩戴着的头衔的详情 - * - * @return 当前未佩戴任何东西时, 返回的 code 为 -1, message 为 "nodata" - */ - @GET("appUser/getWearTitle") - Call getWearTitle(); - - /** - * 佩戴头衔 - * - * @param title 头衔名 - */ - @POST("AppUser/wearTitle") - Call wearTitle(@Query("title") String title); - - /** - * 取消佩戴头衔(取消佩戴当前佩戴着的头衔) - */ - @GET("appUser/cancelTitle") - Call cancelTitle(); - - //TODO 头衔工坊(没有可升级头衔, 暂不明确此 API) - - /** - * 侧拉抽屉 -> 直播中心 -> 获奖记录 - * 获得用户的获奖记录 - */ - @GET("AppUser/awards") - Call getAwardRecords(); - - /** - * 瓜子商店 - * 侧拉抽屉 -> 直播中心 -> 瓜子商店 -> 银瓜子兑换 -> 硬币银瓜子互换 -> 兑换硬币 - * 将 700 银瓜子兑换为 1 硬币, 每个用户每天只能换一次 - * - * @return 已经兑换过时返回 403 - * 2018-03-15 访问此 API 必须有一个合法的 UA, 否则返回 65530 - */ - @POST("AppExchange/silver2coin") - Call silver2Coin(); - - /** - * 扭蛋机 - * 侧拉抽屉 -> 直播中心 -> 扭蛋机 -> 普通扭蛋 - * 获得 扭蛋机(普通扭蛋) 这个页面对应的后台数据 - */ - @GET("AppUser/capsuleInfo") - Call getCapsuleInfo(); - - /** - * 抽扭蛋 - * - * @param count 数量, 只能为 1, 10, 100 - * @param type 扭蛋类型, 只能为 "normal" 或 "colorful" - */ - @POST("AppUser/capsuleInfoOpen") - @FormUrlEncoded - Call openCapsule(@Field("count") int count, @Field("type") String type); - - /** - * 抽普通扭蛋 - * 侧拉抽屉 -> 直播中心 -> 扭蛋机 -> 普通扭蛋 -> 扭 - * 普通扭蛋的 type 为 "normal" - * - * @param count 数量, 只能为 1, 10, 100 - */ - default Call openNormalCapsule(int count) { - return openCapsule(count, "normal"); - } - - /** - * 抽梦幻扭蛋 - * - * @param count 数量, 只能为 1, 10, 100 - */ - default Call openColorfulCapsule(int count) { - return openCapsule(count, "colorful"); - } - - /** - * 房间设置 - * 侧拉抽屉 -> 直播中心 -> 房间设置 -> (上面的个人信息, 包括 房间号, 粉丝数, UP 经验) - * 根据用户 ID 来获取房间信息, 通常用于获取自己的直播间信息(可以用来获取他人的房间信息) - * 该 API 不会增加直播间观看历史 - * - * @param userId 用户 ID - */ - @GET("assistant/getRoomInfo") - Call getAssistantRoomInfo(@Query("uId") long userId); - - /** - * 侧拉抽屉 -> 直播中心 -> 房间设置 -> 我的封面 - * 获取自己的直播间的封面 - * - * @param roomId 房间号 - * @return 获取其他人的封面会 -403 - */ - @GET("mhand/assistant/getCover") - Call getCover(@Query("roomId") long roomId); - - //TODO 粉丝勋章(尚未达到开通粉丝勋章的最低要求, 无法对该 API 截包) -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenConstDefinition.java b/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenConstDefinition.java deleted file mode 100644 index eff2950..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenConstDefinition.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.hiczp.bilibili.api.live.bulletScreen; - -public class BulletScreenConstDefinition { - public static final int DEFAULT_MESSAGE_LENGTH_LIMIT = 20; -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenHelper.java b/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenHelper.java deleted file mode 100644 index 6bdb5a3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenHelper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.hiczp.bilibili.api.live.bulletScreen; - -import javax.annotation.Nonnull; - -public class BulletScreenHelper { - public static String[] splitMessageByFixedLength(@Nonnull String message, int lengthLimit) { - int count = message.length() / lengthLimit; - if (message.length() % lengthLimit != 0) { - count++; - } - String[] messages = new String[count]; - for (int i = 0; i < count; i++) { - messages[i] = message.substring(i * lengthLimit, i != count - 1 ? (i + 1) * lengthLimit : message.length()); - } - return messages; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenSendingCallback.java b/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenSendingCallback.java deleted file mode 100644 index 0171e22..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenSendingCallback.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.bulletScreen; - -import com.hiczp.bilibili.api.live.entity.BulletScreenEntity; -import com.hiczp.bilibili.api.live.entity.SendBulletScreenResponseEntity; - -public interface BulletScreenSendingCallback { - void onResponse(BulletScreenEntity bulletScreenEntity, SendBulletScreenResponseEntity sendBulletScreenResponseEntity); - - void onFailure(BulletScreenEntity bulletScreenEntity, Throwable throwable); -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenSendingTask.java b/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenSendingTask.java deleted file mode 100644 index 1b06865..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/bulletScreen/BulletScreenSendingTask.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.hiczp.bilibili.api.live.bulletScreen; - -import com.hiczp.bilibili.api.live.entity.BulletScreenEntity; -import com.hiczp.bilibili.api.provider.BilibiliServiceProvider; - -public class BulletScreenSendingTask { - private BilibiliServiceProvider bilibiliServiceProvider; - private BulletScreenEntity bulletScreenEntity; - private BulletScreenSendingCallback bulletScreenSendingCallback; - - public BulletScreenSendingTask(BilibiliServiceProvider bilibiliServiceProvider, BulletScreenEntity bulletScreenEntity, BulletScreenSendingCallback bulletScreenSendingCallback) { - this.bilibiliServiceProvider = bilibiliServiceProvider; - this.bulletScreenEntity = bulletScreenEntity; - this.bulletScreenSendingCallback = bulletScreenSendingCallback; - } - - public BilibiliServiceProvider getBilibiliServiceProvider() { - return bilibiliServiceProvider; - } - - public BulletScreenEntity getBulletScreenEntity() { - return bulletScreenEntity; - } - - public BulletScreenSendingCallback getBulletScreenSendingCallback() { - return bulletScreenSendingCallback; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/ActivityGiftsEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/ActivityGiftsEntity.java deleted file mode 100644 index 4846927..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/ActivityGiftsEntity.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; -import java.util.Map; - -public class ActivityGiftsEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : [{"id":102,"bag_id":48843715,"name":"秘银水壶","num":9,"img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-102.png?20171010161652","gift_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/102.gif?20171010161652","combo_num":5,"super_num":225,"count_set":"1,5,9","count_map":{"1":"","5":"连击","9":"全部"}}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - public static class Data { - /** - * id : 102 - * bag_id : 48843715 - * name : 秘银水壶 - * num : 9 - * img : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-102.png?20171010161652 - * gift_url : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/102.gif?20171010161652 - * combo_num : 5 - * super_num : 225 - * count_set : 1,5,9 - * count_map : {"1":"","5":"连击","9":"全部"} - */ - - @SerializedName("id") - private int id; - @SerializedName("bag_id") - private int bagId; - @SerializedName("name") - private String name; - @SerializedName("num") - private int number; - @SerializedName("img") - private String img; - @SerializedName("gift_url") - private String giftUrl; - @SerializedName("combo_num") - private int comboNum; - @SerializedName("super_num") - private int superNum; - @SerializedName("count_set") - private String countSet; - @SerializedName("count_map") - private Map countMap; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getBagId() { - return bagId; - } - - public void setBagId(int bagId) { - this.bagId = bagId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public String getGiftUrl() { - return giftUrl; - } - - public void setGiftUrl(String giftUrl) { - this.giftUrl = giftUrl; - } - - public int getComboNum() { - return comboNum; - } - - public void setComboNum(int comboNum) { - this.comboNum = comboNum; - } - - public int getSuperNum() { - return superNum; - } - - public void setSuperNum(int superNum) { - this.superNum = superNum; - } - - public String getCountSet() { - return countSet; - } - - public void setCountSet(String countSet) { - this.countSet = countSet; - } - - public Map getCountMap() { - return countMap; - } - - public void setCountMap(Map countMap) { - this.countMap = countMap; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/AllListEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/AllListEntity.java deleted file mode 100644 index 8ba1653..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/AllListEntity.java +++ /dev/null @@ -1,1702 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class AllListEntity extends ResponseEntity { - /** - * code : 0 - * msg : ok - * message : ok - * data : {"banner":[{"title":"直播周刊","img":"https://i0.hdslb.com/bfs/live/af17c8d882104370075f4fa5418343861ac3e540.png","remark":"直播周刊","link":"https://live.bilibili.com/AppBanner/index?id=746"}],"entranceIcons":[{"id":9,"name":"绘画专区","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/9_big.png?20171116172700","height":"132","width":"132"}},{"id":8,"name":"萌宅推荐","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/8_big.png?20171116172700","height":"132","width":"132"}},{"id":3,"name":"网络游戏","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/3_big.png?20171116172700","height":"132","width":"132"}},{"id":1,"name":"单机联机","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/1_big.png?20171116172700","height":"132","width":"132"}},{"id":4,"name":"电子竞技","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/4_big.png?20171116172700","height":"132","width":"132"}}],"partitions":[{"partition":{"id":1,"name":"娱乐","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/1_3x.png?201709151052","height":"63","width":"63"},"count":1484},"lives":[{"roomid":7399897,"uid":7619276,"title":"包裹有免费B坷垃可送哦(点这看直播单)","uname":"星子弈风","online":145,"user_cover":"https://i0.hdslb.com/bfs/live/7fc54c49ed7db4bc53fe6e5c8888db3eb0c01d7c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/7399897.jpg?03020945","show_cover":false,"link":"/7399897","face":"https://i2.hdslb.com/bfs/face/41c4b60b54795870ac4d209dc949a51ca7614062.jpg","parent_id":1,"parent_name":"娱乐","area_id":123,"area_name":"户外","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/415156/live_7619276_6963984.flv?wsSecret=26f02e69c2e01fc840da1f452d673f37&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":2802503,"uid":34993653,"title":"做个温柔读书哄睡的小姐姐","username":"楚小芭","online":958,"user_cover":"https://i0.hdslb.com/bfs/live/33e9537f94545758035b14a59a68fd1b78f8184b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/2802503.jpg?03020945","show_cover":false,"link":"/2802503","face":"https://i0.hdslb.com/bfs/face/41a917cb13f546e62bfea4e06a7781d8118c676e.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/368878/live_34993653_4247645.flv?wsSecret=01587e645b73cfeec12992ac3f3b8288&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":910884,"uid":20165629,"title":"跟我走!","username":"共青团中央","online":15974,"user_cover":"https://i0.hdslb.com/bfs/live/2591ba98c2db7da32dd40ac100322ab8d9a218c6.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/910884.jpg?03020946","show_cover":false,"link":"/910884","face":"https://i0.hdslb.com/bfs/face/3b4caf3ad325fd962bf98f90e4aac0b4ae4679c8.jpg","parent_id":1,"parent_name":"娱乐","area_id":123,"area_name":"户外","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/377121/live_20165629_5904889.flv?wsSecret=88113f81c6eb29be592c43d4cbaddc0c&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":30040,"uid":5480206,"title":"破产 弹到一半随时卖琴","username":"桥白白白白","online":955,"user_cover":"https://i0.hdslb.com/bfs/live/f7ac32e981f4cd7b0bf6733ba79e705dd312e8f4.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/30040.jpg?03020946","show_cover":false,"link":"/5454","face":"https://i1.hdslb.com/bfs/face/67ba6957182bb865c8b4b5fd9006778af0cf9f71.jpg","parent_id":1,"parent_name":"娱乐","area_id":143,"area_name":"才艺","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/680310/live_5480206_332_c521e483.flv?wsSecret=0d2d608349a38973aaded375418ceca3&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":1338247,"uid":27894414,"title":"来呀来呀造人呀!造人人人人人人人!","username":"露琪亚Rukiaルキア","online":78,"user_cover":"https://i0.hdslb.com/bfs/live/b5accf156795b0e24c406bb2debe3448032e13fd.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1338247.jpg?03020946","show_cover":false,"link":"/1338247","face":"https://i0.hdslb.com/bfs/face/b4dda315df2c9ffcc5f378b5871932e42122c567.jpg","parent_id":1,"parent_name":"娱乐","area_id":25,"area_name":"手工","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/558698/live_27894414_1428176.flv?wsSecret=1189d19dfda8cc47ae10d258ae9be26a&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":4346987,"uid":30580510,"title":"你来喵~一声,我也会喵~给你听哟~","username":"是白米不是黑米","online":368,"user_cover":"https://i0.hdslb.com/bfs/live/4f10d04cfebc28bc48a7d9be2f9fb91d83c7226f.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/4346987.jpg?03020946","show_cover":false,"link":"/4346987","face":"https://i0.hdslb.com/bfs/face/f7e093a0613af8cf95ca684deb0fbfa7b2ab2ba3.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/723153/live_30580510_8427291.flv?wsSecret=cb1dd97e388bde304a3aedeab071ca87&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]},{"partition":{"id":2,"name":"游戏","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/2_3x.png?201709151052","height":"63","width":"63"},"count":1075},"lives":[{"roomId":34180,"uid":10404286,"title":"一枪一个嘤嘤宝","username":"红发杰克丶","online":8502,"user_cover":"https://i0.hdslb.com/bfs/live/771bd280cc478e2816ff0d4dbd66c3e6709d6cc8.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/34180.jpg?03020946","show_cover":false,"link":"/260","face":"https://i2.hdslb.com/bfs/face/ea5235b1c9d9ce2604c37bcef2c0ef965d3b5589.jpg","parent_id":2,"parent_name":"游戏","area_id":80,"area_name":"绝地求生:大逃杀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/756124/live_10404286_9705271.flv?wsSecret=8dd39659dea6f9d0a0163330f50beda4&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":109950,"uid":28761888,"title":"莽夫の686天下无敌","username":"女粉巨多的楠叔","online":6494,"user_cover":"https://i0.hdslb.com/bfs/live/017cc1afcb9ce8cfe253a8566070866db64762e7.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/109950.jpg?03020945","show_cover":false,"link":"/109950","face":"https://i1.hdslb.com/bfs/face/87b5dac33b652e9a15d5f4659ca2daf0e14cd29f.jpg","parent_id":2,"parent_name":"游戏","area_id":80,"area_name":"绝地求生:大逃杀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/406802/live_28761888_7951947.flv?wsSecret=2fb2a0316d5c07642a0b202e44a84fe2&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":34085,"uid":13376263,"title":"大家一起怂!!","username":"国家一级loli饲养员","online":1805,"user_cover":"https://i0.hdslb.com/bfs/live/409d4b33bd89c63729b9a4721b7f7fa5063939ad.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/34085.jpg?03020946","show_cover":false,"link":"/34085","face":"https://i0.hdslb.com/bfs/face/a742e7a99884a070570f21e33854d10abbc3b8bb.jpg","parent_id":2,"parent_name":"游戏","area_id":107,"area_name":"其他游戏","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/331431/live_13376263_5317554.flv?wsSecret=d9337ad7717b7ea474443062759c1147&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":280446,"uid":8192168,"title":"大家元宵节快乐!记得吃汤圆!","username":"叶落莫言","online":49474,"user_cover":"https://i0.hdslb.com/bfs/live/09356a3593cf0d67dee99aefe766ebac2a1d45f3.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/280446.jpg?03020945","show_cover":false,"link":"/387","face":"https://i1.hdslb.com/bfs/face/37bfd9a9f40eb9ff52b697e204386ab918ccd742.jpg","parent_id":2,"parent_name":"游戏","area_id":80,"area_name":"绝地求生:大逃杀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/563981/live_8192168_5923385.flv?wsSecret=d6f6edd11376d1601d5e14c31ede6f15&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":5600543,"uid":38353550,"title":"我的世界吸血鬼暮色星系生存~~~","username":"丿灬丶落叶FL","online":994,"user_cover":"https://i0.hdslb.com/bfs/live/d782cb8221026b610d4759f214cc5d15d16251ef.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5600543.jpg?03020946","show_cover":false,"link":"/5600543","face":"https://i1.hdslb.com/bfs/face/cf290155d42fd8ca29818197bbda501b7b8656e0.jpg","parent_id":2,"parent_name":"游戏","area_id":56,"area_name":"我的世界","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/607990/live_38353550_9136170.flv?wsSecret=5f0bc0853e5c0cfcf9d36b6c3ed8fd1d&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":22237,"uid":1772434,"title":"饥荒联机智能敌对地狱模式。作死?嗯!","username":"暮思橙月","online":19194,"user_cover":"https://i0.hdslb.com/bfs/live/0db51626ac6affae89e8e43345e5b8d6e6b95cfa.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/22237.jpg?03020946","show_cover":false,"link":"/531","face":"https://i1.hdslb.com/bfs/face/9e0333da3070d39de806c01106081098011b894e.jpg","parent_id":2,"parent_name":"游戏","area_id":107,"area_name":"其他游戏","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/672474/live_1772434_332_c521e483.flv?wsSecret=723497319c91e7a79c955de0132b431b&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]},{"partition":{"id":3,"name":"手游","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/3_3x.png?201709151052","height":"63","width":"63"},"count":473},"lives":[{"roomId":1218338,"uid":28046227,"title":"(乖巧)颜值主播不谈技术0-0","username":"惆怅玉米头","online":1034,"user_cover":"https://i0.hdslb.com/bfs/live/41139d3b1a5e5e89aead6fb8d8b0e685633eb2c9.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1218338.jpg?03020945","show_cover":false,"link":"/1218338","face":"https://i2.hdslb.com/bfs/face/3da294e650d153612421142cf351266b3a0688c4.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://xl.live-play.acgvideo.com/live-xl/320746/live_28046227_3518126.flv?wsSecret=5a57987578c27250e24bfde48e30d34e&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":4036239,"uid":101242935,"title":"王者,,,,坑,了解一下吧","username":"雨季youyou","online":7,"user_cover":"https://i0.hdslb.com/bfs/live/f22672b27a7164f4058002c8727f69148ec08557.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/4036239.jpg?03020946","show_cover":false,"link":"/4036239","face":"https://i2.hdslb.com/bfs/face/20bf5098724f50e357a38507f82b7c463165e9f0.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/176213/live_101242935_2718900.flv?wsSecret=68df597274c6afbb224252ff45f79c77&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":3269664,"uid":77545560,"title":"好厉害的花木兰","username":"海岛情话","online":4295,"user_cover":"https://i0.hdslb.com/bfs/live/23342613fb41f1cf9523e79404ef3c69a641c904.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/3269664.jpg?03020945","show_cover":false,"link":"/3269664","face":"https://i0.hdslb.com/bfs/face/ad1cfde69fc3afd79b6a21ddd0e3a7cd9992932e.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/453762/live_77545560_5747022.flv?wsSecret=a4108497e7509dc13c2926de1087bd37&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":9610655,"uid":296520363,"title":"永生之夜的直播间","username":"永生之夜","online":29,"user_cover":"https://i0.hdslb.com/bfs/live/c5567f3923a7662753bf136a65f6f788b8916cb9.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/9610655.jpg?03020946","show_cover":false,"link":"/9610655","face":"https://i0.hdslb.com/bfs/face/d1c6b761b0de659aa3add519bdab0e510551150a.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/378600/live_296520363_1459790.flv?wsSecret=0cabcb12cdaa6794cbdb326f82705eec&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":6636042,"uid":16689737,"title":"都老师在线 (黑色幸存者)","username":"中文丶丶丶","online":1099,"user_cover":"https://i0.hdslb.com/bfs/live/b7bada8de2138de4183093f01d741ed7928a6c1b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/6636042.jpg?03020945","show_cover":false,"link":"/6636042","face":"https://i1.hdslb.com/bfs/face/b7945826ec45a40785e593fbbc73b4648eda6fd1.jpg","parent_id":3,"parent_name":"手游","area_id":98,"area_name":"其他手游","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/606287/live_16689737_5840082.flv?wsSecret=4135a775eee475ae1df1f6939de05008&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":3054160,"uid":75593922,"title":"神奇女侠专场,抢先体验?!","username":"羽为CHENG","online":11654,"user_cover":"https://i0.hdslb.com/bfs/live/5925758a0364d365d75233c544ef492cd30bdbd5.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/3054160.jpg?03020945","show_cover":false,"link":"/3054160","face":"https://i0.hdslb.com/bfs/face/0bf0bba23c6ce03ff3bffde3e97be02d9f4044cd.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/469985/live_75593922_5603101.flv?wsSecret=e3fd90584e3d0714498973d932595a48&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]},{"partition":{"id":4,"name":"绘画","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/4_3x.png?201709151052","height":"63","width":"63"},"count":67},"lives":[{"roomId":73945,"uid":5050136,"title":"【爽到】やっばり。小学生赛高だぜ!!!!","username":"Kirito丶桐人君","online":869,"user_cover":"https://i0.hdslb.com/bfs/live/375e1b19a907b9cfa85dbd41f6ab98f6ac5a602a.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/73945.jpg?03020946","show_cover":false,"link":"/73945","face":"https://i2.hdslb.com/bfs/face/56157d60c8c2c0b8f7e137262bbb2e577c95c7a0.png","parent_id":4,"parent_name":"绘画","area_id":95,"area_name":"临摹绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/267298/live_5050136_7329209.flv?wsSecret=a85ef18a73794de63ba80732bf2d0ccc&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":3593269,"uid":44966419,"title":"教你怎么用鼠绘阿松们(伪)","username":"那就叫ichi吧","online":14,"user_cover":"https://i0.hdslb.com/bfs/live/df748933bb924b479bbf77eb69302a5161c0a3e0.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/3593269.jpg?03020946","show_cover":false,"link":"/3593269","face":"https://i0.hdslb.com/bfs/face/754d6a58a695a9bf5738f0a253504c6941dbda78.jpg","parent_id":4,"parent_name":"绘画","area_id":94,"area_name":"同人绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/791676/live_44966419_4351969.flv?wsSecret=000a552750fa9243d6e1f97f981de7e8&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":95278,"uid":5030761,"title":"SAI 启动!","username":"深井玑","online":2520,"user_cover":"https://i0.hdslb.com/bfs/live/86f52149ab7ced43cad509348c831f346608b8bd.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/95278.jpg?03020946","show_cover":false,"link":"/314","face":"https://i1.hdslb.com/bfs/face/2feef28d962b0e5c8bbd573cffe84d5e13277747.jpg","parent_id":4,"parent_name":"绘画","area_id":94,"area_name":"同人绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/520270/live_5030761_7103241.flv?wsSecret=3da3ddd8bd44a98152f44a824482dbea&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":5790845,"uid":35331809,"title":"睡不着来画个简单的指绘","username":"深海菠萝屋中的海绵","online":1201,"user_cover":"https://i0.hdslb.com/bfs/live/8e6400f2c40050e010baaa92c6386b33f56aca74.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5790845.jpg?03020945","show_cover":false,"link":"/5790845","face":"https://i0.hdslb.com/bfs/face/04ba147d39ff7db59cf62bc959d28a48094f69df.jpg","parent_id":4,"parent_name":"绘画","area_id":95,"area_name":"临摹绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/195067/live_35331809_3420166.flv?wsSecret=94689ada71b574432d59350f3a1455cc&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomId":19582,"uid":1533649,"title":"胃疼!因为没有女朋友!","username":"绪奈夏目子丶","online":1576,"user_cover":"https://i0.hdslb.com/bfs/live/34b45ab63d81fec05e4b8549c3798e59051d7ed2.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/19582.jpg?03020946","show_cover":false,"link":"/19582","face":"https://i1.hdslb.com/bfs/face/00544b5a80fb73b3b5d8f6001268238aa7f078d9.jpg","parent_id":4,"parent_name":"绘画","area_id":51,"area_name":"原创绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/506577/live_1533649_8481907.flv?wsSecret=5475d2b7ab65bd8a55e62d488af828bd&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":67223,"uid":4836885,"title":"摸鱼","username":"酎六六六_","online":1698,"user_cover":"https://i0.hdslb.com/bfs/live/4162a6d4cadf4088a1e1fd7029bd40579dca8854.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/67223.jpg?03020945","show_cover":false,"link":"/310","face":"https://i2.hdslb.com/bfs/face/7ee4fc0d4e261badfd23460ffad4b003cb06deb7.jpg","parent_id":4,"parent_name":"绘画","area_id":51,"area_name":"原创绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/664283/live_4836885_1208886.flv?wsSecret=c71f698544d69ea97432985d01aca6a9&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]}],"star_show":{"partition":{"id":999,"name":"颜值领域","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-2_3x.png?201709151052","height":"63","width":"63"},"count":0,"hidden":0},"lives":[{"roomId":5495804,"uid":203267722,"title":"你点,我唱","username":"花优er","online":1298,"user_cover":"https://i0.hdslb.com/bfs/live/8881fca2f4d0d3b937767f5cacb4117966b9fea6.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5495804.jpg?03020946","show_cover":"https://i0.hdslb.com/bfs/vc/4c5126739114bb441cb3c12460a471733b1fe25a.jpg","link":"/5495804","face":"https://i0.hdslb.com/bfs/face/a44d19265a7c3240122dbe36d598d75a00acffd5.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/923710/live_203267722_7185906.flv?wsSecret=455db153c50c8adab57aa793f3c82ce8&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomId":151159,"uid":463999,"title":"元宵快乐~","username":"波喵喵喵","online":662,"user_cover":"https://i0.hdslb.com/bfs/live/76e08ebaa07fd12c80374447f0ea0691a920bb4c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/151159.jpg?03020947","show_cover":"https://i0.hdslb.com/bfs/vc/463336c59f976123a4358d819f161c0455a84308.jpg","link":"/280","face":"https://i0.hdslb.com/bfs/face/25ca9cca4fa9522c08b12b7de48a2509734fcd9d.jpg","parent_id":1,"parent_name":"娱乐","area_id":139,"area_name":"美少女","web_pendent":"weekRank","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/510065/live_463999_8651963.flv?wsSecret=10711c5b09edb0e3fba6094742ec842f&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"娱乐分区No.3"},{"roomId":68612,"uid":3311852,"title":"元宵节快乐","username":"璃猫タヌキ","online":13101,"user_cover":"https://i0.hdslb.com/bfs/live/fe4233635a6c1f207011bf0756a65f65695d0f65.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/68612.jpg?03020946","show_cover":"https://i0.hdslb.com/bfs/vc/73b0c3e319c6a30a737b77e1214df427334640cc.jpg","link":"/185","face":"https://i0.hdslb.com/bfs/face/232325726db9b91c85061686fc265f138ea7b544.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/921032/live_3311852_7248026.flv?wsSecret=9a220f6242a03b6e80dcd1e975ad40d8&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":8259977,"uid":278452410,"title":"别的小朋友都回家了你什么时候带我回家啊","username":"橙子斯密达","online":464,"user_cover":"https://i0.hdslb.com/bfs/live/177871a2418067b0443f81e5080563d1026f8c6b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/8259977.jpg?02111210","show_cover":"https://i0.hdslb.com/bfs/vc/9f6735c702b86286af0e32649310e1067aad943b.jpg","link":"/8259977","face":"https://i1.hdslb.com/bfs/face/12242421082cc3263ba3415e10f957d7ba751d9a.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/369622/live_278452410_6809315.flv?wsSecret=aba1d0fc8fec64a437e5289a6956d570&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""}]},"recommend_data":{"partition":{"id":0,"name":"推荐主播","area":"hot","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"},"count":3528},"banner_data":[{"cover":{"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320},"title":"今天,你的小视频上榜了吗?","is_clip":1,"new_cover":{"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320},"new_title":"B站大触竟然都在这里???","new_router":"https://h.bilibili.com/ywh/h5/index"}],"lives":[{"owner":{"face":"https://i2.hdslb.com/bfs/face/4a31c283b90fcd6fe49b7a12662a14e607236c52.jpg","mid":2715177,"name":"祥宁嫂嫂丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3815b7eb6f5f15b61c8c7b6991f1b805495e7059.jpg","height":180,"width":320},"room_id":52658,"check_version":0,"online":2351,"area":"电子竞技","area_id":4,"title":"(新人推荐)全区免费首胜啦~","playurl":"http://xl.live-play.acgvideo.com/live-xl/882210/live_2715177_5087642.flv?wsSecret=39d9fd9a3f4a28eae0d8e9ce734313a0&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":86,"area_v2_name":"英雄联盟","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/f4c2ceae1988050e35201abafafed134b98195c7.jpg","mid":166584070,"name":"独上熹楼ヽ城主"},"cover":{"src":"https://i0.hdslb.com/bfs/live/54777c587d71c5eff7074f7e16a609a746379224.jpg","height":180,"width":320},"room_id":5469025,"check_version":0,"online":3419,"area":"唱见舞见","area_id":10,"title":"攻音受音陪你賴床 腐女慎入","playurl":"http://qn.live-play.acgvideo.com/live-qn/289198/live_166584070_2864596.flv?wsSecret=011980f56104608d1d1563488dddced9&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","data_behavior_id":"a0d146db7e2beaf:a0d146db7e2beaf:0:0","data_source_id":"system"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/c489cebbd9cb5902b950ca819ab1980d3fd49f5c.jpg","mid":1597982,"name":"Richard_Price"},"cover":{"src":"https://i0.hdslb.com/bfs/live/c46554cb778ac9941bf39e4771ff75c944f60e39.jpg","height":180,"width":320},"room_id":869069,"check_version":0,"online":814,"area":"唱见舞见","area_id":10,"title":"KTV, 元宵节快乐","playurl":"http://live-play.acgvideo.com/live/993/live_1597982_9114881.flv?wsSecret=626dadef4ec70594d55e5e67c48f1508&wsTime=5a712ed7","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/303f46216ceed76e2e5360a9de0c239ec9e32379.jpg","mid":719049,"name":"卖火柴的可可亚"},"cover":{"src":"https://i0.hdslb.com/bfs/live/2be48255ad5cd5b212ae2108d1e998568ee5efb1.jpg","height":180,"width":320},"room_id":53428,"check_version":0,"online":2712,"area":"单机联机","area_id":1,"title":"【影之诗】休闲游戏何必上分","playurl":"http://xl.live-play.acgvideo.com/live-xl/342779/live_719049_5853792.flv?wsSecret=39d2799d5266e44e3e4d0c19ee34f4ef&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ca7aaba009c22adcd1071522f9fdc6a4f669d532.jpg","mid":9870438,"name":"阿运呀"},"cover":{"src":"https://i0.hdslb.com/bfs/live/ff3d7a4d7cbe3cad02b14df15f56da239727f576.jpg","height":180,"width":320},"room_id":93279,"check_version":0,"online":3615,"area":"单机联机","area_id":1,"title":"【阿运】神秘海域4之一个萌新","playurl":"http://txy.live-play.acgvideo.com/live-txy/312360/live_9870438_5301909.flv?wsSecret=eeb9a68c89eb6171b4ab5b5bf3663a67&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/6ca5366bede574a88683201db31735466fb7665c.jpg","mid":4790535,"name":"祈咔"},"cover":{"src":"https://i0.hdslb.com/bfs/live/0149b64df95f1f31af4032871f3cc8942115ed13.jpg","height":180,"width":320},"room_id":100849,"check_version":0,"online":2661,"area":"唱见舞见","area_id":10,"title":"【古风】孤寡古疯老唱见","playurl":"http://dl.live-play.acgvideo.com/live-dl/905519/live_4790535_6783016.flv?wsSecret=189cdfc6e1af1682c236b43c8f3300a4&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/ceaffc80b824f1d277034622fba809ff3a50db89.jpg","mid":4008909,"name":"KIM高能萌"},"cover":{"src":"https://i0.hdslb.com/bfs/live/1cf09a1a579e608a1284b637a2f784c3558b91c6.jpg","height":180,"width":320},"room_id":7365762,"check_version":0,"online":2168,"area":"单机联机","area_id":1,"title":"少男的绝地描边画来了解一下^^","playurl":"http://qn.live-play.acgvideo.com/live-qn/108838/live_4008909_3934891.flv?wsSecret=7c3c5503e406cdfcd65caf25ed0e8be3&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/56e342a20940346d7026af2ff72a9bb89001a197.jpg","mid":13610473,"name":"北极星丶清寒"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d7f524a13e318769e77190ce7ee4002daf7206e0.jpg","height":180,"width":320},"room_id":402805,"check_version":0,"online":4227,"area":"单机联机","area_id":1,"title":"寒宾逊的1.12.2荒岛求生","playurl":"http://qn.live-play.acgvideo.com/live-qn/945345/live_13610473_8275609.flv?wsSecret=f5f547db01501929cdd424866b8a772f&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":56,"area_v2_name":"我的世界","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/9eb27d14a4b29e1aa32f645a5273a00796162c41.jpg","mid":19088449,"name":"猜十八"},"cover":{"src":"https://i0.hdslb.com/bfs/live/383c84bb6d3412ce8843209990b1aa4c2e4ea101.jpg","height":180,"width":320},"room_id":54912,"check_version":0,"online":4090,"area":"手游直播","area_id":12,"title":"手机吃鸡 人机大作战?","playurl":"http://qn.live-play.acgvideo.com/live-qn/488202/live_19088449_4499867.flv?wsSecret=349df85ace4fe1837a02d78e00e36678&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/25ca9cca4fa9522c08b12b7de48a2509734fcd9d.jpg","mid":463999,"name":"波喵喵喵"},"cover":{"src":"https://i0.hdslb.com/bfs/live/76e08ebaa07fd12c80374447f0ea0691a920bb4c.jpg","height":180,"width":320},"room_id":151159,"check_version":0,"online":662,"area":"生活娱乐","area_id":6,"title":"元宵快乐~","playurl":"http://dl.live-play.acgvideo.com/live-dl/299784/live_463999_8651963.flv?wsSecret=21f8ca49261774740366a83ed591ab54&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"娱乐分区No.3","area_v2_id":139,"area_v2_name":"美少女","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/29ff8cea978d08989193f13146006a5b14e22784.jpg","mid":9165690,"name":"桐人ヽ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/e8e88ba6d479acc6c39896ac2104d4d868a964f2.jpg","height":180,"width":320},"room_id":53100,"check_version":0,"online":3222,"area":"网络游戏","area_id":3,"title":"上午嘤嘤嘤下午夺命晚上吃鸡!","playurl":"http://qn.live-play.acgvideo.com/live-qn/359080/live_9165690_1198449.flv?wsSecret=8cfeafdf3b2cb6dd4cfc1b1308bc9644&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":84,"area_v2_name":"300英雄","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ce10c759df53720268b23ef8bd06150aa61834a5.jpg","mid":659965,"name":"基佬爱上熊"},"cover":{"src":"https://i0.hdslb.com/bfs/live/65b8641c7681faca6317314bc907edac984390f1.jpg","height":180,"width":320},"room_id":16101,"check_version":0,"online":4206,"area":"单机联机","area_id":1,"title":"【流放之路】一款继承暗黑2的游戏","playurl":"http://xl.live-play.acgvideo.com/live-xl/791352/live_659965_4719464.flv?wsSecret=38ef4f3b8dbd455b728d3c4d50bb0043&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"}]}} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * banner : [{"title":"直播周刊","img":"https://i0.hdslb.com/bfs/live/af17c8d882104370075f4fa5418343861ac3e540.png","remark":"直播周刊","link":"https://live.bilibili.com/AppBanner/index?id=746"}] - * entranceIcons : [{"id":9,"name":"绘画专区","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/9_big.png?20171116172700","height":"132","width":"132"}},{"id":8,"name":"萌宅推荐","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/8_big.png?20171116172700","height":"132","width":"132"}},{"id":3,"name":"网络游戏","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/3_big.png?20171116172700","height":"132","width":"132"}},{"id":1,"name":"单机联机","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/1_big.png?20171116172700","height":"132","width":"132"}},{"id":4,"name":"电子竞技","entrance_icon":{"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/4_big.png?20171116172700","height":"132","width":"132"}}] - * partitions : [{"partition":{"id":1,"name":"娱乐","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/1_3x.png?201709151052","height":"63","width":"63"},"count":1484},"lives":[{"roomid":7399897,"uid":7619276,"title":"包裹有免费B坷垃可送哦(点这看直播单)","uname":"星子弈风","online":145,"user_cover":"https://i0.hdslb.com/bfs/live/7fc54c49ed7db4bc53fe6e5c8888db3eb0c01d7c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/7399897.jpg?03020945","show_cover":false,"link":"/7399897","face":"https://i2.hdslb.com/bfs/face/41c4b60b54795870ac4d209dc949a51ca7614062.jpg","parent_id":1,"parent_name":"娱乐","area_id":123,"area_name":"户外","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/415156/live_7619276_6963984.flv?wsSecret=26f02e69c2e01fc840da1f452d673f37&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":2802503,"uid":34993653,"title":"做个温柔读书哄睡的小姐姐","username":"楚小芭","online":958,"user_cover":"https://i0.hdslb.com/bfs/live/33e9537f94545758035b14a59a68fd1b78f8184b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/2802503.jpg?03020945","show_cover":false,"link":"/2802503","face":"https://i0.hdslb.com/bfs/face/41a917cb13f546e62bfea4e06a7781d8118c676e.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/368878/live_34993653_4247645.flv?wsSecret=01587e645b73cfeec12992ac3f3b8288&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":910884,"uid":20165629,"title":"跟我走!","username":"共青团中央","online":15974,"user_cover":"https://i0.hdslb.com/bfs/live/2591ba98c2db7da32dd40ac100322ab8d9a218c6.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/910884.jpg?03020946","show_cover":false,"link":"/910884","face":"https://i0.hdslb.com/bfs/face/3b4caf3ad325fd962bf98f90e4aac0b4ae4679c8.jpg","parent_id":1,"parent_name":"娱乐","area_id":123,"area_name":"户外","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/377121/live_20165629_5904889.flv?wsSecret=88113f81c6eb29be592c43d4cbaddc0c&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":30040,"uid":5480206,"title":"破产 弹到一半随时卖琴","username":"桥白白白白","online":955,"user_cover":"https://i0.hdslb.com/bfs/live/f7ac32e981f4cd7b0bf6733ba79e705dd312e8f4.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/30040.jpg?03020946","show_cover":false,"link":"/5454","face":"https://i1.hdslb.com/bfs/face/67ba6957182bb865c8b4b5fd9006778af0cf9f71.jpg","parent_id":1,"parent_name":"娱乐","area_id":143,"area_name":"才艺","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/680310/live_5480206_332_c521e483.flv?wsSecret=0d2d608349a38973aaded375418ceca3&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":1338247,"uid":27894414,"title":"来呀来呀造人呀!造人人人人人人人!","username":"露琪亚Rukiaルキア","online":78,"user_cover":"https://i0.hdslb.com/bfs/live/b5accf156795b0e24c406bb2debe3448032e13fd.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1338247.jpg?03020946","show_cover":false,"link":"/1338247","face":"https://i0.hdslb.com/bfs/face/b4dda315df2c9ffcc5f378b5871932e42122c567.jpg","parent_id":1,"parent_name":"娱乐","area_id":25,"area_name":"手工","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/558698/live_27894414_1428176.flv?wsSecret=1189d19dfda8cc47ae10d258ae9be26a&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":4346987,"uid":30580510,"title":"你来喵~一声,我也会喵~给你听哟~","username":"是白米不是黑米","online":368,"user_cover":"https://i0.hdslb.com/bfs/live/4f10d04cfebc28bc48a7d9be2f9fb91d83c7226f.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/4346987.jpg?03020946","show_cover":false,"link":"/4346987","face":"https://i0.hdslb.com/bfs/face/f7e093a0613af8cf95ca684deb0fbfa7b2ab2ba3.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/723153/live_30580510_8427291.flv?wsSecret=cb1dd97e388bde304a3aedeab071ca87&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]},{"partition":{"id":2,"name":"游戏","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/2_3x.png?201709151052","height":"63","width":"63"},"count":1075},"lives":[{"roomId":34180,"uid":10404286,"title":"一枪一个嘤嘤宝","username":"红发杰克丶","online":8502,"user_cover":"https://i0.hdslb.com/bfs/live/771bd280cc478e2816ff0d4dbd66c3e6709d6cc8.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/34180.jpg?03020946","show_cover":false,"link":"/260","face":"https://i2.hdslb.com/bfs/face/ea5235b1c9d9ce2604c37bcef2c0ef965d3b5589.jpg","parent_id":2,"parent_name":"游戏","area_id":80,"area_name":"绝地求生:大逃杀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/756124/live_10404286_9705271.flv?wsSecret=8dd39659dea6f9d0a0163330f50beda4&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":109950,"uid":28761888,"title":"莽夫の686天下无敌","username":"女粉巨多的楠叔","online":6494,"user_cover":"https://i0.hdslb.com/bfs/live/017cc1afcb9ce8cfe253a8566070866db64762e7.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/109950.jpg?03020945","show_cover":false,"link":"/109950","face":"https://i1.hdslb.com/bfs/face/87b5dac33b652e9a15d5f4659ca2daf0e14cd29f.jpg","parent_id":2,"parent_name":"游戏","area_id":80,"area_name":"绝地求生:大逃杀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/406802/live_28761888_7951947.flv?wsSecret=2fb2a0316d5c07642a0b202e44a84fe2&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":34085,"uid":13376263,"title":"大家一起怂!!","username":"国家一级loli饲养员","online":1805,"user_cover":"https://i0.hdslb.com/bfs/live/409d4b33bd89c63729b9a4721b7f7fa5063939ad.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/34085.jpg?03020946","show_cover":false,"link":"/34085","face":"https://i0.hdslb.com/bfs/face/a742e7a99884a070570f21e33854d10abbc3b8bb.jpg","parent_id":2,"parent_name":"游戏","area_id":107,"area_name":"其他游戏","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/331431/live_13376263_5317554.flv?wsSecret=d9337ad7717b7ea474443062759c1147&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":280446,"uid":8192168,"title":"大家元宵节快乐!记得吃汤圆!","username":"叶落莫言","online":49474,"user_cover":"https://i0.hdslb.com/bfs/live/09356a3593cf0d67dee99aefe766ebac2a1d45f3.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/280446.jpg?03020945","show_cover":false,"link":"/387","face":"https://i1.hdslb.com/bfs/face/37bfd9a9f40eb9ff52b697e204386ab918ccd742.jpg","parent_id":2,"parent_name":"游戏","area_id":80,"area_name":"绝地求生:大逃杀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/563981/live_8192168_5923385.flv?wsSecret=d6f6edd11376d1601d5e14c31ede6f15&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":5600543,"uid":38353550,"title":"我的世界吸血鬼暮色星系生存~~~","username":"丿灬丶落叶FL","online":994,"user_cover":"https://i0.hdslb.com/bfs/live/d782cb8221026b610d4759f214cc5d15d16251ef.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5600543.jpg?03020946","show_cover":false,"link":"/5600543","face":"https://i1.hdslb.com/bfs/face/cf290155d42fd8ca29818197bbda501b7b8656e0.jpg","parent_id":2,"parent_name":"游戏","area_id":56,"area_name":"我的世界","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/607990/live_38353550_9136170.flv?wsSecret=5f0bc0853e5c0cfcf9d36b6c3ed8fd1d&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":22237,"uid":1772434,"title":"饥荒联机智能敌对地狱模式。作死?嗯!","username":"暮思橙月","online":19194,"user_cover":"https://i0.hdslb.com/bfs/live/0db51626ac6affae89e8e43345e5b8d6e6b95cfa.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/22237.jpg?03020946","show_cover":false,"link":"/531","face":"https://i1.hdslb.com/bfs/face/9e0333da3070d39de806c01106081098011b894e.jpg","parent_id":2,"parent_name":"游戏","area_id":107,"area_name":"其他游戏","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/672474/live_1772434_332_c521e483.flv?wsSecret=723497319c91e7a79c955de0132b431b&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]},{"partition":{"id":3,"name":"手游","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/3_3x.png?201709151052","height":"63","width":"63"},"count":473},"lives":[{"roomId":1218338,"uid":28046227,"title":"(乖巧)颜值主播不谈技术0-0","username":"惆怅玉米头","online":1034,"user_cover":"https://i0.hdslb.com/bfs/live/41139d3b1a5e5e89aead6fb8d8b0e685633eb2c9.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1218338.jpg?03020945","show_cover":false,"link":"/1218338","face":"https://i2.hdslb.com/bfs/face/3da294e650d153612421142cf351266b3a0688c4.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://xl.live-play.acgvideo.com/live-xl/320746/live_28046227_3518126.flv?wsSecret=5a57987578c27250e24bfde48e30d34e&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":4036239,"uid":101242935,"title":"王者,,,,坑,了解一下吧","username":"雨季youyou","online":7,"user_cover":"https://i0.hdslb.com/bfs/live/f22672b27a7164f4058002c8727f69148ec08557.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/4036239.jpg?03020946","show_cover":false,"link":"/4036239","face":"https://i2.hdslb.com/bfs/face/20bf5098724f50e357a38507f82b7c463165e9f0.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/176213/live_101242935_2718900.flv?wsSecret=68df597274c6afbb224252ff45f79c77&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":3269664,"uid":77545560,"title":"好厉害的花木兰","username":"海岛情话","online":4295,"user_cover":"https://i0.hdslb.com/bfs/live/23342613fb41f1cf9523e79404ef3c69a641c904.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/3269664.jpg?03020945","show_cover":false,"link":"/3269664","face":"https://i0.hdslb.com/bfs/face/ad1cfde69fc3afd79b6a21ddd0e3a7cd9992932e.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/453762/live_77545560_5747022.flv?wsSecret=a4108497e7509dc13c2926de1087bd37&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":9610655,"uid":296520363,"title":"永生之夜的直播间","username":"永生之夜","online":29,"user_cover":"https://i0.hdslb.com/bfs/live/c5567f3923a7662753bf136a65f6f788b8916cb9.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/9610655.jpg?03020946","show_cover":false,"link":"/9610655","face":"https://i0.hdslb.com/bfs/face/d1c6b761b0de659aa3add519bdab0e510551150a.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/378600/live_296520363_1459790.flv?wsSecret=0cabcb12cdaa6794cbdb326f82705eec&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":6636042,"uid":16689737,"title":"都老师在线 (黑色幸存者)","username":"中文丶丶丶","online":1099,"user_cover":"https://i0.hdslb.com/bfs/live/b7bada8de2138de4183093f01d741ed7928a6c1b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/6636042.jpg?03020945","show_cover":false,"link":"/6636042","face":"https://i1.hdslb.com/bfs/face/b7945826ec45a40785e593fbbc73b4648eda6fd1.jpg","parent_id":3,"parent_name":"手游","area_id":98,"area_name":"其他手游","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/606287/live_16689737_5840082.flv?wsSecret=4135a775eee475ae1df1f6939de05008&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":3054160,"uid":75593922,"title":"神奇女侠专场,抢先体验?!","username":"羽为CHENG","online":11654,"user_cover":"https://i0.hdslb.com/bfs/live/5925758a0364d365d75233c544ef492cd30bdbd5.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/3054160.jpg?03020945","show_cover":false,"link":"/3054160","face":"https://i0.hdslb.com/bfs/face/0bf0bba23c6ce03ff3bffde3e97be02d9f4044cd.jpg","parent_id":3,"parent_name":"手游","area_id":35,"area_name":"王者荣耀","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/469985/live_75593922_5603101.flv?wsSecret=e3fd90584e3d0714498973d932595a48&wsTime=1519957196","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]},{"partition":{"id":4,"name":"绘画","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/4_3x.png?201709151052","height":"63","width":"63"},"count":67},"lives":[{"roomId":73945,"uid":5050136,"title":"【爽到】やっばり。小学生赛高だぜ!!!!","username":"Kirito丶桐人君","online":869,"user_cover":"https://i0.hdslb.com/bfs/live/375e1b19a907b9cfa85dbd41f6ab98f6ac5a602a.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/73945.jpg?03020946","show_cover":false,"link":"/73945","face":"https://i2.hdslb.com/bfs/face/56157d60c8c2c0b8f7e137262bbb2e577c95c7a0.png","parent_id":4,"parent_name":"绘画","area_id":95,"area_name":"临摹绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/267298/live_5050136_7329209.flv?wsSecret=a85ef18a73794de63ba80732bf2d0ccc&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":3593269,"uid":44966419,"title":"教你怎么用鼠绘阿松们(伪)","username":"那就叫ichi吧","online":14,"user_cover":"https://i0.hdslb.com/bfs/live/df748933bb924b479bbf77eb69302a5161c0a3e0.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/3593269.jpg?03020946","show_cover":false,"link":"/3593269","face":"https://i0.hdslb.com/bfs/face/754d6a58a695a9bf5738f0a253504c6941dbda78.jpg","parent_id":4,"parent_name":"绘画","area_id":94,"area_name":"同人绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/791676/live_44966419_4351969.flv?wsSecret=000a552750fa9243d6e1f97f981de7e8&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":95278,"uid":5030761,"title":"SAI 启动!","username":"深井玑","online":2520,"user_cover":"https://i0.hdslb.com/bfs/live/86f52149ab7ced43cad509348c831f346608b8bd.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/95278.jpg?03020946","show_cover":false,"link":"/314","face":"https://i1.hdslb.com/bfs/face/2feef28d962b0e5c8bbd573cffe84d5e13277747.jpg","parent_id":4,"parent_name":"绘画","area_id":94,"area_name":"同人绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/520270/live_5030761_7103241.flv?wsSecret=3da3ddd8bd44a98152f44a824482dbea&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":5790845,"uid":35331809,"title":"睡不着来画个简单的指绘","username":"深海菠萝屋中的海绵","online":1201,"user_cover":"https://i0.hdslb.com/bfs/live/8e6400f2c40050e010baaa92c6386b33f56aca74.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5790845.jpg?03020945","show_cover":false,"link":"/5790845","face":"https://i0.hdslb.com/bfs/face/04ba147d39ff7db59cf62bc959d28a48094f69df.jpg","parent_id":4,"parent_name":"绘画","area_id":95,"area_name":"临摹绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/195067/live_35331809_3420166.flv?wsSecret=94689ada71b574432d59350f3a1455cc&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomId":19582,"uid":1533649,"title":"胃疼!因为没有女朋友!","username":"绪奈夏目子丶","online":1576,"user_cover":"https://i0.hdslb.com/bfs/live/34b45ab63d81fec05e4b8549c3798e59051d7ed2.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/19582.jpg?03020946","show_cover":false,"link":"/19582","face":"https://i1.hdslb.com/bfs/face/00544b5a80fb73b3b5d8f6001268238aa7f078d9.jpg","parent_id":4,"parent_name":"绘画","area_id":51,"area_name":"原创绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/506577/live_1533649_8481907.flv?wsSecret=5475d2b7ab65bd8a55e62d488af828bd&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":67223,"uid":4836885,"title":"摸鱼","username":"酎六六六_","online":1698,"user_cover":"https://i0.hdslb.com/bfs/live/4162a6d4cadf4088a1e1fd7029bd40579dca8854.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/67223.jpg?03020945","show_cover":false,"link":"/310","face":"https://i2.hdslb.com/bfs/face/7ee4fc0d4e261badfd23460ffad4b003cb06deb7.jpg","parent_id":4,"parent_name":"绘画","area_id":51,"area_name":"原创绘画","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/664283/live_4836885_1208886.flv?wsSecret=c71f698544d69ea97432985d01aca6a9&wsTime=1519957192","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}]}] - * star_show : {"partition":{"id":999,"name":"颜值领域","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-2_3x.png?201709151052","height":"63","width":"63"},"count":0,"hidden":0},"lives":[{"roomid":5495804,"uid":203267722,"title":"你点,我唱","uname":"花优er","online":1298,"user_cover":"https://i0.hdslb.com/bfs/live/8881fca2f4d0d3b937767f5cacb4117966b9fea6.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5495804.jpg?03020946","show_cover":"https://i0.hdslb.com/bfs/vc/4c5126739114bb441cb3c12460a471733b1fe25a.jpg","link":"/5495804","face":"https://i0.hdslb.com/bfs/face/a44d19265a7c3240122dbe36d598d75a00acffd5.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/923710/live_203267722_7185906.flv?wsSecret=455db153c50c8adab57aa793f3c82ce8&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomId":151159,"uid":463999,"title":"元宵快乐~","username":"波喵喵喵","online":662,"user_cover":"https://i0.hdslb.com/bfs/live/76e08ebaa07fd12c80374447f0ea0691a920bb4c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/151159.jpg?03020947","show_cover":"https://i0.hdslb.com/bfs/vc/463336c59f976123a4358d819f161c0455a84308.jpg","link":"/280","face":"https://i0.hdslb.com/bfs/face/25ca9cca4fa9522c08b12b7de48a2509734fcd9d.jpg","parent_id":1,"parent_name":"娱乐","area_id":139,"area_name":"美少女","web_pendent":"weekRank","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/510065/live_463999_8651963.flv?wsSecret=10711c5b09edb0e3fba6094742ec842f&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"娱乐分区No.3"},{"roomId":68612,"uid":3311852,"title":"元宵节快乐","username":"璃猫タヌキ","online":13101,"user_cover":"https://i0.hdslb.com/bfs/live/fe4233635a6c1f207011bf0756a65f65695d0f65.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/68612.jpg?03020946","show_cover":"https://i0.hdslb.com/bfs/vc/73b0c3e319c6a30a737b77e1214df427334640cc.jpg","link":"/185","face":"https://i0.hdslb.com/bfs/face/232325726db9b91c85061686fc265f138ea7b544.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/921032/live_3311852_7248026.flv?wsSecret=9a220f6242a03b6e80dcd1e975ad40d8&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":8259977,"uid":278452410,"title":"别的小朋友都回家了你什么时候带我回家啊","username":"橙子斯密达","online":464,"user_cover":"https://i0.hdslb.com/bfs/live/177871a2418067b0443f81e5080563d1026f8c6b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/8259977.jpg?02111210","show_cover":"https://i0.hdslb.com/bfs/vc/9f6735c702b86286af0e32649310e1067aad943b.jpg","link":"/8259977","face":"https://i1.hdslb.com/bfs/face/12242421082cc3263ba3415e10f957d7ba751d9a.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/369622/live_278452410_6809315.flv?wsSecret=aba1d0fc8fec64a437e5289a6956d570&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""}]} - * recommend_data : {"partition":{"id":0,"name":"推荐主播","area":"hot","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"},"count":3528},"banner_data":[{"cover":{"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320},"title":"今天,你的小视频上榜了吗?","is_clip":1,"new_cover":{"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320},"new_title":"B站大触竟然都在这里???","new_router":"https://h.bilibili.com/ywh/h5/index"}],"lives":[{"owner":{"face":"https://i2.hdslb.com/bfs/face/4a31c283b90fcd6fe49b7a12662a14e607236c52.jpg","mid":2715177,"name":"祥宁嫂嫂丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3815b7eb6f5f15b61c8c7b6991f1b805495e7059.jpg","height":180,"width":320},"room_id":52658,"check_version":0,"online":2351,"area":"电子竞技","area_id":4,"title":"(新人推荐)全区免费首胜啦~","playurl":"http://xl.live-play.acgvideo.com/live-xl/882210/live_2715177_5087642.flv?wsSecret=39d9fd9a3f4a28eae0d8e9ce734313a0&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":86,"area_v2_name":"英雄联盟","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/f4c2ceae1988050e35201abafafed134b98195c7.jpg","mid":166584070,"name":"独上熹楼ヽ城主"},"cover":{"src":"https://i0.hdslb.com/bfs/live/54777c587d71c5eff7074f7e16a609a746379224.jpg","height":180,"width":320},"room_id":5469025,"check_version":0,"online":3419,"area":"唱见舞见","area_id":10,"title":"攻音受音陪你賴床 腐女慎入","playurl":"http://qn.live-play.acgvideo.com/live-qn/289198/live_166584070_2864596.flv?wsSecret=011980f56104608d1d1563488dddced9&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","data_behavior_id":"a0d146db7e2beaf:a0d146db7e2beaf:0:0","data_source_id":"system"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/c489cebbd9cb5902b950ca819ab1980d3fd49f5c.jpg","mid":1597982,"name":"Richard_Price"},"cover":{"src":"https://i0.hdslb.com/bfs/live/c46554cb778ac9941bf39e4771ff75c944f60e39.jpg","height":180,"width":320},"room_id":869069,"check_version":0,"online":814,"area":"唱见舞见","area_id":10,"title":"KTV, 元宵节快乐","playurl":"http://live-play.acgvideo.com/live/993/live_1597982_9114881.flv?wsSecret=626dadef4ec70594d55e5e67c48f1508&wsTime=5a712ed7","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/303f46216ceed76e2e5360a9de0c239ec9e32379.jpg","mid":719049,"name":"卖火柴的可可亚"},"cover":{"src":"https://i0.hdslb.com/bfs/live/2be48255ad5cd5b212ae2108d1e998568ee5efb1.jpg","height":180,"width":320},"room_id":53428,"check_version":0,"online":2712,"area":"单机联机","area_id":1,"title":"【影之诗】休闲游戏何必上分","playurl":"http://xl.live-play.acgvideo.com/live-xl/342779/live_719049_5853792.flv?wsSecret=39d2799d5266e44e3e4d0c19ee34f4ef&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ca7aaba009c22adcd1071522f9fdc6a4f669d532.jpg","mid":9870438,"name":"阿运呀"},"cover":{"src":"https://i0.hdslb.com/bfs/live/ff3d7a4d7cbe3cad02b14df15f56da239727f576.jpg","height":180,"width":320},"room_id":93279,"check_version":0,"online":3615,"area":"单机联机","area_id":1,"title":"【阿运】神秘海域4之一个萌新","playurl":"http://txy.live-play.acgvideo.com/live-txy/312360/live_9870438_5301909.flv?wsSecret=eeb9a68c89eb6171b4ab5b5bf3663a67&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/6ca5366bede574a88683201db31735466fb7665c.jpg","mid":4790535,"name":"祈咔"},"cover":{"src":"https://i0.hdslb.com/bfs/live/0149b64df95f1f31af4032871f3cc8942115ed13.jpg","height":180,"width":320},"room_id":100849,"check_version":0,"online":2661,"area":"唱见舞见","area_id":10,"title":"【古风】孤寡古疯老唱见","playurl":"http://dl.live-play.acgvideo.com/live-dl/905519/live_4790535_6783016.flv?wsSecret=189cdfc6e1af1682c236b43c8f3300a4&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/ceaffc80b824f1d277034622fba809ff3a50db89.jpg","mid":4008909,"name":"KIM高能萌"},"cover":{"src":"https://i0.hdslb.com/bfs/live/1cf09a1a579e608a1284b637a2f784c3558b91c6.jpg","height":180,"width":320},"room_id":7365762,"check_version":0,"online":2168,"area":"单机联机","area_id":1,"title":"少男的绝地描边画来了解一下^^","playurl":"http://qn.live-play.acgvideo.com/live-qn/108838/live_4008909_3934891.flv?wsSecret=7c3c5503e406cdfcd65caf25ed0e8be3&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/56e342a20940346d7026af2ff72a9bb89001a197.jpg","mid":13610473,"name":"北极星丶清寒"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d7f524a13e318769e77190ce7ee4002daf7206e0.jpg","height":180,"width":320},"room_id":402805,"check_version":0,"online":4227,"area":"单机联机","area_id":1,"title":"寒宾逊的1.12.2荒岛求生","playurl":"http://qn.live-play.acgvideo.com/live-qn/945345/live_13610473_8275609.flv?wsSecret=f5f547db01501929cdd424866b8a772f&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":56,"area_v2_name":"我的世界","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/9eb27d14a4b29e1aa32f645a5273a00796162c41.jpg","mid":19088449,"name":"猜十八"},"cover":{"src":"https://i0.hdslb.com/bfs/live/383c84bb6d3412ce8843209990b1aa4c2e4ea101.jpg","height":180,"width":320},"room_id":54912,"check_version":0,"online":4090,"area":"手游直播","area_id":12,"title":"手机吃鸡 人机大作战?","playurl":"http://qn.live-play.acgvideo.com/live-qn/488202/live_19088449_4499867.flv?wsSecret=349df85ace4fe1837a02d78e00e36678&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/25ca9cca4fa9522c08b12b7de48a2509734fcd9d.jpg","mid":463999,"name":"波喵喵喵"},"cover":{"src":"https://i0.hdslb.com/bfs/live/76e08ebaa07fd12c80374447f0ea0691a920bb4c.jpg","height":180,"width":320},"room_id":151159,"check_version":0,"online":662,"area":"生活娱乐","area_id":6,"title":"元宵快乐~","playurl":"http://dl.live-play.acgvideo.com/live-dl/299784/live_463999_8651963.flv?wsSecret=21f8ca49261774740366a83ed591ab54&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"娱乐分区No.3","area_v2_id":139,"area_v2_name":"美少女","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/29ff8cea978d08989193f13146006a5b14e22784.jpg","mid":9165690,"name":"桐人ヽ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/e8e88ba6d479acc6c39896ac2104d4d868a964f2.jpg","height":180,"width":320},"room_id":53100,"check_version":0,"online":3222,"area":"网络游戏","area_id":3,"title":"上午嘤嘤嘤下午夺命晚上吃鸡!","playurl":"http://qn.live-play.acgvideo.com/live-qn/359080/live_9165690_1198449.flv?wsSecret=8cfeafdf3b2cb6dd4cfc1b1308bc9644&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":84,"area_v2_name":"300英雄","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ce10c759df53720268b23ef8bd06150aa61834a5.jpg","mid":659965,"name":"基佬爱上熊"},"cover":{"src":"https://i0.hdslb.com/bfs/live/65b8641c7681faca6317314bc907edac984390f1.jpg","height":180,"width":320},"room_id":16101,"check_version":0,"online":4206,"area":"单机联机","area_id":1,"title":"【流放之路】一款继承暗黑2的游戏","playurl":"http://xl.live-play.acgvideo.com/live-xl/791352/live_659965_4719464.flv?wsSecret=38ef4f3b8dbd455b728d3c4d50bb0043&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"}]} - */ - - @SerializedName("star_show") - private StarShow starShow; - @SerializedName("recommend_data") - private RecommendData recommendData; - @SerializedName("banner") - private List banner; - @SerializedName("entranceIcons") - private List entranceIcons; - @SerializedName("partitions") - private List partitions; - - public StarShow getStarShow() { - return starShow; - } - - public void setStarShow(StarShow starShow) { - this.starShow = starShow; - } - - public RecommendData getRecommendData() { - return recommendData; - } - - public void setRecommendData(RecommendData recommendData) { - this.recommendData = recommendData; - } - - public List getBanner() { - return banner; - } - - public void setBanner(List banner) { - this.banner = banner; - } - - public List getEntranceIcons() { - return entranceIcons; - } - - public void setEntranceIcons(List entranceIcons) { - this.entranceIcons = entranceIcons; - } - - public List getPartitions() { - return partitions; - } - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - public static class StarShow { - /** - * partition : {"id":999,"name":"颜值领域","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-2_3x.png?201709151052","height":"63","width":"63"},"count":0,"hidden":0} - * lives : [{"roomid":5495804,"uid":203267722,"title":"你点,我唱","uname":"花优er","online":1298,"user_cover":"https://i0.hdslb.com/bfs/live/8881fca2f4d0d3b937767f5cacb4117966b9fea6.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5495804.jpg?03020946","show_cover":"https://i0.hdslb.com/bfs/vc/4c5126739114bb441cb3c12460a471733b1fe25a.jpg","link":"/5495804","face":"https://i0.hdslb.com/bfs/face/a44d19265a7c3240122dbe36d598d75a00acffd5.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/923710/live_203267722_7185906.flv?wsSecret=455db153c50c8adab57aa793f3c82ce8&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomId":151159,"uid":463999,"title":"元宵快乐~","username":"波喵喵喵","online":662,"user_cover":"https://i0.hdslb.com/bfs/live/76e08ebaa07fd12c80374447f0ea0691a920bb4c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/151159.jpg?03020947","show_cover":"https://i0.hdslb.com/bfs/vc/463336c59f976123a4358d819f161c0455a84308.jpg","link":"/280","face":"https://i0.hdslb.com/bfs/face/25ca9cca4fa9522c08b12b7de48a2509734fcd9d.jpg","parent_id":1,"parent_name":"娱乐","area_id":139,"area_name":"美少女","web_pendent":"weekRank","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/510065/live_463999_8651963.flv?wsSecret=10711c5b09edb0e3fba6094742ec842f&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"娱乐分区No.3"},{"roomId":68612,"uid":3311852,"title":"元宵节快乐","username":"璃猫タヌキ","online":13101,"user_cover":"https://i0.hdslb.com/bfs/live/fe4233635a6c1f207011bf0756a65f65695d0f65.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/68612.jpg?03020946","show_cover":"https://i0.hdslb.com/bfs/vc/73b0c3e319c6a30a737b77e1214df427334640cc.jpg","link":"/185","face":"https://i0.hdslb.com/bfs/face/232325726db9b91c85061686fc265f138ea7b544.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/921032/live_3311852_7248026.flv?wsSecret=9a220f6242a03b6e80dcd1e975ad40d8&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":8259977,"uid":278452410,"title":"别的小朋友都回家了你什么时候带我回家啊","username":"橙子斯密达","online":464,"user_cover":"https://i0.hdslb.com/bfs/live/177871a2418067b0443f81e5080563d1026f8c6b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/8259977.jpg?02111210","show_cover":"https://i0.hdslb.com/bfs/vc/9f6735c702b86286af0e32649310e1067aad943b.jpg","link":"/8259977","face":"https://i1.hdslb.com/bfs/face/12242421082cc3263ba3415e10f957d7ba751d9a.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/369622/live_278452410_6809315.flv?wsSecret=aba1d0fc8fec64a437e5289a6956d570&wsTime=1519957201","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""}] - */ - - @SerializedName("partition") - private Partition partition; - @SerializedName("lives") - private List lives; - - public Partition getPartition() { - return partition; - } - - public void setPartition(Partition partition) { - this.partition = partition; - } - - public List getLives() { - return lives; - } - - public void setLives(List lives) { - this.lives = lives; - } - - public static class Partition { - /** - * id : 999 - * name : 颜值领域 - * sub_icon : {"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-2_3x.png?201709151052","height":"63","width":"63"} - * count : 0 - * hidden : 0 - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("sub_icon") - private SubIcon subIcon; - @SerializedName("count") - private int count; - @SerializedName("hidden") - private int hidden; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public SubIcon getSubIcon() { - return subIcon; - } - - public void setSubIcon(SubIcon subIcon) { - this.subIcon = subIcon; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public int getHidden() { - return hidden; - } - - public void setHidden(int hidden) { - this.hidden = hidden; - } - - public static class SubIcon { - /** - * src : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-2_3x.png?201709151052 - * height : 63 - * width : 63 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private String height; - @SerializedName("width") - private String width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWidth() { - return width; - } - - public void setWidth(String width) { - this.width = width; - } - } - } - - public static class Lives { - /** - * roomid : 5495804 - * uid : 203267722 - * title : 你点,我唱 - * uname : 花优er - * online : 1298 - * user_cover : https://i0.hdslb.com/bfs/live/8881fca2f4d0d3b937767f5cacb4117966b9fea6.jpg - * user_cover_flag : 1 - * system_cover : https://i0.hdslb.com/bfs/live/5495804.jpg?03020946 - * show_cover : https://i0.hdslb.com/bfs/vc/4c5126739114bb441cb3c12460a471733b1fe25a.jpg - * link : /5495804 - * face : https://i0.hdslb.com/bfs/face/a44d19265a7c3240122dbe36d598d75a00acffd5.jpg - * parent_id : 1 - * parent_name : 娱乐 - * area_id : 32 - * area_name : 手机直播 - * web_pendent : - * cover_size : {"height":180,"width":320} - * play_url : http://qn.live-play.acgvideo.com/live-qn/923710/live_203267722_7185906.flv?wsSecret=455db153c50c8adab57aa793f3c82ce8&wsTime=1519957201 - * accept_quality_v2 : [4] - * current_quality : 0 - * accept_quality : 4 - * broadcast_type : 1 - * is_tv : 0 - * corner : - * pendent : - */ - - @SerializedName("roomid") - private int roomId; - @SerializedName("uid") - private int uid; - @SerializedName("title") - private String title; - @SerializedName("uname") - private String username; - @SerializedName("online") - private int online; - @SerializedName("user_cover") - private String userCover; - @SerializedName("user_cover_flag") - private int userCoverFlag; - @SerializedName("system_cover") - private String systemCover; - @SerializedName("show_cover") - private String showCover; - @SerializedName("link") - private String link; - @SerializedName("face") - private String face; - @SerializedName("parent_id") - private int parentId; - @SerializedName("parent_name") - private String parentName; - @SerializedName("area_id") - private int areaId; - @SerializedName("area_name") - private String areaName; - @SerializedName("web_pendent") - private String webPendent; - @SerializedName("cover_size") - private CoverSize coverSize; - @SerializedName("play_url") - private String playUrl; - @SerializedName("current_quality") - private int currentQuality; - @SerializedName("accept_quality") - private String acceptQuality; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("is_tv") - private int isTv; - @SerializedName("corner") - private String corner; - @SerializedName("pendent") - private String pendent; - @SerializedName("accept_quality_v2") - private List acceptQualityV2; - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getUid() { - return uid; - } - - public void setUid(int uid) { - this.uid = uid; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public String getUserCover() { - return userCover; - } - - public void setUserCover(String userCover) { - this.userCover = userCover; - } - - public int getUserCoverFlag() { - return userCoverFlag; - } - - public void setUserCoverFlag(int userCoverFlag) { - this.userCoverFlag = userCoverFlag; - } - - public String getSystemCover() { - return systemCover; - } - - public void setSystemCover(String systemCover) { - this.systemCover = systemCover; - } - - public String getShowCover() { - return showCover; - } - - public void setShowCover(String showCover) { - this.showCover = showCover; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getParentId() { - return parentId; - } - - public void setParentId(int parentId) { - this.parentId = parentId; - } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public String getWebPendent() { - return webPendent; - } - - public void setWebPendent(String webPendent) { - this.webPendent = webPendent; - } - - public CoverSize getCoverSize() { - return coverSize; - } - - public void setCoverSize(CoverSize coverSize) { - this.coverSize = coverSize; - } - - public String getPlayUrl() { - return playUrl; - } - - public void setPlayUrl(String playUrl) { - this.playUrl = playUrl; - } - - public int getCurrentQuality() { - return currentQuality; - } - - public void setCurrentQuality(int currentQuality) { - this.currentQuality = currentQuality; - } - - public String getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(String acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public int getIsTv() { - return isTv; - } - - public void setIsTv(int isTv) { - this.isTv = isTv; - } - - public String getCorner() { - return corner; - } - - public void setCorner(String corner) { - this.corner = corner; - } - - public String getPendent() { - return pendent; - } - - public void setPendent(String pendent) { - this.pendent = pendent; - } - - public List getAcceptQualityV2() { - return acceptQualityV2; - } - - public void setAcceptQualityV2(List acceptQualityV2) { - this.acceptQualityV2 = acceptQualityV2; - } - - public static class CoverSize { - /** - * height : 180 - * width : 320 - */ - - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } - } - - public static class RecommendData { - /** - * partition : {"id":0,"name":"推荐主播","area":"hot","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"},"count":3528} - * banner_data : [{"cover":{"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320},"title":"今天,你的小视频上榜了吗?","is_clip":1,"new_cover":{"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320},"new_title":"B站大触竟然都在这里???","new_router":"https://h.bilibili.com/ywh/h5/index"}] - * lives : [{"owner":{"face":"https://i2.hdslb.com/bfs/face/4a31c283b90fcd6fe49b7a12662a14e607236c52.jpg","mid":2715177,"name":"祥宁嫂嫂丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3815b7eb6f5f15b61c8c7b6991f1b805495e7059.jpg","height":180,"width":320},"room_id":52658,"check_version":0,"online":2351,"area":"电子竞技","area_id":4,"title":"(新人推荐)全区免费首胜啦~","playurl":"http://xl.live-play.acgvideo.com/live-xl/882210/live_2715177_5087642.flv?wsSecret=39d9fd9a3f4a28eae0d8e9ce734313a0&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":86,"area_v2_name":"英雄联盟","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/f4c2ceae1988050e35201abafafed134b98195c7.jpg","mid":166584070,"name":"独上熹楼ヽ城主"},"cover":{"src":"https://i0.hdslb.com/bfs/live/54777c587d71c5eff7074f7e16a609a746379224.jpg","height":180,"width":320},"room_id":5469025,"check_version":0,"online":3419,"area":"唱见舞见","area_id":10,"title":"攻音受音陪你賴床 腐女慎入","playurl":"http://qn.live-play.acgvideo.com/live-qn/289198/live_166584070_2864596.flv?wsSecret=011980f56104608d1d1563488dddced9&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","data_behavior_id":"a0d146db7e2beaf:a0d146db7e2beaf:0:0","data_source_id":"system"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/c489cebbd9cb5902b950ca819ab1980d3fd49f5c.jpg","mid":1597982,"name":"Richard_Price"},"cover":{"src":"https://i0.hdslb.com/bfs/live/c46554cb778ac9941bf39e4771ff75c944f60e39.jpg","height":180,"width":320},"room_id":869069,"check_version":0,"online":814,"area":"唱见舞见","area_id":10,"title":"KTV, 元宵节快乐","playurl":"http://live-play.acgvideo.com/live/993/live_1597982_9114881.flv?wsSecret=626dadef4ec70594d55e5e67c48f1508&wsTime=5a712ed7","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/303f46216ceed76e2e5360a9de0c239ec9e32379.jpg","mid":719049,"name":"卖火柴的可可亚"},"cover":{"src":"https://i0.hdslb.com/bfs/live/2be48255ad5cd5b212ae2108d1e998568ee5efb1.jpg","height":180,"width":320},"room_id":53428,"check_version":0,"online":2712,"area":"单机联机","area_id":1,"title":"【影之诗】休闲游戏何必上分","playurl":"http://xl.live-play.acgvideo.com/live-xl/342779/live_719049_5853792.flv?wsSecret=39d2799d5266e44e3e4d0c19ee34f4ef&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ca7aaba009c22adcd1071522f9fdc6a4f669d532.jpg","mid":9870438,"name":"阿运呀"},"cover":{"src":"https://i0.hdslb.com/bfs/live/ff3d7a4d7cbe3cad02b14df15f56da239727f576.jpg","height":180,"width":320},"room_id":93279,"check_version":0,"online":3615,"area":"单机联机","area_id":1,"title":"【阿运】神秘海域4之一个萌新","playurl":"http://txy.live-play.acgvideo.com/live-txy/312360/live_9870438_5301909.flv?wsSecret=eeb9a68c89eb6171b4ab5b5bf3663a67&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/6ca5366bede574a88683201db31735466fb7665c.jpg","mid":4790535,"name":"祈咔"},"cover":{"src":"https://i0.hdslb.com/bfs/live/0149b64df95f1f31af4032871f3cc8942115ed13.jpg","height":180,"width":320},"room_id":100849,"check_version":0,"online":2661,"area":"唱见舞见","area_id":10,"title":"【古风】孤寡古疯老唱见","playurl":"http://dl.live-play.acgvideo.com/live-dl/905519/live_4790535_6783016.flv?wsSecret=189cdfc6e1af1682c236b43c8f3300a4&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/ceaffc80b824f1d277034622fba809ff3a50db89.jpg","mid":4008909,"name":"KIM高能萌"},"cover":{"src":"https://i0.hdslb.com/bfs/live/1cf09a1a579e608a1284b637a2f784c3558b91c6.jpg","height":180,"width":320},"room_id":7365762,"check_version":0,"online":2168,"area":"单机联机","area_id":1,"title":"少男的绝地描边画来了解一下^^","playurl":"http://qn.live-play.acgvideo.com/live-qn/108838/live_4008909_3934891.flv?wsSecret=7c3c5503e406cdfcd65caf25ed0e8be3&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/56e342a20940346d7026af2ff72a9bb89001a197.jpg","mid":13610473,"name":"北极星丶清寒"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d7f524a13e318769e77190ce7ee4002daf7206e0.jpg","height":180,"width":320},"room_id":402805,"check_version":0,"online":4227,"area":"单机联机","area_id":1,"title":"寒宾逊的1.12.2荒岛求生","playurl":"http://qn.live-play.acgvideo.com/live-qn/945345/live_13610473_8275609.flv?wsSecret=f5f547db01501929cdd424866b8a772f&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":56,"area_v2_name":"我的世界","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/9eb27d14a4b29e1aa32f645a5273a00796162c41.jpg","mid":19088449,"name":"猜十八"},"cover":{"src":"https://i0.hdslb.com/bfs/live/383c84bb6d3412ce8843209990b1aa4c2e4ea101.jpg","height":180,"width":320},"room_id":54912,"check_version":0,"online":4090,"area":"手游直播","area_id":12,"title":"手机吃鸡 人机大作战?","playurl":"http://qn.live-play.acgvideo.com/live-qn/488202/live_19088449_4499867.flv?wsSecret=349df85ace4fe1837a02d78e00e36678&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/25ca9cca4fa9522c08b12b7de48a2509734fcd9d.jpg","mid":463999,"name":"波喵喵喵"},"cover":{"src":"https://i0.hdslb.com/bfs/live/76e08ebaa07fd12c80374447f0ea0691a920bb4c.jpg","height":180,"width":320},"room_id":151159,"check_version":0,"online":662,"area":"生活娱乐","area_id":6,"title":"元宵快乐~","playurl":"http://dl.live-play.acgvideo.com/live-dl/299784/live_463999_8651963.flv?wsSecret=21f8ca49261774740366a83ed591ab54&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"娱乐分区No.3","area_v2_id":139,"area_v2_name":"美少女","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/29ff8cea978d08989193f13146006a5b14e22784.jpg","mid":9165690,"name":"桐人ヽ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/e8e88ba6d479acc6c39896ac2104d4d868a964f2.jpg","height":180,"width":320},"room_id":53100,"check_version":0,"online":3222,"area":"网络游戏","area_id":3,"title":"上午嘤嘤嘤下午夺命晚上吃鸡!","playurl":"http://qn.live-play.acgvideo.com/live-qn/359080/live_9165690_1198449.flv?wsSecret=8cfeafdf3b2cb6dd4cfc1b1308bc9644&wsTime=1519957201","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":84,"area_v2_name":"300英雄","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ce10c759df53720268b23ef8bd06150aa61834a5.jpg","mid":659965,"name":"基佬爱上熊"},"cover":{"src":"https://i0.hdslb.com/bfs/live/65b8641c7681faca6317314bc907edac984390f1.jpg","height":180,"width":320},"room_id":16101,"check_version":0,"online":4206,"area":"单机联机","area_id":1,"title":"【流放之路】一款继承暗黑2的游戏","playurl":"http://xl.live-play.acgvideo.com/live-xl/791352/live_659965_4719464.flv?wsSecret=38ef4f3b8dbd455b728d3c4d50bb0043&wsTime=1519957199","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"}] - */ - - @SerializedName("partition") - private PartitionX partition; - @SerializedName("banner_data") - private List bannerData; - @SerializedName("lives") - private List lives; - - public PartitionX getPartition() { - return partition; - } - - public void setPartition(PartitionX partition) { - this.partition = partition; - } - - public List getBannerData() { - return bannerData; - } - - public void setBannerData(List bannerData) { - this.bannerData = bannerData; - } - - public List getLives() { - return lives; - } - - public void setLives(List lives) { - this.lives = lives; - } - - public static class PartitionX { - /** - * id : 0 - * name : 推荐主播 - * area : hot - * sub_icon : {"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"} - * count : 3528 - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("area") - private String area; - @SerializedName("sub_icon") - private SubIconX subIcon; - @SerializedName("count") - private int count; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public SubIconX getSubIcon() { - return subIcon; - } - - public void setSubIcon(SubIconX subIcon) { - this.subIcon = subIcon; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public static class SubIconX { - /** - * src : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052 - * height : 63 - * width : 63 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private String height; - @SerializedName("width") - private String width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWidth() { - return width; - } - - public void setWidth(String width) { - this.width = width; - } - } - } - - public static class BannerData { - /** - * cover : {"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320} - * title : 今天,你的小视频上榜了吗? - * is_clip : 1 - * new_cover : {"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320} - * new_title : B站大触竟然都在这里??? - * new_router : https://h.bilibili.com/ywh/h5/index - */ - - @SerializedName("cover") - private Cover cover; - @SerializedName("title") - private String title; - @SerializedName("is_clip") - private int isClip; - @SerializedName("new_cover") - private NewCover newCover; - @SerializedName("new_title") - private String newTitle; - @SerializedName("new_router") - private String newRouter; - - public Cover getCover() { - return cover; - } - - public void setCover(Cover cover) { - this.cover = cover; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public int getIsClip() { - return isClip; - } - - public void setIsClip(int isClip) { - this.isClip = isClip; - } - - public NewCover getNewCover() { - return newCover; - } - - public void setNewCover(NewCover newCover) { - this.newCover = newCover; - } - - public String getNewTitle() { - return newTitle; - } - - public void setNewTitle(String newTitle) { - this.newTitle = newTitle; - } - - public String getNewRouter() { - return newRouter; - } - - public void setNewRouter(String newRouter) { - this.newRouter = newRouter; - } - - public static class Cover { - /** - * src : https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - - public static class NewCover { - /** - * src : https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } - - public static class LivesX { - /** - * owner : {"face":"https://i2.hdslb.com/bfs/face/4a31c283b90fcd6fe49b7a12662a14e607236c52.jpg","mid":2715177,"name":"祥宁嫂嫂丶"} - * cover : {"src":"https://i0.hdslb.com/bfs/live/3815b7eb6f5f15b61c8c7b6991f1b805495e7059.jpg","height":180,"width":320} - * room_id : 52658 - * check_version : 0 - * online : 2351 - * area : 电子竞技 - * area_id : 4 - * title : (新人推荐)全区免费首胜啦~ - * playurl : http://xl.live-play.acgvideo.com/live-xl/882210/live_2715177_5087642.flv?wsSecret=39d9fd9a3f4a28eae0d8e9ce734313a0&wsTime=1519957201 - * accept_quality_v2 : [] - * current_quality : 4 - * accept_quality : 4 - * broadcast_type : 0 - * is_tv : 0 - * corner : - * pendent : - * area_v2_id : 86 - * area_v2_name : 英雄联盟 - * area_v2_parent_id : 2 - * area_v2_parent_name : 游戏 - * data_behavior_id : a0d146db7e2beaf:a0d146db7e2beaf:0:0 - * data_source_id : system - */ - - @SerializedName("owner") - private Owner owner; - @SerializedName("cover") - private CoverX cover; - @SerializedName("room_id") - private int roomId; - @SerializedName("check_version") - private int checkVersion; - @SerializedName("online") - private int online; - @SerializedName("area") - private String area; - @SerializedName("area_id") - private int areaId; - @SerializedName("title") - private String title; - @SerializedName("playurl") - private String playUrl; - @SerializedName("current_quality") - private int currentQuality; - @SerializedName("accept_quality") - private String acceptQuality; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("is_tv") - private int isTv; - @SerializedName("corner") - private String corner; - @SerializedName("pendent") - private String pendent; - @SerializedName("area_v2_id") - private int areaV2Id; - @SerializedName("area_v2_name") - private String areaV2Name; - @SerializedName("area_v2_parent_id") - private int areaV2ParentId; - @SerializedName("area_v2_parent_name") - private String areaV2ParentName; - @SerializedName("data_behavior_id") - private String dataBehaviorId; - @SerializedName("data_source_id") - private String dataSourceId; - @SerializedName("accept_quality_v2") - private List acceptQualityV2; - - public Owner getOwner() { - return owner; - } - - public void setOwner(Owner owner) { - this.owner = owner; - } - - public CoverX getCover() { - return cover; - } - - public void setCover(CoverX cover) { - this.cover = cover; - } - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getCheckVersion() { - return checkVersion; - } - - public void setCheckVersion(int checkVersion) { - this.checkVersion = checkVersion; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getPlayUrl() { - return playUrl; - } - - public void setPlayUrl(String playUrl) { - this.playUrl = playUrl; - } - - public int getCurrentQuality() { - return currentQuality; - } - - public void setCurrentQuality(int currentQuality) { - this.currentQuality = currentQuality; - } - - public String getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(String acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public int getIsTv() { - return isTv; - } - - public void setIsTv(int isTv) { - this.isTv = isTv; - } - - public String getCorner() { - return corner; - } - - public void setCorner(String corner) { - this.corner = corner; - } - - public String getPendent() { - return pendent; - } - - public void setPendent(String pendent) { - this.pendent = pendent; - } - - public int getAreaV2Id() { - return areaV2Id; - } - - public void setAreaV2Id(int areaV2Id) { - this.areaV2Id = areaV2Id; - } - - public String getAreaV2Name() { - return areaV2Name; - } - - public void setAreaV2Name(String areaV2Name) { - this.areaV2Name = areaV2Name; - } - - public int getAreaV2ParentId() { - return areaV2ParentId; - } - - public void setAreaV2ParentId(int areaV2ParentId) { - this.areaV2ParentId = areaV2ParentId; - } - - public String getAreaV2ParentName() { - return areaV2ParentName; - } - - public void setAreaV2ParentName(String areaV2ParentName) { - this.areaV2ParentName = areaV2ParentName; - } - - public String getDataBehaviorId() { - return dataBehaviorId; - } - - public void setDataBehaviorId(String dataBehaviorId) { - this.dataBehaviorId = dataBehaviorId; - } - - public String getDataSourceId() { - return dataSourceId; - } - - public void setDataSourceId(String dataSourceId) { - this.dataSourceId = dataSourceId; - } - - public List getAcceptQualityV2() { - return acceptQualityV2; - } - - public void setAcceptQualityV2(List acceptQualityV2) { - this.acceptQualityV2 = acceptQualityV2; - } - - public static class Owner { - /** - * face : https://i2.hdslb.com/bfs/face/4a31c283b90fcd6fe49b7a12662a14e607236c52.jpg - * mid : 2715177 - * name : 祥宁嫂嫂丶 - */ - - @SerializedName("face") - private String face; - @SerializedName("mid") - private long userId; - @SerializedName("name") - private String name; - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - - public static class CoverX { - /** - * src : https://i0.hdslb.com/bfs/live/3815b7eb6f5f15b61c8c7b6991f1b805495e7059.jpg - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } - } - - public static class Banner { - /** - * title : 直播周刊 - * img : https://i0.hdslb.com/bfs/live/af17c8d882104370075f4fa5418343861ac3e540.png - * remark : 直播周刊 - * link : https://live.bilibili.com/AppBanner/index?id=746 - */ - - @SerializedName("title") - private String title; - @SerializedName("img") - private String img; - @SerializedName("remark") - private String remark; - @SerializedName("link") - private String link; - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - } - - public static class EntranceIcons { - /** - * id : 9 - * name : 绘画专区 - * entrance_icon : {"src":"https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/9_big.png?20171116172700","height":"132","width":"132"} - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("entrance_icon") - private EntranceIcon entranceIcon; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public EntranceIcon getEntranceIcon() { - return entranceIcon; - } - - public void setEntranceIcon(EntranceIcon entranceIcon) { - this.entranceIcon = entranceIcon; - } - - public static class EntranceIcon { - /** - * src : https://static.hdslb.com/live-static/images/mobile/android/big/xxhdpi/9_big.png?20171116172700 - * height : 132 - * width : 132 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private String height; - @SerializedName("width") - private String width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWidth() { - return width; - } - - public void setWidth(String width) { - this.width = width; - } - } - } - - public static class Partitions { - /** - * partition : {"id":1,"name":"娱乐","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/1_3x.png?201709151052","height":"63","width":"63"},"count":1484} - * lives : [{"roomid":7399897,"uid":7619276,"title":"包裹有免费B坷垃可送哦(点这看直播单)","uname":"星子弈风","online":145,"user_cover":"https://i0.hdslb.com/bfs/live/7fc54c49ed7db4bc53fe6e5c8888db3eb0c01d7c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/7399897.jpg?03020945","show_cover":false,"link":"/7399897","face":"https://i2.hdslb.com/bfs/face/41c4b60b54795870ac4d209dc949a51ca7614062.jpg","parent_id":1,"parent_name":"娱乐","area_id":123,"area_name":"户外","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/415156/live_7619276_6963984.flv?wsSecret=26f02e69c2e01fc840da1f452d673f37&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":2802503,"uid":34993653,"title":"做个温柔读书哄睡的小姐姐","username":"楚小芭","online":958,"user_cover":"https://i0.hdslb.com/bfs/live/33e9537f94545758035b14a59a68fd1b78f8184b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/2802503.jpg?03020945","show_cover":false,"link":"/2802503","face":"https://i0.hdslb.com/bfs/face/41a917cb13f546e62bfea4e06a7781d8118c676e.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/368878/live_34993653_4247645.flv?wsSecret=01587e645b73cfeec12992ac3f3b8288&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":910884,"uid":20165629,"title":"跟我走!","username":"共青团中央","online":15974,"user_cover":"https://i0.hdslb.com/bfs/live/2591ba98c2db7da32dd40ac100322ab8d9a218c6.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/910884.jpg?03020946","show_cover":false,"link":"/910884","face":"https://i0.hdslb.com/bfs/face/3b4caf3ad325fd962bf98f90e4aac0b4ae4679c8.jpg","parent_id":1,"parent_name":"娱乐","area_id":123,"area_name":"户外","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/377121/live_20165629_5904889.flv?wsSecret=88113f81c6eb29be592c43d4cbaddc0c&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":30040,"uid":5480206,"title":"破产 弹到一半随时卖琴","username":"桥白白白白","online":955,"user_cover":"https://i0.hdslb.com/bfs/live/f7ac32e981f4cd7b0bf6733ba79e705dd312e8f4.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/30040.jpg?03020946","show_cover":false,"link":"/5454","face":"https://i1.hdslb.com/bfs/face/67ba6957182bb865c8b4b5fd9006778af0cf9f71.jpg","parent_id":1,"parent_name":"娱乐","area_id":143,"area_name":"才艺","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/680310/live_5480206_332_c521e483.flv?wsSecret=0d2d608349a38973aaded375418ceca3&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":1338247,"uid":27894414,"title":"来呀来呀造人呀!造人人人人人人人!","username":"露琪亚Rukiaルキア","online":78,"user_cover":"https://i0.hdslb.com/bfs/live/b5accf156795b0e24c406bb2debe3448032e13fd.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1338247.jpg?03020946","show_cover":false,"link":"/1338247","face":"https://i0.hdslb.com/bfs/face/b4dda315df2c9ffcc5f378b5871932e42122c567.jpg","parent_id":1,"parent_name":"娱乐","area_id":25,"area_name":"手工","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/558698/live_27894414_1428176.flv?wsSecret=1189d19dfda8cc47ae10d258ae9be26a&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomId":4346987,"uid":30580510,"title":"你来喵~一声,我也会喵~给你听哟~","username":"是白米不是黑米","online":368,"user_cover":"https://i0.hdslb.com/bfs/live/4f10d04cfebc28bc48a7d9be2f9fb91d83c7226f.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/4346987.jpg?03020946","show_cover":false,"link":"/4346987","face":"https://i0.hdslb.com/bfs/face/f7e093a0613af8cf95ca684deb0fbfa7b2ab2ba3.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/723153/live_30580510_8427291.flv?wsSecret=cb1dd97e388bde304a3aedeab071ca87&wsTime=1519957197","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}] - */ - - @SerializedName("partition") - private PartitionXX partition; - @SerializedName("lives") - private List lives; - - public PartitionXX getPartition() { - return partition; - } - - public void setPartition(PartitionXX partition) { - this.partition = partition; - } - - public List getLives() { - return lives; - } - - public void setLives(List lives) { - this.lives = lives; - } - - public static class PartitionXX { - /** - * id : 1 - * name : 娱乐 - * sub_icon : {"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/1_3x.png?201709151052","height":"63","width":"63"} - * count : 1484 - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("sub_icon") - private SubIconXX subIcon; - @SerializedName("count") - private int count; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public SubIconXX getSubIcon() { - return subIcon; - } - - public void setSubIcon(SubIconXX subIcon) { - this.subIcon = subIcon; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public static class SubIconXX { - /** - * src : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/1_3x.png?201709151052 - * height : 63 - * width : 63 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private String height; - @SerializedName("width") - private String width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWidth() { - return width; - } - - public void setWidth(String width) { - this.width = width; - } - } - } - - public static class LivesXX { - /** - * roomid : 7399897 - * uid : 7619276 - * title : 包裹有免费B坷垃可送哦(点这看直播单) - * uname : 星子弈风 - * online : 145 - * user_cover : https://i0.hdslb.com/bfs/live/7fc54c49ed7db4bc53fe6e5c8888db3eb0c01d7c.jpg - * user_cover_flag : 1 - * system_cover : https://i0.hdslb.com/bfs/live/7399897.jpg?03020945 - * show_cover : false - * link : /7399897 - * face : https://i2.hdslb.com/bfs/face/41c4b60b54795870ac4d209dc949a51ca7614062.jpg - * parent_id : 1 - * parent_name : 娱乐 - * area_id : 123 - * area_name : 户外 - * web_pendent : - * cover_size : {"height":180,"width":320} - * play_url : http://js.live-play.acgvideo.com/live-js/415156/live_7619276_6963984.flv?wsSecret=26f02e69c2e01fc840da1f452d673f37&wsTime=1519957197 - * accept_quality_v2 : [4] - * current_quality : 0 - * accept_quality : 4 - * broadcast_type : 0 - * is_tv : 0 - * corner : - * pendent : - */ - - @SerializedName("roomid") - private int roomId; - @SerializedName("uid") - private int uid; - @SerializedName("title") - private String title; - @SerializedName("uname") - private String username; - @SerializedName("online") - private int online; - @SerializedName("user_cover") - private String userCover; - @SerializedName("user_cover_flag") - private int userCoverFlag; - @SerializedName("system_cover") - private String systemCover; - @SerializedName("show_cover") - private boolean showCover; - @SerializedName("link") - private String link; - @SerializedName("face") - private String face; - @SerializedName("parent_id") - private int parentId; - @SerializedName("parent_name") - private String parentName; - @SerializedName("area_id") - private int areaId; - @SerializedName("area_name") - private String areaName; - @SerializedName("web_pendent") - private String webPendent; - @SerializedName("cover_size") - private CoverSizeX coverSize; - @SerializedName("play_url") - private String playUrl; - @SerializedName("current_quality") - private int currentQuality; - @SerializedName("accept_quality") - private String acceptQuality; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("is_tv") - private int isTv; - @SerializedName("corner") - private String corner; - @SerializedName("pendent") - private String pendent; - @SerializedName("accept_quality_v2") - private List acceptQualityV2; - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getUid() { - return uid; - } - - public void setUid(int uid) { - this.uid = uid; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public String getUserCover() { - return userCover; - } - - public void setUserCover(String userCover) { - this.userCover = userCover; - } - - public int getUserCoverFlag() { - return userCoverFlag; - } - - public void setUserCoverFlag(int userCoverFlag) { - this.userCoverFlag = userCoverFlag; - } - - public String getSystemCover() { - return systemCover; - } - - public void setSystemCover(String systemCover) { - this.systemCover = systemCover; - } - - public boolean isShowCover() { - return showCover; - } - - public void setShowCover(boolean showCover) { - this.showCover = showCover; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getParentId() { - return parentId; - } - - public void setParentId(int parentId) { - this.parentId = parentId; - } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public String getWebPendent() { - return webPendent; - } - - public void setWebPendent(String webPendent) { - this.webPendent = webPendent; - } - - public CoverSizeX getCoverSize() { - return coverSize; - } - - public void setCoverSize(CoverSizeX coverSize) { - this.coverSize = coverSize; - } - - public String getPlayUrl() { - return playUrl; - } - - public void setPlayUrl(String playUrl) { - this.playUrl = playUrl; - } - - public int getCurrentQuality() { - return currentQuality; - } - - public void setCurrentQuality(int currentQuality) { - this.currentQuality = currentQuality; - } - - public String getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(String acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public int getIsTv() { - return isTv; - } - - public void setIsTv(int isTv) { - this.isTv = isTv; - } - - public String getCorner() { - return corner; - } - - public void setCorner(String corner) { - this.corner = corner; - } - - public String getPendent() { - return pendent; - } - - public void setPendent(String pendent) { - this.pendent = pendent; - } - - public List getAcceptQualityV2() { - return acceptQualityV2; - } - - public void setAcceptQualityV2(List acceptQualityV2) { - this.acceptQualityV2 = acceptQualityV2; - } - - public static class CoverSizeX { - /** - * height : 180 - * width : 320 - */ - - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/AppSmallTVEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/AppSmallTVEntity.java deleted file mode 100644 index 637ff94..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/AppSmallTVEntity.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class AppSmallTVEntity extends ResponseEntity { - /** - * code : 0 - * msg : OK - * message : OK - * data : {"lastid":0,"join":[{"id":39674,"dtime":32}],"unjoin":[{"id":39674,"dtime":32}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * lastid : 0 - * join : [{"id":39674,"dtime":32}] - * unjoin : [{"id":39674,"dtime":32}] - */ - - @SerializedName("lastid") - private long lastId; - @SerializedName("join") - private List join; - @SerializedName("unjoin") - private List unJoin; - - public long getLastId() { - return lastId; - } - - public void setLastId(long lastId) { - this.lastId = lastId; - } - - public List getJoin() { - return join; - } - - public void setJoin(List join) { - this.join = join; - } - - public List getUnJoin() { - return unJoin; - } - - public void setUnJoin(List unJoin) { - this.unJoin = unJoin; - } - - public static class Join { - /** - * id : 39674 - * dtime : 32 - */ - - @SerializedName("id") - private long id; - @SerializedName("dtime") - private int dtime; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public int getDtime() { - return dtime; - } - - public void setDtime(int dtime) { - this.dtime = dtime; - } - } - - public static class Unjoin { - /** - * id : 39674 - * dtime : 32 - */ - - @SerializedName("id") - private long id; - @SerializedName("dtime") - private int dtime; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public int getDtime() { - return dtime; - } - - public void setDtime(int dtime) { - this.dtime = dtime; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/AreaListEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/AreaListEntity.java deleted file mode 100644 index 6416aef..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/AreaListEntity.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class AreaListEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : [{"id":"56","parent_id":"2","old_area_id":"1","name":"我的世界","act_id":"0"},{"id":"57","parent_id":"2","old_area_id":"1","name":"以撒","act_id":"0"},{"id":"64","parent_id":"2","old_area_id":"1","name":"饥荒","act_id":"0"},{"id":"65","parent_id":"2","old_area_id":"1","name":"彩虹六号","act_id":"0"},{"id":"78","parent_id":"2","old_area_id":"3","name":"DNF","act_id":"0"},{"id":"80","parent_id":"2","old_area_id":"1","name":"绝地求生:大逃杀","act_id":"0"},{"id":"81","parent_id":"2","old_area_id":"3","name":"三国杀","act_id":"0"},{"id":"82","parent_id":"2","old_area_id":"3","name":"剑网3","act_id":"0"},{"id":"83","parent_id":"2","old_area_id":"3","name":"魔兽世界","act_id":"0"},{"id":"84","parent_id":"2","old_area_id":"3","name":"300英雄","act_id":"0"},{"id":"86","parent_id":"2","old_area_id":"4","name":"英雄联盟","act_id":"0"},{"id":"87","parent_id":"2","old_area_id":"3","name":"守望先锋","act_id":"0"},{"id":"88","parent_id":"2","old_area_id":"4","name":"穿越火线","act_id":"0"},{"id":"89","parent_id":"2","old_area_id":"4","name":"CS:GO","act_id":"0"},{"id":"90","parent_id":"2","old_area_id":"4","name":"CS","act_id":"0"},{"id":"91","parent_id":"2","old_area_id":"3","name":"炉石传说","act_id":"0"},{"id":"92","parent_id":"2","old_area_id":"4","name":"DOTA2","act_id":"0"},{"id":"93","parent_id":"2","old_area_id":"4","name":"星际争霸2","act_id":"0"},{"id":"102","parent_id":"2","old_area_id":"3","name":"最终幻想14","act_id":"0"},{"id":"112","parent_id":"2","old_area_id":"3","name":"龙之谷","act_id":"0"},{"id":"114","parent_id":"2","old_area_id":"4","name":"风暴英雄","act_id":"0"},{"id":"115","parent_id":"2","old_area_id":"3","name":"坦克世界","act_id":"0"},{"id":"138","parent_id":"2","old_area_id":"1","name":"超级马里奥奥德赛","act_id":"0"},{"id":"147","parent_id":"2","old_area_id":"1","name":"怪物猎人:世界","act_id":"0"},{"id":"107","parent_id":"2","old_area_id":"1","name":"其他游戏","act_id":"0"}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - public static class Data { - /** - * id : 56 - * parent_id : 2 - * old_area_id : 1 - * name : 我的世界 - * act_id : 0 - */ - - @SerializedName("id") - private String id; - @SerializedName("parent_id") - private String parentId; - @SerializedName("old_area_id") - private String oldAreaId; - @SerializedName("name") - private String name; - @SerializedName("act_id") - private String actId; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getParentId() { - return parentId; - } - - public void setParentId(String parentId) { - this.parentId = parentId; - } - - public String getOldAreaId() { - return oldAreaId; - } - - public void setOldAreaId(String oldAreaId) { - this.oldAreaId = oldAreaId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getActId() { - return actId; - } - - public void setActId(String actId) { - this.actId = actId; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/AssistantRoomInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/AssistantRoomInfoEntity.java deleted file mode 100644 index 039b3ad..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/AssistantRoomInfoEntity.java +++ /dev/null @@ -1,336 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class AssistantRoomInfoEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * msg : ok - * data : {"roomId":29434,"face":"https://i1.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg","uname":"hyx5020","rcost":35946,"online":519,"status":0,"fansNum":548,"title":"SpaceX重型猎鹰(FH)发射重播","istry":0,"try_time":"0000-00-00 00:00:00","is_medal":1,"medal_name":"502零","medal_status":1,"medal_rename_status":1,"master_score":8786,"master_level":11,"master_level_color":5805790,"master_next_level":12,"master_level_current":12450,"max_level":40,"end_day":-1,"identification":1,"identification_check_status":1,"area":33,"open_medal_level":10,"is_set_medal":1,"fulltext":"LV等级5级或UP等级10级才能开通粉丝勋章哦~加油!"} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * roomId : 29434 - * face : https://i1.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg - * uname : hyx5020 - * rcost : 35946 - * online : 519 - * status : 0 - * fansNum : 548 - * title : SpaceX重型猎鹰(FH)发射重播 - * istry : 0 - * try_time : 0000-00-00 00:00:00 - * is_medal : 1 - * medal_name : 502零 - * medal_status : 1 - * medal_rename_status : 1 - * master_score : 8786 - * master_level : 11 - * master_level_color : 5805790 - * master_next_level : 12 - * master_level_current : 12450 - * max_level : 40 - * end_day : -1 - * identification : 1 - * identification_check_status : 1 - * area : 33 - * open_medal_level : 10 - * is_set_medal : 1 - * fulltext : LV等级5级或UP等级10级才能开通粉丝勋章哦~加油! - */ - - @SerializedName("roomId") - private int roomId; - @SerializedName("face") - private String face; - @SerializedName("uname") - private String username; - @SerializedName("rcost") - private int roomCost; - @SerializedName("online") - private int online; - @SerializedName("status") - private int status; - @SerializedName("fansNum") - private int fansNum; - @SerializedName("title") - private String title; - @SerializedName("istry") - private int isTry; - @SerializedName("try_time") - private String tryTime; - @SerializedName("is_medal") - private int isMedal; - @SerializedName("medal_name") - private String medalName; - @SerializedName("medal_status") - private int medalStatus; - @SerializedName("medal_rename_status") - private int medalRenameStatus; - @SerializedName("master_score") - private int masterScore; - @SerializedName("master_level") - private int masterLevel; - @SerializedName("master_level_color") - private int masterLevelColor; - @SerializedName("master_next_level") - private int masterNextLevel; - @SerializedName("master_level_current") - private int masterLevelCurrent; - @SerializedName("max_level") - private int maxLevel; - @SerializedName("end_day") - private int endDay; - @SerializedName("identification") - private int identification; - @SerializedName("identification_check_status") - private int identificationCheckStatus; - @SerializedName("area") - private int area; - @SerializedName("open_medal_level") - private int openMedalLevel; - @SerializedName("is_set_medal") - private int isSetMedal; - @SerializedName("fulltext") - private String fulltext; - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getRoomCost() { - return roomCost; - } - - public void setRoomCost(int roomCost) { - this.roomCost = roomCost; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public int getFansNum() { - return fansNum; - } - - public void setFansNum(int fansNum) { - this.fansNum = fansNum; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public int getIsTry() { - return isTry; - } - - public void setIsTry(int isTry) { - this.isTry = isTry; - } - - public String getTryTime() { - return tryTime; - } - - public void setTryTime(String tryTime) { - this.tryTime = tryTime; - } - - public int getIsMedal() { - return isMedal; - } - - public void setIsMedal(int isMedal) { - this.isMedal = isMedal; - } - - public String getMedalName() { - return medalName; - } - - public void setMedalName(String medalName) { - this.medalName = medalName; - } - - public int getMedalStatus() { - return medalStatus; - } - - public void setMedalStatus(int medalStatus) { - this.medalStatus = medalStatus; - } - - public int getMedalRenameStatus() { - return medalRenameStatus; - } - - public void setMedalRenameStatus(int medalRenameStatus) { - this.medalRenameStatus = medalRenameStatus; - } - - public int getMasterScore() { - return masterScore; - } - - public void setMasterScore(int masterScore) { - this.masterScore = masterScore; - } - - public int getMasterLevel() { - return masterLevel; - } - - public void setMasterLevel(int masterLevel) { - this.masterLevel = masterLevel; - } - - public int getMasterLevelColor() { - return masterLevelColor; - } - - public void setMasterLevelColor(int masterLevelColor) { - this.masterLevelColor = masterLevelColor; - } - - public int getMasterNextLevel() { - return masterNextLevel; - } - - public void setMasterNextLevel(int masterNextLevel) { - this.masterNextLevel = masterNextLevel; - } - - public int getMasterLevelCurrent() { - return masterLevelCurrent; - } - - public void setMasterLevelCurrent(int masterLevelCurrent) { - this.masterLevelCurrent = masterLevelCurrent; - } - - public int getMaxLevel() { - return maxLevel; - } - - public void setMaxLevel(int maxLevel) { - this.maxLevel = maxLevel; - } - - public int getEndDay() { - return endDay; - } - - public void setEndDay(int endDay) { - this.endDay = endDay; - } - - public int getIdentification() { - return identification; - } - - public void setIdentification(int identification) { - this.identification = identification; - } - - public int getIdentificationCheckStatus() { - return identificationCheckStatus; - } - - public void setIdentificationCheckStatus(int identificationCheckStatus) { - this.identificationCheckStatus = identificationCheckStatus; - } - - public int getArea() { - return area; - } - - public void setArea(int area) { - this.area = area; - } - - public int getOpenMedalLevel() { - return openMedalLevel; - } - - public void setOpenMedalLevel(int openMedalLevel) { - this.openMedalLevel = openMedalLevel; - } - - public int getIsSetMedal() { - return isSetMedal; - } - - public void setIsSetMedal(int isSetMedal) { - this.isSetMedal = isSetMedal; - } - - public String getFulltext() { - return fulltext; - } - - public void setFulltext(String fulltext) { - this.fulltext = fulltext; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/AwardsEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/AwardsEntity.java deleted file mode 100644 index 9ffb6bb..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/AwardsEntity.java +++ /dev/null @@ -1,277 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class AwardsEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"list":[{"id":100000,"uid":1000000,"gift_name":"小电视","gift_type":"2","gift_num":1,"user_name":"打码","user_phone":"打码","user_address":"打码","user_extra_field":"{\"user_area\":\"打码\",\"user_post_code\":\"打码\",\"user_city\":\"打码\",\"user_province\":\"打码\"}","source":"小电视抽奖","source_id":10000,"create_time":"2018-02-01 00:00:00","update_time":null,"expire_time":"2018-02-16 00:00:00","comment":null,"status":0,"expire":true,"finished":true},{"id":10000,"uid":1000000,"gift_name":"小米Max2手机","gift_type":"2","gift_num":1,"user_name":"打码","user_phone":"打码","user_address":"打码","user_extra_field":"{\"user_province\":\"\\u6253\\u7801\",\"user_city\":\"\\u6253\\u7801\",\"user_area\":\"\\u6253\\u7801\",\"user_post_code\":\"打码\"}","source":"小米Max2超耐久直播第二季","source_id":1,"create_time":"2017-06-01 00:00:00","update_time":"2017-06-01 00:00:00","expire_time":"2017-06-30 00:00:00","comment":null,"status":0,"expire":true,"finished":true}],"use_count":0,"count":2} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * list : [{"id":100000,"uid":1000000,"gift_name":"小电视","gift_type":"2","gift_num":1,"user_name":"打码","user_phone":"打码","user_address":"打码","user_extra_field":"{\"user_area\":\"打码\",\"user_post_code\":\"打码\",\"user_city\":\"打码\",\"user_province\":\"打码\"}","source":"小电视抽奖","source_id":10000,"create_time":"2018-02-01 00:00:00","update_time":null,"expire_time":"2018-02-16 00:00:00","comment":null,"status":0,"expire":true,"finished":true},{"id":10000,"uid":1000000,"gift_name":"小米Max2手机","gift_type":"2","gift_num":1,"user_name":"打码","user_phone":"打码","user_address":"打码","user_extra_field":"{\"user_province\":\"\\u6253\\u7801\",\"user_city\":\"\\u6253\\u7801\",\"user_area\":\"\\u6253\\u7801\",\"user_post_code\":\"打码\"}","source":"小米Max2超耐久直播第二季","source_id":1,"create_time":"2017-06-01 00:00:00","update_time":"2017-06-01 00:00:00","expire_time":"2017-06-30 00:00:00","comment":null,"status":0,"expire":true,"finished":true}] - * use_count : 0 - * count : 2 - */ - - @SerializedName("use_count") - private int useCount; - @SerializedName("count") - private int count; - @SerializedName("list") - private List awardList; - - public int getUseCount() { - return useCount; - } - - public void setUseCount(int useCount) { - this.useCount = useCount; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public List getAwardList() { - return awardList; - } - - public void setAwardList(List awardList) { - this.awardList = awardList; - } - - public static class Award { - /** - * id : 100000 - * uid : 1000000 - * gift_name : 小电视 - * gift_type : 2 - * gift_num : 1 - * user_name : 打码 - * user_phone : 打码 - * user_address : 打码 - * user_extra_field : {"user_area":"打码","user_post_code":"打码","user_city":"打码","user_province":"打码"} - * source : 小电视抽奖 - * source_id : 10000 - * create_time : 2018-02-01 00:00:00 - * update_time : null - * expire_time : 2018-02-16 00:00:00 - * comment : null - * status : 0 - * expire : true - * finished : true - */ - - @SerializedName("id") - private int id; - @SerializedName("uid") - private long userId; - @SerializedName("gift_name") - private String giftName; - @SerializedName("gift_type") - private String giftType; - @SerializedName("gift_num") - private int giftNum; - @SerializedName("user_name") - private String userName; - @SerializedName("user_phone") - private String userPhone; - @SerializedName("user_address") - private String userAddress; - @SerializedName("user_extra_field") - private String userExtraField; - @SerializedName("source") - private String source; - @SerializedName("source_id") - private int sourceId; - @SerializedName("create_time") - private String createTime; - @SerializedName("update_time") - private Object updateTime; - @SerializedName("expire_time") - private String expireTime; - @SerializedName("comment") - private Object comment; - @SerializedName("status") - private int status; - @SerializedName("expire") - private boolean expire; - @SerializedName("finished") - private boolean finished; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public String getGiftType() { - return giftType; - } - - public void setGiftType(String giftType) { - this.giftType = giftType; - } - - public int getGiftNum() { - return giftNum; - } - - public void setGiftNum(int giftNum) { - this.giftNum = giftNum; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getUserPhone() { - return userPhone; - } - - public void setUserPhone(String userPhone) { - this.userPhone = userPhone; - } - - public String getUserAddress() { - return userAddress; - } - - public void setUserAddress(String userAddress) { - this.userAddress = userAddress; - } - - public String getUserExtraField() { - return userExtraField; - } - - public void setUserExtraField(String userExtraField) { - this.userExtraField = userExtraField; - } - - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } - - public int getSourceId() { - return sourceId; - } - - public void setSourceId(int sourceId) { - this.sourceId = sourceId; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public Object getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Object updateTime) { - this.updateTime = updateTime; - } - - public String getExpireTime() { - return expireTime; - } - - public void setExpireTime(String expireTime) { - this.expireTime = expireTime; - } - - public Object getComment() { - return comment; - } - - public void setComment(Object comment) { - this.comment = comment; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public boolean isExpire() { - return expire; - } - - public void setExpire(boolean expire) { - this.expire = expire; - } - - public boolean isFinished() { - return finished; - } - - public void setFinished(boolean finished) { - this.finished = finished; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/BulletScreenConfigEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/BulletScreenConfigEntity.java deleted file mode 100644 index 08ffcdd..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/BulletScreenConfigEntity.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class BulletScreenConfigEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"refresh_row_factor":0.125,"refresh_rate":100,"max_delay":5000} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * refresh_row_factor : 0.125 - * refresh_rate : 100 - * max_delay : 5000 - */ - - @SerializedName("refresh_row_factor") - private double refreshRowFactor; - @SerializedName("refresh_rate") - private int refreshRate; - @SerializedName("max_delay") - private int maxDelay; - - public double getRefreshRowFactor() { - return refreshRowFactor; - } - - public void setRefreshRowFactor(double refreshRowFactor) { - this.refreshRowFactor = refreshRowFactor; - } - - public int getRefreshRate() { - return refreshRate; - } - - public void setRefreshRate(int refreshRate) { - this.refreshRate = refreshRate; - } - - public int getMaxDelay() { - return maxDelay; - } - - public void setMaxDelay(int maxDelay) { - this.maxDelay = maxDelay; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/BulletScreenEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/BulletScreenEntity.java deleted file mode 100644 index d67bd30..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/BulletScreenEntity.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class BulletScreenEntity { - @SerializedName("cid") - private long roomId; - - @SerializedName("mid") - private long userId; - - /** - * 弹幕长度限制为 LiveRoomInfoEntity.getData().getMsgLength(), 对于每个用户而言, 每个房间都一样 - * 通过完成 B站 有关任务, 获得成就, 可以加大这个限制(舰长, 老爷等可以直接加大限制), 最长好像是 40 个字 - */ - @SerializedName("msg") - private String message; - - /** - * 在 web 端发送弹幕, 该字段是固定的, 为用户进入直播页面的时间的时间戳. 但是在 Android 端, 这是一个随机数 - * 该随机数不包括符号位有 9 位 - */ - @SerializedName("rnd") - private long random = (long) (Math.random() * (999999999 - (-999999999)) + (-999999999)); - - /** - * 1 普通 - * 4 底端 - * 5 顶端 - * 6 逆向 - * 7 特殊 - * 9 高级 - * 一些模式需要 VIP - */ - private int mode = 1; - - /** - * 弹幕池 - * 尚且只见过为 0 的情况 - */ - private int pool = 0; - - private String type = "json"; - - private int color = 16777215; - - @SerializedName("fontsize") - private int fontSize = 25; - - private String playTime = "0.0"; - - /** - * 实际上并不需要包含 mid 就可以正常发送弹幕, 但是真实的 Android 客户端确实发送了 mid - */ - public BulletScreenEntity(long roomId, long userId, String message) { - this.roomId = roomId; - this.userId = userId; - this.message = message; - } - - public long getRoomId() { - return roomId; - } - - public BulletScreenEntity setRoomId(long roomId) { - this.roomId = roomId; - return this; - } - - public long getUserId() { - return userId; - } - - public BulletScreenEntity setUserId(long userId) { - this.userId = userId; - return this; - } - - public String getMessage() { - return message; - } - - public BulletScreenEntity setMessage(String message) { - this.message = message; - return this; - } - - public long getRandom() { - return random; - } - - public BulletScreenEntity setRandom(long random) { - this.random = random; - return this; - } - - public int getMode() { - return mode; - } - - public BulletScreenEntity setMode(int mode) { - this.mode = mode; - return this; - } - - public int getPool() { - return pool; - } - - public BulletScreenEntity setPool(int pool) { - this.pool = pool; - return this; - } - - public String getType() { - return type; - } - - public BulletScreenEntity setType(String type) { - this.type = type; - return this; - } - - public int getColor() { - return color; - } - - public BulletScreenEntity setColor(int color) { - this.color = color; - return this; - } - - public int getFontSize() { - return fontSize; - } - - public BulletScreenEntity setFontSize(int fontSize) { - this.fontSize = fontSize; - return this; - } - - public String getPlayTime() { - return playTime; - } - - public BulletScreenEntity setPlayTime(String playTime) { - this.playTime = playTime; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/CancelMedalResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/CancelMedalResponseEntity.java deleted file mode 100644 index 3474c65..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/CancelMedalResponseEntity.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class CancelMedalResponseEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : [] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/CancelTitleResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/CancelTitleResponseEntity.java deleted file mode 100644 index 09c6387..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/CancelTitleResponseEntity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class CancelTitleResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : [] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/CapsuleInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/CapsuleInfoEntity.java deleted file mode 100644 index 67f2ab8..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/CapsuleInfoEntity.java +++ /dev/null @@ -1,279 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class CapsuleInfoEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"normal":{"status":1,"coin":65,"change":5,"progress":{"now":1800,"max":10000},"rule":"使用价值累计达到10000瓜子的礼物(包含直接使用瓜子购买、道具包裹,但不包括产生梦幻扭蛋币的活动道具),可以获得1枚扭蛋币。使用扭蛋币可以参与抽奖。","gift":[{"id":22,"name":"经验曜石","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/22.png?20171116172700"},{"id":21,"name":"经验原石","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/21.png?20171116172700"},{"id":30,"name":"爱心便当","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/30.png?20171116172700"},{"id":0,"name":"小号小电视","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/b.png?20171116172700"},{"id":4,"name":"蓝白胖次","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/4.png?20171116172700"},{"id":3,"name":"B坷垃","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/3.png?20171116172700"},{"id":2,"name":"亿圆","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/2.png?20171116172700"},{"id":1,"name":"辣条","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/1.png?20171116172700"}],"list":[{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验曜石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"五河墨子"},{"num":"1","gift":"经验曜石","date":"2018-03-02","name":"五河墨子"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"吃包子的560"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"莯兮吖"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"莯兮吖"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"黎梦的莫语小迷妹"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"ltg86692169"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"亦真亦幻似梦似醒"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"ATICN"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"黎离溱洧"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"龘卛逼"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"FENGHETAO"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"殇璃奏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"= -"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"楠瓜精"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"楠瓜精"}]},"colorful":{"status":0}} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * normal : {"status":1,"coin":65,"change":5,"progress":{"now":1800,"max":10000},"rule":"使用价值累计达到10000瓜子的礼物(包含直接使用瓜子购买、道具包裹,但不包括产生梦幻扭蛋币的活动道具),可以获得1枚扭蛋币。使用扭蛋币可以参与抽奖。","gift":[{"id":22,"name":"经验曜石","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/22.png?20171116172700"},{"id":21,"name":"经验原石","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/21.png?20171116172700"},{"id":30,"name":"爱心便当","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/30.png?20171116172700"},{"id":0,"name":"小号小电视","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/b.png?20171116172700"},{"id":4,"name":"蓝白胖次","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/4.png?20171116172700"},{"id":3,"name":"B坷垃","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/3.png?20171116172700"},{"id":2,"name":"亿圆","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/2.png?20171116172700"},{"id":1,"name":"辣条","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/1.png?20171116172700"}],"list":[{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验曜石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"五河墨子"},{"num":"1","gift":"经验曜石","date":"2018-03-02","name":"五河墨子"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"吃包子的560"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"莯兮吖"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"莯兮吖"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"黎梦的莫语小迷妹"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"ltg86692169"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"亦真亦幻似梦似醒"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"ATICN"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"黎离溱洧"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"龘卛逼"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"FENGHETAO"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"殇璃奏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"= -"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"楠瓜精"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"楠瓜精"}]} - * colorful : {"status":0} - */ - - @SerializedName("normal") - private Normal normal; - @SerializedName("colorful") - private Colorful colorful; - - public Normal getNormal() { - return normal; - } - - public void setNormal(Normal normal) { - this.normal = normal; - } - - public Colorful getColorful() { - return colorful; - } - - public void setColorful(Colorful colorful) { - this.colorful = colorful; - } - - public static class Normal { - /** - * status : 1 - * coin : 65 - * change : 5 - * progress : {"now":1800,"max":10000} - * rule : 使用价值累计达到10000瓜子的礼物(包含直接使用瓜子购买、道具包裹,但不包括产生梦幻扭蛋币的活动道具),可以获得1枚扭蛋币。使用扭蛋币可以参与抽奖。 - * gift : [{"id":22,"name":"经验曜石","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/22.png?20171116172700"},{"id":21,"name":"经验原石","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/21.png?20171116172700"},{"id":30,"name":"爱心便当","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/30.png?20171116172700"},{"id":0,"name":"小号小电视","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/b.png?20171116172700"},{"id":4,"name":"蓝白胖次","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/4.png?20171116172700"},{"id":3,"name":"B坷垃","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/3.png?20171116172700"},{"id":2,"name":"亿圆","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/2.png?20171116172700"},{"id":1,"name":"辣条","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/1.png?20171116172700"}] - * list : [{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验曜石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"我去取经"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"五河墨子"},{"num":"1","gift":"经验曜石","date":"2018-03-02","name":"五河墨子"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"吃包子的560"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"莯兮吖"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"莯兮吖"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"NShy小马"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"黎梦的莫语小迷妹"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"薄荷and紫苏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"ltg86692169"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"亦真亦幻似梦似醒"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"ATICN"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"黎离溱洧"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"龘卛逼"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"FENGHETAO"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"殇璃奏"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"= -"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"楠瓜精"},{"num":"1","gift":"经验原石","date":"2018-03-02","name":"楠瓜精"}] - */ - - @SerializedName("status") - private int status; - @SerializedName("coin") - private long coin; - @SerializedName("change") - private int change; - @SerializedName("progress") - private Progress progress; - @SerializedName("rule") - private String rule; - @SerializedName("gift") - private List gift; - @SerializedName("list") - private List winners; - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public long getCoin() { - return coin; - } - - public void setCoin(long coin) { - this.coin = coin; - } - - public int getChange() { - return change; - } - - public void setChange(int change) { - this.change = change; - } - - public Progress getProgress() { - return progress; - } - - public void setProgress(Progress progress) { - this.progress = progress; - } - - public String getRule() { - return rule; - } - - public void setRule(String rule) { - this.rule = rule; - } - - public List getGift() { - return gift; - } - - public void setGift(List gift) { - this.gift = gift; - } - - public List getWinners() { - return winners; - } - - public void setWinners(List winners) { - this.winners = winners; - } - - public static class Progress { - /** - * now : 1800 - * max : 10000 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - - public static class Gift { - /** - * id : 22 - * name : 经验曜石 - * img : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/normal/22.png?20171116172700 - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("img") - private String img; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - } - - public static class Winner { - /** - * num : 1 - * gift : 经验原石 - * date : 2018-03-02 - * name : NShy小马 - */ - - @SerializedName("num") - private String num; - @SerializedName("gift") - private String gift; - @SerializedName("date") - private String date; - @SerializedName("name") - private String name; - - public String getNum() { - return num; - } - - public void setNum(String num) { - this.num = num; - } - - public String getGift() { - return gift; - } - - public void setGift(String gift) { - this.gift = gift; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - } - - public static class Colorful { - /** - * status : 0 - */ - - @SerializedName("status") - private int status; - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/CoverEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/CoverEntity.java deleted file mode 100644 index f0f8e8a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/CoverEntity.java +++ /dev/null @@ -1,179 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class CoverEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * msg : OK - * data : {"cover":"https://i0.hdslb.com/bfs/live/b4d4dbf35f7a30fb6b0a2ea4077514235262797e.jpg","status":1,"reason":"","isup":0,"cover_list":[{"id":381657,"iscover":1,"cover":"https://i0.hdslb.com/bfs/live/b4d4dbf35f7a30fb6b0a2ea4077514235262797e.jpg","status":1,"reason":"","isup":1,"lock":0},{"id":0,"reason":"","cover":"","isup":0,"lock":1,"status":2,"iscover":0},{"id":0,"reason":"","cover":"","isup":0,"lock":1,"status":2,"iscover":0},{"id":0,"reason":"","cover":"","isup":0,"lock":1,"status":2,"iscover":0}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * cover : https://i0.hdslb.com/bfs/live/b4d4dbf35f7a30fb6b0a2ea4077514235262797e.jpg - * status : 1 - * reason : - * isup : 0 - * cover_list : [{"id":381657,"iscover":1,"cover":"https://i0.hdslb.com/bfs/live/b4d4dbf35f7a30fb6b0a2ea4077514235262797e.jpg","status":1,"reason":"","isup":1,"lock":0},{"id":0,"reason":"","cover":"","isup":0,"lock":1,"status":2,"iscover":0},{"id":0,"reason":"","cover":"","isup":0,"lock":1,"status":2,"iscover":0},{"id":0,"reason":"","cover":"","isup":0,"lock":1,"status":2,"iscover":0}] - */ - - @SerializedName("cover") - private String cover; - @SerializedName("status") - private int status; - @SerializedName("reason") - private String reason; - @SerializedName("isup") - private int isUp; - @SerializedName("cover_list") - private List coverList; - - public String getCover() { - return cover; - } - - public void setCover(String cover) { - this.cover = cover; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public String getReason() { - return reason; - } - - public void setReason(String reason) { - this.reason = reason; - } - - public int getIsUp() { - return isUp; - } - - public void setIsUp(int isUp) { - this.isUp = isUp; - } - - public List getCoverList() { - return coverList; - } - - public void setCoverList(List coverList) { - this.coverList = coverList; - } - - public static class CoverData { - /** - * id : 381657 - * iscover : 1 - * cover : https://i0.hdslb.com/bfs/live/b4d4dbf35f7a30fb6b0a2ea4077514235262797e.jpg - * status : 1 - * reason : - * isup : 1 - * lock : 0 - */ - - @SerializedName("id") - private int id; - @SerializedName("iscover") - private int isCover; - @SerializedName("cover") - private String cover; - @SerializedName("status") - private int status; - @SerializedName("reason") - private String reason; - @SerializedName("isup") - private int isUp; - @SerializedName("lock") - private int lock; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getIsCover() { - return isCover; - } - - public void setIsCover(int isCover) { - this.isCover = isCover; - } - - public String getCover() { - return cover; - } - - public void setCover(String cover) { - this.cover = cover; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public String getReason() { - return reason; - } - - public void setReason(String reason) { - this.reason = reason; - } - - public int getIsUp() { - return isUp; - } - - public void setIsUp(int isUp) { - this.isUp = isUp; - } - - public int getLock() { - return lock; - } - - public void setLock(int lock) { - this.lock = lock; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/FollowedHostsEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/FollowedHostsEntity.java deleted file mode 100644 index dbac5de..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/FollowedHostsEntity.java +++ /dev/null @@ -1,278 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class FollowedHostsEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : {"page":1,"pagesize":20,"count":19,"total_page":1,"total_status":1,"total_desc":"快打开喜欢主播的开播提醒吧,再也不错过ta的直播啦","list":[{"uid":11153765,"name":"3号直播间","face":"https://i1.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","roomid":23058,"areaName":"放映厅","area_v2_id":34,"area_v2_name":"音乐台","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":314474,"roomTags":["ACG音乐"],"live_status":1,"round_status":0},{"uid":32786875,"name":"real信誓蛋蛋","face":"https://i1.hdslb.com/bfs/face/f425590c6c720b7952f18e63028d0d5eec89e74d.jpg","roomid":906677,"areaName":"生活娱乐","area_v2_id":32,"area_v2_name":"手机直播","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":295364,"live_status":0,"round_status":1},{"uid":819554,"name":"池田天天","face":"https://i1.hdslb.com/bfs/face/fdb8593ca8a578f5aff6bb744fa1df6fa149d9f1.jpg","roomid":13924,"areaName":"唱见舞见","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":49026,"roomTags":["天天","少年音","唱歌"],"live_status":0,"round_status":1},{"uid":85835398,"name":"TASTEBUDS伶牙俐吃","face":"https://i1.hdslb.com/bfs/face/b72b49c4a38df59d287e12e3f8f59b57b7cd442c.jpg","roomid":4024675,"areaName":"生活娱乐","area_v2_id":26,"area_v2_name":"日常","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":144294,"live_status":0,"round_status":1},{"uid":176037767,"name":"我是郭杰瑞","face":"https://i0.hdslb.com/bfs/face/6182455e4d61159121c223ddc7a3a381f2d4d056.jpg","roomid":5084304,"areaName":"御宅文化","area_v2_id":143,"area_v2_name":"才艺","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":598231,"live_status":0,"round_status":1},{"uid":11284967,"name":"我是嘿老外","face":"https://i2.hdslb.com/bfs/face/536cce524ef0d14396927d8f678cd2e59f6c2245.jpg","roomid":901547,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":455899,"live_status":0,"round_status":1},{"uid":32820037,"name":"歪果仁研究协会","face":"https://i0.hdslb.com/bfs/face/bc03f2d20bf588f0597bd2b5979dd4740acd5056.jpg","roomid":907059,"areaName":"生活娱乐","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":1249996,"live_status":0,"round_status":1},{"uid":19220722,"name":"陈小麦Mr.BowTie","face":"https://i0.hdslb.com/bfs/face/443f0c3a524a825a0def5d08a1b59c1fc5476ec3.jpg","roomid":888383,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":4496,"live_status":0,"round_status":1},{"uid":5793775,"name":"Sanjay·衰傑","face":"https://i1.hdslb.com/bfs/face/5f22337565aa16a2bf22d124a7e9a9352dd36c8a.jpg","roomid":926157,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":13,"live_status":0,"round_status":1},{"uid":15834498,"name":"拂菻坊","face":"https://i1.hdslb.com/bfs/face/59caded2aa9e6f0350ec41d4d57ad7c8835265b9.jpg","roomid":439728,"areaName":"生活娱乐","area_v2_id":145,"area_v2_name":"聊天室","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":1764054,"roomTags":["日常聊天","pubg"],"live_status":0,"round_status":1},{"uid":12526468,"name":"PandaBros熊猫兄弟","face":"https://i1.hdslb.com/bfs/face/489e3dc94adeda13f92d12e234c58b3d52f58f9a.jpg","roomid":545141,"areaName":"电子竞技","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":56358,"roomTags":["英雄联盟"],"live_status":0,"round_status":1},{"uid":14558631,"name":"王霸胆英语","face":"https://i1.hdslb.com/bfs/face/55a3de63bf59205d05521e9b26622048827eda8d.jpg","roomid":79324,"areaName":"生活娱乐","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":429121,"roomTags":["海外留学"],"live_status":0,"round_status":1},{"uid":18739124,"name":"TrevorJames吃货老外","face":"https://i2.hdslb.com/bfs/face/3dc1747e97029a7085f9433ea2bb75a01c60e6d6.jpg","roomid":544814,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":507338,"live_status":0,"round_status":1},{"uid":6549181,"name":"Arias丶","face":"https://i1.hdslb.com/bfs/face/dc433e06c62385abc849003c8d94e3258155da31.jpg","roomid":19175,"areaName":"电子竞技","area_v2_id":92,"area_v2_name":"DOTA2","area_v2_parent_id":2,"area_v2_parent_name":"游戏","tstatus":0,"fansNum":14,"live_status":0,"round_status":0},{"uid":14614133,"name":"我就是FISH","face":"https://i1.hdslb.com/bfs/face/a076329348d82164c3f54598ee90239c17817d21.jpg","roomid":4716742,"areaName":"手游直播","area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游","tstatus":0,"fansNum":8,"live_status":0,"round_status":0},{"uid":10775090,"name":"SEeleLAO","face":"https://i2.hdslb.com/bfs/face/1213c81a1da304629061705edb65b78f78f25281.jpg","roomid":3300253,"areaName":"单机联机","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏","tstatus":0,"fansNum":89,"roomTags":["守望先锋","收获日2"],"live_status":0,"round_status":0},{"uid":122879,"name":"敖厂长","face":"https://i0.hdslb.com/bfs/face/5fad8f73b16577e27e6e9072a174c632efb36867.jpg","roomid":544586,"areaName":"单机联机","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":3160187,"roomTags":["敖厂长"],"live_status":0,"round_status":0},{"uid":2866663,"name":"hyx5020","face":"https://i1.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg","roomid":29434,"areaName":"放映厅","area_v2_id":33,"area_v2_name":"映评馆","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":547,"roomTags":["SpaceX","Falcon","重型猎鹰","发射"],"live_status":0,"round_status":0},{"uid":6857104,"name":"张逗张花","face":"https://i0.hdslb.com/bfs/face/95273c9962066dd944078e42cb1e5a0269b73e9a.jpg","roomid":78735,"areaName":"生活娱乐","area_v2_id":32,"area_v2_name":"手机直播","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":1068934,"roomTags":["张逗张花"],"live_status":0,"round_status":0}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * page : 1 - * pagesize : 20 - * count : 19 - * total_page : 1 - * total_status : 1 - * total_desc : 快打开喜欢主播的开播提醒吧,再也不错过ta的直播啦 - * list : [{"uid":11153765,"name":"3号直播间","face":"https://i1.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","roomid":23058,"areaName":"放映厅","area_v2_id":34,"area_v2_name":"音乐台","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":314474,"roomTags":["ACG音乐"],"live_status":1,"round_status":0},{"uid":32786875,"name":"real信誓蛋蛋","face":"https://i1.hdslb.com/bfs/face/f425590c6c720b7952f18e63028d0d5eec89e74d.jpg","roomid":906677,"areaName":"生活娱乐","area_v2_id":32,"area_v2_name":"手机直播","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":295364,"live_status":0,"round_status":1},{"uid":819554,"name":"池田天天","face":"https://i1.hdslb.com/bfs/face/fdb8593ca8a578f5aff6bb744fa1df6fa149d9f1.jpg","roomid":13924,"areaName":"唱见舞见","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":49026,"roomTags":["天天","少年音","唱歌"],"live_status":0,"round_status":1},{"uid":85835398,"name":"TASTEBUDS伶牙俐吃","face":"https://i1.hdslb.com/bfs/face/b72b49c4a38df59d287e12e3f8f59b57b7cd442c.jpg","roomid":4024675,"areaName":"生活娱乐","area_v2_id":26,"area_v2_name":"日常","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":144294,"live_status":0,"round_status":1},{"uid":176037767,"name":"我是郭杰瑞","face":"https://i0.hdslb.com/bfs/face/6182455e4d61159121c223ddc7a3a381f2d4d056.jpg","roomid":5084304,"areaName":"御宅文化","area_v2_id":143,"area_v2_name":"才艺","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":598231,"live_status":0,"round_status":1},{"uid":11284967,"name":"我是嘿老外","face":"https://i2.hdslb.com/bfs/face/536cce524ef0d14396927d8f678cd2e59f6c2245.jpg","roomid":901547,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":455899,"live_status":0,"round_status":1},{"uid":32820037,"name":"歪果仁研究协会","face":"https://i0.hdslb.com/bfs/face/bc03f2d20bf588f0597bd2b5979dd4740acd5056.jpg","roomid":907059,"areaName":"生活娱乐","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":1249996,"live_status":0,"round_status":1},{"uid":19220722,"name":"陈小麦Mr.BowTie","face":"https://i0.hdslb.com/bfs/face/443f0c3a524a825a0def5d08a1b59c1fc5476ec3.jpg","roomid":888383,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":4496,"live_status":0,"round_status":1},{"uid":5793775,"name":"Sanjay·衰傑","face":"https://i1.hdslb.com/bfs/face/5f22337565aa16a2bf22d124a7e9a9352dd36c8a.jpg","roomid":926157,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":13,"live_status":0,"round_status":1},{"uid":15834498,"name":"拂菻坊","face":"https://i1.hdslb.com/bfs/face/59caded2aa9e6f0350ec41d4d57ad7c8835265b9.jpg","roomid":439728,"areaName":"生活娱乐","area_v2_id":145,"area_v2_name":"聊天室","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":1764054,"roomTags":["日常聊天","pubg"],"live_status":0,"round_status":1},{"uid":12526468,"name":"PandaBros熊猫兄弟","face":"https://i1.hdslb.com/bfs/face/489e3dc94adeda13f92d12e234c58b3d52f58f9a.jpg","roomid":545141,"areaName":"电子竞技","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":56358,"roomTags":["英雄联盟"],"live_status":0,"round_status":1},{"uid":14558631,"name":"王霸胆英语","face":"https://i1.hdslb.com/bfs/face/55a3de63bf59205d05521e9b26622048827eda8d.jpg","roomid":79324,"areaName":"生活娱乐","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":429121,"roomTags":["海外留学"],"live_status":0,"round_status":1},{"uid":18739124,"name":"TrevorJames吃货老外","face":"https://i2.hdslb.com/bfs/face/3dc1747e97029a7085f9433ea2bb75a01c60e6d6.jpg","roomid":544814,"areaName":"","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":507338,"live_status":0,"round_status":1},{"uid":6549181,"name":"Arias丶","face":"https://i1.hdslb.com/bfs/face/dc433e06c62385abc849003c8d94e3258155da31.jpg","roomid":19175,"areaName":"电子竞技","area_v2_id":92,"area_v2_name":"DOTA2","area_v2_parent_id":2,"area_v2_parent_name":"游戏","tstatus":0,"fansNum":14,"live_status":0,"round_status":0},{"uid":14614133,"name":"我就是FISH","face":"https://i1.hdslb.com/bfs/face/a076329348d82164c3f54598ee90239c17817d21.jpg","roomid":4716742,"areaName":"手游直播","area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游","tstatus":0,"fansNum":8,"live_status":0,"round_status":0},{"uid":10775090,"name":"SEeleLAO","face":"https://i2.hdslb.com/bfs/face/1213c81a1da304629061705edb65b78f78f25281.jpg","roomid":3300253,"areaName":"单机联机","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏","tstatus":0,"fansNum":89,"roomTags":["守望先锋","收获日2"],"live_status":0,"round_status":0},{"uid":122879,"name":"敖厂长","face":"https://i0.hdslb.com/bfs/face/5fad8f73b16577e27e6e9072a174c632efb36867.jpg","roomid":544586,"areaName":"单机联机","area_v2_id":0,"area_v2_name":"","area_v2_parent_id":0,"area_v2_parent_name":"","tstatus":0,"fansNum":3160187,"roomTags":["敖厂长"],"live_status":0,"round_status":0},{"uid":2866663,"name":"hyx5020","face":"https://i1.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg","roomid":29434,"areaName":"放映厅","area_v2_id":33,"area_v2_name":"映评馆","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":547,"roomTags":["SpaceX","Falcon","重型猎鹰","发射"],"live_status":0,"round_status":0},{"uid":6857104,"name":"张逗张花","face":"https://i0.hdslb.com/bfs/face/95273c9962066dd944078e42cb1e5a0269b73e9a.jpg","roomid":78735,"areaName":"生活娱乐","area_v2_id":32,"area_v2_name":"手机直播","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","tstatus":0,"fansNum":1068934,"roomTags":["张逗张花"],"live_status":0,"round_status":0}] - */ - - @SerializedName("page") - private long page; - @SerializedName("pagesize") - private long pageSize; - @SerializedName("count") - private long count; - @SerializedName("total_page") - private long totalPage; - @SerializedName("total_status") - private int totalStatus; - @SerializedName("total_desc") - private String totalDesc; - @SerializedName("list") - private List list; - - public long getPage() { - return page; - } - - public void setPage(long page) { - this.page = page; - } - - public long getPageSize() { - return pageSize; - } - - public void setPageSize(long pageSize) { - this.pageSize = pageSize; - } - - public long getCount() { - return count; - } - - public void setCount(long count) { - this.count = count; - } - - public long getTotalPage() { - return totalPage; - } - - public void setTotalPage(long totalPage) { - this.totalPage = totalPage; - } - - public int getTotalStatus() { - return totalStatus; - } - - public void setTotalStatus(int totalStatus) { - this.totalStatus = totalStatus; - } - - public String getTotalDesc() { - return totalDesc; - } - - public void setTotalDesc(String totalDesc) { - this.totalDesc = totalDesc; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class Room { - /** - * uid : 11153765 - * name : 3号直播间 - * face : https://i1.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg - * roomid : 23058 - * areaName : 放映厅 - * area_v2_id : 34 - * area_v2_name : 音乐台 - * area_v2_parent_id : 1 - * area_v2_parent_name : 娱乐 - * tstatus : 0 - * fansNum : 314474 - * roomTags : ["ACG音乐"] - * live_status : 1 - * round_status : 0 - */ - - @SerializedName("uid") - private long uid; - @SerializedName("name") - private String name; - @SerializedName("face") - private String face; - @SerializedName("roomid") - private int roomId; - @SerializedName("areaName") - private String areaName; - @SerializedName("area_v2_id") - private int areaV2Id; - @SerializedName("area_v2_name") - private String areaV2Name; - @SerializedName("area_v2_parent_id") - private int areaV2ParentId; - @SerializedName("area_v2_parent_name") - private String areaV2ParentName; - @SerializedName("tstatus") - private int tstatus; - @SerializedName("fansNum") - private long fansNum; - @SerializedName("live_status") - private int liveStatus; - @SerializedName("round_status") - private int roundStatus; - @SerializedName("roomTags") - private List roomTags; - - public long getUid() { - return uid; - } - - public void setUid(long uid) { - this.uid = uid; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public int getAreaV2Id() { - return areaV2Id; - } - - public void setAreaV2Id(int areaV2Id) { - this.areaV2Id = areaV2Id; - } - - public String getAreaV2Name() { - return areaV2Name; - } - - public void setAreaV2Name(String areaV2Name) { - this.areaV2Name = areaV2Name; - } - - public int getAreaV2ParentId() { - return areaV2ParentId; - } - - public void setAreaV2ParentId(int areaV2ParentId) { - this.areaV2ParentId = areaV2ParentId; - } - - public String getAreaV2ParentName() { - return areaV2ParentName; - } - - public void setAreaV2ParentName(String areaV2ParentName) { - this.areaV2ParentName = areaV2ParentName; - } - - public int getTstatus() { - return tstatus; - } - - public void setTstatus(int tstatus) { - this.tstatus = tstatus; - } - - public long getFansNum() { - return fansNum; - } - - public void setFansNum(long fansNum) { - this.fansNum = fansNum; - } - - public int getLiveStatus() { - return liveStatus; - } - - public void setLiveStatus(int liveStatus) { - this.liveStatus = liveStatus; - } - - public int getRoundStatus() { - return roundStatus; - } - - public void setRoundStatus(int roundStatus) { - this.roundStatus = roundStatus; - } - - public List getRoomTags() { - return roomTags; - } - - public void setRoomTags(List roomTags) { - this.roomTags = roomTags; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/FreeSilverAwardEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/FreeSilverAwardEntity.java deleted file mode 100644 index 9109710..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/FreeSilverAwardEntity.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class FreeSilverAwardEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : {"surplus":-1039.6166666667,"silver":2426,"awardSilver":30,"isEnd":0} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * surplus : -1039.6166666667 - * silver : 2426 - * awardSilver : 30 - * isEnd : 0 - */ - - @SerializedName("surplus") - private double surplus; - @SerializedName("silver") - private int silver; - @SerializedName("awardSilver") - private int awardSilver; - @SerializedName("isEnd") - private int isEnd; - - public double getSurplus() { - return surplus; - } - - public void setSurplus(double surplus) { - this.surplus = surplus; - } - - public int getSilver() { - return silver; - } - - public void setSilver(int silver) { - this.silver = silver; - } - - public int getAwardSilver() { - return awardSilver; - } - - public void setAwardSilver(int awardSilver) { - this.awardSilver = awardSilver; - } - - public int getIsEnd() { - return isEnd; - } - - public void setIsEnd(int isEnd) { - this.isEnd = isEnd; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/FreeSilverCurrentTaskEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/FreeSilverCurrentTaskEntity.java deleted file mode 100644 index 7d5d9ef..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/FreeSilverCurrentTaskEntity.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class FreeSilverCurrentTaskEntity extends ResponseEntity { - /** - * code : 0 - * message : - * data : {"minute":3,"silver":30,"time_start":1509821442,"time_end":1509821622,"times":1,"max_times":3} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * minute : 3 - * silver : 30 - * time_start : 1509821442 - * time_end : 1509821622 - * times : 1 - * max_times : 3 - */ - - @SerializedName("minute") - private int minute; - @SerializedName("silver") - private int silver; - @SerializedName("time_start") - private int timeStart; - @SerializedName("time_end") - private int timeEnd; - @SerializedName("times") - private int times; - @SerializedName("max_times") - private int maxTimes; - - public int getMinute() { - return minute; - } - - public void setMinute(int minute) { - this.minute = minute; - } - - public int getSilver() { - return silver; - } - - public void setSilver(int silver) { - this.silver = silver; - } - - public int getTimeStart() { - return timeStart; - } - - public void setTimeStart(int timeStart) { - this.timeStart = timeStart; - } - - public int getTimeEnd() { - return timeEnd; - } - - public void setTimeEnd(int timeEnd) { - this.timeEnd = timeEnd; - } - - public int getTimes() { - return times; - } - - public void setTimes(int times) { - this.times = times; - } - - public int getMaxTimes() { - return maxTimes; - } - - public void setMaxTimes(int maxTimes) { - this.maxTimes = maxTimes; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/GetAppSmallTVRewardResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/GetAppSmallTVRewardResponseEntity.java deleted file mode 100644 index 6b95b10..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/GetAppSmallTVRewardResponseEntity.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class GetAppSmallTVRewardResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : ok - * message : ok - * data : {"fname":"","sname":"麦麦0w0","win":0,"reward":{"id":7,"num":2,"name":"辣条","url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-1.png?20171118161652"},"status":0} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * fname : - * sname : 麦麦0w0 - * win : 0 - * reward : {"id":7,"num":2,"name":"辣条","url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-1.png?20171118161652"} - * status : 0 - */ - - @SerializedName("fname") - private String fname; - @SerializedName("sname") - private String sname; - @SerializedName("win") - private int win; - @SerializedName("reward") - private Reward reward; - @SerializedName("status") - private int status; - - public String getFname() { - return fname; - } - - public void setFname(String fname) { - this.fname = fname; - } - - public String getSname() { - return sname; - } - - public void setSname(String sname) { - this.sname = sname; - } - - public int getWin() { - return win; - } - - public void setWin(int win) { - this.win = win; - } - - public Reward getReward() { - return reward; - } - - public void setReward(Reward reward) { - this.reward = reward; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public static class Reward { - /** - * id : 7 - * num : 2 - * name : 辣条 - * url : http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-1.png?20171118161652 - */ - - @SerializedName("id") - private int id; - @SerializedName("num") - private int num; - @SerializedName("name") - private String name; - @SerializedName("url") - private String url; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getNum() { - return num; - } - - public void setNum(int num) { - this.num = num; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/GiftEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/GiftEntity.java deleted file mode 100644 index a9de08d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/GiftEntity.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.time.Instant; - -public class GiftEntity { - @SerializedName("giftId") - private long giftId; - - @SerializedName("bag_id") - private long bagId; - - @SerializedName("num") - private long number; - - @SerializedName("roomid") - private long roomId; - - @SerializedName("ruid") - private long roomUserId; - - @SerializedName("timestamp") - private long timeStamp = Instant.now().getEpochSecond(); - - //该随机数有 10 位, 暂时未见到负数的情况 - @SerializedName("rnd") - private long random = (long) (Math.random() * 9999999999L); - - /** - * 礼物的构造器, giftId 与 bagId 必须匹配, roomId 与 roomUserId 必须匹配 - * - * @param giftId 礼物 ID - * @param bagId 礼物在背包中的 ID - * @param number 数量 - * @param roomId 房间号 - * @param roomUserId 房间主播的用户 ID - */ - public GiftEntity(long giftId, long bagId, long number, long roomId, long roomUserId) { - this.giftId = giftId; - this.bagId = bagId; - this.number = number; - this.roomId = roomId; - this.roomUserId = roomUserId; - } - - public GiftEntity(long giftId, long bagId, long number, LiveRoomInfoEntity.LiveRoom liveRoom) { - this(giftId, bagId, number, liveRoom.getRoomId(), liveRoom.getUserId()); - } - - public GiftEntity(PlayerBagEntity.BagGift bagGift, long number, long roomId, long roomUserId) { - this(bagGift.getGiftId(), bagGift.getId(), number, roomId, roomUserId); - } - - public GiftEntity(PlayerBagEntity.BagGift bagGift, long number, LiveRoomInfoEntity.LiveRoom liveRoom) { - this(bagGift.getGiftId(), bagGift.getId(), number, liveRoom.getRoomId(), liveRoom.getUserId()); - } - - public long getGiftId() { - return giftId; - } - - public GiftEntity setGiftId(long giftId) { - this.giftId = giftId; - return this; - } - - public long getBagId() { - return bagId; - } - - public GiftEntity setBagId(long bagId) { - this.bagId = bagId; - return this; - } - - public long getNumber() { - return number; - } - - public GiftEntity setNumber(long number) { - this.number = number; - return this; - } - - public long getRoomId() { - return roomId; - } - - public GiftEntity setRoomId(long roomId) { - this.roomId = roomId; - return this; - } - - public long getRoomUserId() { - return roomUserId; - } - - public GiftEntity setRoomUserId(long roomUserId) { - this.roomUserId = roomUserId; - return this; - } - - public long getTimeStamp() { - return timeStamp; - } - - public GiftEntity setTimeStamp(long timeStamp) { - this.timeStamp = timeStamp; - return this; - } - - public long getRandom() { - return random; - } - - public GiftEntity setRandom(long random) { - this.random = random; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/GiftTopEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/GiftTopEntity.java deleted file mode 100644 index 9956112..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/GiftTopEntity.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class GiftTopEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"unlogin":0,"uname":"czp3009","rank":1,"coin":25000,"list":[{"uid":20293030,"rank":1,"isSelf":1,"score":25000,"uname":"czp3009","coin":25000,"face":"http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","guard_level":0},{"uid":19946822,"rank":2,"isSelf":0,"score":8000,"uname":"罗非鱼追上来了","coin":8000,"face":"http://i2.hdslb.com/bfs/face/e71031a931125617fad2c148213381bb6e0e9f26.jpg","guard_level":0},{"uid":8353249,"rank":3,"isSelf":0,"score":3500,"uname":"TcCoke","coin":3500,"face":"http://i2.hdslb.com/bfs/face/7c3c131f89380db0046024d1a903d3a6e4dc6128.jpg","guard_level":0},{"uid":12872641,"rank":4,"isSelf":0,"score":2000,"uname":"biggy2","coin":2000,"face":"http://i2.hdslb.com/bfs/face/418ac05726b3e6d4c35ff6bcda7a2751266126b5.jpg","guard_level":0},{"uid":33577376,"rank":5,"isSelf":0,"score":1100,"uname":"SASA协会-MF设计局","coin":1100,"face":"http://i2.hdslb.com/bfs/face/33ac7325236b34bb36a34dc58502c322c6ceaced.jpg","guard_level":0},{"uid":35225572,"rank":6,"isSelf":0,"score":100,"uname":"kk东子","coin":100,"face":"http://i0.hdslb.com/bfs/face/278f12f9993c84ef673785a48968aef78dbde92e.jpg","guard_level":0}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * unlogin : 0 - * uname : czp3009 - * rank : 1 - * coin : 25000 - * list : [{"uid":20293030,"rank":1,"isSelf":1,"score":25000,"uname":"czp3009","coin":25000,"face":"http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","guard_level":0},{"uid":19946822,"rank":2,"isSelf":0,"score":8000,"uname":"罗非鱼追上来了","coin":8000,"face":"http://i2.hdslb.com/bfs/face/e71031a931125617fad2c148213381bb6e0e9f26.jpg","guard_level":0},{"uid":8353249,"rank":3,"isSelf":0,"score":3500,"uname":"TcCoke","coin":3500,"face":"http://i2.hdslb.com/bfs/face/7c3c131f89380db0046024d1a903d3a6e4dc6128.jpg","guard_level":0},{"uid":12872641,"rank":4,"isSelf":0,"score":2000,"uname":"biggy2","coin":2000,"face":"http://i2.hdslb.com/bfs/face/418ac05726b3e6d4c35ff6bcda7a2751266126b5.jpg","guard_level":0},{"uid":33577376,"rank":5,"isSelf":0,"score":1100,"uname":"SASA协会-MF设计局","coin":1100,"face":"http://i2.hdslb.com/bfs/face/33ac7325236b34bb36a34dc58502c322c6ceaced.jpg","guard_level":0},{"uid":35225572,"rank":6,"isSelf":0,"score":100,"uname":"kk东子","coin":100,"face":"http://i0.hdslb.com/bfs/face/278f12f9993c84ef673785a48968aef78dbde92e.jpg","guard_level":0}] - */ - - @SerializedName("unlogin") - private int unLogin; - @SerializedName("uname") - private String username; - @SerializedName("rank") - private int rank; - @SerializedName("coin") - private int coin; - @SerializedName("list") - private List giftSenders; - - public int getUnLogin() { - return unLogin; - } - - public void setUnLogin(int unLogin) { - this.unLogin = unLogin; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getRank() { - return rank; - } - - public void setRank(int rank) { - this.rank = rank; - } - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public List getGiftSenders() { - return giftSenders; - } - - public void setGiftSenders(List giftSenders) { - this.giftSenders = giftSenders; - } - - public static class GiftSender { - /** - * uid : 20293030 - * rank : 1 - * isSelf : 1 - * score : 25000 - * uname : czp3009 - * coin : 25000 - * face : http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg - * guard_level : 0 - */ - - @SerializedName("uid") - private long userId; - @SerializedName("rank") - private int rank; - @SerializedName("isSelf") - private int isSelf; - @SerializedName("score") - private int score; - @SerializedName("uname") - private String username; - @SerializedName("coin") - private int coin; - @SerializedName("face") - private String face; - @SerializedName("guard_level") - private int guardLevel; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public int getRank() { - return rank; - } - - public void setRank(int rank) { - this.rank = rank; - } - - public int getIsSelf() { - return isSelf; - } - - public void setIsSelf(int isSelf) { - this.isSelf = isSelf; - } - - public int getScore() { - return score; - } - - public void setScore(int score) { - this.score = score; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/HistoryEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/HistoryEntity.java deleted file mode 100644 index 0a7092a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/HistoryEntity.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class HistoryEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"page":1,"pagesize":20,"list":[{"name":"czp3009","face":"https://i1.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","roomid":1110317,"areaName":"生活娱乐","live_status":0,"round_status":0,"fansNum":44,"area_v2_id":"27","area_v2_name":"学习","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["编程"]},{"name":"3号直播间","face":"https://i1.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","roomid":3,"areaName":"放映厅","live_status":1,"round_status":0,"fansNum":314211,"area_v2_id":"34","area_v2_name":"音乐台","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["ACG音乐"]},{"name":"青衣才不是御姐呢","face":"https://i1.hdslb.com/bfs/face/025fa73e3f1be9d7f4c2b10678d6a0a5a89addee.jpg","roomid":526,"areaName":"生活娱乐","live_status":0,"round_status":0,"fansNum":139168,"area_v2_id":"139","area_v2_name":"美少女","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["御姐","电台","声控","声优"]},{"name":"宫本狗雨","face":"https://i0.hdslb.com/bfs/face/8c49a758216f9bd14b0046afe48a3514f44126f0.jpg","roomid":102,"areaName":"单机联机","live_status":1,"round_status":0,"fansNum":582323,"area_v2_id":"80","area_v2_name":"绝地求生:大逃杀","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["英雄联盟","守望麦克雷","黄金矿工","灵魂唱见"]},{"name":"Tocci椭奇","face":"https://i2.hdslb.com/bfs/face/c67d599dffb6911fdfc3d70c41204363ee41d1bd.jpg","roomid":519,"areaName":"生活娱乐","live_status":0,"round_status":0,"fansNum":124306,"area_v2_id":"32","area_v2_name":"手机直播","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["英雄联盟","宅舞"]},{"name":"叶落莫言","face":"https://i1.hdslb.com/bfs/face/37bfd9a9f40eb9ff52b697e204386ab918ccd742.jpg","roomid":387,"areaName":"单机联机","live_status":1,"round_status":0,"fansNum":143357,"area_v2_id":"80","area_v2_name":"绝地求生:大逃杀","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["守望先锋","绝地求生","唱见","古风翻唱"]},{"name":"Alessa0","face":"https://i2.hdslb.com/bfs/face/c1cd432957bbd9bbb98d2c3c36849b5ad7ece7d5.jpg","roomid":1013,"areaName":"单机联机","live_status":1,"round_status":0,"fansNum":257534,"area_v2_id":"107","area_v2_name":"其他游戏","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":[]},{"name":"游戏彩笔","face":"https://i2.hdslb.com/bfs/face/0433055d4eac3b2314faadb47de64be114571d4c.jpg","roomid":461,"areaName":"手游直播","live_status":0,"round_status":0,"fansNum":91385,"area_v2_id":"40","area_v2_name":"崩坏3","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":["崩坏3","绝地求生大逃杀","300英雄"]},{"name":"就决定是你了长生","face":"https://i0.hdslb.com/bfs/face/941f199204fd885cca123cbe8be6eedb6639d0e0.jpg","roomid":1170236,"areaName":"唱见舞见","live_status":1,"round_status":0,"fansNum":3461,"area_v2_id":"21","area_v2_name":"唱见","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["就决定是你了老头"]},{"name":"大大叔菜的抠脚","face":"https://i1.hdslb.com/bfs/face/f8da5f279cfd1ea08c46f15f4dc0c9ca81647cae.jpg","roomid":7733281,"areaName":"手游直播","live_status":1,"round_status":0,"fansNum":2655,"area_v2_id":"98","area_v2_name":"其他手游","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":[]},{"name":"MURDO-木木","face":"https://i2.hdslb.com/bfs/face/11e653115be367111729e26b71c7a95e2e50a5a4.jpg","roomid":5983722,"areaName":"绘画专区","live_status":0,"round_status":0,"fansNum":2473,"area_v2_id":"51","area_v2_name":"原创绘画","area_v2_parent_name":"绘画","area_v2_parent_id":"4","roomTags":[]},{"name":"hyx5020","face":"https://i0.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg","roomid":29434,"areaName":"放映厅","live_status":0,"round_status":0,"fansNum":548,"area_v2_id":"33","area_v2_name":"映评馆","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["SpaceX","Falcon","重型猎鹰","发射"]},{"name":"两仪滚","face":"https://i1.hdslb.com/bfs/face/4a91427ef035836b1937244bc559ed03f244bfa9.jpg","roomid":388,"areaName":"单机联机","live_status":0,"round_status":1,"fansNum":310591,"area_v2_id":"107","area_v2_name":"其他游戏","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["二五仔","猛男","B站恶霸","吃鸡"]},{"name":"污污_永远的魔法师_","face":"https://i0.hdslb.com/bfs/face/effbe54414657ed89b2a48fd822abeed90d67f67.jpg","roomid":255,"areaName":"绘画专区","live_status":0,"round_status":0,"fansNum":129145,"area_v2_id":"94","area_v2_name":"同人绘画","area_v2_parent_name":"绘画","area_v2_parent_id":"4","roomTags":["绘画","板绘"]},{"name":"Kano_Amigo乐队键盘手","face":"https://i1.hdslb.com/bfs/face/0e8dc590bcbcb986f7898d9eb77cdadbf061fc64.jpg","roomid":673794,"areaName":"御宅文化","live_status":0,"round_status":1,"fansNum":4266,"area_v2_id":"143","area_v2_name":"才艺","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":[]},{"name":"棉花大哥哥","face":"https://i2.hdslb.com/bfs/face/9fc16093743b2692a1a6d4dee19eede911e6712f.jpg","roomid":103,"areaName":"生活娱乐","live_status":0,"round_status":1,"fansNum":116498,"area_v2_id":"145","area_v2_name":"聊天室","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["王者荣耀","声控","颜控"]},{"name":"萌萌哒条码","face":"https://i1.hdslb.com/bfs/face/14b69433ef566f39a236991cbb0ff5ef95cc82f2.jpg","roomid":1325308,"areaName":"手游直播","live_status":0,"round_status":0,"fansNum":23679,"area_v2_id":"98","area_v2_name":"其他手游","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":["minecraft 我的世界","Hypixel 炉石传说","守望先锋 绝地求生","单机游戏 星际争霸"]},{"name":"某幻君","face":"https://i1.hdslb.com/bfs/face/9ed5ebf1e3694d9cd2b4fcd1d353759ee83b3dfe.jpg","roomid":271744,"areaName":"单机联机","live_status":0,"round_status":1,"fansNum":1521416,"area_v2_id":"107","area_v2_name":"其他游戏","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["绝地求生大逃杀"]},{"name":"池田天天","face":"https://i0.hdslb.com/bfs/face/fdb8593ca8a578f5aff6bb744fa1df6fa149d9f1.jpg","roomid":13924,"areaName":"唱见舞见","live_status":0,"round_status":1,"fansNum":48799,"area_v2_id":"21","area_v2_name":"唱见","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["天天","少年音","唱歌"]},{"name":"我就是FISH","face":"https://i1.hdslb.com/bfs/face/a076329348d82164c3f54598ee90239c17817d21.jpg","roomid":4716742,"areaName":"手游直播","live_status":0,"round_status":0,"fansNum":8,"area_v2_id":"98","area_v2_name":"其他手游","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":[]}],"total_page":1} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * page : 1 - * pagesize : 20 - * list : [{"name":"czp3009","face":"https://i1.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","roomid":1110317,"areaName":"生活娱乐","live_status":0,"round_status":0,"fansNum":44,"area_v2_id":"27","area_v2_name":"学习","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["编程"]},{"name":"3号直播间","face":"https://i1.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","roomid":3,"areaName":"放映厅","live_status":1,"round_status":0,"fansNum":314211,"area_v2_id":"34","area_v2_name":"音乐台","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["ACG音乐"]},{"name":"青衣才不是御姐呢","face":"https://i1.hdslb.com/bfs/face/025fa73e3f1be9d7f4c2b10678d6a0a5a89addee.jpg","roomid":526,"areaName":"生活娱乐","live_status":0,"round_status":0,"fansNum":139168,"area_v2_id":"139","area_v2_name":"美少女","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["御姐","电台","声控","声优"]},{"name":"宫本狗雨","face":"https://i0.hdslb.com/bfs/face/8c49a758216f9bd14b0046afe48a3514f44126f0.jpg","roomid":102,"areaName":"单机联机","live_status":1,"round_status":0,"fansNum":582323,"area_v2_id":"80","area_v2_name":"绝地求生:大逃杀","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["英雄联盟","守望麦克雷","黄金矿工","灵魂唱见"]},{"name":"Tocci椭奇","face":"https://i2.hdslb.com/bfs/face/c67d599dffb6911fdfc3d70c41204363ee41d1bd.jpg","roomid":519,"areaName":"生活娱乐","live_status":0,"round_status":0,"fansNum":124306,"area_v2_id":"32","area_v2_name":"手机直播","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["英雄联盟","宅舞"]},{"name":"叶落莫言","face":"https://i1.hdslb.com/bfs/face/37bfd9a9f40eb9ff52b697e204386ab918ccd742.jpg","roomid":387,"areaName":"单机联机","live_status":1,"round_status":0,"fansNum":143357,"area_v2_id":"80","area_v2_name":"绝地求生:大逃杀","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["守望先锋","绝地求生","唱见","古风翻唱"]},{"name":"Alessa0","face":"https://i2.hdslb.com/bfs/face/c1cd432957bbd9bbb98d2c3c36849b5ad7ece7d5.jpg","roomid":1013,"areaName":"单机联机","live_status":1,"round_status":0,"fansNum":257534,"area_v2_id":"107","area_v2_name":"其他游戏","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":[]},{"name":"游戏彩笔","face":"https://i2.hdslb.com/bfs/face/0433055d4eac3b2314faadb47de64be114571d4c.jpg","roomid":461,"areaName":"手游直播","live_status":0,"round_status":0,"fansNum":91385,"area_v2_id":"40","area_v2_name":"崩坏3","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":["崩坏3","绝地求生大逃杀","300英雄"]},{"name":"就决定是你了长生","face":"https://i0.hdslb.com/bfs/face/941f199204fd885cca123cbe8be6eedb6639d0e0.jpg","roomid":1170236,"areaName":"唱见舞见","live_status":1,"round_status":0,"fansNum":3461,"area_v2_id":"21","area_v2_name":"唱见","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["就决定是你了老头"]},{"name":"大大叔菜的抠脚","face":"https://i1.hdslb.com/bfs/face/f8da5f279cfd1ea08c46f15f4dc0c9ca81647cae.jpg","roomid":7733281,"areaName":"手游直播","live_status":1,"round_status":0,"fansNum":2655,"area_v2_id":"98","area_v2_name":"其他手游","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":[]},{"name":"MURDO-木木","face":"https://i2.hdslb.com/bfs/face/11e653115be367111729e26b71c7a95e2e50a5a4.jpg","roomid":5983722,"areaName":"绘画专区","live_status":0,"round_status":0,"fansNum":2473,"area_v2_id":"51","area_v2_name":"原创绘画","area_v2_parent_name":"绘画","area_v2_parent_id":"4","roomTags":[]},{"name":"hyx5020","face":"https://i0.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg","roomid":29434,"areaName":"放映厅","live_status":0,"round_status":0,"fansNum":548,"area_v2_id":"33","area_v2_name":"映评馆","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["SpaceX","Falcon","重型猎鹰","发射"]},{"name":"两仪滚","face":"https://i1.hdslb.com/bfs/face/4a91427ef035836b1937244bc559ed03f244bfa9.jpg","roomid":388,"areaName":"单机联机","live_status":0,"round_status":1,"fansNum":310591,"area_v2_id":"107","area_v2_name":"其他游戏","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["二五仔","猛男","B站恶霸","吃鸡"]},{"name":"污污_永远的魔法师_","face":"https://i0.hdslb.com/bfs/face/effbe54414657ed89b2a48fd822abeed90d67f67.jpg","roomid":255,"areaName":"绘画专区","live_status":0,"round_status":0,"fansNum":129145,"area_v2_id":"94","area_v2_name":"同人绘画","area_v2_parent_name":"绘画","area_v2_parent_id":"4","roomTags":["绘画","板绘"]},{"name":"Kano_Amigo乐队键盘手","face":"https://i1.hdslb.com/bfs/face/0e8dc590bcbcb986f7898d9eb77cdadbf061fc64.jpg","roomid":673794,"areaName":"御宅文化","live_status":0,"round_status":1,"fansNum":4266,"area_v2_id":"143","area_v2_name":"才艺","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":[]},{"name":"棉花大哥哥","face":"https://i2.hdslb.com/bfs/face/9fc16093743b2692a1a6d4dee19eede911e6712f.jpg","roomid":103,"areaName":"生活娱乐","live_status":0,"round_status":1,"fansNum":116498,"area_v2_id":"145","area_v2_name":"聊天室","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["王者荣耀","声控","颜控"]},{"name":"萌萌哒条码","face":"https://i1.hdslb.com/bfs/face/14b69433ef566f39a236991cbb0ff5ef95cc82f2.jpg","roomid":1325308,"areaName":"手游直播","live_status":0,"round_status":0,"fansNum":23679,"area_v2_id":"98","area_v2_name":"其他手游","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":["minecraft 我的世界","Hypixel 炉石传说","守望先锋 绝地求生","单机游戏 星际争霸"]},{"name":"某幻君","face":"https://i1.hdslb.com/bfs/face/9ed5ebf1e3694d9cd2b4fcd1d353759ee83b3dfe.jpg","roomid":271744,"areaName":"单机联机","live_status":0,"round_status":1,"fansNum":1521416,"area_v2_id":"107","area_v2_name":"其他游戏","area_v2_parent_name":"游戏","area_v2_parent_id":"2","roomTags":["绝地求生大逃杀"]},{"name":"池田天天","face":"https://i0.hdslb.com/bfs/face/fdb8593ca8a578f5aff6bb744fa1df6fa149d9f1.jpg","roomid":13924,"areaName":"唱见舞见","live_status":0,"round_status":1,"fansNum":48799,"area_v2_id":"21","area_v2_name":"唱见","area_v2_parent_name":"娱乐","area_v2_parent_id":"1","roomTags":["天天","少年音","唱歌"]},{"name":"我就是FISH","face":"https://i1.hdslb.com/bfs/face/a076329348d82164c3f54598ee90239c17817d21.jpg","roomid":4716742,"areaName":"手游直播","live_status":0,"round_status":0,"fansNum":8,"area_v2_id":"98","area_v2_name":"其他手游","area_v2_parent_name":"手游","area_v2_parent_id":"3","roomTags":[]}] - * total_page : 1 - */ - - @SerializedName("page") - private int page; - @SerializedName("pagesize") - private int pageSize; - @SerializedName("total_page") - private int totalPage; - @SerializedName("list") - private List rooms; - - public int getPage() { - return page; - } - - public void setPage(int page) { - this.page = page; - } - - public int getPageSize() { - return pageSize; - } - - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - public int getTotalPage() { - return totalPage; - } - - public void setTotalPage(int totalPage) { - this.totalPage = totalPage; - } - - public List getRooms() { - return rooms; - } - - public void setRooms(List rooms) { - this.rooms = rooms; - } - - public static class Room { - /** - * name : czp3009 - * face : https://i1.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg - * roomid : 1110317 - * areaName : 生活娱乐 - * live_status : 0 - * round_status : 0 - * fansNum : 44 - * area_v2_id : 27 - * area_v2_name : 学习 - * area_v2_parent_name : 娱乐 - * area_v2_parent_id : 1 - * roomTags : ["编程"] - */ - - @SerializedName("name") - private String name; - @SerializedName("face") - private String face; - @SerializedName("roomid") - private long roomId; - @SerializedName("areaName") - private String areaName; - @SerializedName("live_status") - private int liveStatus; - @SerializedName("round_status") - private int roundStatus; - @SerializedName("fansNum") - private long fansNum; - @SerializedName("area_v2_id") - private String areaV2Id; - @SerializedName("area_v2_name") - private String areaV2Name; - @SerializedName("area_v2_parent_name") - private String areaV2ParentName; - @SerializedName("area_v2_parent_id") - private String areaV2ParentId; - @SerializedName("roomTags") - private List roomTags; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public int getLiveStatus() { - return liveStatus; - } - - public void setLiveStatus(int liveStatus) { - this.liveStatus = liveStatus; - } - - public int getRoundStatus() { - return roundStatus; - } - - public void setRoundStatus(int roundStatus) { - this.roundStatus = roundStatus; - } - - public long getFansNum() { - return fansNum; - } - - public void setFansNum(long fansNum) { - this.fansNum = fansNum; - } - - public String getAreaV2Id() { - return areaV2Id; - } - - public void setAreaV2Id(String areaV2Id) { - this.areaV2Id = areaV2Id; - } - - public String getAreaV2Name() { - return areaV2Name; - } - - public void setAreaV2Name(String areaV2Name) { - this.areaV2Name = areaV2Name; - } - - public String getAreaV2ParentName() { - return areaV2ParentName; - } - - public void setAreaV2ParentName(String areaV2ParentName) { - this.areaV2ParentName = areaV2ParentName; - } - - public String getAreaV2ParentId() { - return areaV2ParentId; - } - - public void setAreaV2ParentId(String areaV2ParentId) { - this.areaV2ParentId = areaV2ParentId; - } - - public List getRoomTags() { - return roomTags; - } - - public void setRoomTags(List roomTags) { - this.roomTags = roomTags; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/IsFollowedResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/IsFollowedResponseEntity.java deleted file mode 100644 index 90363b4..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/IsFollowedResponseEntity.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class IsFollowedResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : {"follow":1} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * follow : 1 - */ - - @SerializedName("follow") - private int follow; - - public int getFollow() { - return follow; - } - - public void setFollow(int follow) { - this.follow = follow; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/ItemsEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/ItemsEntity.java deleted file mode 100644 index 225fad5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/ItemsEntity.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class ItemsEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : [{"id":99,"name":"花酒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-99.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/99.gif?20171010161652","type":2},{"id":98,"name":"花糕","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-98.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/98.gif?20171010161652","type":3},{"id":97,"name":"「矢量箭头」","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-97.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/97.gif?20171010161652","type":2},{"id":96,"name":"女装","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-96.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/96.gif?20171010161652","type":2},{"id":95,"name":"桂花酒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-95.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/95.gif?20171010161652","type":2},{"id":94,"name":"月饼","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-94.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/94.gif?20171010161652","type":3},{"id":93,"name":"国庆礼炮","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-93.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/93.gif?20171010161652","type":2},{"id":92,"name":"小红星","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-92.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/92.gif?20171010161652","type":3},{"id":91,"name":"I ❤ LOL","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-91.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/91.gif?20171010161652","type":2},{"id":90,"name":"鸡大腿","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-90.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/90.gif?20171010161652","type":2},{"id":89,"name":"月觉","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-89.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/89.gif?20171010161652","type":2},{"id":88,"name":"日觉","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-88.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/88.gif?20171010161652","type":2},{"id":87,"name":"看板娘限定头饰","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-87.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/87.gif?20171010161652","type":3},{"id":86,"name":"学生卡","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-86.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/86.gif?20171010161652","type":2},{"id":85,"name":"神之记事本","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-85.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/85.gif?20171010161652","type":2},{"id":84,"name":"自动铅笔","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-84.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/84.gif?20171010161652","type":3},{"id":70,"name":"游戏中心","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-70.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/70.gif?20171010161652","type":0},{"id":13,"name":"FFF","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-13.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/13.gif?20171010161652","type":1},{"id":7,"name":"666","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-7.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/7.gif?20171010161652","type":1},{"id":8,"name":"233","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-8.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/8.gif?20171010161652","type":1},{"id":25,"name":"小电视","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-25.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/25.gif?20171010161652","type":0},{"id":39,"name":"节奏风暴","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-39.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/39.gif?20171010161652","type":0},{"id":10,"name":"蓝白胖次","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-10.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/10.gif?20171010161652","type":0},{"id":9,"name":"爱心便当","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-9.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/9.gif?20171010161652","type":0},{"id":3,"name":"B坷垃","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-3.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/3.gif?20171010161652","type":0},{"id":4,"name":"喵娘","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-4.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/4.gif?20171010161652","type":0},{"id":6,"name":"亿圆","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-6.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/6.gif?20171010161652","type":0},{"id":1,"name":"辣条","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-1.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/1.gif?20171010161652","type":0},{"id":83,"name":"护身符","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-83.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/83.gif?20171010161652","type":3},{"id":82,"name":"吃货","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-82.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/82.gif?20171010161652","type":3},{"id":81,"name":"22的鬼画符","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-81.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/81.gif?20171010161652","type":3},{"id":80,"name":"吸茶","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-80.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/80.gif?20171010161652","type":3},{"id":79,"name":"看板娘限定草帽","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-79.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/79.gif?20171010161652","type":3},{"id":78,"name":"夏日水枪","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-78.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/78.gif?20171010161652","type":3},{"id":77,"name":"水箭炮","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-77.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/77.gif?20171010161652","type":2},{"id":76,"name":"柠檬茶","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-76.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/76.gif?20171010161652","type":3},{"id":75,"name":"柠檬桶","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-75.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/75.gif?20171010161652","type":3},{"id":74,"name":"超级壁咚","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-74.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/74.gif?20171010161652","type":2},{"id":73,"name":"壁咚","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-73.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/73.gif?20171010161652","type":3},{"id":72,"name":"记忆面包","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-72.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/72.gif?20171010161652","type":2},{"id":71,"name":"铜锣烧","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-71.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/71.gif?20171010161652","type":3},{"id":69,"name":"应援棒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-69.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/69.gif?20171010161652","type":3},{"id":68,"name":"握手券","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-68.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/68.gif?20171010161652","type":2},{"id":67,"name":"小拳拳","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-67.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/67.gif?20171010161652","type":3},{"id":66,"name":"普通拳","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-66.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/66.gif?20171010161652","type":2},{"id":65,"name":"花嫁头饰礼盒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-65.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/65.gif?20171010161652","type":3},{"id":64,"name":"狗粮","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-64.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/64.gif?20171010161652","type":2},{"id":63,"name":"肉骨头","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-63.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/63.gif?20171010161652","type":3},{"id":62,"name":"棒棒糖","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-62.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/62.gif?20171010161652","type":3},{"id":61,"name":"巧克力","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-61.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/61.gif?20171010161652","type":2},{"id":60,"name":"春联","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-60.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/60.gif?20171010161652","type":2},{"id":59,"name":"新年红包","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-59.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/59.gif?20171010161652","type":3},{"id":58,"name":"限量版圣诞帽","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-58.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/58.gif?20171010161652","type":3},{"id":57,"name":"Me More Cool","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-57.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/57.gif?20171010161652","type":3},{"id":56,"name":"绘马板","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-56.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/56.gif?20171010161652","type":2},{"id":55,"name":"圣诞星","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-55.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/55.gif?20171010161652","type":2},{"id":54,"name":"南瓜灯","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-54.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/54.gif?20171010161652","type":2},{"id":53,"name":"速子核心","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-53.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/53.gif?20171010161652","type":2},{"id":52,"name":"聚变核心","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-52.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/52.gif?20171010161652","type":3},{"id":51,"name":"金币","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-51.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/51.gif?20171010161652","type":3},{"id":50,"name":"角色应援棒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-50.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/50.gif?20171010161652","type":3},{"id":49,"name":"萌萌哒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-49.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/49.gif?20171010161652","type":2},{"id":48,"name":"中秋月饼","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-48.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/48.gif?20171010161652","type":2},{"id":47,"name":"王之财宝","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-47.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/47.gif?20171010161652","type":2},{"id":46,"name":"烟花","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-46.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/46.gif?20171010161652","type":2},{"id":45,"name":"烤红薯","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-45.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/45.gif?20171010161652","type":3},{"id":44,"name":"金鱼胖次","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-44.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/44.gif?20171010161652","type":0},{"id":43,"name":"命格转盘","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-43.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/43.gif?20171010161652","type":3},{"id":42,"name":"颜料","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-42.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/42.gif?20171010161652","type":2},{"id":41,"name":"笔","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-41.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/41.gif?20171010161652","type":2},{"id":38,"name":"西瓜","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-38.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/38.gif?20171010161652","type":2},{"id":37,"name":"团扇","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-37.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/37.gif?20171010161652","type":3},{"id":36,"name":"刨冰","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-36.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/36.gif?20171010161652","type":2},{"id":32,"name":"咸粽子","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-32.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/32.gif?20171010161652","type":2},{"id":31,"name":"甜粽子","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-31.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/31.gif?20171010161652","type":2},{"id":29,"name":"菠菜罐头","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-29.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/29.gif?20171010161652","type":2},{"id":28,"name":"被窝","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-28.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/28.gif?20171010161652","type":2},{"id":26,"name":"美人愚","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-26.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/26.gif?20171010161652","type":2},{"id":23,"name":"本子","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-23.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/23.gif?20171010161652","type":2},{"id":22,"name":"橡皮擦","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-22.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/22.gif?20171010161652","type":2},{"id":21,"name":"Are you ok","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-21.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/21.gif?20171010161652","type":2},{"id":20,"name":"应援巾","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-20.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/20.gif?20171010161652","type":2},{"id":19,"name":"应援棒","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-19.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/19.gif?20171010161652","type":2},{"id":18,"name":"年糕","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-18.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/18.gif?20171010161652","type":2},{"id":5,"name":"锅","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-5.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/5.gif?20171010161652"},{"id":2,"name":"王♂者肥皂","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-2.png?20171010161652","gif_url":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/2.gif?20171010161652","type":0}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List items; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List getItems() { - return items; - } - - public void setItems(List items) { - this.items = items; - } - - public static class Item { - /** - * id : 99 - * name : 花酒 - * img : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-99.png?20171010161652 - * gif_url : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/3/99.gif?20171010161652 - * type : 2 - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("img") - private String img; - @SerializedName("gif_url") - private String gifUrl; - @SerializedName("type") - private int type; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public String getGifUrl() { - return gifUrl; - } - - public void setGifUrl(String gifUrl) { - this.gifUrl = gifUrl; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/JoinAppSmallTVResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/JoinAppSmallTVResponseEntity.java deleted file mode 100644 index 4f564b2..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/JoinAppSmallTVResponseEntity.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class JoinAppSmallTVResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : OK - * message : OK - * data : {"id":40147,"dtime":179,"status":1} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * id : 40147 - * dtime : 179 - * status : 1 - */ - - @SerializedName("id") - private long id; - @SerializedName("dtime") - private int dtime; - @SerializedName("status") - private int status; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public int getDtime() { - return dtime; - } - - public void setDtime(int dtime) { - this.dtime = dtime; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/LiveHistoryBulletScreensEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/LiveHistoryBulletScreensEntity.java deleted file mode 100644 index 9005c29..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/LiveHistoryBulletScreensEntity.java +++ /dev/null @@ -1,229 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class LiveHistoryBulletScreensEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"room":[{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:40:10","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:40:59","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:42:03","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:42:08","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:42:26","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:42:31","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"这是自动发送的弹幕","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:42:46","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"感谢 czp3009 的 辣条","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 02:43:31","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"感谢 czp3009 的 辣条","uid":20293030,"nickname":"czp3009","timeline":"2017-10-20 17:41:29","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0},{"text":"感谢 czp3009 的 辣条","uid":20293030,"nickname":"czp3009","timeline":"2017-10-21 01:10:51","isadmin":0,"vip":0,"svip":0,"medal":[],"title":[""],"user_level":[12,0,6406234,">50000"],"rank":10000,"teamid":0,"rnd":-979658878,"user_title":"","guard_level":0}],"admin":[]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - @SerializedName("room") - private List liveHistoryBulletScreens; - @SerializedName("admin") - private List admin; - - public List getLiveHistoryBulletScreens() { - return liveHistoryBulletScreens; - } - - public void setLiveHistoryBulletScreens(List liveHistoryBulletScreens) { - this.liveHistoryBulletScreens = liveHistoryBulletScreens; - } - - public List getAdmin() { - return admin; - } - - public void setAdmin(List admin) { - this.admin = admin; - } - - public static class LiveHistoryBulletScreen { - /** - * text : 这是自动发送的弹幕 - * uid : 20293030 - * nickname : czp3009 - * timeline : 2017-10-20 02:40:10 - * isadmin : 0 - * vip : 0 - * svip : 0 - * medal : [] - * title : [""] - * user_level : [12,0,6406234,">50000"] - * rank : 10000 - * teamid : 0 - * rnd : -979658878 - * user_title : - * guard_level : 0 - */ - - @SerializedName("text") - private String text; - @SerializedName("uid") - private long userId; - @SerializedName("nickname") - private String nickname; - @SerializedName("timeline") - private String timeLine; - @SerializedName("isadmin") - private int isAdmin; - @SerializedName("vip") - private int vip; - @SerializedName("svip") - private int svip; - @SerializedName("rank") - private int rank; - @SerializedName("teamid") - private int teamId; - @SerializedName("rnd") - private long rnd; - @SerializedName("user_title") - private String userTitle; - @SerializedName("guard_level") - private int guardLevel; - @SerializedName("medal") - private List medal; - @SerializedName("title") - private List title; - @SerializedName("user_level") - private List userLevel; - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getNickname() { - return nickname; - } - - public void setNickname(String nickname) { - this.nickname = nickname; - } - - public String getTimeLine() { - return timeLine; - } - - public void setTimeLine(String timeLine) { - this.timeLine = timeLine; - } - - public int getIsAdmin() { - return isAdmin; - } - - public void setIsAdmin(int isAdmin) { - this.isAdmin = isAdmin; - } - - public int getVip() { - return vip; - } - - public void setVip(int vip) { - this.vip = vip; - } - - public int getSvip() { - return svip; - } - - public void setSvip(int svip) { - this.svip = svip; - } - - public int getRank() { - return rank; - } - - public void setRank(int rank) { - this.rank = rank; - } - - public int getTeamId() { - return teamId; - } - - public void setTeamId(int teamId) { - this.teamId = teamId; - } - - public long getRnd() { - return rnd; - } - - public void setRnd(long rnd) { - this.rnd = rnd; - } - - public String getUserTitle() { - return userTitle; - } - - public void setUserTitle(String userTitle) { - this.userTitle = userTitle; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - - public List getMedal() { - return medal; - } - - public void setMedal(List medal) { - this.medal = medal; - } - - public List getTitle() { - return title; - } - - public void setTitle(List title) { - this.title = title; - } - - public List getUserLevel() { - return userLevel; - } - - public void setUserLevel(List userLevel) { - this.userLevel = userLevel; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/LiveRoomInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/LiveRoomInfoEntity.java deleted file mode 100644 index b9efc8a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/LiveRoomInfoEntity.java +++ /dev/null @@ -1,1318 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; -import java.util.Map; - -public class LiveRoomInfoEntity extends ResponseEntity { - /** - * code : 0 - * data : {"room_id":23058,"title":"哔哩哔哩音悦台","cover":"http://i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg","mid":11153765,"uname":"3号直播间","face":"http://i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","m_face":"http://i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","background_id":1,"attention":313994,"is_attention":1,"online":25101,"create":1434695375,"create_at":"2015-06-19 14:29:35","sch_id":0,"status":"LIVE","area":"放映厅","area_id":7,"area_v2_id":34,"area_v2_parent_id":1,"area_v2_name":"音乐台","area_v2_parent_name":"娱乐","schedule":{"cid":10023058,"sch_id":0,"title":"哔哩哔哩音悦台","mid":11153765,"manager":[],"start":1434695375,"start_at":"2015-06-19 14:29:35","aid":0,"stream_id":13998,"online":25101,"status":"LIVE","meta_id":0,"pending_meta_id":0},"meta":{"tag":["ACG音乐"],"description":"

这里是哔哩哔哩官方音乐台喔!<\/p>

一起来听音乐吧ε=ε=(ノ≧∇≦)ノ<\/p>

没想到蒸汽配圣诞下装,意外的很暴露呢=3=<\/p>\n","typeid":1,"tag_ids":{"0":24},"cover":"http://i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg","check_status":"VERIFY","aid":0},"cmt":"livecmt-2.bilibili.com","cmt_port":88,"cmt_port_goim":2243,"recommend":[{"owner":{"face":"http://i2.hdslb.com/bfs/face/941f199204fd885cca123cbe8be6eedb6639d0e0.jpg","mid":14117221,"name":"就决定是你了长生"},"cover":{"src":"http://i0.hdslb.com/bfs/live/1170236.jpg?03160920"},"title":"【长生】唱的不好听算我输!","room_id":1170236,"online":3649},{"owner":{"face":"http://i2.hdslb.com/bfs/face/2af1a482007bee57d176559defc861cd39481dcf.jpg","mid":2756858,"name":"咿呀哥哥"},"cover":{"src":"http://i0.hdslb.com/bfs/live/2532274.jpg?03160920"},"title":"暖音哥哥 数羊哄睡","room_id":2532274,"online":92}],"toplist":[{"name":"桃花榜","type":"lover_2018"}],"isvip":0,"opentime":33690,"prepare":"主播正在嘿嘿嘿中...","isadmin":0,"hot_word":[{"id":48,"words":"打call"},{"id":47,"words":"囍"},{"id":44,"words":"还有这种操作!"},{"id":41,"words":"gay里gay气"},{"id":39,"words":"请大家注意弹幕礼仪哦!"},{"id":36,"words":"向大佬低头"},{"id":25,"words":"prprpr"},{"id":21,"words":"gg"},{"id":20,"words":"你为什么这么熟练啊"},{"id":19,"words":"老司机带带我"},{"id":13,"words":"666666666"},{"id":12,"words":"啪啪啪啪啪"},{"id":11,"words":"Yooooooo"},{"id":10,"words":"FFFFFFFFFF"},{"id":9,"words":"色情主播"},{"id":7,"words":"红红火火恍恍惚惚"},{"id":5,"words":"喂,妖妖零吗"},{"id":2,"words":"2333333"}],"roomgifts":[{"id":116,"name":"情书","price":2000,"type":2,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-116.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/116.gif?20180314161652","count_set":"1,5,10,99,225","combo_num":5,"super_num":225,"count_map":{"1":"","5":"","10":"","99":"","225":"高能"}},{"id":25,"name":"小电视","price":1245000,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-25.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/25.gif?20180314161652","count_set":"1,2,3,4,5","combo_num":1,"super_num":1,"count_map":{"1":"高能","2":"高能","3":"高能","4":"高能","5":"高能"}},{"id":3,"name":"B坷垃","price":9900,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-3.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/3.gif?20180314161652","count_set":"1,10,46,520,1314","combo_num":1,"super_num":46,"count_map":{"1":"","10":"","46":"高能","520":"高能","1314":"高能"}},{"id":4,"name":"喵娘","price":5200,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-4.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/4.gif?20180314161652","count_set":"1,2,10,87,520","combo_num":2,"super_num":87,"count_map":{"1":"","2":"","10":"","87":"高能","520":"高能"}},{"id":6,"name":"亿圆","price":1000,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-6.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/6.gif?20180314161652","count_set":"1,10,99,450,1314","combo_num":10,"super_num":450,"count_map":{"1":"","10":"","99":"","450":"高能","1314":"高能"}},{"id":7,"name":"666","price":666,"type":1,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-7.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/7.gif?20180314161652","count_set":"1,2,3,4,5","combo_num":0,"super_num":0,"count_map":{"1":"","2":"","3":"","4":"","5":""}},{"id":8,"name":"233","price":233,"type":1,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-8.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/8.gif?20180314161652","count_set":"1,2,3,4,5","combo_num":0,"super_num":0,"count_map":{"1":"","2":"","3":"","4":"","5":""}},{"id":1,"name":"辣条","price":100,"type":0,"coin_type":{"silver":"silver"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-1.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/1.gif?20180314161652","count_set":"1,10,99,520,4500","combo_num":0,"super_num":0,"count_map":{"1":"","10":"","99":"","520":"","4500":""}}],"ignore_gift":[{"id":1,"num":10},{"id":21,"num":10}],"msg_mode":1,"msg_color":16777215,"msg_length":30,"master_level":36,"master_level_color":16746162,"broadcast_type":0,"activity_gift":[{"id":115,"bag_id":67456406,"name":"桃花","num":1,"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-115.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/115.gif?20180314161652","combo_num":0,"super_num":0,"count_set":"1,1","count_map":{"1":"全部"}}],"check_version":0,"activity_id":0,"event_corner":[],"guard_level":0,"guard_info":{"heart_status":0,"heart_time":300},"guard_notice":0,"guard_tip_flag":1,"new_year_ceremony":0,"special_gift_gif":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901","show_room_id":3} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private LiveRoom data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public LiveRoom getData() { - return data; - } - - public void setData(LiveRoom data) { - this.data = data; - } - - public static class LiveRoom { - /** - * room_id : 23058 - * title : 哔哩哔哩音悦台 - * cover : http://i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg - * mid : 11153765 - * uname : 3号直播间 - * face : http://i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg - * m_face : http://i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg - * background_id : 1 - * attention : 313994 - * is_attention : 1 - * online : 25101 - * create : 1434695375 - * create_at : 2015-06-19 14:29:35 - * sch_id : 0 - * status : LIVE - * area : 放映厅 - * area_id : 7 - * area_v2_id : 34 - * area_v2_parent_id : 1 - * area_v2_name : 音乐台 - * area_v2_parent_name : 娱乐 - * schedule : {"cid":10023058,"sch_id":0,"title":"哔哩哔哩音悦台","mid":11153765,"manager":[],"start":1434695375,"start_at":"2015-06-19 14:29:35","aid":0,"stream_id":13998,"online":25101,"status":"LIVE","meta_id":0,"pending_meta_id":0} - * meta : {"tag":["ACG音乐"],"description":"

这里是哔哩哔哩官方音乐台喔!<\/p>

一起来听音乐吧ε=ε=(ノ≧∇≦)ノ<\/p>

没想到蒸汽配圣诞下装,意外的很暴露呢=3=<\/p>\n","typeid":1,"tag_ids":{"0":24},"cover":"http://i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg","check_status":"VERIFY","aid":0} - * cmt : livecmt-2.bilibili.com - * cmt_port : 88 - * cmt_port_goim : 2243 - * recommend : [{"owner":{"face":"http://i2.hdslb.com/bfs/face/941f199204fd885cca123cbe8be6eedb6639d0e0.jpg","mid":14117221,"name":"就决定是你了长生"},"cover":{"src":"http://i0.hdslb.com/bfs/live/1170236.jpg?03160920"},"title":"【长生】唱的不好听算我输!","room_id":1170236,"online":3649},{"owner":{"face":"http://i2.hdslb.com/bfs/face/2af1a482007bee57d176559defc861cd39481dcf.jpg","mid":2756858,"name":"咿呀哥哥"},"cover":{"src":"http://i0.hdslb.com/bfs/live/2532274.jpg?03160920"},"title":"暖音哥哥 数羊哄睡","room_id":2532274,"online":92}] - * toplist : [{"name":"桃花榜","type":"lover_2018"}] - * isvip : 0 - * opentime : 33690 - * prepare : 主播正在嘿嘿嘿中... - * isadmin : 0 - * hot_word : [{"id":48,"words":"打call"},{"id":47,"words":"囍"},{"id":44,"words":"还有这种操作!"},{"id":41,"words":"gay里gay气"},{"id":39,"words":"请大家注意弹幕礼仪哦!"},{"id":36,"words":"向大佬低头"},{"id":25,"words":"prprpr"},{"id":21,"words":"gg"},{"id":20,"words":"你为什么这么熟练啊"},{"id":19,"words":"老司机带带我"},{"id":13,"words":"666666666"},{"id":12,"words":"啪啪啪啪啪"},{"id":11,"words":"Yooooooo"},{"id":10,"words":"FFFFFFFFFF"},{"id":9,"words":"色情主播"},{"id":7,"words":"红红火火恍恍惚惚"},{"id":5,"words":"喂,妖妖零吗"},{"id":2,"words":"2333333"}] - * roomgifts : [{"id":116,"name":"情书","price":2000,"type":2,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-116.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/116.gif?20180314161652","count_set":"1,5,10,99,225","combo_num":5,"super_num":225,"count_map":{"1":"","5":"","10":"","99":"","225":"高能"}},{"id":25,"name":"小电视","price":1245000,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-25.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/25.gif?20180314161652","count_set":"1,2,3,4,5","combo_num":1,"super_num":1,"count_map":{"1":"高能","2":"高能","3":"高能","4":"高能","5":"高能"}},{"id":3,"name":"B坷垃","price":9900,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-3.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/3.gif?20180314161652","count_set":"1,10,46,520,1314","combo_num":1,"super_num":46,"count_map":{"1":"","10":"","46":"高能","520":"高能","1314":"高能"}},{"id":4,"name":"喵娘","price":5200,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-4.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/4.gif?20180314161652","count_set":"1,2,10,87,520","combo_num":2,"super_num":87,"count_map":{"1":"","2":"","10":"","87":"高能","520":"高能"}},{"id":6,"name":"亿圆","price":1000,"type":0,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-6.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/6.gif?20180314161652","count_set":"1,10,99,450,1314","combo_num":10,"super_num":450,"count_map":{"1":"","10":"","99":"","450":"高能","1314":"高能"}},{"id":7,"name":"666","price":666,"type":1,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-7.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/7.gif?20180314161652","count_set":"1,2,3,4,5","combo_num":0,"super_num":0,"count_map":{"1":"","2":"","3":"","4":"","5":""}},{"id":8,"name":"233","price":233,"type":1,"coin_type":{"gold":"gold"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-8.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/8.gif?20180314161652","count_set":"1,2,3,4,5","combo_num":0,"super_num":0,"count_map":{"1":"","2":"","3":"","4":"","5":""}},{"id":1,"name":"辣条","price":100,"type":0,"coin_type":{"silver":"silver"},"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-1.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/1.gif?20180314161652","count_set":"1,10,99,520,4500","combo_num":0,"super_num":0,"count_map":{"1":"","10":"","99":"","520":"","4500":""}}] - * ignore_gift : [{"id":1,"num":10},{"id":21,"num":10}] - * msg_mode : 1 - * msg_color : 16777215 - * msg_length : 30 - * master_level : 36 - * master_level_color : 16746162 - * broadcast_type : 0 - * activity_gift : [{"id":115,"bag_id":67456406,"name":"桃花","num":1,"img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-115.png?20180314161652","gift_url":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/115.gif?20180314161652","combo_num":0,"super_num":0,"count_set":"1,1","count_map":{"1":"全部"}}] - * check_version : 0 - * activity_id : 0 - * event_corner : [] - * guard_level : 0 - * guard_info : {"heart_status":0,"heart_time":300} - * guard_notice : 0 - * guard_tip_flag : 1 - * new_year_ceremony : 0 - * special_gift_gif : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901 - * show_room_id : 3 - */ - - @SerializedName("room_id") - private long roomId; - @SerializedName("title") - private String title; - @SerializedName("cover") - private String cover; - @SerializedName("mid") - private long userId; - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("m_face") - private String mobileFace; - @SerializedName("background_id") - private int backgroundId; - @SerializedName("attention") - private int attention; - @SerializedName("is_attention") - private int isAttention; - @SerializedName("online") - private int online; - @SerializedName("create") - private int create; - @SerializedName("create_at") - private String createAt; - @SerializedName("sch_id") - private int scheduleId; - @SerializedName("status") - private String status; - @SerializedName("area") - private String area; - @SerializedName("area_id") - private int areaId; - @SerializedName("area_v2_id") - private int areaV2Id; - @SerializedName("area_v2_parent_id") - private int areaV2ParentId; - @SerializedName("area_v2_name") - private String areaV2Name; - @SerializedName("area_v2_parent_name") - private String areaV2ParentName; - @SerializedName("schedule") - private Schedule schedule; - @SerializedName("meta") - private Meta meta; - @SerializedName("cmt") - private String cmt; - @SerializedName("cmt_port") - private int cmtPort; - @SerializedName("cmt_port_goim") - private int cmtPortGoim; - @SerializedName("isvip") - private int isVip; - @SerializedName("opentime") - private int openTime; - @SerializedName("prepare") - private String prepare; - @SerializedName("isadmin") - private int isAdmin; - @SerializedName("msg_mode") - private int msgMode; - @SerializedName("msg_color") - private int msgColor; - @SerializedName("msg_length") - private int msgLength; - @SerializedName("master_level") - private int masterLevel; - @SerializedName("master_level_color") - private int masterLevelColor; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("check_version") - private int checkVersion; - @SerializedName("activity_id") - private int activityId; - @SerializedName("guard_level") - private int guardLevel; - @SerializedName("guard_info") - private GuardInfo guardInfo; - @SerializedName("guard_notice") - private int guardNotice; - @SerializedName("guard_tip_flag") - private int guardTipFlag; - @SerializedName("new_year_ceremony") - private int newYearCeremony; - @SerializedName("special_gift_gif") - private String specialGiftGif; - @SerializedName("show_room_id") - private long showRoomId; - @SerializedName("recommend") - private List recommend; - @SerializedName("toplist") - private List topList; - @SerializedName("hot_word") - private List hotWords; - @SerializedName("roomgifts") - private List roomGifts; - @SerializedName("ignore_gift") - private List ignoreGift; - @SerializedName("activity_gift") - private List activityGift; - @SerializedName("event_corner") - private JsonElement eventCorner; - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getCover() { - return cover; - } - - public void setCover(String cover) { - this.cover = cover; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public String getMobileFace() { - return mobileFace; - } - - public void setMobileFace(String mobileFace) { - this.mobileFace = mobileFace; - } - - public int getBackgroundId() { - return backgroundId; - } - - public void setBackgroundId(int backgroundId) { - this.backgroundId = backgroundId; - } - - public int getAttention() { - return attention; - } - - public void setAttention(int attention) { - this.attention = attention; - } - - public int getIsAttention() { - return isAttention; - } - - public void setIsAttention(int isAttention) { - this.isAttention = isAttention; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public int getCreate() { - return create; - } - - public void setCreate(int create) { - this.create = create; - } - - public String getCreateAt() { - return createAt; - } - - public void setCreateAt(String createAt) { - this.createAt = createAt; - } - - public int getScheduleId() { - return scheduleId; - } - - public void setScheduleId(int scheduleId) { - this.scheduleId = scheduleId; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public int getAreaV2Id() { - return areaV2Id; - } - - public void setAreaV2Id(int areaV2Id) { - this.areaV2Id = areaV2Id; - } - - public int getAreaV2ParentId() { - return areaV2ParentId; - } - - public void setAreaV2ParentId(int areaV2ParentId) { - this.areaV2ParentId = areaV2ParentId; - } - - public String getAreaV2Name() { - return areaV2Name; - } - - public void setAreaV2Name(String areaV2Name) { - this.areaV2Name = areaV2Name; - } - - public String getAreaV2ParentName() { - return areaV2ParentName; - } - - public void setAreaV2ParentName(String areaV2ParentName) { - this.areaV2ParentName = areaV2ParentName; - } - - public Schedule getSchedule() { - return schedule; - } - - public void setSchedule(Schedule schedule) { - this.schedule = schedule; - } - - public Meta getMeta() { - return meta; - } - - public void setMeta(Meta meta) { - this.meta = meta; - } - - public String getCmt() { - return cmt; - } - - public void setCmt(String cmt) { - this.cmt = cmt; - } - - public int getCmtPort() { - return cmtPort; - } - - public void setCmtPort(int cmtPort) { - this.cmtPort = cmtPort; - } - - public int getCmtPortGoim() { - return cmtPortGoim; - } - - public void setCmtPortGoim(int cmtPortGoim) { - this.cmtPortGoim = cmtPortGoim; - } - - public int getIsVip() { - return isVip; - } - - public void setIsVip(int isVip) { - this.isVip = isVip; - } - - public int getOpenTime() { - return openTime; - } - - public void setOpenTime(int openTime) { - this.openTime = openTime; - } - - public String getPrepare() { - return prepare; - } - - public void setPrepare(String prepare) { - this.prepare = prepare; - } - - public int getIsAdmin() { - return isAdmin; - } - - public void setIsAdmin(int isAdmin) { - this.isAdmin = isAdmin; - } - - public int getMsgMode() { - return msgMode; - } - - public void setMsgMode(int msgMode) { - this.msgMode = msgMode; - } - - public int getMsgColor() { - return msgColor; - } - - public void setMsgColor(int msgColor) { - this.msgColor = msgColor; - } - - public int getMsgLength() { - return msgLength; - } - - public void setMsgLength(int msgLength) { - this.msgLength = msgLength; - } - - public int getMasterLevel() { - return masterLevel; - } - - public void setMasterLevel(int masterLevel) { - this.masterLevel = masterLevel; - } - - public int getMasterLevelColor() { - return masterLevelColor; - } - - public void setMasterLevelColor(int masterLevelColor) { - this.masterLevelColor = masterLevelColor; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public int getCheckVersion() { - return checkVersion; - } - - public void setCheckVersion(int checkVersion) { - this.checkVersion = checkVersion; - } - - public int getActivityId() { - return activityId; - } - - public void setActivityId(int activityId) { - this.activityId = activityId; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - - public GuardInfo getGuardInfo() { - return guardInfo; - } - - public void setGuardInfo(GuardInfo guardInfo) { - this.guardInfo = guardInfo; - } - - public int getGuardNotice() { - return guardNotice; - } - - public void setGuardNotice(int guardNotice) { - this.guardNotice = guardNotice; - } - - public int getGuardTipFlag() { - return guardTipFlag; - } - - public void setGuardTipFlag(int guardTipFlag) { - this.guardTipFlag = guardTipFlag; - } - - public int getNewYearCeremony() { - return newYearCeremony; - } - - public void setNewYearCeremony(int newYearCeremony) { - this.newYearCeremony = newYearCeremony; - } - - public String getSpecialGiftGif() { - return specialGiftGif; - } - - public void setSpecialGiftGif(String specialGiftGif) { - this.specialGiftGif = specialGiftGif; - } - - public long getShowRoomId() { - return showRoomId; - } - - public void setShowRoomId(long showRoomId) { - this.showRoomId = showRoomId; - } - - public List getRecommend() { - return recommend; - } - - public void setRecommend(List recommend) { - this.recommend = recommend; - } - - public List getTopList() { - return topList; - } - - public void setTopList(List topList) { - this.topList = topList; - } - - public List getHotWords() { - return hotWords; - } - - public void setHotWords(List hotWords) { - this.hotWords = hotWords; - } - - public List getRoomGifts() { - return roomGifts; - } - - public void setRoomGifts(List roomGifts) { - this.roomGifts = roomGifts; - } - - public List getIgnoreGift() { - return ignoreGift; - } - - public void setIgnoreGift(List ignoreGift) { - this.ignoreGift = ignoreGift; - } - - public List getActivityGift() { - return activityGift; - } - - public void setActivityGift(List activityGift) { - this.activityGift = activityGift; - } - - public JsonElement getEventCorner() { - return eventCorner; - } - - public void setEventCorner(JsonElement eventCorner) { - this.eventCorner = eventCorner; - } - - public static class Schedule { - /** - * cid : 10023058 - * sch_id : 0 - * title : 哔哩哔哩音悦台 - * mid : 11153765 - * manager : [] - * start : 1434695375 - * start_at : 2015-06-19 14:29:35 - * aid : 0 - * stream_id : 13998 - * online : 25101 - * status : LIVE - * meta_id : 0 - * pending_meta_id : 0 - */ - - @SerializedName("cid") - private long cid; - @SerializedName("sch_id") - private int scheduleId; - @SerializedName("title") - private String title; - @SerializedName("mid") - private long userId; - @SerializedName("start") - private long start; - @SerializedName("start_at") - private String startAt; - @SerializedName("aid") - private int aid; - @SerializedName("stream_id") - private int streamId; - @SerializedName("online") - private int online; - @SerializedName("status") - private String status; - @SerializedName("meta_id") - private int metaId; - @SerializedName("pending_meta_id") - private int pendingMetaId; - @SerializedName("manager") - private List manager; - - public long getCid() { - return cid; - } - - public void setCid(long cid) { - this.cid = cid; - } - - public int getScheduleId() { - return scheduleId; - } - - public void setScheduleId(int scheduleId) { - this.scheduleId = scheduleId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public long getStart() { - return start; - } - - public void setStart(long start) { - this.start = start; - } - - public String getStartAt() { - return startAt; - } - - public void setStartAt(String startAt) { - this.startAt = startAt; - } - - public int getAid() { - return aid; - } - - public void setAid(int aid) { - this.aid = aid; - } - - public int getStreamId() { - return streamId; - } - - public void setStreamId(int streamId) { - this.streamId = streamId; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public int getMetaId() { - return metaId; - } - - public void setMetaId(int metaId) { - this.metaId = metaId; - } - - public int getPendingMetaId() { - return pendingMetaId; - } - - public void setPendingMetaId(int pendingMetaId) { - this.pendingMetaId = pendingMetaId; - } - - public List getManager() { - return manager; - } - - public void setManager(List manager) { - this.manager = manager; - } - } - - public static class Meta { - /** - * tag : ["ACG音乐"] - * description :

这里是哔哩哔哩官方音乐台喔!

一起来听音乐吧ε=ε=(ノ≧∇≦)ノ

没想到蒸汽配圣诞下装,意外的很暴露呢=3=

- - * typeid : 1 - * tag_ids : {"0":24} - * cover : http://i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg - * check_status : VERIFY - * aid : 0 - */ - - @SerializedName("description") - private String description; - @SerializedName("typeid") - private int typeId; - @SerializedName("tag_ids") - private Map tagIds; - @SerializedName("cover") - private String cover; - @SerializedName("check_status") - private String checkStatus; - @SerializedName("aid") - private int aid; - @SerializedName("tag") - private List tag; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public int getTypeId() { - return typeId; - } - - public void setTypeId(int typeId) { - this.typeId = typeId; - } - - public Map getTagIds() { - return tagIds; - } - - public void setTagIds(Map tagIds) { - this.tagIds = tagIds; - } - - public String getCover() { - return cover; - } - - public void setCover(String cover) { - this.cover = cover; - } - - public String getCheckStatus() { - return checkStatus; - } - - public void setCheckStatus(String checkStatus) { - this.checkStatus = checkStatus; - } - - public int getAid() { - return aid; - } - - public void setAid(int aid) { - this.aid = aid; - } - - public List getTag() { - return tag; - } - - public void setTag(List tag) { - this.tag = tag; - } - } - - public static class GuardInfo { - /** - * heart_status : 0 - * heart_time : 300 - */ - - @SerializedName("heart_status") - private int heartStatus; - @SerializedName("heart_time") - private int heartTime; - - public int getHeartStatus() { - return heartStatus; - } - - public void setHeartStatus(int heartStatus) { - this.heartStatus = heartStatus; - } - - public int getHeartTime() { - return heartTime; - } - - public void setHeartTime(int heartTime) { - this.heartTime = heartTime; - } - } - - public static class Recommend { - /** - * owner : {"face":"http://i2.hdslb.com/bfs/face/941f199204fd885cca123cbe8be6eedb6639d0e0.jpg","mid":14117221,"name":"就决定是你了长生"} - * cover : {"src":"http://i0.hdslb.com/bfs/live/1170236.jpg?03160920"} - * title : 【长生】唱的不好听算我输! - * room_id : 1170236 - * online : 3649 - */ - - @SerializedName("owner") - private Owner owner; - @SerializedName("cover") - private Cover cover; - @SerializedName("title") - private String title; - @SerializedName("room_id") - private int roomId; - @SerializedName("online") - private int online; - - public Owner getOwner() { - return owner; - } - - public void setOwner(Owner owner) { - this.owner = owner; - } - - public Cover getCover() { - return cover; - } - - public void setCover(Cover cover) { - this.cover = cover; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public static class Owner { - /** - * face : http://i2.hdslb.com/bfs/face/941f199204fd885cca123cbe8be6eedb6639d0e0.jpg - * mid : 14117221 - * name : 就决定是你了长生 - */ - - @SerializedName("face") - private String face; - @SerializedName("mid") - private long userId; - @SerializedName("name") - private String name; - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - - public static class Cover { - /** - * src : http://i0.hdslb.com/bfs/live/1170236.jpg?03160920 - */ - - @SerializedName("src") - private String src; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - } - } - - public static class TopListData { - /** - * name : 桃花榜 - * type : lover_2018 - */ - - @SerializedName("name") - private String name; - @SerializedName("type") - private String type; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - } - - public static class HotWord { - /** - * id : 48 - * words : 打call - */ - - @SerializedName("id") - private int id; - @SerializedName("words") - private String words; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getWords() { - return words; - } - - public void setWords(String words) { - this.words = words; - } - } - - public static class RoomGift { - /** - * id : 116 - * name : 情书 - * price : 2000 - * type : 2 - * coin_type : {"gold":"gold"} - * img : http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-116.png?20180314161652 - * gift_url : http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/116.gif?20180314161652 - * count_set : 1,5,10,99,225 - * combo_num : 5 - * super_num : 225 - * count_map : {"1":"","5":"","10":"","99":"","225":"高能"} - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("price") - private int price; - @SerializedName("type") - private int type; - @SerializedName("coin_type") - private Map coinType; - @SerializedName("img") - private String img; - @SerializedName("gift_url") - private String giftUrl; - @SerializedName("count_set") - private String countSet; - @SerializedName("combo_num") - private int comboNum; - @SerializedName("super_num") - private int superNum; - @SerializedName("count_map") - private Map countMap; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getPrice() { - return price; - } - - public void setPrice(int price) { - this.price = price; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public Map getCoinType() { - return coinType; - } - - public void setCoinType(Map coinType) { - this.coinType = coinType; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public String getGiftUrl() { - return giftUrl; - } - - public void setGiftUrl(String giftUrl) { - this.giftUrl = giftUrl; - } - - public String getCountSet() { - return countSet; - } - - public void setCountSet(String countSet) { - this.countSet = countSet; - } - - public int getComboNum() { - return comboNum; - } - - public void setComboNum(int comboNum) { - this.comboNum = comboNum; - } - - public int getSuperNum() { - return superNum; - } - - public void setSuperNum(int superNum) { - this.superNum = superNum; - } - - public Map getCountMap() { - return countMap; - } - - public void setCountMap(Map countMap) { - this.countMap = countMap; - } - } - - public static class IgnoreGift { - /** - * id : 1 - * num : 10 - */ - - @SerializedName("id") - private int id; - @SerializedName("num") - private int number; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - } - - public static class ActivityGift { - /** - * id : 115 - * bag_id : 67456406 - * name : 桃花 - * num : 1 - * img : http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift-static-icon/gift-115.png?20180314161652 - * gift_url : http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/gift/mobilegift/2/115.gif?20180314161652 - * combo_num : 0 - * super_num : 0 - * count_set : 1,1 - * count_map : {"1":"全部"} - */ - - @SerializedName("id") - private int id; - @SerializedName("bag_id") - private int bagId; - @SerializedName("name") - private String name; - @SerializedName("num") - private int number; - @SerializedName("img") - private String image; - @SerializedName("gift_url") - private String giftUrl; - @SerializedName("combo_num") - private int comboNumber; - @SerializedName("super_num") - private int superNumber; - @SerializedName("count_set") - private String countSet; - @SerializedName("count_map") - private Map countMap; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getBagId() { - return bagId; - } - - public void setBagId(int bagId) { - this.bagId = bagId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - - public String getImage() { - return image; - } - - public void setImage(String image) { - this.image = image; - } - - public String getGiftUrl() { - return giftUrl; - } - - public void setGiftUrl(String giftUrl) { - this.giftUrl = giftUrl; - } - - public int getComboNumber() { - return comboNumber; - } - - public void setComboNumber(int comboNumber) { - this.comboNumber = comboNumber; - } - - public int getSuperNumber() { - return superNumber; - } - - public void setSuperNumber(int superNumber) { - this.superNumber = superNumber; - } - - public String getCountSet() { - return countSet; - } - - public void setCountSet(String countSet) { - this.countSet = countSet; - } - - public Map getCountMap() { - return countMap; - } - - public void setCountMap(Map countMap) { - this.countMap = countMap; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/MobileActivityEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/MobileActivityEntity.java deleted file mode 100644 index a245372..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/MobileActivityEntity.java +++ /dev/null @@ -1,205 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class MobileActivityEntity extends ResponseEntity { - /** - * code : 0 - * msg : - * message : - * data : {"activity":{"keyword":"lover_2018","icon_web":"","jump_web":"","icon_mobile":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/activity/lover_2018/mobile.png","jump_mobile":"https://live.bilibili.com/blackboard/hour-rank.html#/?1110317","status":1},"task":{"keyword":"task_2017","icon_web":"//i0.hdslb.com/bfs/live/b86792f129a641d8fd4f1ee4a337fcb9d4eac25c.png","jump_web":"//link.bilibili.com/p/center/index#/user-center/achievement/task","jump_mobile":"https://live.bilibili.com/p/eden/task-h5#/","icon_mobile":"https://i0.hdslb.com/bfs/live/61f1b388c1f4ed2838800a4d928dae5ab03d7c44.png","status":0}} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * activity : {"keyword":"lover_2018","icon_web":"","jump_web":"","icon_mobile":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/activity/lover_2018/mobile.png","jump_mobile":"https://live.bilibili.com/blackboard/hour-rank.html#/?1110317","status":1} - * task : {"keyword":"task_2017","icon_web":"//i0.hdslb.com/bfs/live/b86792f129a641d8fd4f1ee4a337fcb9d4eac25c.png","jump_web":"//link.bilibili.com/p/center/index#/user-center/achievement/task","jump_mobile":"https://live.bilibili.com/p/eden/task-h5#/","icon_mobile":"https://i0.hdslb.com/bfs/live/61f1b388c1f4ed2838800a4d928dae5ab03d7c44.png","status":0} - */ - - @SerializedName("activity") - private Activity activity; - @SerializedName("task") - private Task task; - - public Activity getActivity() { - return activity; - } - - public void setActivity(Activity activity) { - this.activity = activity; - } - - public Task getTask() { - return task; - } - - public void setTask(Task task) { - this.task = task; - } - - public static class Activity { - /** - * keyword : lover_2018 - * icon_web : - * jump_web : - * icon_mobile : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/activity/lover_2018/mobile.png - * jump_mobile : https://live.bilibili.com/blackboard/hour-rank.html#/?1110317 - * status : 1 - */ - - @SerializedName("keyword") - private String keyword; - @SerializedName("icon_web") - private String iconWeb; - @SerializedName("jump_web") - private String jumpWeb; - @SerializedName("icon_mobile") - private String iconMobile; - @SerializedName("jump_mobile") - private String jumpMobile; - @SerializedName("status") - private int status; - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public String getIconWeb() { - return iconWeb; - } - - public void setIconWeb(String iconWeb) { - this.iconWeb = iconWeb; - } - - public String getJumpWeb() { - return jumpWeb; - } - - public void setJumpWeb(String jumpWeb) { - this.jumpWeb = jumpWeb; - } - - public String getIconMobile() { - return iconMobile; - } - - public void setIconMobile(String iconMobile) { - this.iconMobile = iconMobile; - } - - public String getJumpMobile() { - return jumpMobile; - } - - public void setJumpMobile(String jumpMobile) { - this.jumpMobile = jumpMobile; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - } - - public static class Task { - /** - * keyword : task_2017 - * icon_web : //i0.hdslb.com/bfs/live/b86792f129a641d8fd4f1ee4a337fcb9d4eac25c.png - * jump_web : //link.bilibili.com/p/center/index#/user-center/achievement/task - * jump_mobile : https://live.bilibili.com/p/eden/task-h5#/ - * icon_mobile : https://i0.hdslb.com/bfs/live/61f1b388c1f4ed2838800a4d928dae5ab03d7c44.png - * status : 0 - */ - - @SerializedName("keyword") - private String keyword; - @SerializedName("icon_web") - private String iconWeb; - @SerializedName("jump_web") - private String jumpWeb; - @SerializedName("jump_mobile") - private String jumpMobile; - @SerializedName("icon_mobile") - private String iconMobile; - @SerializedName("status") - private int status; - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public String getIconWeb() { - return iconWeb; - } - - public void setIconWeb(String iconWeb) { - this.iconWeb = iconWeb; - } - - public String getJumpWeb() { - return jumpWeb; - } - - public void setJumpWeb(String jumpWeb) { - this.jumpWeb = jumpWeb; - } - - public String getJumpMobile() { - return jumpMobile; - } - - public void setJumpMobile(String jumpMobile) { - this.jumpMobile = jumpMobile; - } - - public String getIconMobile() { - return iconMobile; - } - - public void setIconMobile(String iconMobile) { - this.iconMobile = iconMobile; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/MyMedalListEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/MyMedalListEntity.java deleted file mode 100644 index 9702a34..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/MyMedalListEntity.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class MyMedalListEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : [{"medal_id":7,"medal_name":"欧皇","level":3,"uname":"哔哩哔哩直播","intimacy":218,"next_intimacy":500,"status":1,"color":6406234,"guard_type":0,"buff_msg":""},{"medal_id":296,"medal_name":"滚滚","level":2,"uname":"iPanda熊猫频道","intimacy":200,"next_intimacy":300,"status":0,"color":6406234,"guard_type":0,"buff_msg":""},{"medal_id":1411,"medal_name":"工程师","level":1,"uname":"ici2cc","intimacy":0,"next_intimacy":201,"status":0,"color":6406234,"guard_type":0,"buff_msg":""},{"medal_id":13197,"medal_name":"QPC","level":2,"uname":"QPCKerman","intimacy":299,"next_intimacy":300,"status":0,"color":6406234,"guard_type":0,"buff_msg":""}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - public static class Medal { - /** - * medal_id : 7 - * medal_name : 欧皇 - * level : 3 - * uname : 哔哩哔哩直播 - * intimacy : 218 - * next_intimacy : 500 - * status : 1 - * color : 6406234 - * guard_type : 0 - * buff_msg : - */ - - @SerializedName("medal_id") - private int medalId; - @SerializedName("medal_name") - private String medalName; - @SerializedName("level") - private int level; - @SerializedName("uname") - private String username; - @SerializedName("intimacy") - private int intimacy; - @SerializedName("next_intimacy") - private int nextIntimacy; - @SerializedName("status") - private int status; - @SerializedName("color") - private int color; - @SerializedName("guard_type") - private int guardType; - @SerializedName("buff_msg") - private String buffMsg; - - public int getMedalId() { - return medalId; - } - - public void setMedalId(int medalId) { - this.medalId = medalId; - } - - public String getMedalName() { - return medalName; - } - - public void setMedalName(String medalName) { - this.medalName = medalName; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getIntimacy() { - return intimacy; - } - - public void setIntimacy(int intimacy) { - this.intimacy = intimacy; - } - - public int getNextIntimacy() { - return nextIntimacy; - } - - public void setNextIntimacy(int nextIntimacy) { - this.nextIntimacy = nextIntimacy; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public int getColor() { - return color; - } - - public void setColor(int color) { - this.color = color; - } - - public int getGuardType() { - return guardType; - } - - public void setGuardType(int guardType) { - this.guardType = guardType; - } - - public String getBuffMsg() { - return buffMsg; - } - - public void setBuffMsg(String buffMsg) { - this.buffMsg = buffMsg; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/MyTitleListEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/MyTitleListEntity.java deleted file mode 100644 index 0d1ae05..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/MyTitleListEntity.java +++ /dev/null @@ -1,286 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class MyTitleListEntity extends ResponseEntity { - /** - * code : 0 - * message : 获取成功 - * data : {"list":[{"uid":2866663,"had":true,"title":"title-111-1","status":0,"activity":"2017Blink","score":0,"level":[],"category":[{"name":"热门","class":"red"}],"title_pic":{"id":"title-111-1","title":"2017Blink","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20171116172700","width":0,"height":0,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0}}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - @SerializedName("list") - private List list; - - public List<Title> getList() { - return list; - } - - public void setList(List<Title> list) { - this.list = list; - } - - public static class Title { - /** - * uid : 2866663 - * had : true - * title : title-111-1 - * status : 0 - * activity : 2017Blink - * score : 0 - * level : [] - * category : [{"name":"热门","class":"red"}] - * title_pic : {"id":"title-111-1","title":"2017Blink","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20171116172700","width":0,"height":0,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0} - */ - - @SerializedName("uid") - private long userId; - @SerializedName("had") - private boolean had; - @SerializedName("title") - private String title; - @SerializedName("status") - private int status; - @SerializedName("activity") - private String activity; - @SerializedName("score") - private int score; - @SerializedName("title_pic") - private TitlePic titlePic; - @SerializedName("level") - private List<JsonElement> level; - @SerializedName("category") - private List<Category> category; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public boolean isHad() { - return had; - } - - public void setHad(boolean had) { - this.had = had; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public String getActivity() { - return activity; - } - - public void setActivity(String activity) { - this.activity = activity; - } - - public int getScore() { - return score; - } - - public void setScore(int score) { - this.score = score; - } - - public TitlePic getTitlePic() { - return titlePic; - } - - public void setTitlePic(TitlePic titlePic) { - this.titlePic = titlePic; - } - - public List<JsonElement> getLevel() { - return level; - } - - public void setLevel(List<JsonElement> level) { - this.level = level; - } - - public List<Category> getCategory() { - return category; - } - - public void setCategory(List<Category> category) { - this.category = category; - } - - public static class TitlePic { - /** - * id : title-111-1 - * title : 2017Blink - * img : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20171116172700 - * width : 0 - * height : 0 - * is_lihui : 0 - * lihui_img : - * lihui_width : 0 - * lihui_height : 0 - */ - - @SerializedName("id") - private String id; - @SerializedName("title") - private String title; - @SerializedName("img") - private String img; - @SerializedName("width") - private int width; - @SerializedName("height") - private int height; - @SerializedName("is_lihui") - private int isLiHui; - @SerializedName("lihui_img") - private String liHuiImg; - @SerializedName("lihui_width") - private int liHuiWidth; - @SerializedName("lihui_height") - private int liHuiHeight; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getIsLiHui() { - return isLiHui; - } - - public void setIsLiHui(int isLiHui) { - this.isLiHui = isLiHui; - } - - public String getLiHuiImg() { - return liHuiImg; - } - - public void setLiHuiImg(String liHuiImg) { - this.liHuiImg = liHuiImg; - } - - public int getLiHuiWidth() { - return liHuiWidth; - } - - public void setLiHuiWidth(int liHuiWidth) { - this.liHuiWidth = liHuiWidth; - } - - public int getLiHuiHeight() { - return liHuiHeight; - } - - public void setLiHuiHeight(int liHuiHeight) { - this.liHuiHeight = liHuiHeight; - } - } - - public static class Category { - /** - * name : 热门 - * class : red - */ - - @SerializedName("name") - private String name; - @SerializedName("class") - private String classX; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getClassX() { - return classX; - } - - public void setClassX(String classX) { - this.classX = classX; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/OpenCapsuleResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/OpenCapsuleResponseEntity.java deleted file mode 100644 index 0e8d689..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/OpenCapsuleResponseEntity.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class OpenCapsuleResponseEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"status":1,"text":[{"name":"辣条","num":"1","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/open/normal/1.png?20171116172700"}],"isEntity":0,"coin":43,"progress":{"now":7000,"max":10000}} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * status : 1 - * text : [{"name":"辣条","num":"1","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/open/normal/1.png?20171116172700"}] - * isEntity : 0 - * coin : 43 - * progress : {"now":7000,"max":10000} - */ - - @SerializedName("status") - private int status; - @SerializedName("isEntity") - private int isEntity; - @SerializedName("coin") - private int coin; - @SerializedName("progress") - private Progress progress; - @SerializedName("text") - private List<Gift> gifts; - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public int getIsEntity() { - return isEntity; - } - - public void setIsEntity(int isEntity) { - this.isEntity = isEntity; - } - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public Progress getProgress() { - return progress; - } - - public void setProgress(Progress progress) { - this.progress = progress; - } - - public List<Gift> getGifts() { - return gifts; - } - - public void setGifts(List<Gift> gifts) { - this.gifts = gifts; - } - - public static class Progress { - /** - * now : 7000 - * max : 10000 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - - public static class Gift { - /** - * name : 辣条 - * num : 1 - * img : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/capsule-toy/open/normal/1.png?20171116172700 - */ - - @SerializedName("name") - private String name; - @SerializedName("num") - private String number; - @SerializedName("img") - private String img; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getNumber() { - return number; - } - - public void setNumber(String number) { - this.number = number; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/PlayUrlEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/PlayUrlEntity.java deleted file mode 100644 index 202024a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/PlayUrlEntity.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class PlayUrlEntity { - /** - * durl : [{"order":1,"length":0,"url":"http://live-play.acgvideo.com/live/241/live_2866663_332_c521e483.flv?wsSecret=562496ace51d8a998295656e7ef50a56&wsTime=59d68da4"}] - * accept_quality : [4] - * current_quality : 4 - */ - - @SerializedName("current_quality") - private int currentQuality; - @SerializedName("durl") - private List<DUrl> dUrl; - @SerializedName("accept_quality") - private List<Integer> acceptQuality; - - public int getCurrentQuality() { - return currentQuality; - } - - public void setCurrentQuality(int currentQuality) { - this.currentQuality = currentQuality; - } - - public List<DUrl> getdUrl() { - return dUrl; - } - - public void setdUrl(List<DUrl> dUrl) { - this.dUrl = dUrl; - } - - public List<Integer> getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(List<Integer> acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public static class DUrl { - /** - * order : 1 - * length : 0 - * url : http://live-play.acgvideo.com/live/241/live_2866663_332_c521e483.flv?wsSecret=562496ace51d8a998295656e7ef50a56&wsTime=59d68da4 - */ - - @SerializedName("order") - private int order; - @SerializedName("length") - private int length; - @SerializedName("url") - private String url; - - public int getOrder() { - return order; - } - - public void setOrder(int order) { - this.order = order; - } - - public int getLength() { - return length; - } - - public void setLength(int length) { - this.length = length; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/PlayerBagEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/PlayerBagEntity.java deleted file mode 100644 index dd64484..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/PlayerBagEntity.java +++ /dev/null @@ -1,184 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; -import java.util.Map; - -public class PlayerBagEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : [{"id":49345439,"uid":20293030,"gift_id":1,"gift_num":2,"expireat":12797,"gift_type":0,"gift_name":"辣条","gift_price":"100 金瓜子/100 银瓜子","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-1.png?20171010161652","count_set":"1,2","combo_num":99,"super_num":4500,"count_map":{"1":"","2":"全部"}},{"id":49318691,"uid":20293030,"gift_id":1,"gift_num":30,"expireat":531833,"gift_type":0,"gift_name":"辣条","gift_price":"100 金瓜子/100 银瓜子","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-1.png?20171010161652","count_set":"1,10,30","combo_num":99,"super_num":4500,"count_map":{"1":"","30":"全部"}},{"id":48843715,"uid":20293030,"gift_id":102,"gift_num":9,"expireat":2482397,"gift_type":3,"gift_name":"秘银水壶","gift_price":"2000 金瓜子","img":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-102.png?20171010161652","count_set":"1,5,9","combo_num":5,"super_num":225,"count_map":{"1":"","5":"连击","9":"全部"}}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<BagGift> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<BagGift> getData() { - return data; - } - - public void setData(List<BagGift> data) { - this.data = data; - } - - public static class BagGift { - /** - * id : 49345439 - * uid : 20293030 - * gift_id : 1 - * gift_num : 2 - * expireat : 12797 - * gift_type : 0 - * gift_name : 辣条 - * gift_price : 100 金瓜子/100 银瓜子 - * img : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift-static-icon/gift-1.png?20171010161652 - * count_set : 1,2 - * combo_num : 99 - * super_num : 4500 - * count_map : {"1":"","2":"全部"} - */ - - @SerializedName("id") - private long id; - @SerializedName("uid") - private long userId; - @SerializedName("gift_id") - private long giftId; - @SerializedName("gift_num") - private long giftNum; - @SerializedName("expireat") - private long expireAt; - @SerializedName("gift_type") - private long giftType; - @SerializedName("gift_name") - private String giftName; - @SerializedName("gift_price") - private String giftPrice; - @SerializedName("img") - private String img; - @SerializedName("count_set") - private String countSet; - @SerializedName("combo_num") - private long comboNumber; - @SerializedName("super_num") - private long superNumber; - @SerializedName("count_map") - private Map<String, String> countMap; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public long getGiftId() { - return giftId; - } - - public void setGiftId(long giftId) { - this.giftId = giftId; - } - - public long getGiftNum() { - return giftNum; - } - - public void setGiftNum(long giftNum) { - this.giftNum = giftNum; - } - - public long getExpireAt() { - return expireAt; - } - - public void setExpireAt(long expireAt) { - this.expireAt = expireAt; - } - - public long getGiftType() { - return giftType; - } - - public void setGiftType(long giftType) { - this.giftType = giftType; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public String getGiftPrice() { - return giftPrice; - } - - public void setGiftPrice(String giftPrice) { - this.giftPrice = giftPrice; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public String getCountSet() { - return countSet; - } - - public void setCountSet(String countSet) { - this.countSet = countSet; - } - - public long getComboNumber() { - return comboNumber; - } - - public void setComboNumber(long comboNumber) { - this.comboNumber = comboNumber; - } - - public long getSuperNumber() { - return superNumber; - } - - public void setSuperNumber(long superNumber) { - this.superNumber = superNumber; - } - - public Map<String, String> getCountMap() { - return countMap; - } - - public void setCountMap(Map<String, String> countMap) { - this.countMap = countMap; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/ReceiveUserTaskAward.java b/src/main/java/com/hiczp/bilibili/api/live/entity/ReceiveUserTaskAward.java deleted file mode 100644 index ca79b9e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/ReceiveUserTaskAward.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class ReceiveUserTaskAward extends ResponseEntity { - /** - * code : 0 - * msg : - * message : - * data : [] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<JsonElement> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<JsonElement> getData() { - return data; - } - - public void setData(List<JsonElement> data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/RecommendRoomRefreshResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/RecommendRoomRefreshResponseEntity.java deleted file mode 100644 index 1673b2b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/RecommendRoomRefreshResponseEntity.java +++ /dev/null @@ -1,650 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class RecommendRoomRefreshResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : ok - * message : ok - * data : {"partition":{"id":0,"name":"推荐主播","area":"hot","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"},"count":5412},"banner_data":[{"cover":{"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320},"title":"今天,你的小视频上榜了吗?","is_clip":1,"new_cover":{"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320},"new_title":"B站大触竟然都在这里???","new_router":"https://h.bilibili.com/ywh/h5/index"}],"lives":[{"owner":{"face":"https://i1.hdslb.com/bfs/face/8ed8e486437b5053628248dd3c031b109b4cefcd.jpg","mid":218972880,"name":"萌萌の糖酱"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d5805bf0e4cb51b50ad4cbe209ae328aedaeeeda.jpg","height":180,"width":320},"room_id":5619438,"check_version":0,"online":9736,"area":"御宅文化","area_id":2,"title":"ASMR温柔哄睡【软妹音】欧尼酱,睡觉吗","playurl":"http://xl.live-play.acgvideo.com/live-xl/635191/live_218972880_9269900.flv?wsSecret=1d446f8efd39fe766fbf13db9dddc01b&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/ad1cfde69fc3afd79b6a21ddd0e3a7cd9992932e.jpg","mid":77545560,"name":"海岛情话"},"cover":{"src":"https://i0.hdslb.com/bfs/live/23342613fb41f1cf9523e79404ef3c69a641c904.jpg","height":180,"width":320},"room_id":3269664,"check_version":0,"online":4388,"area":"手游直播","area_id":12,"title":"小号98胜率木兰星耀上王者","playurl":"http://qn.live-play.acgvideo.com/live-qn/695751/live_77545560_5747022.flv?wsSecret=2e100446f6efded8287e90cc52ca946e&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":35,"area_v2_name":"王者荣耀","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/0aec19109c04808e28222d18cd3aa7bf3c919629.jpg","mid":592761,"name":"可樂C"},"cover":{"src":"https://i0.hdslb.com/bfs/live/882c7265ee8b4d05f2411386f8be3545dca0a105.jpg","height":180,"width":320},"room_id":5170,"check_version":0,"online":1477,"area":"单机联机","area_id":1,"title":"【可乐C】彩虹六号夕阳红黑车被锤爆","playurl":"http://qn.live-play.acgvideo.com/live-qn/182029/live_592761_3949639.flv?wsSecret=1f70ceec292b5dd37ff8adee42b01d60&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":65,"area_v2_name":"彩虹六号","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/5bb4ce5bf2511dd3e0e36c3f8f77dcb865feb20e.jpg","mid":16653477,"name":"糕糕糕糕呀"},"cover":{"src":"https://i0.hdslb.com/bfs/live/146049c2307491eeece0dde3716023c9efedbd0a.jpg","height":180,"width":320},"room_id":5459316,"check_version":0,"online":5366,"area":"唱见舞见","area_id":10,"title":"安静唱歌","playurl":"http://qn.live-play.acgvideo.com/live-qn/526949/live_16653477_6713858.flv?wsSecret=e6f3367988bf1932dc8da37f959945df&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","data_behavior_id":"2f2e76a7eee721b:2f2e76a7eee721b:0:0","data_source_id":"system"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/024dd9476a0c8e7f5888a636a635f55714d4ea57.jpg","mid":301940,"name":"Gluneko"},"cover":{"src":"https://i0.hdslb.com/bfs/live/83ee0d684ab37ca50faef33935a550b2b77ed7be.jpg","height":180,"width":320},"room_id":10401,"check_version":0,"online":64052,"area":"单机联机","area_id":1,"title":"摸鱼的世界","playurl":"http://qn.live-play.acgvideo.com/live-qn/875128/live_301940_3118084.flv?wsSecret=6f6c25eda34d9178df6136979fbdfd08&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":56,"area_v2_name":"我的世界","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/9f9d0db52e8317c0d7d6eb5c679a614b87ba2deb.jpg","mid":26424461,"name":"小天不是受QAQ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/2c325abf7019d85bbe469e6a6ce48532d7ca1ab0.jpg","height":180,"width":320},"room_id":92075,"check_version":0,"online":33334,"area":"单机联机","area_id":1,"title":"(ฅ´ω`ฅ)","playurl":"http://qn.live-play.acgvideo.com/live-qn/979857/live_26424461_5746903.flv?wsSecret=df79865e2b6cedab0b642c36393a3ccc&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/bc0f90d01610b619458c502b8fc6a6b493bc73f1.jpg","mid":27156703,"name":"萌萌哒的苍云丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/7b9d4eb54cef2069853dc41241dc41b2895583a2.jpg","height":180,"width":320},"room_id":4048839,"check_version":0,"online":8675,"area":"网络游戏","area_id":3,"title":"认真伏笔,拒绝打牌","playurl":"http://dl.live-play.acgvideo.com/live-dl/727680/live_27156703_9775611.flv?wsSecret=fc3c6b4a38c503e78f5f5577351085ec&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":91,"area_v2_name":"炉石传说","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/450e0df5c7104f2682218401bfa3ea3d35556261.jpg","mid":4344862,"name":"楚小月嘟嘟嘟"},"cover":{"src":"https://i0.hdslb.com/bfs/live/105ef448e1cd2d69c52d6132c1fba1218aecb998.jpg","height":180,"width":320},"room_id":8571156,"check_version":0,"online":5538,"area":"单机联机","area_id":1,"title":"【职业声优】男神音恐怖游戏了解一下","playurl":"http://txy.live-play.acgvideo.com/live-txy/389996/live_4344862_9497566.flv?wsSecret=87000ab2ff112eda49cf687e5327748b&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/2f58afd7ab3f6bd2f98322c1ea1537803c8ebddb.jpg","mid":464276,"name":"天使菌_"},"cover":{"src":"https://i0.hdslb.com/bfs/live/ea0e1300c9a78289d84989cb2d65866e091b6c52.jpg","height":180,"width":320},"room_id":14382,"check_version":0,"online":612,"area":"单机联机","area_id":1,"title":"【天使菌_】妇女节快乐下午1点-5点直播","playurl":"http://xl.live-play.acgvideo.com/live-xl/208069/live_464276_332_c521e483.flv?wsSecret=d77952dde26ed755949818c5523467b0&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/0433055d4eac3b2314faadb47de64be114571d4c.jpg","mid":1320581,"name":"游戏彩笔"},"cover":{"src":"https://i0.hdslb.com/bfs/live/6cc54d0b290021068dcfaa82c02cf407a588e0f9.jpg","height":180,"width":320},"room_id":17778,"check_version":0,"online":13094,"area":"手游直播","area_id":12,"title":"【彩笔崩坏3】肝完崩坏去狩猎!","playurl":"http://xl.live-play.acgvideo.com/live-xl/653913/live_1320581_332_c521e483.flv?wsSecret=7d53496570da595fbdebd21c699ccab7&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":40,"area_v2_name":"崩坏3","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/4a91427ef035836b1937244bc559ed03f244bfa9.jpg","mid":183430,"name":"两仪滚"},"cover":{"src":"https://i0.hdslb.com/bfs/live/e64902520ab6e0aaeb6e2d1b721cccbf241045d3.jpg","height":180,"width":320},"room_id":5096,"check_version":0,"online":102641,"area":"单机联机","area_id":1,"title":"【滚】节日快乐","playurl":"http://js.live-play.acgvideo.com/live-js/292971/live_183430_5743361.flv?wsSecret=6e6388c531a84028dee052c867828a93&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ae8aea930b21e86a83313dd3ad12cd8192e8bf49.jpg","mid":6810019,"name":"AnKe-Poi"},"cover":{"src":"https://i0.hdslb.com/bfs/live/656172a98c80d2eb67c91b2279958e4eea772d7c.jpg","height":180,"width":320},"room_id":79558,"check_version":0,"online":17085,"area":"单机联机","area_id":1,"title":"【安可】终于不修路了上来玩会","playurl":"http://qn.live-play.acgvideo.com/live-qn/780558/live_6810019_9448733.flv?wsSecret=bff5414e04a1de2eb8260aa1409b8db6&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * partition : {"id":0,"name":"推荐主播","area":"hot","sub_icon":{"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"},"count":5412} - * banner_data : [{"cover":{"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320},"title":"今天,你的小视频上榜了吗?","is_clip":1,"new_cover":{"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320},"new_title":"B站大触竟然都在这里???","new_router":"https://h.bilibili.com/ywh/h5/index"}] - * lives : [{"owner":{"face":"https://i1.hdslb.com/bfs/face/8ed8e486437b5053628248dd3c031b109b4cefcd.jpg","mid":218972880,"name":"萌萌の糖酱"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d5805bf0e4cb51b50ad4cbe209ae328aedaeeeda.jpg","height":180,"width":320},"room_id":5619438,"check_version":0,"online":9736,"area":"御宅文化","area_id":2,"title":"ASMR温柔哄睡【软妹音】欧尼酱,睡觉吗","playurl":"http://xl.live-play.acgvideo.com/live-xl/635191/live_218972880_9269900.flv?wsSecret=1d446f8efd39fe766fbf13db9dddc01b&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/ad1cfde69fc3afd79b6a21ddd0e3a7cd9992932e.jpg","mid":77545560,"name":"海岛情话"},"cover":{"src":"https://i0.hdslb.com/bfs/live/23342613fb41f1cf9523e79404ef3c69a641c904.jpg","height":180,"width":320},"room_id":3269664,"check_version":0,"online":4388,"area":"手游直播","area_id":12,"title":"小号98胜率木兰星耀上王者","playurl":"http://qn.live-play.acgvideo.com/live-qn/695751/live_77545560_5747022.flv?wsSecret=2e100446f6efded8287e90cc52ca946e&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":35,"area_v2_name":"王者荣耀","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/0aec19109c04808e28222d18cd3aa7bf3c919629.jpg","mid":592761,"name":"可樂C"},"cover":{"src":"https://i0.hdslb.com/bfs/live/882c7265ee8b4d05f2411386f8be3545dca0a105.jpg","height":180,"width":320},"room_id":5170,"check_version":0,"online":1477,"area":"单机联机","area_id":1,"title":"【可乐C】彩虹六号夕阳红黑车被锤爆","playurl":"http://qn.live-play.acgvideo.com/live-qn/182029/live_592761_3949639.flv?wsSecret=1f70ceec292b5dd37ff8adee42b01d60&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":65,"area_v2_name":"彩虹六号","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/5bb4ce5bf2511dd3e0e36c3f8f77dcb865feb20e.jpg","mid":16653477,"name":"糕糕糕糕呀"},"cover":{"src":"https://i0.hdslb.com/bfs/live/146049c2307491eeece0dde3716023c9efedbd0a.jpg","height":180,"width":320},"room_id":5459316,"check_version":0,"online":5366,"area":"唱见舞见","area_id":10,"title":"安静唱歌","playurl":"http://qn.live-play.acgvideo.com/live-qn/526949/live_16653477_6713858.flv?wsSecret=e6f3367988bf1932dc8da37f959945df&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":21,"area_v2_name":"唱见","area_v2_parent_id":1,"area_v2_parent_name":"娱乐","data_behavior_id":"2f2e76a7eee721b:2f2e76a7eee721b:0:0","data_source_id":"system"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/024dd9476a0c8e7f5888a636a635f55714d4ea57.jpg","mid":301940,"name":"Gluneko"},"cover":{"src":"https://i0.hdslb.com/bfs/live/83ee0d684ab37ca50faef33935a550b2b77ed7be.jpg","height":180,"width":320},"room_id":10401,"check_version":0,"online":64052,"area":"单机联机","area_id":1,"title":"摸鱼的世界","playurl":"http://qn.live-play.acgvideo.com/live-qn/875128/live_301940_3118084.flv?wsSecret=6f6c25eda34d9178df6136979fbdfd08&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":56,"area_v2_name":"我的世界","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/9f9d0db52e8317c0d7d6eb5c679a614b87ba2deb.jpg","mid":26424461,"name":"小天不是受QAQ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/2c325abf7019d85bbe469e6a6ce48532d7ca1ab0.jpg","height":180,"width":320},"room_id":92075,"check_version":0,"online":33334,"area":"单机联机","area_id":1,"title":"(ฅ´ω`ฅ)","playurl":"http://qn.live-play.acgvideo.com/live-qn/979857/live_26424461_5746903.flv?wsSecret=df79865e2b6cedab0b642c36393a3ccc&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/bc0f90d01610b619458c502b8fc6a6b493bc73f1.jpg","mid":27156703,"name":"萌萌哒的苍云丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/7b9d4eb54cef2069853dc41241dc41b2895583a2.jpg","height":180,"width":320},"room_id":4048839,"check_version":0,"online":8675,"area":"网络游戏","area_id":3,"title":"认真伏笔,拒绝打牌","playurl":"http://dl.live-play.acgvideo.com/live-dl/727680/live_27156703_9775611.flv?wsSecret=fc3c6b4a38c503e78f5f5577351085ec&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":91,"area_v2_name":"炉石传说","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/450e0df5c7104f2682218401bfa3ea3d35556261.jpg","mid":4344862,"name":"楚小月嘟嘟嘟"},"cover":{"src":"https://i0.hdslb.com/bfs/live/105ef448e1cd2d69c52d6132c1fba1218aecb998.jpg","height":180,"width":320},"room_id":8571156,"check_version":0,"online":5538,"area":"单机联机","area_id":1,"title":"【职业声优】男神音恐怖游戏了解一下","playurl":"http://txy.live-play.acgvideo.com/live-txy/389996/live_4344862_9497566.flv?wsSecret=87000ab2ff112eda49cf687e5327748b&wsTime=1520493001","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/2f58afd7ab3f6bd2f98322c1ea1537803c8ebddb.jpg","mid":464276,"name":"天使菌_"},"cover":{"src":"https://i0.hdslb.com/bfs/live/ea0e1300c9a78289d84989cb2d65866e091b6c52.jpg","height":180,"width":320},"room_id":14382,"check_version":0,"online":612,"area":"单机联机","area_id":1,"title":"【天使菌_】妇女节快乐下午1点-5点直播","playurl":"http://xl.live-play.acgvideo.com/live-xl/208069/live_464276_332_c521e483.flv?wsSecret=d77952dde26ed755949818c5523467b0&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/0433055d4eac3b2314faadb47de64be114571d4c.jpg","mid":1320581,"name":"游戏彩笔"},"cover":{"src":"https://i0.hdslb.com/bfs/live/6cc54d0b290021068dcfaa82c02cf407a588e0f9.jpg","height":180,"width":320},"room_id":17778,"check_version":0,"online":13094,"area":"手游直播","area_id":12,"title":"【彩笔崩坏3】肝完崩坏去狩猎!","playurl":"http://xl.live-play.acgvideo.com/live-xl/653913/live_1320581_332_c521e483.flv?wsSecret=7d53496570da595fbdebd21c699ccab7&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":40,"area_v2_name":"崩坏3","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/4a91427ef035836b1937244bc559ed03f244bfa9.jpg","mid":183430,"name":"两仪滚"},"cover":{"src":"https://i0.hdslb.com/bfs/live/e64902520ab6e0aaeb6e2d1b721cccbf241045d3.jpg","height":180,"width":320},"room_id":5096,"check_version":0,"online":102641,"area":"单机联机","area_id":1,"title":"【滚】节日快乐","playurl":"http://js.live-play.acgvideo.com/live-js/292971/live_183430_5743361.flv?wsSecret=6e6388c531a84028dee052c867828a93&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/ae8aea930b21e86a83313dd3ad12cd8192e8bf49.jpg","mid":6810019,"name":"AnKe-Poi"},"cover":{"src":"https://i0.hdslb.com/bfs/live/656172a98c80d2eb67c91b2279958e4eea772d7c.jpg","height":180,"width":320},"room_id":79558,"check_version":0,"online":17085,"area":"单机联机","area_id":1,"title":"【安可】终于不修路了上来玩会","playurl":"http://qn.live-play.acgvideo.com/live-qn/780558/live_6810019_9448733.flv?wsSecret=bff5414e04a1de2eb8260aa1409b8db6&wsTime=1520493000","accept_quality_v2":[],"current_quality":4,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":"","area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"}] - */ - - @SerializedName("partition") - private Partition partition; - @SerializedName("banner_data") - private List<BannerData> bannerData; - @SerializedName("lives") - private List<Live> lives; - - public Partition getPartition() { - return partition; - } - - public void setPartition(Partition partition) { - this.partition = partition; - } - - public List<BannerData> getBannerData() { - return bannerData; - } - - public void setBannerData(List<BannerData> bannerData) { - this.bannerData = bannerData; - } - - public List<Live> getLives() { - return lives; - } - - public void setLives(List<Live> lives) { - this.lives = lives; - } - - public static class Partition { - /** - * id : 0 - * name : 推荐主播 - * area : hot - * sub_icon : {"src":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052","height":"63","width":"63"} - * count : 5412 - */ - - @SerializedName("id") - private int id; - @SerializedName("name") - private String name; - @SerializedName("area") - private String area; - @SerializedName("sub_icon") - private SubIcon subIcon; - @SerializedName("count") - private int count; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public SubIcon getSubIcon() { - return subIcon; - } - - public void setSubIcon(SubIcon subIcon) { - this.subIcon = subIcon; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public static class SubIcon { - /** - * src : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/android/android/-1_3x.png?201709151052 - * height : 63 - * width : 63 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private String height; - @SerializedName("width") - private String width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWidth() { - return width; - } - - public void setWidth(String width) { - this.width = width; - } - } - } - - public static class BannerData { - /** - * cover : {"src":"https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png","height":180,"width":320} - * title : 今天,你的小视频上榜了吗? - * is_clip : 1 - * new_cover : {"src":"https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg","height":180,"width":320} - * new_title : B站大触竟然都在这里??? - * new_router : https://h.bilibili.com/ywh/h5/index - */ - - @SerializedName("cover") - private Cover cover; - @SerializedName("title") - private String title; - @SerializedName("is_clip") - private int isClip; - @SerializedName("new_cover") - private NewCover newCover; - @SerializedName("new_title") - private String newTitle; - @SerializedName("new_router") - private String newRouter; - - public Cover getCover() { - return cover; - } - - public void setCover(Cover cover) { - this.cover = cover; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public int getIsClip() { - return isClip; - } - - public void setIsClip(int isClip) { - this.isClip = isClip; - } - - public NewCover getNewCover() { - return newCover; - } - - public void setNewCover(NewCover newCover) { - this.newCover = newCover; - } - - public String getNewTitle() { - return newTitle; - } - - public void setNewTitle(String newTitle) { - this.newTitle = newTitle; - } - - public String getNewRouter() { - return newRouter; - } - - public void setNewRouter(String newRouter) { - this.newRouter = newRouter; - } - - public static class Cover { - /** - * src : https://i0.hdslb.com/bfs/live/348fbbc30ca1578d900b44dda64acd1310b1d05e.png - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - - public static class NewCover { - /** - * src : https://i0.hdslb.com/bfs/live/b6ac78b2ad96cdc9a4d59719b1f8b3b8d1893e6d.jpg - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } - - public static class Live { - /** - * owner : {"face":"https://i1.hdslb.com/bfs/face/8ed8e486437b5053628248dd3c031b109b4cefcd.jpg","mid":218972880,"name":"萌萌の糖酱"} - * cover : {"src":"https://i0.hdslb.com/bfs/live/d5805bf0e4cb51b50ad4cbe209ae328aedaeeeda.jpg","height":180,"width":320} - * room_id : 5619438 - * check_version : 0 - * online : 9736 - * area : 御宅文化 - * area_id : 2 - * title : ASMR温柔哄睡【软妹音】欧尼酱,睡觉吗 - * playurl : http://xl.live-play.acgvideo.com/live-xl/635191/live_218972880_9269900.flv?wsSecret=1d446f8efd39fe766fbf13db9dddc01b&wsTime=1520493001 - * accept_quality_v2 : [] - * current_quality : 4 - * accept_quality : 4 - * broadcast_type : 0 - * is_tv : 0 - * corner : - * pendent : - * area_v2_id : 30 - * area_v2_name : ASMR - * area_v2_parent_id : 1 - * area_v2_parent_name : 娱乐 - * data_behavior_id : 2f2e76a7eee721b:2f2e76a7eee721b:0:0 - * data_source_id : system - */ - - @SerializedName("owner") - private Owner owner; - @SerializedName("cover") - private CoverX cover; - @SerializedName("room_id") - private int roomId; - @SerializedName("check_version") - private int checkVersion; - @SerializedName("online") - private int online; - @SerializedName("area") - private String area; - @SerializedName("area_id") - private int areaId; - @SerializedName("title") - private String title; - @SerializedName("playurl") - private String playUrl; - @SerializedName("current_quality") - private int currentQuality; - @SerializedName("accept_quality") - private String acceptQuality; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("is_tv") - private int isTv; - @SerializedName("corner") - private String corner; - @SerializedName("pendent") - private String pendent; - @SerializedName("area_v2_id") - private int areaV2Id; - @SerializedName("area_v2_name") - private String areaV2Name; - @SerializedName("area_v2_parent_id") - private int areaV2ParentId; - @SerializedName("area_v2_parent_name") - private String areaV2ParentName; - @SerializedName("data_behavior_id") - private String dataBehaviorId; - @SerializedName("data_source_id") - private String dataSourceId; - @SerializedName("accept_quality_v2") - private List<?> acceptQualityV2; - - public Owner getOwner() { - return owner; - } - - public void setOwner(Owner owner) { - this.owner = owner; - } - - public CoverX getCover() { - return cover; - } - - public void setCover(CoverX cover) { - this.cover = cover; - } - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getCheckVersion() { - return checkVersion; - } - - public void setCheckVersion(int checkVersion) { - this.checkVersion = checkVersion; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getPlayUrl() { - return playUrl; - } - - public void setPlayUrl(String playUrl) { - this.playUrl = playUrl; - } - - public int getCurrentQuality() { - return currentQuality; - } - - public void setCurrentQuality(int currentQuality) { - this.currentQuality = currentQuality; - } - - public String getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(String acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public int getIsTv() { - return isTv; - } - - public void setIsTv(int isTv) { - this.isTv = isTv; - } - - public String getCorner() { - return corner; - } - - public void setCorner(String corner) { - this.corner = corner; - } - - public String getPendent() { - return pendent; - } - - public void setPendent(String pendent) { - this.pendent = pendent; - } - - public int getAreaV2Id() { - return areaV2Id; - } - - public void setAreaV2Id(int areaV2Id) { - this.areaV2Id = areaV2Id; - } - - public String getAreaV2Name() { - return areaV2Name; - } - - public void setAreaV2Name(String areaV2Name) { - this.areaV2Name = areaV2Name; - } - - public int getAreaV2ParentId() { - return areaV2ParentId; - } - - public void setAreaV2ParentId(int areaV2ParentId) { - this.areaV2ParentId = areaV2ParentId; - } - - public String getAreaV2ParentName() { - return areaV2ParentName; - } - - public void setAreaV2ParentName(String areaV2ParentName) { - this.areaV2ParentName = areaV2ParentName; - } - - public String getDataBehaviorId() { - return dataBehaviorId; - } - - public void setDataBehaviorId(String dataBehaviorId) { - this.dataBehaviorId = dataBehaviorId; - } - - public String getDataSourceId() { - return dataSourceId; - } - - public void setDataSourceId(String dataSourceId) { - this.dataSourceId = dataSourceId; - } - - public List<?> getAcceptQualityV2() { - return acceptQualityV2; - } - - public void setAcceptQualityV2(List<?> acceptQualityV2) { - this.acceptQualityV2 = acceptQualityV2; - } - - public static class Owner { - /** - * face : https://i1.hdslb.com/bfs/face/8ed8e486437b5053628248dd3c031b109b4cefcd.jpg - * mid : 218972880 - * name : 萌萌の糖酱 - */ - - @SerializedName("face") - private String face; - @SerializedName("mid") - private long userId; - @SerializedName("name") - private String name; - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - - public static class CoverX { - /** - * src : https://i0.hdslb.com/bfs/live/d5805bf0e4cb51b50ad4cbe209ae328aedaeeeda.jpg - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/ResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/ResponseEntity.java deleted file mode 100644 index 105071c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/ResponseEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public abstract class ResponseEntity { - //有一些返回的模型中的 code 是字符串, 所以这个父类不能包含 code - @SerializedName("msg") - private String msg; - @SerializedName("message") - private String message; - - public String getMsg() { - return msg; - } - - public ResponseEntity setMsg(String msg) { - this.msg = msg; - return this; - } - - public String getMessage() { - return message; - } - - public ResponseEntity setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/RoomListEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/RoomListEntity.java deleted file mode 100644 index 965b896..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/RoomListEntity.java +++ /dev/null @@ -1,344 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class RoomListEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : [{"roomid":919991,"uid":2948981,"title":"东京上野瞎逛","uname":"冷水煮乐器","online":22728,"user_cover":"https://i0.hdslb.com/bfs/live/a704b2150ebdda4afb49a4c153c9116fd04c191e.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/919991.jpg?03081511","show_cover":false,"link":"/606","face":"https://i2.hdslb.com/bfs/face/1ffdec7cfef14b79f782f94710bf6c427ae201dd.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/552875/live_2948981_9513554.flv?wsSecret=db4b54fcc5ea0c4089f46067f1c17c36&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":4698971,"uid":152382234,"title":"原来是小一呀的直播间","uname":"原来是小一呀","online":1320,"user_cover":"https://i0.hdslb.com/bfs/live/3bceded04a5d7df3437eaeca79f8de4a62840ac4.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/4698971.jpg?03071300","show_cover":false,"link":"/4698971","face":"https://i0.hdslb.com/bfs/face/dc1996e4f8b850b5bf8e1a2b1518093cdd0ea80c.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://txy.live-play.acgvideo.com/live-txy/770269/live_152382234_1119709.flv?wsSecret=b5f789ee9d09cfaf983cc0f862e29aad&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":8711188,"uid":284701760,"title":"女孩子今天不过节❤️","uname":"小蔚云","online":916,"user_cover":"https://i0.hdslb.com/bfs/live/faf6d79c26ce76a5ada2274fbe7c4af003a67f05.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/8711188.jpg?03081511","show_cover":"https://i0.hdslb.com/bfs/vc/c4262240642917432b8c403efca2f92e0f6cba43.jpg","link":"/8711188","face":"https://i0.hdslb.com/bfs/face/6cdd8c582bfb39544a9947283b33fe5d51778adf.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/180773/live_284701760_5649564.flv?wsSecret=a9c48e22b18081898a4729336f122ce3&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":5459316,"uid":16653477,"title":"血统测试 抽奖点歌","uname":"糕糕糕糕呀","online":4812,"user_cover":"https://i0.hdslb.com/bfs/live/146049c2307491eeece0dde3716023c9efedbd0a.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5459316.jpg?03081510","show_cover":false,"link":"/5459316","face":"https://i2.hdslb.com/bfs/face/5bb4ce5bf2511dd3e0e36c3f8f77dcb865feb20e.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/495889/live_16653477_6713858.flv?wsSecret=93983859f778e1872d0116cf69955047&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":7813816,"uid":250028724,"title":"❤️小白羊了解一下","uname":"蜜桃姐姐w","online":296,"user_cover":"https://i0.hdslb.com/bfs/live/74dd7aed3378788f9ac7b5698f0a0f0147536aea.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/7813816.jpg?03081511","show_cover":"https://i0.hdslb.com/bfs/vc/7e4f8c67416e18c10592151a516e3e3ef0738f72.jpg","link":"/7813816","face":"https://i1.hdslb.com/bfs/face/0eca69c4a0022102afb8e4c822f91033dcfe7529.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/338838/live_250028724_8476215.flv?wsSecret=6493558385047256f98a2415b1df3ddd&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":54572,"uid":232150,"title":"你是来暗中观察养猪的小可爱吗?","uname":"下限酱Orz","online":4658,"user_cover":"https://i0.hdslb.com/bfs/live/b222df524419844956d2a9d556955c7f927e0789.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/54572.jpg?03081510","show_cover":false,"link":"/149","face":"https://i1.hdslb.com/bfs/face/51402437ff06fb798835a966ce9c0896620ffb57.jpg","parent_id":1,"parent_name":"娱乐","area_id":28,"area_name":"萌宠","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/354172/live_232150_1148035.flv?wsSecret=d1211de9579d89426bb2b75ccfcb2255&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":1313362,"uid":11300631,"title":"【治愈萌音】手控福利❤可以做你的小公举吗","uname":"阿嗔想要抱抱喵","online":783,"user_cover":"https://i0.hdslb.com/bfs/live/c339c3a74044259b10d0896d661920f1f828fbcf.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1313362.jpg?03081511","show_cover":false,"link":"/1313362","face":"https://i0.hdslb.com/bfs/face/4c00951c5f837de7af061589d8fd9a01a36df2fe.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/877237/live_11300631_2817990.flv?wsSecret=87509af6c52685e7a7afbd02261e10dd&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":1271863,"uid":40275904,"title":"【温油小姐姐】进来听歌哇~","uname":"北有泽兮丶","online":256,"user_cover":"https://i0.hdslb.com/bfs/live/a6e41aae7f9aab76a660c4275323b85c1cfd6842.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1271863.jpg?03081507","show_cover":false,"link":"/1271863","face":"https://i1.hdslb.com/bfs/face/b34acbf8886aa32018dbde21a35b178454c884b5.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://live-play.acgvideo.com/live/962/live_40275904_1507293.flv?wsSecret=28ec4cb70ff9e0632fa4f105a0a00cde&wsTime=5a796354","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":9609987,"uid":16006274,"title":"myachien的直播间","uname":"myachien","online":57,"user_cover":"https://i0.hdslb.com/bfs/live/c6d8b2b6b766ef11e8af4f721feae0e2aaf7e39c.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/9609987.jpg?03081511","show_cover":false,"link":"/9609987","face":"https://i0.hdslb.com/bfs/face/b9b2f5552a1e027bbc51c51bcd8a60cb71948f9f.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/465160/live_16006274_1597898.flv?wsSecret=4e1f5d85f8fe7780751e3a1e50214ebc&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":8084310,"uid":275563061,"title":"知心小可爱上线了今天做啥呢","uname":"巧克力宝宝呀","online":1347,"user_cover":"https://i0.hdslb.com/bfs/live/10cdf58a8a719b5bfaed52bd97b01f0ac71002a8.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/8084310.jpg?03081510","show_cover":"https://i0.hdslb.com/bfs/vc/8333997ed17a55c9dd61c8bfc58cd0aadc772169.jpg","link":"/8084310","face":"https://i1.hdslb.com/bfs/face/34732fa6ae9207e0be7e4512a092b8c2acf6a564.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/404906/live_275563061_5849823.flv?wsSecret=b1bbc6e58888af9ac5463dc7113e76a8&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":18975,"uid":1864036,"title":"【玄凤鹦鹉】手养20多天大鹦鹉宝宝的日常","uname":"丢小喵了个丢小喵","online":2112,"user_cover":"https://i0.hdslb.com/bfs/live/ad3255f6b5931be9f38ec116f52aae78b3f48230.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/18975.jpg?03081511","show_cover":false,"link":"/18975","face":"https://i0.hdslb.com/bfs/face/3961857dbc9c1371a553a785884042f52c20efb3.jpg","parent_id":1,"parent_name":"娱乐","area_id":32,"area_name":"手机直播","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/789434/live_1864036_332_c521e483.flv?wsSecret=c9dc986c18120a31614e31174618985a&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":635644,"uid":6372029,"title":"这是一个隐藏的直播间","uname":"桜嵐karu","online":12792,"user_cover":"https://i0.hdslb.com/bfs/live/63ede64ee5fa35f34fbf30d98b09e22c6636f05a.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/635644.jpg?03081511","show_cover":"https://i0.hdslb.com/bfs/vc/d05d6c56f5b84276b3322c8363ec305b445720bd.jpg","link":"/413","face":"https://i1.hdslb.com/bfs/face/19419cf6cbcd182fdfd3802141bdad0bf54d66cb.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/815391/live_6372029_9770289.flv?wsSecret=f2da7ce318a1a14a37d7c2d4764d97cf&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":5269,"uid":1998535,"title":"iPanda我们永远开开心心在一起","uname":"iPanda熊猫频道","online":16212,"user_cover":"https://i0.hdslb.com/bfs/live/2ff40240f317382b8fab8d1d4af44199ac59546a.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5269.jpg?03081510","show_cover":false,"link":"/5269","face":"https://i2.hdslb.com/bfs/face/d26890e2f93ddfab10f2e21f93222ecab5da8e8a.gif","parent_id":1,"parent_name":"娱乐","area_id":28,"area_name":"萌宠","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/837993/live_1998535_9286339.flv?wsSecret=75dcf732c257d3bc7cf2f8e6c644a871&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":353421,"uid":106631,"title":"上舰送自制粘土~不考虑上下贼船嘛~","uname":"西瓜子Suikako","online":1322,"user_cover":"https://i0.hdslb.com/bfs/live/eebb9a8fac7b7403e0b9be392d5c256dd057c7b1.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/353421.jpg?03081507","show_cover":"https://i0.hdslb.com/bfs/vc/b1274fb220d31380b77f9151bcb6c3f710b0d0d4.jpg","link":"/595","face":"https://i0.hdslb.com/bfs/face/be4f9d50deea1c31e873331575531c3a0cea4e1e.jpg","parent_id":1,"parent_name":"娱乐","area_id":139,"area_name":"美少女","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/358194/live_106631_3052291.flv?wsSecret=8784f7b3364b21902795073178f0daa3&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":5419517,"uid":196424914,"title":"直播打包快递233~摸鱼","uname":"小樱桃手工杂货铺c","online":340,"user_cover":"https://i0.hdslb.com/bfs/live/50e584fbc37eb0bff9c4fa38fb34a6c8c5bf6ee0.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/5419517.jpg?03081511","show_cover":false,"link":"/5419517","face":"https://i1.hdslb.com/bfs/face/2d5af4a384b0746f917d4aea00f10c121f39b571.jpg","parent_id":1,"parent_name":"娱乐","area_id":25,"area_name":"手工","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/562263/live_196424914_3845269.flv?wsSecret=15d2a1d49c99570c26f12cb094bec056&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":6335764,"uid":11403277,"title":"女装大佬,啊啊啊","uname":"风小词","online":3151,"user_cover":"https://i0.hdslb.com/bfs/live/26c86b600ac32049a8aac8d4f148c2e0aac4d528.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/6335764.jpg?03081510","show_cover":"https://i0.hdslb.com/bfs/vc/365b7ba5661fd56300d0f3dc892093a13cc21ad9.jpg","link":"/6335764","face":"https://i0.hdslb.com/bfs/face/f5277d66762228d434188ab957aaac96be1ad3d8.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://qn.live-play.acgvideo.com/live-qn/811990/live_11403277_8254676.flv?wsSecret=0971c89314a5c8dd726dcd77d631d882&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":8503289,"uid":282069177,"title":"农村妇女化妆","uname":"胡屿simple","online":2946,"user_cover":"https://i0.hdslb.com/bfs/live/5a4ddc06ba4e21d95fc4d61046ce90b19b7f0720.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/8503289.jpg?03081510","show_cover":"https://i0.hdslb.com/bfs/vc/654af08b16d3abc3da4fe4015ddf103cc40b2521.jpg","link":"/8503289","face":"https://i0.hdslb.com/bfs/face/caab6ed5aa46f60298a1efb11ea6080a5570da1f.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/857598/live_282069177_9805841.flv?wsSecret=36f2716b55166540286f88784a8e28b9&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":1,"is_tv":0,"corner":"","pendent":""},{"roomid":1008041,"uid":8003874,"title":"唱鸽鸽老叔叔~","uname":"青山水涧","online":40,"user_cover":"https://i0.hdslb.com/bfs/live/1783a0b133c13968c929fe57d6a5d756bba2674b.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/1008041.jpg?03081511","show_cover":false,"link":"/1008041","face":"https://i0.hdslb.com/bfs/face/cc9c5bd84a98ee999a059b67c4ea4eee574f74dd.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://js.live-play.acgvideo.com/live-js/858958/live_8003874_9826284.flv?wsSecret=2dab5132c0806e7afaa00d4527f3f0b1&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":6733696,"uid":26399685,"title":"不七而遇丶三生有幸","uname":"七七七七次郎","online":2523,"user_cover":"https://i0.hdslb.com/bfs/live/01cfa78ae18d9e209e09a8cfabbb22520842a395.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/6733696.jpg?03081511","show_cover":false,"link":"/6733696","face":"https://i1.hdslb.com/bfs/face/593fa6d58abe3c42e2f3d52567a42dcac189119e.jpg","parent_id":1,"parent_name":"娱乐","area_id":21,"area_name":"唱见","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://dl.live-play.acgvideo.com/live-dl/139521/live_26399685_9201826.flv?wsSecret=fb68eec943b1bc2c54b6839084349748&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""},{"roomid":2256697,"uid":38070613,"title":"一个乖团子","uname":"丢你小心心","online":86,"user_cover":"https://i0.hdslb.com/bfs/live/040331852807a339deabc47d0f66171eccf6049a.jpg","user_cover_flag":1,"system_cover":"https://i0.hdslb.com/bfs/live/2256697.jpg?03081507","show_cover":false,"link":"/2256697","face":"https://i0.hdslb.com/bfs/face/b14a5bcbff95267d16e2520650f0cef5c2e0d4fa.jpg","parent_id":1,"parent_name":"娱乐","area_id":145,"area_name":"聊天室","web_pendent":"","cover_size":{"height":180,"width":320},"play_url":"http://bvc.live-play.acgvideo.com/live-bvc/959275/live_38070613_7623319.flv?wsSecret=803dd746ef1d70b813b4ea08f88c1df7&wsTime=1520494924","accept_quality_v2":[4],"current_quality":0,"accept_quality":"4","broadcast_type":0,"is_tv":0,"corner":"","pendent":""}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<Data> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<Data> getData() { - return data; - } - - public void setData(List<Data> data) { - this.data = data; - } - - public static class Data { - /** - * roomid : 919991 - * uid : 2948981 - * title : 东京上野瞎逛 - * uname : 冷水煮乐器 - * online : 22728 - * user_cover : https://i0.hdslb.com/bfs/live/a704b2150ebdda4afb49a4c153c9116fd04c191e.jpg - * user_cover_flag : 1 - * system_cover : https://i0.hdslb.com/bfs/live/919991.jpg?03081511 - * show_cover : false - * link : /606 - * face : https://i2.hdslb.com/bfs/face/1ffdec7cfef14b79f782f94710bf6c427ae201dd.jpg - * parent_id : 1 - * parent_name : 娱乐 - * area_id : 32 - * area_name : 手机直播 - * web_pendent : - * cover_size : {"height":180,"width":320} - * play_url : http://qn.live-play.acgvideo.com/live-qn/552875/live_2948981_9513554.flv?wsSecret=db4b54fcc5ea0c4089f46067f1c17c36&wsTime=1520494924 - * accept_quality_v2 : [4] - * current_quality : 0 - * accept_quality : 4 - * broadcast_type : 0 - * is_tv : 0 - * corner : - * pendent : - */ - - @SerializedName("roomid") - private int roomId; - @SerializedName("uid") - private int uid; - @SerializedName("title") - private String title; - @SerializedName("uname") - private String username; - @SerializedName("online") - private int online; - @SerializedName("user_cover") - private String userCover; - @SerializedName("user_cover_flag") - private int userCoverFlag; - @SerializedName("system_cover") - private String systemCover; - @SerializedName("show_cover") - private boolean showCover; - @SerializedName("link") - private String link; - @SerializedName("face") - private String face; - @SerializedName("parent_id") - private int parentId; - @SerializedName("parent_name") - private String parentName; - @SerializedName("area_id") - private int areaId; - @SerializedName("area_name") - private String areaName; - @SerializedName("web_pendent") - private String webPendent; - @SerializedName("cover_size") - private CoverSize coverSize; - @SerializedName("play_url") - private String playUrl; - @SerializedName("current_quality") - private int currentQuality; - @SerializedName("accept_quality") - private String acceptQuality; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("is_tv") - private int isTv; - @SerializedName("corner") - private String corner; - @SerializedName("pendent") - private String pendent; - @SerializedName("accept_quality_v2") - private List<Integer> acceptQualityV2; - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getUid() { - return uid; - } - - public void setUid(int uid) { - this.uid = uid; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - public String getUserCover() { - return userCover; - } - - public void setUserCover(String userCover) { - this.userCover = userCover; - } - - public int getUserCoverFlag() { - return userCoverFlag; - } - - public void setUserCoverFlag(int userCoverFlag) { - this.userCoverFlag = userCoverFlag; - } - - public String getSystemCover() { - return systemCover; - } - - public void setSystemCover(String systemCover) { - this.systemCover = systemCover; - } - - public boolean isShowCover() { - return showCover; - } - - public void setShowCover(boolean showCover) { - this.showCover = showCover; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getParentId() { - return parentId; - } - - public void setParentId(int parentId) { - this.parentId = parentId; - } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public String getWebPendent() { - return webPendent; - } - - public void setWebPendent(String webPendent) { - this.webPendent = webPendent; - } - - public CoverSize getCoverSize() { - return coverSize; - } - - public void setCoverSize(CoverSize coverSize) { - this.coverSize = coverSize; - } - - public String getPlayUrl() { - return playUrl; - } - - public void setPlayUrl(String playUrl) { - this.playUrl = playUrl; - } - - public int getCurrentQuality() { - return currentQuality; - } - - public void setCurrentQuality(int currentQuality) { - this.currentQuality = currentQuality; - } - - public String getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(String acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public int getIsTv() { - return isTv; - } - - public void setIsTv(int isTv) { - this.isTv = isTv; - } - - public String getCorner() { - return corner; - } - - public void setCorner(String corner) { - this.corner = corner; - } - - public String getPendent() { - return pendent; - } - - public void setPendent(String pendent) { - this.pendent = pendent; - } - - public List<Integer> getAcceptQualityV2() { - return acceptQualityV2; - } - - public void setAcceptQualityV2(List<Integer> acceptQualityV2) { - this.acceptQualityV2 = acceptQualityV2; - } - - public static class CoverSize { - /** - * height : 180 - * width : 320 - */ - - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/RoomsEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/RoomsEntity.java deleted file mode 100644 index c1067b7..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/RoomsEntity.java +++ /dev/null @@ -1,294 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class RoomsEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : [{"owner":{"face":"https://i1.hdslb.com/bfs/face/5be61949369dd844cc459eab808da151d8c363d2.gif","mid":4548018,"name":"扎双马尾的丧尸"},"cover":{"src":"https://i0.hdslb.com/bfs/live/1f260f3bba18fc329f49a545d1b7c7d7810290bf.jpg","height":180,"width":320},"title":"软萌的熊熊丧","room_id":48499,"online":527628,"playurl":"http://txy.live-play.acgvideo.com/live-txy/851545/live_4548018_332_c521e483.flv?wsSecret=c56fa32194f2dcf33c6f3652bbe69b86&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/f7de62c2ebb3f80b4cccdc11de2d1a5ad1eaa553.jpg","mid":16836724,"name":"育碧中国Ubisoft"},"cover":{"src":"https://i0.hdslb.com/bfs/live/c04da150093e404c34794fe69c921db1473a64b5.jpg","height":180,"width":320},"title":"《彩虹六号:围攻》国际邀请赛","room_id":274763,"online":189922,"playurl":"http://live-play.acgvideo.com/live/592/live_16836724_1555083.flv?wsSecret=8a83af6d8f86cc5ccfe1cc6c75d73886&wsTime=5a623875","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":65,"area_v2_name":"彩虹六号","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/6bbeb93dd72c60cb7ad2e876b241d0360d7f0d38.gif","mid":164627,"name":"杆菌无敌"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3b7f754a5abf9e27dc48c53ce07ac856010f1017.jpg","height":180,"width":320},"title":"【杆菌】新年215航天!我又™飞了","room_id":26057,"online":178263,"playurl":"http://js.live-play.acgvideo.com/live-js/350504/live_164627_2722814.flv?wsSecret=7f36641cccd47f1ed04d46424b4e968d&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":37,"area_v2_name":"Fate/GO","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/3ad90d135227e822fc939217b26191e2bff238c9.jpg","mid":75,"name":"丸子"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3ec00d93e7dc4a1eab97882461c99b58ec1a3545.jpg","height":180,"width":320},"title":"【FGO】215剑式血祭,新年福袋","room_id":11713,"online":152795,"playurl":"http://txy.live-play.acgvideo.com/live-txy/591292/live_75_5343444.flv?wsSecret=b6f94cb867df6e72d93599017a75eeec&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":37,"area_v2_name":"Fate/GO","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/288f13d1f589a3d6386d022044fbc10b705cab4f.jpg","mid":20848957,"name":"风竹教主解说"},"cover":{"src":"https://i0.hdslb.com/bfs/live/e45d8e74090431aa91d8749a6b4ada6dd2de768e.jpg","height":180,"width":320},"title":"狗年的第十七只鸡!","room_id":66688,"online":122416,"playurl":"http://qn.live-play.acgvideo.com/live-qn/589040/live_20848957_7290944.flv?wsSecret=76ab1a782de8705d5a9e89c1af4cb390&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/b8bd2c79fe59196a5aae3aa66105b684c316e565.jpg","mid":11616487,"name":"绝不早到小吱吱"},"cover":{"src":"https://i0.hdslb.com/bfs/live/6deca6a5f2801050901c47b4993f8ca48676f9ac.jpg","height":180,"width":320},"title":"aSMr萝莉御姐陪你入睡","room_id":3495920,"online":108598,"playurl":"http://xl.live-play.acgvideo.com/live-xl/503206/live_11616487_4809373.flv?wsSecret=5f115b778892b6ffaa416d36b8331488&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/dd383c48ab9dd1f97d0c907f92406d65db9f0cbd.jpg","mid":11783152,"name":"不要吃咖喱"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3206c8cb59cbe289d4aea477fc2e914cdf330327.jpg","height":180,"width":320},"title":"ASMR酥软萝莉 甜甜的撩爆你233","room_id":360972,"online":105773,"playurl":"http://dl.live-play.acgvideo.com/live-dl/244745/live_11783152_3987869.flv?wsSecret=0319cb71735b733a5cf184343b49c176&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/3908006b2086c3180bb4fa303745b79f6e501d2d.jpg","mid":863092,"name":"提不起劲的小明同学"},"cover":{"src":"https://i0.hdslb.com/bfs/live/7697e5e7168c75fc0aaf80ca85c0de03b861e8df.jpg","height":180,"width":320},"title":"【男声ASMR】女友视角哄睡( づ ωど","room_id":765408,"online":82403,"playurl":"http://xl.live-play.acgvideo.com/live-xl/997008/live_863092_5946736.flv?wsSecret=8c8b95b02efa24f46f3ec495f3151811&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/b6b981ef5d06e5c4f4ae3e38683b35507d30877d.jpg","mid":167945180,"name":"天华华丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/bd8d9d9d714ddddbfff6b489026cbd6dfaa36144.jpg","height":180,"width":320},"title":"万物皆可野,英雄由你定!","room_id":5438584,"online":62037,"playurl":"http://qn.live-play.acgvideo.com/live-qn/683920/live_167945180_7813051.flv?wsSecret=70c297511b9f9cdd39a20513ed0a107d&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"电子竞技","area_id":4,"on_flag":0,"round_status":0,"area_v2_id":86,"area_v2_name":"英雄联盟","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/79d49e85fd4b20dc762c696e1bb62e0f743a4dbb.jpg","mid":922545,"name":"yoyo鼠です"},"cover":{"src":"https://i0.hdslb.com/bfs/live/6801563bf00d507a6fb8c4fa559f7f0fea66644a.jpg","height":180,"width":320},"title":"A鼠MR 毛绒鼠哄睡觉~","room_id":75031,"online":50155,"playurl":"http://xl.live-play.acgvideo.com/live-xl/934981/live_922545_4785397.flv?wsSecret=ca63874caacf5bd4b72a99cd5aa0981d&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/67f01127a411016e2b20cfd3d2e088d651856f31.jpg","mid":4705522,"name":"沙拉Azusa"},"cover":{"src":"https://i0.hdslb.com/bfs/live/f6f292f4febd54942a5454629db075f11132bc40.jpg","height":180,"width":320},"title":"女装美少♂男用变声器在线gay人","room_id":933508,"online":49554,"playurl":"http://txy.live-play.acgvideo.com/live-txy/180689/live_4705522_7251458.flv?wsSecret=148b8ab0cf7b501ca0621bdfb106f6f0&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/b61a708015167fb7360c81bd7c77f0bab3bcf1f7.jpg","mid":4122321,"name":"轻十月"},"cover":{"src":"https://i0.hdslb.com/bfs/live/675c2e619f8c9c8a313e98029a4c81dd087f5ab9.jpg","height":180,"width":320},"title":"豹毙了解一下","room_id":44221,"online":35739,"playurl":"http://dl.live-play.acgvideo.com/live-dl/124285/live_4122321_1127441.flv?wsSecret=5ade712d747a94a1468f53bb91594661&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/f778b776f8d831efd44f4a4942105866b61874ef.jpg","mid":1277462,"name":"大脸Zeta"},"cover":{"src":"https://i0.hdslb.com/bfs/live/17cd7f9110b5f1facd78de4fb257a0f61c779dfb.jpg","height":180,"width":320},"title":"【男低音声控噩梦】骚话王装逼王!!","room_id":45972,"online":35584,"playurl":"http://qn.live-play.acgvideo.com/live-qn/593702/live_1277462_4305311.flv?wsSecret=453f45910a3fa58a1053f3a0b5844607&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":35,"area_v2_name":"王者荣耀","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/025fa73e3f1be9d7f4c2b10678d6a0a5a89addee.jpg","mid":1774758,"name":"青衣才不是御姐呢"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d8cf633b4c8de28cb443dcbfd64105d56e2c37db.jpg","height":180,"width":320},"title":"【男友视角】好了我躺好了","room_id":5311231,"online":35319,"playurl":"http://qn.live-play.acgvideo.com/live-qn/186227/live_1774758_5060462.flv?wsSecret=77165b9cadfe80ed7f198b5f9d980065&wsTime=1518976621","accept_quality":"4","broadcast_type":1,"area":"生活娱乐","area_id":6,"on_flag":0,"round_status":0,"area_v2_id":32,"area_v2_name":"手机直播","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/c30682c5448b045e34092d9afd1e562797fb00c5.jpg","mid":539998,"name":"草莓味の小圆"},"cover":{"src":"https://i0.hdslb.com/bfs/live/837f254f529af7c07dc8533bc175eb0ae49de9fe.jpg","height":180,"width":320},"title":"Asmr酥软萝莉哄睡 欧尼酱 让你耳朵怀孕~","room_id":479592,"online":35253,"playurl":"http://js.live-play.acgvideo.com/live-js/534549/live_539998_8513862.flv?wsSecret=1cfc7b37e5a1c4d8a1027f2e982f3064&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/7d9cdaa07c4f350dc4ab99709facd0ca13427baa.jpg","mid":220316581,"name":"结标あわき"},"cover":{"src":"https://i0.hdslb.com/bfs/live/5a2e03fc0b64ac9035e43d8153d68df9c3f605a5.jpg","height":180,"width":320},"title":"【ASMR】性感小姐姐哄睡","room_id":7553185,"online":34655,"playurl":"http://qn.live-play.acgvideo.com/live-qn/440425/live_220316581_4804670.flv?wsSecret=d59c90f355172e7bbdd3b28dc2d2902c&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/6590e763ec8ad1a3ba7ed5237949c048be91a7c3.jpg","mid":1872628,"name":"枫言w"},"cover":{"src":"https://i0.hdslb.com/bfs/live/a8a67ca034125fb3b17ffffc201fe604c69e7717.jpg","height":180,"width":320},"title":"vanvan传火","room_id":1175880,"online":33828,"playurl":"http://js.live-play.acgvideo.com/live-js/103609/live_1872628_1461564.flv?wsSecret=112a8c10cf1351facd85b94e6fdcff03&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/52df2ea259b280bd22e232cc0fb9772753be4547.jpg","mid":4677463,"name":"小熊茉莉"},"cover":{"src":"https://i0.hdslb.com/bfs/live/98caca8d2e1d3e5ee5b774d50747dee253bd6f5f.jpg","height":180,"width":320},"title":"ASMR-姐妹耳骚 双层福利","room_id":43001,"online":33269,"playurl":"http://dl.live-play.acgvideo.com/live-dl/880812/live_4677463_3808573.flv?wsSecret=e9725f498943caaf5feb178d4fa99beb&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/c1cd432957bbd9bbb98d2c3c36849b5ad7ece7d5.jpg","mid":2976992,"name":"Alessa0"},"cover":{"src":"https://i0.hdslb.com/bfs/live/0ffd3499c297943b190d93574977587200100488.jpg","height":180,"width":320},"title":"新年好","room_id":1013,"online":32837,"playurl":"http://xl.live-play.acgvideo.com/live-xl/669277/live_2976992_332_c521e483.flv?wsSecret=c95899ae76b79e75938b68647565b273&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/5a83cc6de0c936b2cb6bd3a97f46378e15f5a2d3.jpg","mid":103014,"name":"在剧毒中心呼唤爱"},"cover":{"src":"https://i0.hdslb.com/bfs/live/6a85a5ee6fa4edf1d7a0c15d67139aeaf03e26b0.jpg","height":180,"width":320},"title":"店长炼金","room_id":37034,"online":32081,"playurl":"http://js.live-play.acgvideo.com/live-js/819116/live_103014_6932719.flv?wsSecret=ca3071f8811b441108d18542627af83a&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"电子竞技","area_id":4,"on_flag":0,"round_status":0,"area_v2_id":86,"area_v2_name":"英雄联盟","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/02c19a63cc6f9157b21e60da573f69d423721800.jpg","mid":24047117,"name":"吃不饱的小黄瓜"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d6559d746673e370ca9eb190978cee79ca41bc08.jpg","height":180,"width":320},"title":"ASMR 睡,都给我睡!","room_id":1621877,"online":30991,"playurl":"http://qn.live-play.acgvideo.com/live-qn/933811/live_24047117_8600703.flv?wsSecret=e686818c840e50384450d2b3247ec3ec&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/061da7dc21c649a65af75fa6a373cd83e38efef5.jpg","mid":11644473,"name":"第二颗纽扣给樱酱QvQ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/719985b86812915ed4f3ac87f98065e743d77a96.jpg","height":180,"width":320},"title":"ASMR白天不懂夜的黑~","room_id":498388,"online":26821,"playurl":"http://qn.live-play.acgvideo.com/live-qn/964587/live_11644473_9358208.flv?wsSecret=0ec06a805f9e00178baf0485431ee838&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/c52d8d5df531a70cc9c87fbf4a4f9b1732d803a8.gif","mid":8414991,"name":"比尔盖厕"},"cover":{"src":"https://i0.hdslb.com/bfs/live/0c11034bcfd362ff58cd460ab496885c7bb392c7.jpg","height":180,"width":320},"title":"【厕】新年好~浪完回家看直播呀~","room_id":273849,"online":25237,"playurl":"http://xl.live-play.acgvideo.com/live-xl/530700/live_8414991_8935961.flv?wsSecret=cc04b1478146d94fbdce129980ccb90c&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/f27a3f37f207ab46c8f7c6c0c788a055f7d1349d.jpg","mid":2255740,"name":"你的苏暖"},"cover":{"src":"https://i0.hdslb.com/bfs/live/54fe0ca59acb0fd675671671973f6dd4f2e3b0a0.jpg","height":180,"width":320},"title":"苏暖:扛枪软妹","room_id":24541,"online":22941,"playurl":"http://qn.live-play.acgvideo.com/live-qn/671413/live_2255740_332_c521e483.flv?wsSecret=4d91de1eab2b01403941a41e64da9722&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":80,"area_v2_name":"绝地求生:大逃杀","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/559c79e3e1320edd49b447e0454ea586b1d85577.jpg","mid":25144885,"name":"茹么么Rumeme"},"cover":{"src":"https://i0.hdslb.com/bfs/live/cc2e647566feebb0f25bd843b8e85d9bd65c3826.jpg","height":180,"width":320},"title":"轻轻的·ASMR","room_id":1495752,"online":21822,"playurl":"http://qn.live-play.acgvideo.com/live-qn/543633/live_25144885_6437847.flv?wsSecret=f5c9f253538d1d6e07ff2d3497025cba&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"御宅文化","area_id":2,"on_flag":0,"round_status":0,"area_v2_id":30,"area_v2_name":"ASMR ","area_v2_parent_id":1,"area_v2_parent_name":"娱乐"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/dc6c6e198f13eb56413c2838ed3f623ab590a3a6.jpg","mid":66072698,"name":"你好这里是小V丶"},"cover":{"src":"https://i0.hdslb.com/bfs/live/b4977ea39748b94484a2331b442476bd08a86898.jpg","height":180,"width":320},"title":"【小V 】B站最强狼人杀","room_id":4631694,"online":20298,"playurl":"http://qn.live-play.acgvideo.com/live-qn/405642/live_66072698_8344948.flv?wsSecret=7c85f9e9d8f31aa04020da0674881f47&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":41,"area_v2_name":"狼人杀","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i1.hdslb.com/bfs/face/370f188f8fcf5f53d2734a2b7d6cee350da9c4cc.jpg","mid":315834,"name":"雷米FF"},"cover":{"src":"https://i0.hdslb.com/bfs/live/3de6438acccd1140adc6ff3bda1149246347f9f7.jpg","height":180,"width":320},"title":"21点准时复活!","room_id":423510,"online":19295,"playurl":"http://js.live-play.acgvideo.com/live-js/449709/live_315834_1754653.flv?wsSecret=605c0aa251daeac2fc3391f95b01ddb9&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"电子竞技","area_id":4,"on_flag":0,"round_status":0,"area_v2_id":86,"area_v2_name":"英雄联盟","area_v2_parent_id":2,"area_v2_parent_name":"游戏"},{"owner":{"face":"https://i2.hdslb.com/bfs/face/18df6c1ccad7a5b0a0e4c9e28725a569c773579d.gif","mid":18210970,"name":"安妮找不到小熊了"},"cover":{"src":"https://i0.hdslb.com/bfs/live/d2dcdaa2b7f923b7480be68307c1b7d717a91c01.jpg","height":180,"width":320},"title":"【绝地求生】日更良心主播关注了","room_id":543359,"online":14787,"playurl":"http://qn.live-play.acgvideo.com/live-qn/142894/live_18210970_2222961.flv?wsSecret=cb7b006f9e507d2af3b5a43983b57688&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/232325726db9b91c85061686fc265f138ea7b544.jpg","mid":3311852,"name":"璃猫タヌキ"},"cover":{"src":"https://i0.hdslb.com/bfs/live/fe4233635a6c1f207011bf0756a65f65695d0f65.jpg","height":180,"width":320},"title":"qq飞车真好玩","room_id":68612,"online":14174,"playurl":"http://dl.live-play.acgvideo.com/live-dl/247774/live_3311852_7248026.flv?wsSecret=7abab0e16a94fdab107048e9017ffcb3&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"手游直播","area_id":12,"on_flag":0,"round_status":0,"area_v2_id":98,"area_v2_name":"其他手游","area_v2_parent_id":3,"area_v2_parent_name":"手游"},{"owner":{"face":"https://i0.hdslb.com/bfs/face/a42f5bf0c5a1db51f520b9e86fd646378f917867.jpg","mid":682508,"name":"超心塞的十六"},"cover":{"src":"https://i0.hdslb.com/bfs/live/8d879eec269c5e3b6dbd582380bbb4c92d12607b.jpg","height":180,"width":320},"title":"塞尔达达达达达达达 萌新","room_id":10313,"online":13735,"playurl":"http://dl.live-play.acgvideo.com/live-dl/836653/live_682508_3859786.flv?wsSecret=d70840a042a7f93f8950c2d744b48a12&wsTime=1518976621","accept_quality":"4","broadcast_type":0,"area":"单机联机","area_id":1,"on_flag":0,"round_status":0,"area_v2_id":107,"area_v2_name":"其他游戏","area_v2_parent_id":2,"area_v2_parent_name":"游戏"}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<Data> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<Data> getData() { - return data; - } - - public void setData(List<Data> data) { - this.data = data; - } - - public static class Data { - /** - * owner : {"face":"https://i1.hdslb.com/bfs/face/5be61949369dd844cc459eab808da151d8c363d2.gif","mid":4548018,"name":"扎双马尾的丧尸"} - * cover : {"src":"https://i0.hdslb.com/bfs/live/1f260f3bba18fc329f49a545d1b7c7d7810290bf.jpg","height":180,"width":320} - * title : 软萌的熊熊丧 - * room_id : 48499 - * online : 527628 - * playurl : http://txy.live-play.acgvideo.com/live-txy/851545/live_4548018_332_c521e483.flv?wsSecret=c56fa32194f2dcf33c6f3652bbe69b86&wsTime=1518976621 - * accept_quality : 4 - * broadcast_type : 0 - * area : 御宅文化 - * area_id : 2 - * on_flag : 0 - * round_status : 0 - * area_v2_id : 30 - * area_v2_name : ASMR - * area_v2_parent_id : 1 - * area_v2_parent_name : 娱乐 - */ - - @SerializedName("owner") - private Owner owner; - @SerializedName("cover") - private Cover cover; - @SerializedName("title") - private String title; - @SerializedName("room_id") - private long roomId; - @SerializedName("online") - private long online; - @SerializedName("playurl") - private String playurl; - @SerializedName("accept_quality") - private String acceptQuality; - @SerializedName("broadcast_type") - private int broadcastType; - @SerializedName("area") - private String area; - @SerializedName("area_id") - private int areaId; - @SerializedName("on_flag") - private int onFlag; - @SerializedName("round_status") - private int roundStatus; - @SerializedName("area_v2_id") - private int areaV2Id; - @SerializedName("area_v2_name") - private String areaV2Name; - @SerializedName("area_v2_parent_id") - private int areaV2ParentId; - @SerializedName("area_v2_parent_name") - private String areaV2ParentName; - - public Owner getOwner() { - return owner; - } - - public void setOwner(Owner owner) { - this.owner = owner; - } - - public Cover getCover() { - return cover; - } - - public void setCover(Cover cover) { - this.cover = cover; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public long getOnline() { - return online; - } - - public void setOnline(long online) { - this.online = online; - } - - public String getPlayurl() { - return playurl; - } - - public void setPlayurl(String playurl) { - this.playurl = playurl; - } - - public String getAcceptQuality() { - return acceptQuality; - } - - public void setAcceptQuality(String acceptQuality) { - this.acceptQuality = acceptQuality; - } - - public int getBroadcastType() { - return broadcastType; - } - - public void setBroadcastType(int broadcastType) { - this.broadcastType = broadcastType; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public int getAreaId() { - return areaId; - } - - public void setAreaId(int areaId) { - this.areaId = areaId; - } - - public int getOnFlag() { - return onFlag; - } - - public void setOnFlag(int onFlag) { - this.onFlag = onFlag; - } - - public int getRoundStatus() { - return roundStatus; - } - - public void setRoundStatus(int roundStatus) { - this.roundStatus = roundStatus; - } - - public int getAreaV2Id() { - return areaV2Id; - } - - public void setAreaV2Id(int areaV2Id) { - this.areaV2Id = areaV2Id; - } - - public String getAreaV2Name() { - return areaV2Name; - } - - public void setAreaV2Name(String areaV2Name) { - this.areaV2Name = areaV2Name; - } - - public int getAreaV2ParentId() { - return areaV2ParentId; - } - - public void setAreaV2ParentId(int areaV2ParentId) { - this.areaV2ParentId = areaV2ParentId; - } - - public String getAreaV2ParentName() { - return areaV2ParentName; - } - - public void setAreaV2ParentName(String areaV2ParentName) { - this.areaV2ParentName = areaV2ParentName; - } - - public static class Owner { - /** - * face : https://i1.hdslb.com/bfs/face/5be61949369dd844cc459eab808da151d8c363d2.gif - * mid : 4548018 - * name : 扎双马尾的丧尸 - */ - - @SerializedName("face") - private String face; - @SerializedName("mid") - private long mid; - @SerializedName("name") - private String name; - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getMid() { - return mid; - } - - public void setMid(long mid) { - this.mid = mid; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - - public static class Cover { - /** - * src : https://i0.hdslb.com/bfs/live/1f260f3bba18fc329f49a545d1b7c7d7810290bf.jpg - * height : 180 - * width : 320 - */ - - @SerializedName("src") - private String src; - @SerializedName("height") - private int height; - @SerializedName("width") - private int width; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SearchResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SearchResponseEntity.java deleted file mode 100644 index a1f858b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SearchResponseEntity.java +++ /dev/null @@ -1,328 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SearchResponseEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"page":1,"pagesize":20,"type":"all","room":{"list":[{"roomid":23058,"cover":"//i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg","title":"哔哩哔哩音悦台","name":"3号直播间","face":"//i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","online":33717},{"roomid":5962096,"cover":"//i0.hdslb.com/bfs/live/245c47d1e4e7d3ef72915b81ab595fc8c42b7b7e.jpg","title":"新年快乐~好番随机播~","name":"廃喵苦涩酱","face":"//i2.hdslb.com/bfs/face/ebf0eed5436ebd44bf3c60ae770d32ffcd374fcf.jpg","online":5912},{"roomid":157901,"cover":"//i0.hdslb.com/bfs/live/dfe541ff1b1cc5002c324206e997698b2f7aef97.jpg","title":"祈愿屋","name":"我丶好期待","face":"//i1.hdslb.com/bfs/face/48e49865e68124909dad37d61d71ea1c2a3891f2.jpg","online":5855},{"roomid":2703501,"cover":"//i0.hdslb.com/bfs/live/f68beb49d7ccda19a6e17119d216b2d64bad7726.jpg","title":"【灵魂ASMR】同人带老司机重温初体验","name":"兮夜素玄","face":"//i2.hdslb.com/bfs/face/728c4579896fae6357b985646802dcca00e6b88b.jpg","online":5641},{"roomid":35278,"cover":"//i0.hdslb.com/bfs/live/fc8e195f9208506db6fa174aaf9340cf711df660.jpg","title":"新年快乐~米娜桑 好听的音乐直播","name":"智障喵兔w","face":"//i2.hdslb.com/bfs/face/6e5b9196fd84f91320745d5e432b920d750600f2.jpg","online":2534},{"roomid":10101,"cover":"//i0.hdslb.com/bfs/live/7ea796080b68ef514f890ebcbca47203d0c56c6a.jpg","title":"东方同人音乐博物馆","name":"猫耳爱丽丝","face":"//i2.hdslb.com/bfs/face/f864e65a5fc9820c3e814a58e6afefae6aedc794.jpg","online":1268},{"roomid":357983,"cover":"//i0.hdslb.com/bfs/live/78ffda1e4a604c680d1b545ff510998f2ae4d007.jpg","title":"【韩国女团音乐点播间】","name":"大豆爷爷","face":"//i2.hdslb.com/bfs/face/e9211b74cfaead11362e3a84f8b4c920a5b06d0f.jpg","online":937},{"roomid":38946,"cover":"//i0.hdslb.com/bfs/live/2f613f107f4f189f136c8626febc77fa261233ca.jpg","title":"【不是特别攻的音】好听算我输!","name":"散华落叶","face":"//i1.hdslb.com/bfs/face/85ea0bf53ce0f1a6fbefe2472f087416ddc7c18b.jpg","online":682},{"roomid":4394069,"cover":"//i0.hdslb.com/bfs/live/66cc11d95ab71f271d127bcb71d510873b9494d5.jpg","title":"韩国男团点播间","name":"大豆奶奶","face":"//i1.hdslb.com/bfs/face/2fe279e573fbf726531a7dc6fd8071b83af76654.jpg","online":655},{"roomid":4369521,"cover":"//i0.hdslb.com/bfs/live/342f10b170327d8566027783327328ec4b48c720.jpg","title":"QQ飞车:新年快乐哟~","name":"一只欧尼酱丶","face":"//i0.hdslb.com/bfs/face/fc3a953eaa1bd70139a55bfec862eee764431c67.jpg","online":576},{"roomid":1149702,"cover":"//i0.hdslb.com/bfs/live/b41656c693fbea3914b0620621818a332916854a.jpg","title":"嘤嘤嘤怪点歌聊天台","name":"Kyoko释怀","face":"//i2.hdslb.com/bfs/face/8ff5ec6ce92685f974941d9bf8a496c8326ca3e0.jpg","online":377},{"roomid":144784,"cover":"//i0.hdslb.com/bfs/live/5a331b65c855c38ebb458e476870f974b82c1626.jpg","title":"【音乐厅】玖式随机大法","name":"玖兰yuiki","face":"//i2.hdslb.com/bfs/face/bb4d4173bcea989969bacd40d11c00006d68fcf5.jpg","online":357},{"roomid":406117,"cover":"//i0.hdslb.com/bfs/live/46560258e2bd41752c1540e1e8cb86a1d68bc682.jpg","title":"T-ARA 皇冠团 节日快乐 :D","name":"湛蓝初一","face":"//i0.hdslb.com/bfs/face/142af67a3bf12cc98b0bc1685493ede585942d84.jpg","online":249},{"roomid":416695,"cover":"//i0.hdslb.com/bfs/live/3ae3593bd9e589473504ebe831c2962df216c79a.jpg","title":"私人歌单,带耳机进。。","name":"flwjn","face":"//i1.hdslb.com/bfs/face/a809a3b8407840ae00032360108261fcf503d38a.jpg","online":243},{"roomid":29922,"cover":"//i0.hdslb.com/bfs/live/88ca857b0c0b7d387b653d6c64754e320b8fc4bf.jpg","title":"全天直播_东方_V家_萌耳系_二次元环绕","name":"いぬやしゃ_Inuyasha","face":"//i1.hdslb.com/bfs/face/9532691338e471aa5e9d31d28e7664e1ce155123.jpg","online":187},{"roomid":449326,"cover":"//i0.hdslb.com/bfs/live/c597dd333c14e60c7067c171d8fac5d49d92ffaa.jpg","title":"深夜睡眠小电台,可点轻音乐,听歌睡觉哦!","name":"小月丿痕","face":"//i2.hdslb.com/bfs/face/6c464efb32385926487ea424fd8d7a6fd16fc114.jpg","online":151},{"roomid":400766,"cover":"//i0.hdslb.com/bfs/live/ca1e7a9e487ca8f5f25c8eea538e65308473775b.jpg","title":"始于侧颜,沉于歌声,忠于马尾。","name":"龙虾呀","face":"//i1.hdslb.com/bfs/face/8d535760d3390dcccd306008529c98691e27033a.gif","online":147},{"roomid":71423,"cover":"//i0.hdslb.com/bfs/live/7c3965e5f2bd1e2247c3de156fc4b8b6bcb063b7.jpg","title":"Forever音乐屋","name":"匚凵冂","face":"//i1.hdslb.com/bfs/face/d9a98f83554fa287d4a5ca6ed6e5add1a35fbe85.jpg","online":109},{"roomid":2570641,"cover":"//i0.hdslb.com/bfs/live/d8d4c634684cbfc2bc80f12bbee963aa30e71b2b.jpg","title":"24小时网易云音乐vip点歌台","name":"0点后的活动不要叫夜猫","face":"//i1.hdslb.com/bfs/face/09e3fc6b785af00e2d524b9552cdfb370408c54a.jpg","online":84},{"roomid":10724,"cover":"//i0.hdslb.com/bfs/live/82c87e28c5d5546523eab3833d4aaaba465697ea.jpg","title":"新年打猛汉 欢迎组队","name":"天空夜明","face":"//i2.hdslb.com/bfs/face/6a28cb05aed94e1d649d4268a79c3d389b62f365.jpg","online":77}],"total_room":43,"total_page":3},"user":{"list":[{"face":"//i1.hdslb.com/bfs/face/a1b248975dcc42dec34c9b097c5ce3b1b4d6f7bb.jpg","name":"聆听の音乐","live_status":1,"areaName":"放映厅","fansNum":165,"roomTags":["洛天依","天依音悦台","天依"],"roomid":4355580},{"face":"//i0.hdslb.com/bfs/face/12156a3a2f014475c8bdd12d3778570f54587563.jpg","name":"满汉全席音乐团队","live_status":0,"areaName":"生活娱乐","fansNum":1569325,"roomTags":["唱歌","音乐","纯男声"],"roomid":55041},{"face":"//i2.hdslb.com/bfs/face/311c0cf25085a795dcf63bea312caa1edbebd9ca.jpg","name":"我是爱音乐的徐梦圆","live_status":0,"areaName":"单机联机","fansNum":368129,"roomTags":["守望先锋"],"roomid":286662},{"face":"//i2.hdslb.com/bfs/face/5773186b159cb3dfdfba6ef5ad7290c67b824a78.jpg","name":"歌者盟音乐","live_status":0,"areaName":"单机游戏","fansNum":141748,"roomTags":[""],"roomid":923438},{"face":"//i0.hdslb.com/bfs/face/8539f20190ffa7a1d337cd96c4e5ec37fc6ad0b1.jpg","name":"趣弹音乐","live_status":0,"areaName":"生活娱乐","fansNum":83258,"roomTags":[""],"roomid":930041},{"face":"//i0.hdslb.com/bfs/face/bd95e148b71c496449ae3e0a92ad17bce963a9a5.jpg","name":"SOE音乐课堂","live_status":0,"areaName":"生活娱乐","fansNum":62832,"roomTags":["声乐培训"],"roomid":285435},{"face":"//i2.hdslb.com/bfs/face/9fa8bcb0ef1843a585a47fbc73eb02d22dcf7e10.jpg","name":"养心音乐","live_status":0,"areaName":"单机游戏","fansNum":57998,"roomTags":[""],"roomid":4238998},{"face":"//i2.hdslb.com/bfs/face/1540e9eb03abef032a1315327130505d12ef0af3.jpg","name":"馒头音乐","live_status":0,"areaName":"单机游戏","fansNum":55741,"roomTags":[""],"roomid":1357493},{"face":"//i2.hdslb.com/bfs/face/6563b8eea46d7c51d2f58346501637a4e3e1b406.jpg","name":"古风音乐会","live_status":0,"areaName":"单机游戏","fansNum":54934,"roomTags":[""],"roomid":214816},{"face":"//i0.hdslb.com/bfs/face/70caba75dc7c635a0553b2ac4d0b82e55b28829b.jpg","name":"嗨的国风音乐","live_status":0,"areaName":"唱见舞见","fansNum":52707,"roomTags":["古琴"],"roomid":3214656},{"face":"//i2.hdslb.com/bfs/face/904f9263c5a28743977af9139962304d2eb5143e.jpg","name":"白熊音乐Ukulele","live_status":0,"areaName":"单机游戏","fansNum":47957,"roomTags":[""],"roomid":2852510},{"face":"//i1.hdslb.com/bfs/face/255bd6d66d2e0f03603b37e7f1d9bdc86cd38abc.jpg","name":"不要音乐","live_status":0,"areaName":"单机游戏","fansNum":39059,"roomTags":[""],"roomid":1216095},{"face":"//i1.hdslb.com/bfs/face/ea674e951d97d05d1d228660004e8c14d2f046cc.jpg","name":"亮声音乐","live_status":0,"areaName":"单机游戏","fansNum":38554,"roomTags":[""],"roomid":4959493},{"face":"//i2.hdslb.com/bfs/face/9d299e94dc1834353fea7d5f0a5ecb5b1f4d575c.jpg","name":"音乐学霸哥e","live_status":0,"areaName":"单机游戏","fansNum":35614,"roomTags":[""],"roomid":947738},{"face":"//i0.hdslb.com/bfs/face/371b13b4831c1e1b0999989f270c36922bff3d05.jpg","name":"迷因爱音乐","live_status":0,"areaName":"放映厅","fansNum":33092,"roomTags":["电音"],"roomid":3971679},{"face":"//i0.hdslb.com/bfs/face/63175628b06158ceefe8f329ff0761cf28038304.jpg","name":"鸾凤鸣原创音乐","live_status":0,"areaName":"单机游戏","fansNum":27338,"roomTags":[""],"roomid":677243},{"face":"//i2.hdslb.com/bfs/face/4c09fba674efbeeb97cf6219428d66d8b58ae978.jpg","name":"音乐大爆炸-老赵LD","live_status":0,"areaName":"单机联机","fansNum":23997,"roomTags":[""],"roomid":741247},{"face":"//i2.hdslb.com/bfs/face/e22a63b0cf7afd74076fb6214f80bd8528ce8b5b.jpg","name":"音乐人网","live_status":0,"areaName":"生活娱乐","fansNum":22164,"roomTags":["教学","编曲","混音","后期","音乐制作"],"roomid":93751},{"face":"//i2.hdslb.com/bfs/face/bb06e15a84a2f52b0eca3b56260e6b7af3af95a9.jpg","name":"MikaiMusic未开封音乐","live_status":0,"areaName":"单机游戏","fansNum":21813,"roomTags":[""],"roomid":5379747},{"face":"//i0.hdslb.com/bfs/face/d17ddb244a783fa8179c362209080c48716beebf.jpg","name":"唯一音乐小魔王","live_status":0,"areaName":"单机游戏","fansNum":21317,"roomTags":[""],"roomid":9020709}],"total_user":1000,"total_page":50}} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * page : 1 - * pagesize : 20 - * type : all - * room : {"list":[{"roomid":23058,"cover":"//i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg","title":"哔哩哔哩音悦台","name":"3号直播间","face":"//i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","online":33717},{"roomid":5962096,"cover":"//i0.hdslb.com/bfs/live/245c47d1e4e7d3ef72915b81ab595fc8c42b7b7e.jpg","title":"新年快乐~好番随机播~","name":"廃喵苦涩酱","face":"//i2.hdslb.com/bfs/face/ebf0eed5436ebd44bf3c60ae770d32ffcd374fcf.jpg","online":5912},{"roomid":157901,"cover":"//i0.hdslb.com/bfs/live/dfe541ff1b1cc5002c324206e997698b2f7aef97.jpg","title":"祈愿屋","name":"我丶好期待","face":"//i1.hdslb.com/bfs/face/48e49865e68124909dad37d61d71ea1c2a3891f2.jpg","online":5855},{"roomid":2703501,"cover":"//i0.hdslb.com/bfs/live/f68beb49d7ccda19a6e17119d216b2d64bad7726.jpg","title":"【灵魂ASMR】同人带老司机重温初体验","name":"兮夜素玄","face":"//i2.hdslb.com/bfs/face/728c4579896fae6357b985646802dcca00e6b88b.jpg","online":5641},{"roomid":35278,"cover":"//i0.hdslb.com/bfs/live/fc8e195f9208506db6fa174aaf9340cf711df660.jpg","title":"新年快乐~米娜桑 好听的音乐直播","name":"智障喵兔w","face":"//i2.hdslb.com/bfs/face/6e5b9196fd84f91320745d5e432b920d750600f2.jpg","online":2534},{"roomid":10101,"cover":"//i0.hdslb.com/bfs/live/7ea796080b68ef514f890ebcbca47203d0c56c6a.jpg","title":"东方同人音乐博物馆","name":"猫耳爱丽丝","face":"//i2.hdslb.com/bfs/face/f864e65a5fc9820c3e814a58e6afefae6aedc794.jpg","online":1268},{"roomid":357983,"cover":"//i0.hdslb.com/bfs/live/78ffda1e4a604c680d1b545ff510998f2ae4d007.jpg","title":"【韩国女团音乐点播间】","name":"大豆爷爷","face":"//i2.hdslb.com/bfs/face/e9211b74cfaead11362e3a84f8b4c920a5b06d0f.jpg","online":937},{"roomid":38946,"cover":"//i0.hdslb.com/bfs/live/2f613f107f4f189f136c8626febc77fa261233ca.jpg","title":"【不是特别攻的音】好听算我输!","name":"散华落叶","face":"//i1.hdslb.com/bfs/face/85ea0bf53ce0f1a6fbefe2472f087416ddc7c18b.jpg","online":682},{"roomid":4394069,"cover":"//i0.hdslb.com/bfs/live/66cc11d95ab71f271d127bcb71d510873b9494d5.jpg","title":"韩国男团点播间","name":"大豆奶奶","face":"//i1.hdslb.com/bfs/face/2fe279e573fbf726531a7dc6fd8071b83af76654.jpg","online":655},{"roomid":4369521,"cover":"//i0.hdslb.com/bfs/live/342f10b170327d8566027783327328ec4b48c720.jpg","title":"QQ飞车:新年快乐哟~","name":"一只欧尼酱丶","face":"//i0.hdslb.com/bfs/face/fc3a953eaa1bd70139a55bfec862eee764431c67.jpg","online":576},{"roomid":1149702,"cover":"//i0.hdslb.com/bfs/live/b41656c693fbea3914b0620621818a332916854a.jpg","title":"嘤嘤嘤怪点歌聊天台","name":"Kyoko释怀","face":"//i2.hdslb.com/bfs/face/8ff5ec6ce92685f974941d9bf8a496c8326ca3e0.jpg","online":377},{"roomid":144784,"cover":"//i0.hdslb.com/bfs/live/5a331b65c855c38ebb458e476870f974b82c1626.jpg","title":"【音乐厅】玖式随机大法","name":"玖兰yuiki","face":"//i2.hdslb.com/bfs/face/bb4d4173bcea989969bacd40d11c00006d68fcf5.jpg","online":357},{"roomid":406117,"cover":"//i0.hdslb.com/bfs/live/46560258e2bd41752c1540e1e8cb86a1d68bc682.jpg","title":"T-ARA 皇冠团 节日快乐 :D","name":"湛蓝初一","face":"//i0.hdslb.com/bfs/face/142af67a3bf12cc98b0bc1685493ede585942d84.jpg","online":249},{"roomid":416695,"cover":"//i0.hdslb.com/bfs/live/3ae3593bd9e589473504ebe831c2962df216c79a.jpg","title":"私人歌单,带耳机进。。","name":"flwjn","face":"//i1.hdslb.com/bfs/face/a809a3b8407840ae00032360108261fcf503d38a.jpg","online":243},{"roomid":29922,"cover":"//i0.hdslb.com/bfs/live/88ca857b0c0b7d387b653d6c64754e320b8fc4bf.jpg","title":"全天直播_东方_V家_萌耳系_二次元环绕","name":"いぬやしゃ_Inuyasha","face":"//i1.hdslb.com/bfs/face/9532691338e471aa5e9d31d28e7664e1ce155123.jpg","online":187},{"roomid":449326,"cover":"//i0.hdslb.com/bfs/live/c597dd333c14e60c7067c171d8fac5d49d92ffaa.jpg","title":"深夜睡眠小电台,可点轻音乐,听歌睡觉哦!","name":"小月丿痕","face":"//i2.hdslb.com/bfs/face/6c464efb32385926487ea424fd8d7a6fd16fc114.jpg","online":151},{"roomid":400766,"cover":"//i0.hdslb.com/bfs/live/ca1e7a9e487ca8f5f25c8eea538e65308473775b.jpg","title":"始于侧颜,沉于歌声,忠于马尾。","name":"龙虾呀","face":"//i1.hdslb.com/bfs/face/8d535760d3390dcccd306008529c98691e27033a.gif","online":147},{"roomid":71423,"cover":"//i0.hdslb.com/bfs/live/7c3965e5f2bd1e2247c3de156fc4b8b6bcb063b7.jpg","title":"Forever音乐屋","name":"匚凵冂","face":"//i1.hdslb.com/bfs/face/d9a98f83554fa287d4a5ca6ed6e5add1a35fbe85.jpg","online":109},{"roomid":2570641,"cover":"//i0.hdslb.com/bfs/live/d8d4c634684cbfc2bc80f12bbee963aa30e71b2b.jpg","title":"24小时网易云音乐vip点歌台","name":"0点后的活动不要叫夜猫","face":"//i1.hdslb.com/bfs/face/09e3fc6b785af00e2d524b9552cdfb370408c54a.jpg","online":84},{"roomid":10724,"cover":"//i0.hdslb.com/bfs/live/82c87e28c5d5546523eab3833d4aaaba465697ea.jpg","title":"新年打猛汉 欢迎组队","name":"天空夜明","face":"//i2.hdslb.com/bfs/face/6a28cb05aed94e1d649d4268a79c3d389b62f365.jpg","online":77}],"total_room":43,"total_page":3} - * user : {"list":[{"face":"//i1.hdslb.com/bfs/face/a1b248975dcc42dec34c9b097c5ce3b1b4d6f7bb.jpg","name":"聆听の音乐","live_status":1,"areaName":"放映厅","fansNum":165,"roomTags":["洛天依","天依音悦台","天依"],"roomid":4355580},{"face":"//i0.hdslb.com/bfs/face/12156a3a2f014475c8bdd12d3778570f54587563.jpg","name":"满汉全席音乐团队","live_status":0,"areaName":"生活娱乐","fansNum":1569325,"roomTags":["唱歌","音乐","纯男声"],"roomid":55041},{"face":"//i2.hdslb.com/bfs/face/311c0cf25085a795dcf63bea312caa1edbebd9ca.jpg","name":"我是爱音乐的徐梦圆","live_status":0,"areaName":"单机联机","fansNum":368129,"roomTags":["守望先锋"],"roomid":286662},{"face":"//i2.hdslb.com/bfs/face/5773186b159cb3dfdfba6ef5ad7290c67b824a78.jpg","name":"歌者盟音乐","live_status":0,"areaName":"单机游戏","fansNum":141748,"roomTags":[""],"roomid":923438},{"face":"//i0.hdslb.com/bfs/face/8539f20190ffa7a1d337cd96c4e5ec37fc6ad0b1.jpg","name":"趣弹音乐","live_status":0,"areaName":"生活娱乐","fansNum":83258,"roomTags":[""],"roomid":930041},{"face":"//i0.hdslb.com/bfs/face/bd95e148b71c496449ae3e0a92ad17bce963a9a5.jpg","name":"SOE音乐课堂","live_status":0,"areaName":"生活娱乐","fansNum":62832,"roomTags":["声乐培训"],"roomid":285435},{"face":"//i2.hdslb.com/bfs/face/9fa8bcb0ef1843a585a47fbc73eb02d22dcf7e10.jpg","name":"养心音乐","live_status":0,"areaName":"单机游戏","fansNum":57998,"roomTags":[""],"roomid":4238998},{"face":"//i2.hdslb.com/bfs/face/1540e9eb03abef032a1315327130505d12ef0af3.jpg","name":"馒头音乐","live_status":0,"areaName":"单机游戏","fansNum":55741,"roomTags":[""],"roomid":1357493},{"face":"//i2.hdslb.com/bfs/face/6563b8eea46d7c51d2f58346501637a4e3e1b406.jpg","name":"古风音乐会","live_status":0,"areaName":"单机游戏","fansNum":54934,"roomTags":[""],"roomid":214816},{"face":"//i0.hdslb.com/bfs/face/70caba75dc7c635a0553b2ac4d0b82e55b28829b.jpg","name":"嗨的国风音乐","live_status":0,"areaName":"唱见舞见","fansNum":52707,"roomTags":["古琴"],"roomid":3214656},{"face":"//i2.hdslb.com/bfs/face/904f9263c5a28743977af9139962304d2eb5143e.jpg","name":"白熊音乐Ukulele","live_status":0,"areaName":"单机游戏","fansNum":47957,"roomTags":[""],"roomid":2852510},{"face":"//i1.hdslb.com/bfs/face/255bd6d66d2e0f03603b37e7f1d9bdc86cd38abc.jpg","name":"不要音乐","live_status":0,"areaName":"单机游戏","fansNum":39059,"roomTags":[""],"roomid":1216095},{"face":"//i1.hdslb.com/bfs/face/ea674e951d97d05d1d228660004e8c14d2f046cc.jpg","name":"亮声音乐","live_status":0,"areaName":"单机游戏","fansNum":38554,"roomTags":[""],"roomid":4959493},{"face":"//i2.hdslb.com/bfs/face/9d299e94dc1834353fea7d5f0a5ecb5b1f4d575c.jpg","name":"音乐学霸哥e","live_status":0,"areaName":"单机游戏","fansNum":35614,"roomTags":[""],"roomid":947738},{"face":"//i0.hdslb.com/bfs/face/371b13b4831c1e1b0999989f270c36922bff3d05.jpg","name":"迷因爱音乐","live_status":0,"areaName":"放映厅","fansNum":33092,"roomTags":["电音"],"roomid":3971679},{"face":"//i0.hdslb.com/bfs/face/63175628b06158ceefe8f329ff0761cf28038304.jpg","name":"鸾凤鸣原创音乐","live_status":0,"areaName":"单机游戏","fansNum":27338,"roomTags":[""],"roomid":677243},{"face":"//i2.hdslb.com/bfs/face/4c09fba674efbeeb97cf6219428d66d8b58ae978.jpg","name":"音乐大爆炸-老赵LD","live_status":0,"areaName":"单机联机","fansNum":23997,"roomTags":[""],"roomid":741247},{"face":"//i2.hdslb.com/bfs/face/e22a63b0cf7afd74076fb6214f80bd8528ce8b5b.jpg","name":"音乐人网","live_status":0,"areaName":"生活娱乐","fansNum":22164,"roomTags":["教学","编曲","混音","后期","音乐制作"],"roomid":93751},{"face":"//i2.hdslb.com/bfs/face/bb06e15a84a2f52b0eca3b56260e6b7af3af95a9.jpg","name":"MikaiMusic未开封音乐","live_status":0,"areaName":"单机游戏","fansNum":21813,"roomTags":[""],"roomid":5379747},{"face":"//i0.hdslb.com/bfs/face/d17ddb244a783fa8179c362209080c48716beebf.jpg","name":"唯一音乐小魔王","live_status":0,"areaName":"单机游戏","fansNum":21317,"roomTags":[""],"roomid":9020709}],"total_user":1000,"total_page":50} - */ - - @SerializedName("page") - private long page; - @SerializedName("pagesize") - private long pageSize; - @SerializedName("type") - private String type; - @SerializedName("room") - private Room room; - @SerializedName("user") - private User user; - - public long getPage() { - return page; - } - - public void setPage(long page) { - this.page = page; - } - - public long getPageSize() { - return pageSize; - } - - public void setPageSize(long pageSize) { - this.pageSize = pageSize; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Room getRoom() { - return room; - } - - public void setRoom(Room room) { - this.room = room; - } - - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - public static class Room { - /** - * list : [{"roomid":23058,"cover":"//i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg","title":"哔哩哔哩音悦台","name":"3号直播间","face":"//i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg","online":33717},{"roomid":5962096,"cover":"//i0.hdslb.com/bfs/live/245c47d1e4e7d3ef72915b81ab595fc8c42b7b7e.jpg","title":"新年快乐~好番随机播~","name":"廃喵苦涩酱","face":"//i2.hdslb.com/bfs/face/ebf0eed5436ebd44bf3c60ae770d32ffcd374fcf.jpg","online":5912},{"roomid":157901,"cover":"//i0.hdslb.com/bfs/live/dfe541ff1b1cc5002c324206e997698b2f7aef97.jpg","title":"祈愿屋","name":"我丶好期待","face":"//i1.hdslb.com/bfs/face/48e49865e68124909dad37d61d71ea1c2a3891f2.jpg","online":5855},{"roomid":2703501,"cover":"//i0.hdslb.com/bfs/live/f68beb49d7ccda19a6e17119d216b2d64bad7726.jpg","title":"【灵魂ASMR】同人带老司机重温初体验","name":"兮夜素玄","face":"//i2.hdslb.com/bfs/face/728c4579896fae6357b985646802dcca00e6b88b.jpg","online":5641},{"roomid":35278,"cover":"//i0.hdslb.com/bfs/live/fc8e195f9208506db6fa174aaf9340cf711df660.jpg","title":"新年快乐~米娜桑 好听的音乐直播","name":"智障喵兔w","face":"//i2.hdslb.com/bfs/face/6e5b9196fd84f91320745d5e432b920d750600f2.jpg","online":2534},{"roomid":10101,"cover":"//i0.hdslb.com/bfs/live/7ea796080b68ef514f890ebcbca47203d0c56c6a.jpg","title":"东方同人音乐博物馆","name":"猫耳爱丽丝","face":"//i2.hdslb.com/bfs/face/f864e65a5fc9820c3e814a58e6afefae6aedc794.jpg","online":1268},{"roomid":357983,"cover":"//i0.hdslb.com/bfs/live/78ffda1e4a604c680d1b545ff510998f2ae4d007.jpg","title":"【韩国女团音乐点播间】","name":"大豆爷爷","face":"//i2.hdslb.com/bfs/face/e9211b74cfaead11362e3a84f8b4c920a5b06d0f.jpg","online":937},{"roomid":38946,"cover":"//i0.hdslb.com/bfs/live/2f613f107f4f189f136c8626febc77fa261233ca.jpg","title":"【不是特别攻的音】好听算我输!","name":"散华落叶","face":"//i1.hdslb.com/bfs/face/85ea0bf53ce0f1a6fbefe2472f087416ddc7c18b.jpg","online":682},{"roomid":4394069,"cover":"//i0.hdslb.com/bfs/live/66cc11d95ab71f271d127bcb71d510873b9494d5.jpg","title":"韩国男团点播间","name":"大豆奶奶","face":"//i1.hdslb.com/bfs/face/2fe279e573fbf726531a7dc6fd8071b83af76654.jpg","online":655},{"roomid":4369521,"cover":"//i0.hdslb.com/bfs/live/342f10b170327d8566027783327328ec4b48c720.jpg","title":"QQ飞车:新年快乐哟~","name":"一只欧尼酱丶","face":"//i0.hdslb.com/bfs/face/fc3a953eaa1bd70139a55bfec862eee764431c67.jpg","online":576},{"roomid":1149702,"cover":"//i0.hdslb.com/bfs/live/b41656c693fbea3914b0620621818a332916854a.jpg","title":"嘤嘤嘤怪点歌聊天台","name":"Kyoko释怀","face":"//i2.hdslb.com/bfs/face/8ff5ec6ce92685f974941d9bf8a496c8326ca3e0.jpg","online":377},{"roomid":144784,"cover":"//i0.hdslb.com/bfs/live/5a331b65c855c38ebb458e476870f974b82c1626.jpg","title":"【音乐厅】玖式随机大法","name":"玖兰yuiki","face":"//i2.hdslb.com/bfs/face/bb4d4173bcea989969bacd40d11c00006d68fcf5.jpg","online":357},{"roomid":406117,"cover":"//i0.hdslb.com/bfs/live/46560258e2bd41752c1540e1e8cb86a1d68bc682.jpg","title":"T-ARA 皇冠团 节日快乐 :D","name":"湛蓝初一","face":"//i0.hdslb.com/bfs/face/142af67a3bf12cc98b0bc1685493ede585942d84.jpg","online":249},{"roomid":416695,"cover":"//i0.hdslb.com/bfs/live/3ae3593bd9e589473504ebe831c2962df216c79a.jpg","title":"私人歌单,带耳机进。。","name":"flwjn","face":"//i1.hdslb.com/bfs/face/a809a3b8407840ae00032360108261fcf503d38a.jpg","online":243},{"roomid":29922,"cover":"//i0.hdslb.com/bfs/live/88ca857b0c0b7d387b653d6c64754e320b8fc4bf.jpg","title":"全天直播_东方_V家_萌耳系_二次元环绕","name":"いぬやしゃ_Inuyasha","face":"//i1.hdslb.com/bfs/face/9532691338e471aa5e9d31d28e7664e1ce155123.jpg","online":187},{"roomid":449326,"cover":"//i0.hdslb.com/bfs/live/c597dd333c14e60c7067c171d8fac5d49d92ffaa.jpg","title":"深夜睡眠小电台,可点轻音乐,听歌睡觉哦!","name":"小月丿痕","face":"//i2.hdslb.com/bfs/face/6c464efb32385926487ea424fd8d7a6fd16fc114.jpg","online":151},{"roomid":400766,"cover":"//i0.hdslb.com/bfs/live/ca1e7a9e487ca8f5f25c8eea538e65308473775b.jpg","title":"始于侧颜,沉于歌声,忠于马尾。","name":"龙虾呀","face":"//i1.hdslb.com/bfs/face/8d535760d3390dcccd306008529c98691e27033a.gif","online":147},{"roomid":71423,"cover":"//i0.hdslb.com/bfs/live/7c3965e5f2bd1e2247c3de156fc4b8b6bcb063b7.jpg","title":"Forever音乐屋","name":"匚凵冂","face":"//i1.hdslb.com/bfs/face/d9a98f83554fa287d4a5ca6ed6e5add1a35fbe85.jpg","online":109},{"roomid":2570641,"cover":"//i0.hdslb.com/bfs/live/d8d4c634684cbfc2bc80f12bbee963aa30e71b2b.jpg","title":"24小时网易云音乐vip点歌台","name":"0点后的活动不要叫夜猫","face":"//i1.hdslb.com/bfs/face/09e3fc6b785af00e2d524b9552cdfb370408c54a.jpg","online":84},{"roomid":10724,"cover":"//i0.hdslb.com/bfs/live/82c87e28c5d5546523eab3833d4aaaba465697ea.jpg","title":"新年打猛汉 欢迎组队","name":"天空夜明","face":"//i2.hdslb.com/bfs/face/6a28cb05aed94e1d649d4268a79c3d389b62f365.jpg","online":77}] - * total_room : 43 - * total_page : 3 - */ - - @SerializedName("total_room") - private long totalRoom; - @SerializedName("total_page") - private long totalPage; - @SerializedName("list") - private List<RoomData> list; - - public long getTotalRoom() { - return totalRoom; - } - - public void setTotalRoom(long totalRoom) { - this.totalRoom = totalRoom; - } - - public long getTotalPage() { - return totalPage; - } - - public void setTotalPage(long totalPage) { - this.totalPage = totalPage; - } - - public List<RoomData> getList() { - return list; - } - - public void setList(List<RoomData> list) { - this.list = list; - } - - public static class RoomData { - /** - * roomid : 23058 - * cover : //i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg - * title : 哔哩哔哩音悦台 - * name : 3号直播间 - * face : //i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg - * online : 33717 - */ - - @SerializedName("roomid") - private long roomId; - @SerializedName("cover") - private String cover; - @SerializedName("title") - private String title; - @SerializedName("name") - private String name; - @SerializedName("face") - private String face; - @SerializedName("online") - private int online; - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public String getCover() { - return cover; - } - - public void setCover(String cover) { - this.cover = cover; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - } - } - - public static class User { - /** - * list : [{"face":"//i1.hdslb.com/bfs/face/a1b248975dcc42dec34c9b097c5ce3b1b4d6f7bb.jpg","name":"聆听の音乐","live_status":1,"areaName":"放映厅","fansNum":165,"roomTags":["洛天依","天依音悦台","天依"],"roomid":4355580},{"face":"//i0.hdslb.com/bfs/face/12156a3a2f014475c8bdd12d3778570f54587563.jpg","name":"满汉全席音乐团队","live_status":0,"areaName":"生活娱乐","fansNum":1569325,"roomTags":["唱歌","音乐","纯男声"],"roomid":55041},{"face":"//i2.hdslb.com/bfs/face/311c0cf25085a795dcf63bea312caa1edbebd9ca.jpg","name":"我是爱音乐的徐梦圆","live_status":0,"areaName":"单机联机","fansNum":368129,"roomTags":["守望先锋"],"roomid":286662},{"face":"//i2.hdslb.com/bfs/face/5773186b159cb3dfdfba6ef5ad7290c67b824a78.jpg","name":"歌者盟音乐","live_status":0,"areaName":"单机游戏","fansNum":141748,"roomTags":[""],"roomid":923438},{"face":"//i0.hdslb.com/bfs/face/8539f20190ffa7a1d337cd96c4e5ec37fc6ad0b1.jpg","name":"趣弹音乐","live_status":0,"areaName":"生活娱乐","fansNum":83258,"roomTags":[""],"roomid":930041},{"face":"//i0.hdslb.com/bfs/face/bd95e148b71c496449ae3e0a92ad17bce963a9a5.jpg","name":"SOE音乐课堂","live_status":0,"areaName":"生活娱乐","fansNum":62832,"roomTags":["声乐培训"],"roomid":285435},{"face":"//i2.hdslb.com/bfs/face/9fa8bcb0ef1843a585a47fbc73eb02d22dcf7e10.jpg","name":"养心音乐","live_status":0,"areaName":"单机游戏","fansNum":57998,"roomTags":[""],"roomid":4238998},{"face":"//i2.hdslb.com/bfs/face/1540e9eb03abef032a1315327130505d12ef0af3.jpg","name":"馒头音乐","live_status":0,"areaName":"单机游戏","fansNum":55741,"roomTags":[""],"roomid":1357493},{"face":"//i2.hdslb.com/bfs/face/6563b8eea46d7c51d2f58346501637a4e3e1b406.jpg","name":"古风音乐会","live_status":0,"areaName":"单机游戏","fansNum":54934,"roomTags":[""],"roomid":214816},{"face":"//i0.hdslb.com/bfs/face/70caba75dc7c635a0553b2ac4d0b82e55b28829b.jpg","name":"嗨的国风音乐","live_status":0,"areaName":"唱见舞见","fansNum":52707,"roomTags":["古琴"],"roomid":3214656},{"face":"//i2.hdslb.com/bfs/face/904f9263c5a28743977af9139962304d2eb5143e.jpg","name":"白熊音乐Ukulele","live_status":0,"areaName":"单机游戏","fansNum":47957,"roomTags":[""],"roomid":2852510},{"face":"//i1.hdslb.com/bfs/face/255bd6d66d2e0f03603b37e7f1d9bdc86cd38abc.jpg","name":"不要音乐","live_status":0,"areaName":"单机游戏","fansNum":39059,"roomTags":[""],"roomid":1216095},{"face":"//i1.hdslb.com/bfs/face/ea674e951d97d05d1d228660004e8c14d2f046cc.jpg","name":"亮声音乐","live_status":0,"areaName":"单机游戏","fansNum":38554,"roomTags":[""],"roomid":4959493},{"face":"//i2.hdslb.com/bfs/face/9d299e94dc1834353fea7d5f0a5ecb5b1f4d575c.jpg","name":"音乐学霸哥e","live_status":0,"areaName":"单机游戏","fansNum":35614,"roomTags":[""],"roomid":947738},{"face":"//i0.hdslb.com/bfs/face/371b13b4831c1e1b0999989f270c36922bff3d05.jpg","name":"迷因爱音乐","live_status":0,"areaName":"放映厅","fansNum":33092,"roomTags":["电音"],"roomid":3971679},{"face":"//i0.hdslb.com/bfs/face/63175628b06158ceefe8f329ff0761cf28038304.jpg","name":"鸾凤鸣原创音乐","live_status":0,"areaName":"单机游戏","fansNum":27338,"roomTags":[""],"roomid":677243},{"face":"//i2.hdslb.com/bfs/face/4c09fba674efbeeb97cf6219428d66d8b58ae978.jpg","name":"音乐大爆炸-老赵LD","live_status":0,"areaName":"单机联机","fansNum":23997,"roomTags":[""],"roomid":741247},{"face":"//i2.hdslb.com/bfs/face/e22a63b0cf7afd74076fb6214f80bd8528ce8b5b.jpg","name":"音乐人网","live_status":0,"areaName":"生活娱乐","fansNum":22164,"roomTags":["教学","编曲","混音","后期","音乐制作"],"roomid":93751},{"face":"//i2.hdslb.com/bfs/face/bb06e15a84a2f52b0eca3b56260e6b7af3af95a9.jpg","name":"MikaiMusic未开封音乐","live_status":0,"areaName":"单机游戏","fansNum":21813,"roomTags":[""],"roomid":5379747},{"face":"//i0.hdslb.com/bfs/face/d17ddb244a783fa8179c362209080c48716beebf.jpg","name":"唯一音乐小魔王","live_status":0,"areaName":"单机游戏","fansNum":21317,"roomTags":[""],"roomid":9020709}] - * total_user : 1000 - * total_page : 50 - */ - - @SerializedName("total_user") - private long totalUser; - @SerializedName("total_page") - private long totalPage; - @SerializedName("list") - private List<UserData> list; - - public long getTotalUser() { - return totalUser; - } - - public void setTotalUser(long totalUser) { - this.totalUser = totalUser; - } - - public long getTotalPage() { - return totalPage; - } - - public void setTotalPage(long totalPage) { - this.totalPage = totalPage; - } - - public List<UserData> getList() { - return list; - } - - public void setList(List<UserData> list) { - this.list = list; - } - - public static class UserData { - /** - * face : //i1.hdslb.com/bfs/face/a1b248975dcc42dec34c9b097c5ce3b1b4d6f7bb.jpg - * name : 聆听の音乐 - * live_status : 1 - * areaName : 放映厅 - * fansNum : 165 - * roomTags : ["洛天依","天依音悦台","天依"] - * roomid : 4355580 - */ - - @SerializedName("face") - private String face; - @SerializedName("name") - private String name; - @SerializedName("live_status") - private int liveStatus; - @SerializedName("areaName") - private String areaName; - @SerializedName("fansNum") - private long fansNum; - @SerializedName("roomid") - private long roomId; - @SerializedName("roomTags") - private List<String> roomTags; - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getLiveStatus() { - return liveStatus; - } - - public void setLiveStatus(int liveStatus) { - this.liveStatus = liveStatus; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public long getFansNum() { - return fansNum; - } - - public void setFansNum(long fansNum) { - this.fansNum = fansNum; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public List<String> getRoomTags() { - return roomTags; - } - - public void setRoomTags(List<String> roomTags) { - this.roomTags = roomTags; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SendBulletScreenResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SendBulletScreenResponseEntity.java deleted file mode 100644 index c23c641..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SendBulletScreenResponseEntity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SendBulletScreenResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : - * data : [] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<JsonElement> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<JsonElement> getData() { - return data; - } - - public void setData(List<JsonElement> data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SendDailyResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SendDailyResponseEntity.java deleted file mode 100644 index 0941249..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SendDailyResponseEntity.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class SendDailyResponseEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : {"result":2} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * result : 2 - */ - - @SerializedName("result") - private int result; - - public int getResult() { - return result; - } - - public void setResult(int result) { - this.result = result; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SendGiftResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SendGiftResponseEntity.java deleted file mode 100644 index 6e48512..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SendGiftResponseEntity.java +++ /dev/null @@ -1,671 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SendGiftResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : {"silver":"2696","gold":"0","data":{"giftName":"辣条","num":1,"uname":"czp3009","rcost":31134,"uid":20293030,"top_list":[{"uid":20293030,"uname":"czp3009","coin":25100,"face":"http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","guard_level":0,"rank":1,"score":25100},{"uid":19946822,"uname":"罗非鱼追上来了","coin":8000,"face":"http://i2.hdslb.com/bfs/face/e71031a931125617fad2c148213381bb6e0e9f26.jpg","guard_level":0,"rank":2,"score":8000},{"uid":8353249,"uname":"TcCoke","coin":3500,"face":"http://i2.hdslb.com/bfs/face/7c3c131f89380db0046024d1a903d3a6e4dc6128.jpg","guard_level":0,"rank":3,"score":3500}],"timestamp":1509972225,"giftId":1,"giftType":0,"action":"喂食","super":0,"price":100,"rnd":"1430788195","newMedal":0,"newTitle":0,"medal":[],"title":"","beatId":0,"biz_source":"live","metadata":"","remain":1,"gold":0,"silver":0,"eventScore":0,"eventNum":0,"smalltv_msg":[],"specialGift":null,"notice_msg":[],"capsule":{"normal":{"coin":10,"change":0,"progress":{"now":2900,"max":10000}},"colorful":{"coin":0,"change":0,"progress":{"now":0,"max":5000}}},"addFollow":0},"remain":1} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * silver : 2696 - * gold : 0 - * data : {"giftName":"辣条","num":1,"uname":"czp3009","rcost":31134,"uid":20293030,"top_list":[{"uid":20293030,"uname":"czp3009","coin":25100,"face":"http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","guard_level":0,"rank":1,"score":25100},{"uid":19946822,"uname":"罗非鱼追上来了","coin":8000,"face":"http://i2.hdslb.com/bfs/face/e71031a931125617fad2c148213381bb6e0e9f26.jpg","guard_level":0,"rank":2,"score":8000},{"uid":8353249,"uname":"TcCoke","coin":3500,"face":"http://i2.hdslb.com/bfs/face/7c3c131f89380db0046024d1a903d3a6e4dc6128.jpg","guard_level":0,"rank":3,"score":3500}],"timestamp":1509972225,"giftId":1,"giftType":0,"action":"喂食","super":0,"price":100,"rnd":"1430788195","newMedal":0,"newTitle":0,"medal":[],"title":"","beatId":0,"biz_source":"live","metadata":"","remain":1,"gold":0,"silver":0,"eventScore":0,"eventNum":0,"smalltv_msg":[],"specialGift":null,"notice_msg":[],"capsule":{"normal":{"coin":10,"change":0,"progress":{"now":2900,"max":10000}},"colorful":{"coin":0,"change":0,"progress":{"now":0,"max":5000}}},"addFollow":0} - * remain : 1 - */ - - @SerializedName("silver") - private String silver; - @SerializedName("gold") - private String gold; - @SerializedName("data") - private DataX dataX; - @SerializedName("remain") - private int remain; - - public String getSilver() { - return silver; - } - - public void setSilver(String silver) { - this.silver = silver; - } - - public String getGold() { - return gold; - } - - public void setGold(String gold) { - this.gold = gold; - } - - public DataX getDataX() { - return dataX; - } - - public void setDataX(DataX dataX) { - this.dataX = dataX; - } - - public int getRemain() { - return remain; - } - - public void setRemain(int remain) { - this.remain = remain; - } - - public static class DataX { - /** - * giftName : 辣条 - * num : 1 - * uname : czp3009 - * rcost : 31134 - * uid : 20293030 - * top_list : [{"uid":20293030,"uname":"czp3009","coin":25100,"face":"http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","guard_level":0,"rank":1,"score":25100},{"uid":19946822,"uname":"罗非鱼追上来了","coin":8000,"face":"http://i2.hdslb.com/bfs/face/e71031a931125617fad2c148213381bb6e0e9f26.jpg","guard_level":0,"rank":2,"score":8000},{"uid":8353249,"uname":"TcCoke","coin":3500,"face":"http://i2.hdslb.com/bfs/face/7c3c131f89380db0046024d1a903d3a6e4dc6128.jpg","guard_level":0,"rank":3,"score":3500}] - * timestamp : 1509972225 - * giftId : 1 - * giftType : 0 - * action : 喂食 - * super : 0 - * price : 100 - * rnd : 1430788195 - * newMedal : 0 - * newTitle : 0 - * medal : [] - * title : - * beatId : 0 - * biz_source : live - * metadata : - * remain : 1 - * gold : 0 - * silver : 0 - * eventScore : 0 - * eventNum : 0 - * smalltv_msg : [] - * specialGift : null - * notice_msg : [] - * capsule : {"normal":{"coin":10,"change":0,"progress":{"now":2900,"max":10000}},"colorful":{"coin":0,"change":0,"progress":{"now":0,"max":5000}}} - * addFollow : 0 - */ - - @SerializedName("giftName") - private String giftName; - @SerializedName("num") - private int num; - @SerializedName("uname") - private String username; - @SerializedName("rcost") - private int roomCost; - @SerializedName("uid") - private int uid; - @SerializedName("timestamp") - private long timestamp; - @SerializedName("giftId") - private int giftId; - @SerializedName("giftType") - private int giftType; - @SerializedName("action") - private String action; - @SerializedName("super") - private int superX; - @SerializedName("price") - private int price; - @SerializedName("rnd") - private String rnd; - @SerializedName("newMedal") - private int newMedal; - @SerializedName("newTitle") - private int newTitle; - @SerializedName("title") - private String title; - @SerializedName("beatId") - private int beatId; - @SerializedName("biz_source") - private String bizSource; - @SerializedName("metadata") - private String metadata; - @SerializedName("remain") - private int remain; - @SerializedName("gold") - private int gold; - @SerializedName("silver") - private int silver; - @SerializedName("eventScore") - private int eventScore; - @SerializedName("eventNum") - private int eventNum; - @SerializedName("specialGift") - private JsonElement specialGift; - @SerializedName("capsule") - private Capsule capsule; - @SerializedName("addFollow") - private int addFollow; - @SerializedName("top_list") - private List<TopListData> topList; - /** - * medal 可能是空的 JsonArray, 也可能是一个 JsonObject - */ - @SerializedName("medal") - private JsonElement medal; - @SerializedName("smalltv_msg") - private JsonElement smallTvMsg; - @SerializedName("notice_msg") - private JsonElement noticeMsg; - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public int getNum() { - return num; - } - - public void setNum(int num) { - this.num = num; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getRoomCost() { - return roomCost; - } - - public void setRoomCost(int roomCost) { - this.roomCost = roomCost; - } - - public int getUid() { - return uid; - } - - public void setUid(int uid) { - this.uid = uid; - } - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public int getGiftId() { - return giftId; - } - - public void setGiftId(int giftId) { - this.giftId = giftId; - } - - public int getGiftType() { - return giftType; - } - - public void setGiftType(int giftType) { - this.giftType = giftType; - } - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public int getSuperX() { - return superX; - } - - public void setSuperX(int superX) { - this.superX = superX; - } - - public int getPrice() { - return price; - } - - public void setPrice(int price) { - this.price = price; - } - - public String getRnd() { - return rnd; - } - - public void setRnd(String rnd) { - this.rnd = rnd; - } - - public int getNewMedal() { - return newMedal; - } - - public void setNewMedal(int newMedal) { - this.newMedal = newMedal; - } - - public int getNewTitle() { - return newTitle; - } - - public void setNewTitle(int newTitle) { - this.newTitle = newTitle; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public int getBeatId() { - return beatId; - } - - public void setBeatId(int beatId) { - this.beatId = beatId; - } - - public String getBizSource() { - return bizSource; - } - - public void setBizSource(String bizSource) { - this.bizSource = bizSource; - } - - public String getMetadata() { - return metadata; - } - - public void setMetadata(String metadata) { - this.metadata = metadata; - } - - public int getRemain() { - return remain; - } - - public void setRemain(int remain) { - this.remain = remain; - } - - public int getGold() { - return gold; - } - - public void setGold(int gold) { - this.gold = gold; - } - - public int getSilver() { - return silver; - } - - public void setSilver(int silver) { - this.silver = silver; - } - - public int getEventScore() { - return eventScore; - } - - public void setEventScore(int eventScore) { - this.eventScore = eventScore; - } - - public int getEventNum() { - return eventNum; - } - - public void setEventNum(int eventNum) { - this.eventNum = eventNum; - } - - public JsonElement getSpecialGift() { - return specialGift; - } - - public void setSpecialGift(JsonObject specialGift) { - this.specialGift = specialGift; - } - - public Capsule getCapsule() { - return capsule; - } - - public void setCapsule(Capsule capsule) { - this.capsule = capsule; - } - - public int getAddFollow() { - return addFollow; - } - - public void setAddFollow(int addFollow) { - this.addFollow = addFollow; - } - - public List<TopListData> getTopList() { - return topList; - } - - public void setTopList(List<TopListData> topList) { - this.topList = topList; - } - - public JsonElement getMedal() { - return medal; - } - - public void setMedal(JsonElement medal) { - this.medal = medal; - } - - public JsonElement getSmallTvMsg() { - return smallTvMsg; - } - - public void setSmallTvMsg(JsonElement smallTvMsg) { - this.smallTvMsg = smallTvMsg; - } - - public JsonElement getNoticeMsg() { - return noticeMsg; - } - - public void setNoticeMsg(JsonElement noticeMsg) { - this.noticeMsg = noticeMsg; - } - - public static class Capsule { - /** - * normal : {"coin":10,"change":0,"progress":{"now":2900,"max":10000}} - * colorful : {"coin":0,"change":0,"progress":{"now":0,"max":5000}} - */ - - @SerializedName("normal") - private Normal normal; - @SerializedName("colorful") - private Colorful colorful; - - public Normal getNormal() { - return normal; - } - - public void setNormal(Normal normal) { - this.normal = normal; - } - - public Colorful getColorful() { - return colorful; - } - - public void setColorful(Colorful colorful) { - this.colorful = colorful; - } - - public static class Normal { - /** - * coin : 10 - * change : 0 - * progress : {"now":2900,"max":10000} - */ - - @SerializedName("coin") - private int coin; - @SerializedName("change") - private int change; - @SerializedName("progress") - private ProgressEntity progress; - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public int getChange() { - return change; - } - - public void setChange(int change) { - this.change = change; - } - - public ProgressEntity getProgress() { - return progress; - } - - public void setProgress(ProgressEntity progress) { - this.progress = progress; - } - - public static class ProgressEntity { - /** - * now : 2900 - * max : 10000 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - } - - public static class Colorful { - /** - * coin : 0 - * change : 0 - * progress : {"now":0,"max":5000} - */ - - @SerializedName("coin") - private int coin; - @SerializedName("change") - private int change; - @SerializedName("progress") - private ProgressX progress; - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public int getChange() { - return change; - } - - public void setChange(int change) { - this.change = change; - } - - public ProgressX getProgress() { - return progress; - } - - public void setProgress(ProgressX progress) { - this.progress = progress; - } - - public static class ProgressX { - /** - * now : 0 - * max : 5000 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - } - } - - public static class TopListData { - /** - * uid : 20293030 - * uname : czp3009 - * coin : 25100 - * face : http://i0.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg - * guard_level : 0 - * rank : 1 - * score : 25100 - */ - - @SerializedName("uid") - private int uid; - @SerializedName("uname") - private String username; - @SerializedName("coin") - private int coin; - @SerializedName("face") - private String face; - @SerializedName("guard_level") - private int guardLevel; - @SerializedName("rank") - private int rank; - @SerializedName("score") - private int score; - - public int getUid() { - return uid; - } - - public void setUid(int uid) { - this.uid = uid; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - - public int getRank() { - return rank; - } - - public void setRank(int rank) { - this.rank = rank; - } - - public int getScore() { - return score; - } - - public void setScore(int score) { - this.score = score; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SendOnlineHeartResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SendOnlineHeartResponseEntity.java deleted file mode 100644 index 018fde3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SendOnlineHeartResponseEntity.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SendOnlineHeartResponseEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : {"giftlist":[]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - @SerializedName("giftlist") - private List<JsonElement> giftList; - - public List<JsonElement> getGiftList() { - return giftList; - } - - public void setGiftList(List<JsonElement> giftList) { - this.giftList = giftList; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SignInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SignInfoEntity.java deleted file mode 100644 index b4f8b3e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SignInfoEntity.java +++ /dev/null @@ -1,195 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SignInfoEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : {"sign_msg":"今天签到已获得<br /> 辣条<font color='#fea024'>2个<\/font> 经验<font color='#fea024'>3000<\/font> ","maxday_num":30,"sign_day":4,"days_award":[{"id":1,"award":"silver","count":666,"text":"666银瓜子","day":5,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/5_1.png?20171102172700","width":56,"height":68}},{"id":2,"award":"vip","count":3,"text":"3天月费老爷","day":10,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/10_1.png?20171102172700","width":56,"height":68}},{"id":3,"award":"gift","count":4,"text":"1份喵娘","day":20,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/20_1.png?20171102172700","width":56,"height":68}},{"id":4,"award":"title","count":1,"text":"月老头衔","day":30,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/30_1.png?20171102172700","width":56,"height":68}}]} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * sign_msg : 今天签到已获得<br /> 辣条<font color='#fea024'>2个</font> 经验<font color='#fea024'>3000</font>  - * maxday_num : 30 - * sign_day : 4 - * days_award : [{"id":1,"award":"silver","count":666,"text":"666银瓜子","day":5,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/5_1.png?20171102172700","width":56,"height":68}},{"id":2,"award":"vip","count":3,"text":"3天月费老爷","day":10,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/10_1.png?20171102172700","width":56,"height":68}},{"id":3,"award":"gift","count":4,"text":"1份喵娘","day":20,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/20_1.png?20171102172700","width":56,"height":68}},{"id":4,"award":"title","count":1,"text":"月老头衔","day":30,"img":{"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/30_1.png?20171102172700","width":56,"height":68}}] - */ - - @SerializedName("sign_msg") - private String signMsg; - @SerializedName("maxday_num") - private int maxDayNumber; - @SerializedName("sign_day") - private int signDay; - @SerializedName("days_award") - private List<DaysAward> daysAwards; - - public String getSignMsg() { - return signMsg; - } - - public void setSignMsg(String signMsg) { - this.signMsg = signMsg; - } - - public int getMaxDayNumber() { - return maxDayNumber; - } - - public void setMaxDayNumber(int maxDayNumber) { - this.maxDayNumber = maxDayNumber; - } - - public int getSignDay() { - return signDay; - } - - public void setSignDay(int signDay) { - this.signDay = signDay; - } - - public List<DaysAward> getDaysAwards() { - return daysAwards; - } - - public void setDaysAwards(List<DaysAward> daysAwards) { - this.daysAwards = daysAwards; - } - - public static class DaysAward { - /** - * id : 1 - * award : silver - * count : 666 - * text : 666银瓜子 - * day : 5 - * img : {"src":"http://static.hdslb.com/live-static/live-app/dayaward/1/5_1.png?20171102172700","width":56,"height":68} - */ - - @SerializedName("id") - private int id; - @SerializedName("award") - private String award; - @SerializedName("count") - private int count; - @SerializedName("text") - private String text; - @SerializedName("day") - private int day; - @SerializedName("img") - private Img img; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getAward() { - return award; - } - - public void setAward(String award) { - this.award = award; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public int getDay() { - return day; - } - - public void setDay(int day) { - this.day = day; - } - - public Img getImg() { - return img; - } - - public void setImg(Img img) { - this.img = img; - } - - public static class Img { - /** - * src : http://static.hdslb.com/live-static/live-app/dayaward/1/5_1.png?20171102172700 - * width : 56 - * height : 68 - */ - - @SerializedName("src") - private String src; - @SerializedName("width") - private int width; - @SerializedName("height") - private int height; - - public String getSrc() { - return src; - } - - public void setSrc(String src) { - this.src = src; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/Silver2CoinResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/Silver2CoinResponseEntity.java deleted file mode 100644 index 8b2a9a9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/Silver2CoinResponseEntity.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class Silver2CoinResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : 兑换成功 - * message : 兑换成功 - * data : {"silver":"22494","gold":"0","tid":"e32cb3fc6bca9a7dff343469b1ff981f2123","coin":1} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * silver : 22494 - * gold : 0 - * tid : e32cb3fc6bca9a7dff343469b1ff981f2123 - * coin : 1 - */ - - @SerializedName("silver") - private String silver; - @SerializedName("gold") - private String gold; - @SerializedName("tid") - private String tid; - @SerializedName("coin") - private int coin; - - public String getSilver() { - return silver; - } - - public void setSilver(String silver) { - this.silver = silver; - } - - public String getGold() { - return gold; - } - - public void setGold(String gold) { - this.gold = gold; - } - - public String getTid() { - return tid; - } - - public void setTid(String tid) { - this.tid = tid; - } - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/SpecialGiftEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/SpecialGiftEntity.java deleted file mode 100644 index e20c10a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/SpecialGiftEntity.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.annotations.SerializedName; - -public class SpecialGiftEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * msg : OK - * data : {"gift39":null} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * gift39 : null - */ - - @SerializedName("gift39") - private JsonElement gift39; - - public JsonElement getGift39() { - return gift39; - } - - public void setGift39(JsonObject gift39) { - this.gift39 = gift39; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/TitlesEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/TitlesEntity.java deleted file mode 100644 index b6a79e3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/TitlesEntity.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class TitlesEntity extends ResponseEntity { - /** - * code : 0 - * message : ok - * data : [{"id":"task-color","title":"姹紫嫣红成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-color.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"task-year","title":"度年如日成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-year.png?20171102172700","width":186,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"task-winder","title":"追云逐月成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-winder.png?20171102172700","width":191,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"task-ul-max","title":"方得始终成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-ul-max.png?20171102172700","width":194,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"task-up-max","title":"久负盛名成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-up-max.png?20171102172700","width":190,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"task-tv-king","title":"电视王成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-tv-king.png?20171102172700","width":165,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"task-rich-man","title":"富甲天下成就","img":"http://static.hdslb.com/live-static/live-app/title/3/task-rich-man.png?20171102172700","width":156,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"christmas-top1","title":"2015年圣诞节","img":"http://static.hdslb.com/live-static/live-app/title/3/christmas-top1.png?20171102172700","width":198,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"christmas-top2","title":"2015年圣诞节","img":"http://static.hdslb.com/live-static/live-app/title/3/christmas-top2.png?20171102172700","width":198,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"old-man","title":"2015年圣诞节","img":"http://static.hdslb.com/live-static/live-app/title/3/old-man.png?20171102172700","width":135,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"middle-man","title":"2015年圣诞节","img":"http://static.hdslb.com/live-static/live-app/title/3/middle-man.png?20171102172700","width":164,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"youth-man","title":"2015年圣诞节","img":"http://static.hdslb.com/live-static/live-app/title/3/youth-man.png?20171102172700","width":133,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"child-man","title":"2015年圣诞节","img":"http://static.hdslb.com/live-static/live-app/title/3/child-man.png?20171102172700","width":166,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"festival-top1","title":"春节年糕活动","img":"http://static.hdslb.com/live-static/live-app/title/3/festival-top1.png?20171102172700","width":183,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"festival-top2","title":"春节年糕活动","img":"http://static.hdslb.com/live-static/live-app/title/3/festival-top2.png?20171102172700","width":169,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"cake-dough","title":"春节年糕活动","img":"http://static.hdslb.com/live-static/live-app/title/3/cake-dough.png?20171102172700","width":185,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"cake-flour","title":"春节年糕活动","img":"http://static.hdslb.com/live-static/live-app/title/3/cake-flour.png?20171102172700","width":183,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"carnival-top","title":"冬季嘉年华","img":"http://static.hdslb.com/live-static/live-app/title/3/carnival-top.png?20171102172700","width":177,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"school-top1","title":"保卫学园计划","img":"http://static.hdslb.com/live-static/live-app/title/3/school-top1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"school-top2","title":"保卫学园计划","img":"http://static.hdslb.com/live-static/live-app/title/3/school-top2.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"school-top3","title":"保卫学园计划","img":"http://static.hdslb.com/live-static/live-app/title/3/school-top3.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"school-top4","title":"保卫学园计划","img":"http://static.hdslb.com/live-static/live-app/title/3/school-top4.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"school-top5","title":"保卫学园计划","img":"http://static.hdslb.com/live-static/live-app/title/3/school-top5.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sweet-1","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sweet-2","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-2.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sweet-3","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-3.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sweet-4","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-4.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sweet-5","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-5.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sing-1","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sing-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sing-2","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sing-2.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sing-3","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sing-3.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sing-4","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sing-4.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sing-5","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/sing-5.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"warrior-1","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/warrior-1.png?20171102172700","width":193,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"warrior-2","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/warrior-2.png?20171102172700","width":195,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"warrior-3","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/warrior-3.png?20171102172700","width":191,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"warrior-4","title":"唱见甜心召集令","img":"http://static.hdslb.com/live-static/live-app/title/3/warrior-4.png?20171102172700","width":192,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sign-one-month","title":"签到全勤奖励","img":"http://static.hdslb.com/live-static/live-app/title/3/sign-one-month.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"may-spinach","title":"五月病活动","img":"http://static.hdslb.com/live-static/live-app/title/3/may-spinach.png?20171102172700","width":161,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"may-pillow","title":"五月病活动","img":"http://static.hdslb.com/live-static/live-app/title/3/may-pillow.png?20171102172700","width":161,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"may-high","title":"五月病活动","img":"http://static.hdslb.com/live-static/live-app/title/3/may-high.png?20171102172700","width":185,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"may-sleep","title":"五月病活动","img":"http://static.hdslb.com/live-static/live-app/title/3/may-sleep.png?20171102172700","width":185,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"xiaomi","title":"小米MAX活动","img":"http://static.hdslb.com/live-static/live-app/title/3/xiaomi.png?20171102172700","width":174,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"salty","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/salty.png?20171102172700","width":160,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"salty-man","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/salty-man.png?20171102172700","width":197,"height":50,"is_lihui":1,"lihui_img":"http://static.hdslb.com/live-static/live-app/titlie_lihui/3/salty-man.png?20171102172700","lihui_width":400,"lihui_height":564},{"id":"salty-king","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/salty-king.png?20171102172700","width":192,"height":50,"is_lihui":1,"lihui_img":"http://static.hdslb.com/live-static/live-app/titlie_lihui/3/salty-king.png?20171102172700","lihui_width":400,"lihui_height":564},{"id":"salty-sweet","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/salty-sweet.png?20171102172700","width":197,"height":50,"is_lihui":1,"lihui_img":"http://static.hdslb.com/live-static/live-app/titlie_lihui/3/salty-sweet.png?20171102172700","lihui_width":400,"lihui_height":564},{"id":"sweet","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet.png?20171102172700","width":160,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"sweet-fighter","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-fighter.png?20171102172700","width":197,"height":50,"is_lihui":1,"lihui_img":"http://static.hdslb.com/live-static/live-app/titlie_lihui/3/sweet-fighter.png?20171102172700","lihui_width":400,"lihui_height":564},{"id":"sweet-princess","title":"2016年端午节","img":"http://static.hdslb.com/live-static/live-app/title/3/sweet-princess.png?20171102172700","width":192,"height":50,"is_lihui":1,"lihui_img":"http://static.hdslb.com/live-static/live-app/titlie_lihui/3/sweet-princess.png?20171102172700","lihui_width":400,"lihui_height":564},{"id":"anniversary","title":"七周年活动","img":"http://static.hdslb.com/live-static/live-app/title/3/anniversary.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"ice-dust","title":"2016夏色活动","img":"http://static.hdslb.com/live-static/live-app/title/3/ice-dust.png?20171102172700","width":192,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"ice-zero","title":"2016夏色活动","img":"http://static.hdslb.com/live-static/live-app/title/3/ice-zero.png?20171102172700","width":192,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"da-shen","title":"绘画招募活动","img":"http://static.hdslb.com/live-static/live-app/title/3/da-shen.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"gao-shou","title":"绘画招募活动","img":"http://static.hdslb.com/live-static/live-app/title/3/gao-shou.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"shen-7","title":"绘画招募活动","img":"http://static.hdslb.com/live-static/live-app/title/3/shen-7.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"nuan-xin","title":"绘画招募活动","img":"http://static.hdslb.com/live-static/live-app/title/3/nuan-xin.png?20171102172700","width":187,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"tao-lu","title":"橙光活动","img":"http://static.hdslb.com/live-static/live-app/title/3/tao-lu.png?20171102172700","width":198,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-56-1","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-56-1.png?20171102172700","width":170,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-56-2","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-56-2.png?20171102172700","width":190,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-56-3","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-56-3.png?20171102172700","width":190,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-56-4","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-56-4.png?20171102172700","width":163,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-57-1","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-57-1.png?20171102172700","width":150,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-58-1","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-58-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-59-1","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-59-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-60-1","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-60-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-61-1","title":"2016吃瓜活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-61-1.png?20171102172700","width":185,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-62-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-62-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-63-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-63-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-64-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-64-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-65-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-65-1.png?20171102172700","width":95,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-66-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-66-1.png?20171102172700","width":95,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-67-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-67-1.png?20171102172700","width":95,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-68-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-68-1.png?20171102172700","width":95,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-69-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-69-1.png?20171102172700","width":95,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-70-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-70-1.png?20171102172700","width":124,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-71-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-71-1.png?20171102172700","width":124,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-72-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-72-1.png?20171102172700","width":124,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-73-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-73-1.png?20171102172700","width":124,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-74-1","title":"2016拜年祭主播选拔活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-74-1.png?20171102172700","width":124,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-75-1","title":"2016深空远征活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-75-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-75-2","title":"2016深空远征活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-75-2.png?20171102172700","width":186,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-75-3","title":"2016深空远征活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-75-3.png?20171102172700","width":190,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-76-1","title":"2016深空远征活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-76-1.png?20171102172700","width":104,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-77-1","title":"2016红叶祭活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-77-1.png?20171102172700","width":185,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-78-1","title":"2016双11活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-78-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-79-1","title":"2016双11活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-79-1.png?20171102172700","width":190,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-80-1","title":"Last Order活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-80-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-81-1","title":"Last Order活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-81-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-82-1","title":"Last Order活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-82-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-82-2","title":"Last Order活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-82-2.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-82-3","title":"Last Order活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-82-3.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-83-1","title":"2016年度回馈活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-83-1.png?20171102172700","width":103,"height":49,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-84-1","title":"2016年度回馈活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-84-1.png?20171102172700","width":143,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-85-1","title":"2016年度回馈活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-85-1.png?20171102172700","width":118,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-86-1","title":"2016年度回馈活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-86-1.png?20171102172700","width":107,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-87-1","title":"2016年度回馈活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-87-1.png?20171102172700","width":107,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-88-1","title":"2016年度回馈活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-88-1.png?20171102172700","width":111,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-89-1","title":"丁酉年春节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-89-1.png?20171102172700","width":103,"height":49,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-89-2","title":"丁酉年春节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-89-2-2.png?20171102172700","width":103,"height":49,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-89-2-2","title":"丁酉年春节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-89-2-2.png?20171102172700","width":105,"height":49,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-90-1","title":"丁酉年春节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-90-1.png?20171102172700","width":156,"height":43,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-91-1","title":"丁酉年春节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-91-1.png?20171102172700","width":139,"height":44,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-92-1","title":"丁酉年春节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-92-1.png?20171102172700","width":129,"height":41,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-93-1","title":"2017情人节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-93-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-94-1","title":"2017情人节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-94-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-95-1","title":"2017情人节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-95-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-95-2","title":"2017情人节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-95-2.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-96-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-96-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-97-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-97-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-98-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-98-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-99-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-99-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-100-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-100-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-101-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-101-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-102-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-102-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-103-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-103-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-104-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-104-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-105-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-105-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-106-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-106-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-107-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-107-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-108-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-108-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-108-2","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-108-2.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-109-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-109-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-110-1","title":"2017超次元文明演武","img":"http://static.hdslb.com/live-static/live-app/title/3/title-110-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-111-1","title":"2017Blink","img":"http://static.hdslb.com/live-static/live-app/title/3/title-111-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-112-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-112-1.png?20171102172700","width":192,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-113-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-113-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-114-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-114-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-115-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-115-1.png?20171102172700","width":180,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-116-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-116-1.png?20171102172700","width":193,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-117-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-117-1.png?20171102172700","width":195,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-118-1","title":"新主播招募","img":"http://static.hdslb.com/live-static/live-app/title/3/title-118-1.png?20171102172700","width":191,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-119-1","title":"2017排行榜","img":"http://static.hdslb.com/live-static/live-app/title/3/title-119-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-120-1","title":"友爱社头衔","img":"http://static.hdslb.com/live-static/live-app/title/3/title-120-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-121-1","title":"友爱社头衔","img":"http://static.hdslb.com/live-static/live-app/title/3/title-121-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-122-1","title":"友爱社头衔","img":"http://static.hdslb.com/live-static/live-app/title/3/title-122-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-123-1","title":"友爱社头衔","img":"http://static.hdslb.com/live-static/live-app/title/3/title-123-1.png?20171102172700","width":194,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-123-2","title":"友爱社头衔","img":"http://static.hdslb.com/live-static/live-app/title/3/title-123-2.png?20171102172700","width":191,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-124-1","title":"儿童节活动","img":"http://static.hdslb.com/live-static/live-app/title/3/title-124-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-125-1","title":"聊天概率掉落","img":"http://static.hdslb.com/live-static/live-app/title/3/title-125-1.png?20171102172700","width":196,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-126-1","title":"夏日大作战","img":"http://static.hdslb.com/live-static/live-app/title/3/title-126-1.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-126-2","title":"夏日大作战","img":"http://static.hdslb.com/live-static/live-app/title/3/title-126-2.png?20171102172700","width":200,"height":50,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-127-1","title":"开学季","img":"http://static.hdslb.com/live-static/live-app/title/3/title-127-1.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-127-2","title":"开学季","img":"http://static.hdslb.com/live-static/live-app/title/3/title-127-2.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-128-1","title":"国庆","img":"http://static.hdslb.com/live-static/live-app/title/3/title-128-1.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-128-2","title":"国庆","img":"http://static.hdslb.com/live-static/live-app/title/3/title-128-2.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-129-1","title":"中秋节","img":"http://static.hdslb.com/live-static/live-app/title/3/title-129-1.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-130-1","title":"中秋节","img":"http://static.hdslb.com/live-static/live-app/title/3/title-130-1.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-131-1","title":"哔哩谷物语","img":"http://static.hdslb.com/live-static/live-app/title/3/title-131-1.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-131-2","title":"哔哩谷物语","img":"http://static.hdslb.com/live-static/live-app/title/3/title-131-2.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},{"id":"title-133-1","title":"秋叶祭","img":"http://static.hdslb.com/live-static/live-app/title/3/title-133-1.png?20171102172700","width":68,"height":20,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0}] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<Title> titles; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<Title> getTitles() { - return titles; - } - - public void setTitles(List<Title> titles) { - this.titles = titles; - } - - public static class Title { - /** - * id : task-color - * title : 姹紫嫣红成就 - * img : http://static.hdslb.com/live-static/live-app/title/3/task-color.png?20171102172700 - * width : 200 - * height : 50 - * is_lihui : 0 - * lihui_img : - * lihui_width : 0 - * lihui_height : 0 - */ - - @SerializedName("id") - private String id; - @SerializedName("title") - private String title; - @SerializedName("img") - private String img; - @SerializedName("width") - private int width; - @SerializedName("height") - private int height; - @SerializedName("is_lihui") - private int isLiHui; - @SerializedName("lihui_img") - private String liHuiImg; - @SerializedName("lihui_width") - private int liHuiWidth; - @SerializedName("lihui_height") - private int liHuiHeight; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getIsLiHui() { - return isLiHui; - } - - public void setIsLiHui(int isLiHui) { - this.isLiHui = isLiHui; - } - - public String getLiHuiImg() { - return liHuiImg; - } - - public void setLiHuiImg(String liHuiImg) { - this.liHuiImg = liHuiImg; - } - - public int getLiHuiWidth() { - return liHuiWidth; - } - - public void setLiHuiWidth(int liHuiWidth) { - this.liHuiWidth = liHuiWidth; - } - - public int getLiHuiHeight() { - return liHuiHeight; - } - - public void setLiHuiHeight(int liHuiHeight) { - this.liHuiHeight = liHuiHeight; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/UserInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/UserInfoEntity.java deleted file mode 100644 index d2e2042..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/UserInfoEntity.java +++ /dev/null @@ -1,271 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class UserInfoEntity extends ResponseEntity { - /** - * code : 0 - * msg : OK - * message : OK - * data : {"silver":129890,"gold":16102,"medal":{"medal_name":"欧皇","level":3,"color":6406234,"medal_color":6406234},"vip":1,"svip":1,"svip_time":"2019-02-09 11:03:54","vip_time":"2019-02-09 11:03:54","wearTitle":{"title":"title-111-1","activity":"bilibili Link"},"isSign":0,"user_level":22,"user_level_color":5805790,"room_id":29434,"use_count":0,"vip_view_status":1} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * silver : 129890 - * gold : 16102 - * medal : {"medal_name":"欧皇","level":3,"color":6406234,"medal_color":6406234} - * vip : 1 - * svip : 1 - * svip_time : 2019-02-09 11:03:54 - * vip_time : 2019-02-09 11:03:54 - * wearTitle : {"title":"title-111-1","activity":"bilibili Link"} - * isSign : 0 - * user_level : 22 - * user_level_color : 5805790 - * room_id : 29434 - * use_count : 0 - * vip_view_status : 1 - */ - - @SerializedName("silver") - private int silver; - @SerializedName("gold") - private int gold; - @SerializedName("medal") - private Medal medal; - @SerializedName("vip") - private int vip; - @SerializedName("svip") - private int svip; - @SerializedName("svip_time") - private String svipTime; - @SerializedName("vip_time") - private String vipTime; - @SerializedName("wearTitle") - private WearTitle wearTitle; - @SerializedName("isSign") - private boolean isSign; - @SerializedName("user_level") - private int userLevel; - @SerializedName("user_level_color") - private int userLevelColor; - @SerializedName("room_id") - private int roomId; - @SerializedName("use_count") - private int useCount; - @SerializedName("vip_view_status") - private int vipViewStatus; - - public int getSilver() { - return silver; - } - - public void setSilver(int silver) { - this.silver = silver; - } - - public int getGold() { - return gold; - } - - public void setGold(int gold) { - this.gold = gold; - } - - public Medal getMedal() { - return medal; - } - - public void setMedal(Medal medal) { - this.medal = medal; - } - - public int getVip() { - return vip; - } - - public void setVip(int vip) { - this.vip = vip; - } - - public int getSvip() { - return svip; - } - - public void setSvip(int svip) { - this.svip = svip; - } - - public String getSvipTime() { - return svipTime; - } - - public void setSvipTime(String svipTime) { - this.svipTime = svipTime; - } - - public String getVipTime() { - return vipTime; - } - - public void setVipTime(String vipTime) { - this.vipTime = vipTime; - } - - public WearTitle getWearTitle() { - return wearTitle; - } - - public void setWearTitle(WearTitle wearTitle) { - this.wearTitle = wearTitle; - } - - public boolean isIsSign() { - return isSign; - } - - public void setIsSign(boolean isSign) { - this.isSign = isSign; - } - - public int getUserLevel() { - return userLevel; - } - - public void setUserLevel(int userLevel) { - this.userLevel = userLevel; - } - - public int getUserLevelColor() { - return userLevelColor; - } - - public void setUserLevelColor(int userLevelColor) { - this.userLevelColor = userLevelColor; - } - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getUseCount() { - return useCount; - } - - public void setUseCount(int useCount) { - this.useCount = useCount; - } - - public int getVipViewStatus() { - return vipViewStatus; - } - - public void setVipViewStatus(int vipViewStatus) { - this.vipViewStatus = vipViewStatus; - } - - public static class Medal { - /** - * medal_name : 欧皇 - * level : 3 - * color : 6406234 - * medal_color : 6406234 - */ - - @SerializedName("medal_name") - private String medalName; - @SerializedName("level") - private int level; - @SerializedName("color") - private int color; - @SerializedName("medal_color") - private int medalColor; - - public String getMedalName() { - return medalName; - } - - public void setMedalName(String medalName) { - this.medalName = medalName; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - public int getColor() { - return color; - } - - public void setColor(int color) { - this.color = color; - } - - public int getMedalColor() { - return medalColor; - } - - public void setMedalColor(int medalColor) { - this.medalColor = medalColor; - } - } - - public static class WearTitle { - /** - * title : title-111-1 - * activity : bilibili Link - */ - - @SerializedName("title") - private String title; - @SerializedName("activity") - private String activity; - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getActivity() { - return activity; - } - - public void setActivity(String activity) { - this.activity = activity; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/UserTasksEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/UserTasksEntity.java deleted file mode 100644 index 9eb7895..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/UserTasksEntity.java +++ /dev/null @@ -1,458 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class UserTasksEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : {"share_info":{"task_id":"share_task","share_count":0,"progress":{"now":0,"max":1},"status":0,"awards":[{"name":"扭蛋币","type":"toycoin","num":5},{"name":"亲密度","type":"intimacy","num":10}]},"watch_info":{"task_id":"single_watch_task","status":0,"progress":{"now":0,"max":1},"awards":[{"name":"银瓜子","type":"silver","num":500}]},"double_watch_info":{"task_id":"double_watch_task","status":2,"web_watch":1,"mobile_watch":1,"progress":{"now":2,"max":2},"awards":[{"name":"银瓜子","type":"silver","num":700},{"name":"友爱金","type":"union_money","num":1000},{"name":"亲密度","type":"intimacy","num":20}]}} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * share_info : {"task_id":"share_task","share_count":0,"progress":{"now":0,"max":1},"status":0,"awards":[{"name":"扭蛋币","type":"toycoin","num":5},{"name":"亲密度","type":"intimacy","num":10}]} - * watch_info : {"task_id":"single_watch_task","status":0,"progress":{"now":0,"max":1},"awards":[{"name":"银瓜子","type":"silver","num":500}]} - * double_watch_info : {"task_id":"double_watch_task","status":2,"web_watch":1,"mobile_watch":1,"progress":{"now":2,"max":2},"awards":[{"name":"银瓜子","type":"silver","num":700},{"name":"友爱金","type":"union_money","num":1000},{"name":"亲密度","type":"intimacy","num":20}]} - */ - - @SerializedName("share_info") - private ShareInfo shareInfo; - @SerializedName("watch_info") - private WatchInfo watchInfo; - @SerializedName("double_watch_info") - private DoubleWatchInfo doubleWatchInfo; - - public ShareInfo getShareInfo() { - return shareInfo; - } - - public void setShareInfo(ShareInfo shareInfo) { - this.shareInfo = shareInfo; - } - - public WatchInfo getWatchInfo() { - return watchInfo; - } - - public void setWatchInfo(WatchInfo watchInfo) { - this.watchInfo = watchInfo; - } - - public DoubleWatchInfo getDoubleWatchInfo() { - return doubleWatchInfo; - } - - public void setDoubleWatchInfo(DoubleWatchInfo doubleWatchInfo) { - this.doubleWatchInfo = doubleWatchInfo; - } - - public static class ShareInfo { - /** - * task_id : share_task - * share_count : 0 - * progress : {"now":0,"max":1} - * status : 0 - * awards : [{"name":"扭蛋币","type":"toycoin","num":5},{"name":"亲密度","type":"intimacy","num":10}] - */ - - @SerializedName("task_id") - private String taskId; - @SerializedName("share_count") - private int shareCount; - @SerializedName("progress") - private Progress progress; - @SerializedName("status") - private int status; - @SerializedName("awards") - private List<Award> awards; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public int getShareCount() { - return shareCount; - } - - public void setShareCount(int shareCount) { - this.shareCount = shareCount; - } - - public Progress getProgress() { - return progress; - } - - public void setProgress(Progress progress) { - this.progress = progress; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public List<Award> getAwards() { - return awards; - } - - public void setAwards(List<Award> awards) { - this.awards = awards; - } - - public static class Progress { - /** - * now : 0 - * max : 1 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - - public static class Award { - /** - * name : 扭蛋币 - * type : toycoin - * num : 5 - */ - - @SerializedName("name") - private String name; - @SerializedName("type") - private String type; - @SerializedName("num") - private int number; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - } - } - - public static class WatchInfo { - /** - * task_id : single_watch_task - * status : 0 - * progress : {"now":0,"max":1} - * awards : [{"name":"银瓜子","type":"silver","num":500}] - */ - - @SerializedName("task_id") - private String taskId; - @SerializedName("status") - private int status; - @SerializedName("progress") - private ProgressX progress; - @SerializedName("awards") - private List<AwardX> awards; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public ProgressX getProgress() { - return progress; - } - - public void setProgress(ProgressX progress) { - this.progress = progress; - } - - public List<AwardX> getAwards() { - return awards; - } - - public void setAwards(List<AwardX> awards) { - this.awards = awards; - } - - public static class ProgressX { - /** - * now : 0 - * max : 1 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - - public static class AwardX { - /** - * name : 银瓜子 - * type : silver - * num : 500 - */ - - @SerializedName("name") - private String name; - @SerializedName("type") - private String type; - @SerializedName("num") - private int number; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - } - } - - public static class DoubleWatchInfo { - /** - * task_id : double_watch_task - * status : 2 - * web_watch : 1 - * mobile_watch : 1 - * progress : {"now":2,"max":2} - * awards : [{"name":"银瓜子","type":"silver","num":700},{"name":"友爱金","type":"union_money","num":1000},{"name":"亲密度","type":"intimacy","num":20}] - */ - - @SerializedName("task_id") - private String taskId; - @SerializedName("status") - private int status; - @SerializedName("web_watch") - private int webWatch; - @SerializedName("mobile_watch") - private int mobileWatch; - @SerializedName("progress") - private ProgressXX progress; - @SerializedName("awards") - private List<AwardXX> awards; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public int getWebWatch() { - return webWatch; - } - - public void setWebWatch(int webWatch) { - this.webWatch = webWatch; - } - - public int getMobileWatch() { - return mobileWatch; - } - - public void setMobileWatch(int mobileWatch) { - this.mobileWatch = mobileWatch; - } - - public ProgressXX getProgress() { - return progress; - } - - public void setProgress(ProgressXX progress) { - this.progress = progress; - } - - public List<AwardXX> getAwards() { - return awards; - } - - public void setAwards(List<AwardXX> awards) { - this.awards = awards; - } - - public static class ProgressXX { - /** - * now : 2 - * max : 2 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - - public static class AwardXX { - /** - * name : 银瓜子 - * type : silver - * num : 700 - */ - - @SerializedName("name") - private String name; - @SerializedName("type") - private String type; - @SerializedName("num") - private int number; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/WearMedalResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/WearMedalResponseEntity.java deleted file mode 100644 index d54b073..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/WearMedalResponseEntity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class WearMedalResponseEntity extends ResponseEntity { - /** - * code : 0 - * message : OK - * data : [] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<JsonElement> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<JsonElement> getData() { - return data; - } - - public void setData(List<JsonElement> data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/WearTitleEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/WearTitleEntity.java deleted file mode 100644 index e660c9d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/WearTitleEntity.java +++ /dev/null @@ -1,433 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class WearTitleEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : {"id":"5940800","uid":"2866663","tid":"111","num":"1","score":"0","create_time":"2017-08-03 21:53:22","expire_time":"0000-00-00 00:00:00","status":"1","level":[0],"category":[{"name":"热门","class":"red"}],"pic":[{"id":"title-111-1","title":"2017Blink","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20180302110600","width":0,"height":0,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0}],"title_pic":{"id":"title-111-1","title":"2017Blink","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20180302110600","width":0,"height":0,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0},"name":"bilibili Link","upgrade_score":1000000} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * id : 5940800 - * uid : 2866663 - * tid : 111 - * num : 1 - * score : 0 - * create_time : 2017-08-03 21:53:22 - * expire_time : 0000-00-00 00:00:00 - * status : 1 - * level : [0] - * category : [{"name":"热门","class":"red"}] - * pic : [{"id":"title-111-1","title":"2017Blink","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20180302110600","width":0,"height":0,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0}] - * title_pic : {"id":"title-111-1","title":"2017Blink","img":"https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20180302110600","width":0,"height":0,"is_lihui":0,"lihui_img":"","lihui_width":0,"lihui_height":0} - * name : bilibili Link - * upgrade_score : 1000000 - */ - - @SerializedName("id") - private String id; - @SerializedName("uid") - private String uid; - @SerializedName("tid") - private String tid; - @SerializedName("num") - private String number; - @SerializedName("score") - private String score; - @SerializedName("create_time") - private String createTime; - @SerializedName("expire_time") - private String expireTime; - @SerializedName("status") - private String status; - @SerializedName("title_pic") - private TitlePic titlePic; - @SerializedName("name") - private String name; - @SerializedName("upgrade_score") - private int upgradeScore; - @SerializedName("level") - private List<Integer> level; - @SerializedName("category") - private List<Category> category; - @SerializedName("pic") - private List<Pic> pic; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getUid() { - return uid; - } - - public void setUid(String uid) { - this.uid = uid; - } - - public String getTid() { - return tid; - } - - public void setTid(String tid) { - this.tid = tid; - } - - public String getNumber() { - return number; - } - - public void setNumber(String number) { - this.number = number; - } - - public String getScore() { - return score; - } - - public void setScore(String score) { - this.score = score; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getExpireTime() { - return expireTime; - } - - public void setExpireTime(String expireTime) { - this.expireTime = expireTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public TitlePic getTitlePic() { - return titlePic; - } - - public void setTitlePic(TitlePic titlePic) { - this.titlePic = titlePic; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getUpgradeScore() { - return upgradeScore; - } - - public void setUpgradeScore(int upgradeScore) { - this.upgradeScore = upgradeScore; - } - - public List<Integer> getLevel() { - return level; - } - - public void setLevel(List<Integer> level) { - this.level = level; - } - - public List<Category> getCategory() { - return category; - } - - public void setCategory(List<Category> category) { - this.category = category; - } - - public List<Pic> getPic() { - return pic; - } - - public void setPic(List<Pic> pic) { - this.pic = pic; - } - - public static class TitlePic { - /** - * id : title-111-1 - * title : 2017Blink - * img : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20180302110600 - * width : 0 - * height : 0 - * is_lihui : 0 - * lihui_img : - * lihui_width : 0 - * lihui_height : 0 - */ - - @SerializedName("id") - private String id; - @SerializedName("title") - private String title; - @SerializedName("img") - private String img; - @SerializedName("width") - private int width; - @SerializedName("height") - private int height; - @SerializedName("is_lihui") - private int isLiHui; - @SerializedName("lihui_img") - private String liHuiImg; - @SerializedName("lihui_width") - private int liHuiWidth; - @SerializedName("lihui_height") - private int liHuiHeight; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getIsLiHui() { - return isLiHui; - } - - public void setIsLiHui(int isLiHui) { - this.isLiHui = isLiHui; - } - - public String getLiHuiImg() { - return liHuiImg; - } - - public void setLiHuiImg(String liHuiImg) { - this.liHuiImg = liHuiImg; - } - - public int getLiHuiWidth() { - return liHuiWidth; - } - - public void setLiHuiWidth(int liHuiWidth) { - this.liHuiWidth = liHuiWidth; - } - - public int getLiHuiHeight() { - return liHuiHeight; - } - - public void setLiHuiHeight(int liHuiHeight) { - this.liHuiHeight = liHuiHeight; - } - } - - public static class Category { - /** - * name : 热门 - * class : red - */ - - @SerializedName("name") - private String name; - @SerializedName("class") - private String classX; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getClassX() { - return classX; - } - - public void setClassX(String classX) { - this.classX = classX; - } - } - - public static class Pic { - /** - * id : title-111-1 - * title : 2017Blink - * img : https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/title-111-1.png?20180302110600 - * width : 0 - * height : 0 - * is_lihui : 0 - * lihui_img : - * lihui_width : 0 - * lihui_height : 0 - */ - - @SerializedName("id") - private String id; - @SerializedName("title") - private String title; - @SerializedName("img") - private String img; - @SerializedName("width") - private int width; - @SerializedName("height") - private int height; - @SerializedName("is_lihui") - private int isLiHui; - @SerializedName("lihui_img") - private String liHuiImg; - @SerializedName("lihui_width") - private int liHuiWidth; - @SerializedName("lihui_height") - private int liHuiHeight; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getImg() { - return img; - } - - public void setImg(String img) { - this.img = img; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getIsLiHui() { - return isLiHui; - } - - public void setIsLiHui(int isLiHui) { - this.isLiHui = isLiHui; - } - - public String getLiHuiImg() { - return liHuiImg; - } - - public void setLiHuiImg(String liHuiImg) { - this.liHuiImg = liHuiImg; - } - - public int getLiHuiWidth() { - return liHuiWidth; - } - - public void setLiHuiWidth(int liHuiWidth) { - this.liHuiWidth = liHuiWidth; - } - - public int getLiHuiHeight() { - return liHuiHeight; - } - - public void setLiHuiHeight(int liHuiHeight) { - this.liHuiHeight = liHuiHeight; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/entity/WearTitleResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/entity/WearTitleResponseEntity.java deleted file mode 100644 index 5ad57a2..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/entity/WearTitleResponseEntity.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.hiczp.bilibili.api.live.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class WearTitleResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : [] - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private List<JsonElement> data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public List<JsonElement> getData() { - return data; - } - - public void setData(List<JsonElement> data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java b/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java deleted file mode 100644 index c96cb55..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java +++ /dev/null @@ -1,247 +0,0 @@ -package com.hiczp.bilibili.api.live.socket; - -import com.google.common.eventbus.EventBus; -import com.hiczp.bilibili.api.live.bulletScreen.BulletScreenConstDefinition; -import com.hiczp.bilibili.api.live.entity.BulletScreenEntity; -import com.hiczp.bilibili.api.live.entity.LiveRoomInfoEntity; -import com.hiczp.bilibili.api.live.entity.SendBulletScreenResponseEntity; -import com.hiczp.bilibili.api.live.socket.codec.PackageDecoder; -import com.hiczp.bilibili.api.live.socket.codec.PackageEncoder; -import com.hiczp.bilibili.api.live.socket.handler.LiveClientHandler; -import com.hiczp.bilibili.api.provider.BilibiliServiceProvider; -import io.netty.bootstrap.Bootstrap; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.socket.SocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.handler.codec.LengthFieldBasedFrameDecoder; -import io.netty.handler.timeout.IdleStateHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import retrofit2.Call; - -import javax.annotation.Nonnull; -import java.io.IOException; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; - -public class LiveClient { - private static final Logger LOGGER = LoggerFactory.getLogger(LiveClient.class); - - private static final String DEFAULT_SERVER_ADDRESS = "livecmt-2.bilibili.com"; - private static final int DEFAULT_SERVER_PORT = 2243; - - private final BilibiliServiceProvider bilibiliServiceProvider; - private final EventLoopGroup eventLoopGroup; - private final long userId; - private Long showRoomId; - private Long realRoomId; - private final EventBus eventBus; - private boolean useRealRoomIdForConstructing; - - private LiveRoomInfoEntity.LiveRoom liveRoom; - - private Channel channel; - - public LiveClient(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, @Nonnull EventLoopGroup eventLoopGroup, long roomId, boolean isRealRoomId, long userId) { - this.bilibiliServiceProvider = bilibiliServiceProvider; - this.eventLoopGroup = eventLoopGroup; - this.useRealRoomIdForConstructing = isRealRoomId; - if (isRealRoomId) { - realRoomId = roomId; - } else { - showRoomId = roomId; - } - this.userId = userId; - this.eventBus = new EventBus(String.format("BilibiliLiveClientEventBus-%s", getShowRoomIdOrRoomId())); - } - - public LiveClient(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, @Nonnull EventLoopGroup eventLoopGroup, long showRoomId, long userId) { - this(bilibiliServiceProvider, eventLoopGroup, showRoomId, false, userId); - } - - public LiveClient(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, @Nonnull EventLoopGroup eventLoopGroup, long roomId, boolean isRealRoomId) { - this(bilibiliServiceProvider, eventLoopGroup, roomId, isRealRoomId, 0); - } - - public LiveClient(@Nonnull BilibiliServiceProvider bilibiliServiceProvider, @Nonnull EventLoopGroup eventLoopGroup, long showRoomId) { - this(bilibiliServiceProvider, eventLoopGroup, showRoomId, false, 0); - } - - public Call<LiveRoomInfoEntity> fetchRoomInfoAsync() { - return bilibiliServiceProvider.getLiveService() - .getRoomInfo(getShowRoomIdOrRoomId()); - } - - public LiveRoomInfoEntity.LiveRoom fetchRoomInfo() throws IOException { - LiveRoomInfoEntity.LiveRoom liveRoom = - fetchRoomInfoAsync() - .execute() - .body() - .getData(); - //此时 code 为 -404 - if (liveRoom != null) { - return liveRoom; - } else { - throw new IllegalArgumentException("Target room " + getShowRoomIdOrRoomId() + " not exists"); - } - } - - public Callable<LiveClient> connectAsync() { - return () -> { - if (channel != null && channel.isActive()) { - LOGGER.warn("Already connected to server, connect method can not be invoked twice"); - return this; - } - if (realRoomId == null) { - if (liveRoom == null) { - LOGGER.debug("Fetching info of live room {}", showRoomId); - liveRoom = fetchRoomInfo(); - LOGGER.debug("Get actual room id {}", liveRoom.getRoomId()); - } - realRoomId = liveRoom.getRoomId(); - } - - LOGGER.debug("Init SocketChannel Bootstrap"); - Bootstrap bootstrap = new Bootstrap() - .group(eventLoopGroup) - .channel(NioSocketChannel.class) - .handler(new ChannelInitializer<SocketChannel>() { - @Override - protected void initChannel(SocketChannel socketChannel) throws Exception { - socketChannel.pipeline() - .addLast(new LengthFieldBasedFrameDecoder( - Integer.MAX_VALUE, - 0, - Package.LENGTH_FIELD_LENGTH, - -Package.LENGTH_FIELD_LENGTH, - 0 - )) - .addLast(new IdleStateHandler(40, 0, 0)) - .addLast(new PackageEncoder()) - .addLast(new PackageDecoder()) - .addLast(new LiveClientHandler(self(), realRoomId, userId)); - } - }); - - String address = liveRoom != null ? liveRoom.getCmt() : DEFAULT_SERVER_ADDRESS; - int port = liveRoom != null ? liveRoom.getCmtPortGoim() : DEFAULT_SERVER_PORT; - LOGGER.debug("Connecting to Bullet Screen server {}:{}", address, port); - try { - channel = bootstrap.connect(address, port) - .sync() - .channel(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (Exception e) { //有可能在此时出现网络错误 - throw new IOException(e); - } - - return this; - }; - } - - public LiveClient connect(ExecutorService executorService) throws InterruptedException, ExecutionException { - Future<LiveClient> future = executorService.submit(connectAsync()); - return future.get(); - } - - public synchronized LiveClient connect() throws Exception { - return connectAsync().call(); - } - - public synchronized ChannelFuture closeChannelAsync() { - if (channel != null) { - LOGGER.debug("Closing connection"); - ChannelFuture channelFuture = channel.close(); - channel = null; - return channelFuture; - } else { - return null; - } - } - - public void closeChannel() { - ChannelFuture channelFuture = closeChannelAsync(); - if (channelFuture != null) { - channelFuture.awaitUninterruptibly(); - } - } - - public EventBus getEventBus() { - return eventBus; - } - - public LiveClient registerListener(@Nonnull Object object) { - eventBus.register(object); - return this; - } - - public LiveClient registerListeners(@Nonnull Iterable<Object> objects) { - objects.forEach(eventBus::register); - return this; - } - - public LiveClient unregisterListener(@Nonnull Object object) { - eventBus.unregister(object); - return this; - } - - public LiveClient unregisterListeners(@Nonnull Iterable<Object> objects) { - objects.forEach(eventBus::unregister); - return this; - } - - //TODO 弹幕发送队列 - - public Call<SendBulletScreenResponseEntity> sendBulletScreenAsync(@Nonnull String message) { - return bilibiliServiceProvider.getLiveService() - .sendBulletScreen(createBulletScreenEntity(message)); - } - - public SendBulletScreenResponseEntity sendBulletScreen(@Nonnull String message) throws IOException { - return sendBulletScreenAsync(message) - .execute() - .body(); - } - - private BulletScreenEntity createBulletScreenEntity(String message) { - return new BulletScreenEntity( - getRoomIdOrShowRoomId(), - userId, - message - ); - } - - public long getUserId() { - return userId; - } - - public long getRoomIdOrShowRoomId() { - return realRoomId != null ? realRoomId : showRoomId; - } - - public long getShowRoomIdOrRoomId() { - return showRoomId != null ? showRoomId : realRoomId; - } - - public int getBulletScreenLengthLimitOrDefaultLengthLimit() { - return liveRoom != null ? liveRoom.getMsgLength() : BulletScreenConstDefinition.DEFAULT_MESSAGE_LENGTH_LIMIT; - } - - public Channel getChannel() { - return channel; - } - - public boolean isUseRealRoomIdForConstructing() { - return useRealRoomIdForConstructing; - } - - private LiveClient self() { - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/Package.java b/src/main/java/com/hiczp/bilibili/api/live/socket/Package.java deleted file mode 100644 index d125cf4..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/Package.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.hiczp.bilibili.api.live.socket; - -/** - * 数据包结构说明 - * 00 00 00 28/00 10/00 00 00 00 00 07/00 00 00 00 - * 1-4 字节: 数据包长度 - * 5-6 字节: 协议头长度, 固定值 0x10 - * 7-8 字节: 设备类型, Android 固定为 0 - * 9-12 字节: 数据包类型 - * 13-16 字节: 设备类型, 同 7-8 字节 - * 之后的字节为数据包正文, 大多数情况下为 JSON - */ -public class Package { - public static final short LENGTH_FIELD_LENGTH = 4; - - private static final short PROTOCOL_HEAD_LENGTH = 16; - - private final int packageLength; - private final short protocolHeadLength; - private final DeviceType shortDeviceType; - private final PackageType packageType; - private final DeviceType longDeviceType; - private final byte[] content; - - public Package(int packageLength, short protocolHeadLength, DeviceType shortDeviceType, PackageType packageType, DeviceType longDeviceType, byte[] content) { - this.packageLength = packageLength; - this.protocolHeadLength = protocolHeadLength; - this.shortDeviceType = shortDeviceType; - this.packageType = packageType; - this.longDeviceType = longDeviceType; - this.content = content; - } - - public Package(PackageType packageType, byte[] content) { - this(PROTOCOL_HEAD_LENGTH + content.length, - PROTOCOL_HEAD_LENGTH, - DeviceType.ANDROID, - packageType, - DeviceType.ANDROID, - content - ); - } - - public int getPackageLength() { - return packageLength; - } - - public short getProtocolHeadLength() { - return protocolHeadLength; - } - - public DeviceType getShortDeviceType() { - return shortDeviceType; - } - - public PackageType getPackageType() { - return packageType; - } - - public DeviceType getLongDeviceType() { - return longDeviceType; - } - - public byte[] getContent() { - return content; - } - - public enum DeviceType { - ANDROID(0x00); - - private final int value; - - DeviceType(int value) { - this.value = value; - } - - public static DeviceType valueOf(int value) { - for (DeviceType deviceType : DeviceType.values()) { - if (deviceType.value == value) { - return deviceType; - } - } - throw new IllegalArgumentException("No matching constant for [" + value + "]"); - } - - public int getValue() { - return value; - } - } - - public enum PackageType { - HEART_BEAT(0x02), - VIEWER_COUNT(0x03), - DATA(0x05), - ENTER_ROOM(0x07), - ENTER_ROOM_SUCCESS(0x08); - - private final int value; - - PackageType(int value) { - this.value = value; - } - - public static PackageType valueOf(int value) { - for (PackageType packageType : PackageType.values()) { - if (packageType.value == value) { - return packageType; - } - } - throw new IllegalArgumentException("No matching constant for [" + value + "]"); - } - - public int getValue() { - return value; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/PackageHelper.java b/src/main/java/com/hiczp/bilibili/api/live/socket/PackageHelper.java deleted file mode 100644 index 04903e6..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/PackageHelper.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hiczp.bilibili.api.live.socket; - -import com.google.gson.Gson; -import com.hiczp.bilibili.api.live.socket.entity.EnterRoomEntity; - -public class PackageHelper { - private static final Gson GSON = new Gson(); - - /** - * 创建一个进房数据包 - * - * @param roomId 房间号 - * @param userId 用户号 - * @return 进房数据包 - */ - public static Package createEnterRoomPackage(long roomId, long userId) { - return new Package( - Package.PackageType.ENTER_ROOM, - GSON.toJson(new EnterRoomEntity(roomId, userId)).getBytes() - ); - } - - /** - * 创建一个心跳包 - * @return 心跳包 - */ - public static Package createHeartBeatPackage() { - return new Package( - Package.PackageType.HEART_BEAT, - new byte[0] - ); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/codec/PackageDecoder.java b/src/main/java/com/hiczp/bilibili/api/live/socket/codec/PackageDecoder.java deleted file mode 100644 index 3bef2b5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/codec/PackageDecoder.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.codec; - -import com.hiczp.bilibili.api.live.socket.Package; -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.ByteToMessageDecoder; - -import java.util.List; - -/** - * 数据包解码器 - */ -public class PackageDecoder extends ByteToMessageDecoder { - @Override - protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { - int packageLength = in.readInt(); - short protocolHeadLength = in.readShort(); - Package.DeviceType shortDeviceType = Package.DeviceType.valueOf(in.readShort()); - Package.PackageType packageType = Package.PackageType.valueOf(in.readInt()); - Package.DeviceType longDeviceType = Package.DeviceType.valueOf(in.readInt()); - byte[] content = new byte[packageLength - protocolHeadLength]; - in.readBytes(content); - - out.add(new Package( - packageLength, - protocolHeadLength, - shortDeviceType, - packageType, - longDeviceType, - content - )); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/codec/PackageEncoder.java b/src/main/java/com/hiczp/bilibili/api/live/socket/codec/PackageEncoder.java deleted file mode 100644 index 31ac924..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/codec/PackageEncoder.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.codec; - -import com.hiczp.bilibili.api.live.socket.Package; -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.MessageToByteEncoder; - -/** - * 数据包编码器 - */ -public class PackageEncoder extends MessageToByteEncoder<Package> { - @Override - protected void encode(ChannelHandlerContext ctx, Package msg, ByteBuf out) throws Exception { - out.writeInt(msg.getPackageLength()) - .writeShort(msg.getProtocolHeadLength()) - .writeShort(msg.getShortDeviceType().getValue()) - .writeInt(msg.getPackageType().getValue()) - .writeInt(msg.getLongDeviceType().getValue()) - .writeBytes(msg.getContent()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ActivityEventEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ActivityEventEntity.java deleted file mode 100644 index 5e14206..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ActivityEventEntity.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class ActivityEventEntity implements DataEntity { - /** - * cmd : ACTIVITY_EVENT - * data : {"keyword":"newspring_2018","type":"cracker","limit":300000,"progress":158912} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * keyword : newspring_2018 - * type : cracker - * limit : 300000 - * progress : 158912 - */ - - @SerializedName("keyword") - private String keyword; - @SerializedName("type") - private String type; - @SerializedName("limit") - private int limit; - @SerializedName("progress") - private int progress; - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } - - public int getProgress() { - return progress; - } - - public void setProgress(int progress) { - this.progress = progress; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ChangeRoomInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ChangeRoomInfoEntity.java deleted file mode 100644 index 41e3078..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ChangeRoomInfoEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class ChangeRoomInfoEntity implements DataEntity { - /** - * cmd : CHANGE_ROOM_INFO - * background : http://static.hdslb.com/live-static/images/bg/4.jpg - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("background") - private String background; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getBackground() { - return background; - } - - public void setBackground(String background) { - this.background = background; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ComboEndEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ComboEndEntity.java deleted file mode 100644 index 312f8fd..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ComboEndEntity.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class ComboEndEntity implements DataEntity { - /** - * cmd : COMBO_END - * data : {"uname":"打死安迷修-雷狮","r_uname":"Jinko_神子","combo_num":1,"price":200,"gift_name":"flag","gift_id":20002,"start_time":1527929335,"end_time":1527929335} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * uname : 打死安迷修-雷狮 - * r_uname : Jinko_神子 - * combo_num : 1 - * price : 200 - * gift_name : flag - * gift_id : 20002 - * start_time : 1527929335 - * end_time : 1527929335 - */ - - @SerializedName("uname") - private String username; - @SerializedName("r_uname") - private String roomUsername; - @SerializedName("combo_num") - private int comboNumber; - @SerializedName("price") - private int price; - @SerializedName("gift_name") - private String giftName; - @SerializedName("gift_id") - private int giftId; - @SerializedName("start_time") - private long startTime; - @SerializedName("end_time") - private long endTime; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getRoomUsername() { - return roomUsername; - } - - public void setRoomUsername(String roomUsername) { - this.roomUsername = roomUsername; - } - - public int getComboNumber() { - return comboNumber; - } - - public void setComboNumber(int comboNumber) { - this.comboNumber = comboNumber; - } - - public int getPrice() { - return price; - } - - public void setPrice(int price) { - this.price = price; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public int getGiftId() { - return giftId; - } - - public void setGiftId(int giftId) { - this.giftId = giftId; - } - - public long getStartTime() { - return startTime; - } - - public void setStartTime(long startTime) { - this.startTime = startTime; - } - - public long getEndTime() { - return endTime; - } - - public void setEndTime(long endTime) { - this.endTime = endTime; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ComboSendEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ComboSendEntity.java deleted file mode 100644 index 6d1b5d0..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/ComboSendEntity.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class ComboSendEntity implements DataEntity { - /** - * cmd : COMBO_SEND - * data : {"uid":33012231,"uname":"我就是讨厌你这样","combo_num":3,"gift_name":"凉了","gift_id":20010,"action":"赠送"} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * uid : 33012231 - * uname : 我就是讨厌你这样 - * combo_num : 3 - * gift_name : 凉了 - * gift_id : 20010 - * action : 赠送 - */ - - @SerializedName("uid") - private long uid; - @SerializedName("uname") - private String userName; - @SerializedName("combo_num") - private int comboNumber; - @SerializedName("gift_name") - private String giftName; - @SerializedName("gift_id") - private int giftId; - @SerializedName("action") - private String action; - - public long getUid() { - return uid; - } - - public void setUid(long uid) { - this.uid = uid; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public int getComboNumber() { - return comboNumber; - } - - public void setComboNumber(int comboNumber) { - this.comboNumber = comboNumber; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public int getGiftId() { - return giftId; - } - - public void setGiftId(int giftId) { - this.giftId = giftId; - } - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/CutOffEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/CutOffEntity.java deleted file mode 100644 index bb56d3c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/CutOffEntity.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class CutOffEntity implements DataEntity { - /** - * cmd : CUT_OFF - * msg : 禁播游戏 - * roomid : 8446134 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("msg") - private String msg; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/DanMuMsgEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/DanMuMsgEntity.java deleted file mode 100644 index 374fced..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/DanMuMsgEntity.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.List; -import java.util.Optional; - -public class DanMuMsgEntity implements DataEntity { - private static final Gson GSON = new Gson(); - private static final Type STRING_LIST_TYPE = new TypeToken<List<String>>() { - }.getType(); - - /** - * info : [[0,1,25,16777215,1520664535,1662637384,0,"88874b7b",0],"czpnb",[15723776,"Dough君",0,0,0,"10000",1,""],[],[10,0,9868950,">50000"],[],0,0,{"uname_color":""}] - * cmd : DANMU_MSG - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("info") - private JsonArray info; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public JsonArray getInfo() { - return info; - } - - public void setInfo(JsonArray info) { - this.info = info; - } - - /** - * 弹幕池 (0 普通 1 字幕 2 特殊) - */ - public int getPool() { - return info.get(0).getAsJsonArray().get(0).getAsInt(); - } - - /** - * 弹幕的模式 (1 普通 4 底端 5 顶端 6 逆向 7 特殊 9 高级) - */ - public int getMode() { - return info.get(0).getAsJsonArray().get(1).getAsInt(); - } - - /** - * 字体大小 - */ - public int getFontSize() { - return info.get(0).getAsJsonArray().get(2).getAsInt(); - } - - /** - * 字体颜色 - */ - public int getColor() { - return info.get(0).getAsJsonArray().get(3).getAsInt(); - } - - /** - * 弹幕发送时间(Unix 时间戳)(其实是服务器接收到弹幕的时间) - */ - public long getSendTime() { - return info.get(0).getAsJsonArray().get(4).getAsInt(); - } - - /** - * 用户进入房间的时间(Unix 时间戳)(但是 Android 发送的弹幕, 这个值会是随机数) - */ - public String getUserEnterTime() { - return info.get(0).getAsJsonArray().get(5).getAsString(); - } - - /** - * 弹幕内容 - */ - public String getMessage() { - return info.get(1).getAsString(); - } - - /** - * 发送者的用户 ID - */ - public long getUserId() { - return info.get(2).getAsJsonArray().get(0).getAsLong(); - } - - /** - * 发送者的用户名 - */ - public String getUsername() { - return info.get(2).getAsJsonArray().get(1).getAsString(); - } - - /** - * 发送者是否是管理员 - */ - public boolean isAdmin() { - return info.get(2).getAsJsonArray().get(2).getAsBoolean(); - } - - /** - * 发送者是否是 VIP - */ - public boolean isVip() { - return info.get(2).getAsJsonArray().get(3).getAsBoolean(); - } - - /** - * 发送者是否是 SVip - */ - public boolean isSVip() { - return info.get(2).getAsJsonArray().get(4).getAsBoolean(); - } - - /** - * 表示粉丝勋章有关信息的 JsonArray 可能是空的 - * 获取粉丝勋章等级 - */ - public Optional<Integer> getFansMedalLevel() { - if (info.get(3).getAsJsonArray().size() > 0) { - return Optional.of(info.get(3).getAsJsonArray().get(0).getAsInt()); - } else { - return Optional.empty(); - } - } - - /** - * 获取粉丝勋章名称 - */ - public Optional<String> getFansMedalName() { - if (info.get(3).getAsJsonArray().size() > 0) { - return Optional.of(info.get(3).getAsJsonArray().get(1).getAsString()); - } else { - return Optional.empty(); - } - } - - /** - * 粉丝勋章对应的主播的名字 - */ - public Optional<String> getFansMedalOwnerName() { - if (info.get(3).getAsJsonArray().size() > 0) { - return Optional.of(info.get(3).getAsJsonArray().get(2).getAsString()); - } else { - return Optional.empty(); - } - } - - /** - * 粉丝勋章对应的主播的直播间 ID - */ - public Optional<String> getFansMedalOwnerRoomId() { - if (info.get(3).getAsJsonArray().size() > 0) { - return Optional.of(info.get(3).getAsJsonArray().get(3).getAsString()); - } else { - return Optional.empty(); - } - } - - /** - * 用户的观众等级 - */ - public int getUserLevel() { - return info.get(4).getAsJsonArray().get(0).getAsInt(); - } - - /** - * 用户的观众等级排名 - */ - public String getUserRank() { - return info.get(4).getAsJsonArray().get(3).getAsString(); - } - - /** - * 用户头衔 - */ - public List<String> getUserTitles() { - return GSON.fromJson(info.get(5), STRING_LIST_TYPE); - } - - /** - * 用户名颜色 - */ - public String getUsernameColor() { - return info.get(8).getAsJsonObject().get("uname_color").getAsString(); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/DataEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/DataEntity.java deleted file mode 100644 index eaaf79a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/DataEntity.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -public interface DataEntity { - String getCmd(); -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EnterRoomEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EnterRoomEntity.java deleted file mode 100644 index 945c2ab..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EnterRoomEntity.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class EnterRoomEntity { - @SerializedName("roomid") - private long roomId; - @SerializedName("uid") - private long userId; - - public EnterRoomEntity(long roomId, long userId) { - this.roomId = roomId; - this.userId = userId; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EntryEffectEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EntryEffectEntity.java deleted file mode 100644 index 4d5707e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EntryEffectEntity.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class EntryEffectEntity implements DataEntity { - /** - * cmd : ENTRY_EFFECT - * data : {"id":3,"uid":9359447,"target_id":275592903,"show_avatar":1,"copy_writing":"欢迎 <%藏拙当成玉%> 进入房间","highlight_color":"#FFF100","basemap_url":"http://i0.hdslb.com/bfs/live/d208b9654b93a70b4177e1aa7e2f0343f8a5ff1a.png","effective_time":1,"priority":50,"privilege_type":0,"face":"http://i1.hdslb.com/bfs/face/12cb1ea6eea79667e3fb722bbd8995bb96f4cd6f.jpg"} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * id : 3 - * uid : 9359447 - * target_id : 275592903 - * show_avatar : 1 - * copy_writing : 欢迎 <%藏拙当成玉%> 进入房间 - * highlight_color : #FFF100 - * basemap_url : http://i0.hdslb.com/bfs/live/d208b9654b93a70b4177e1aa7e2f0343f8a5ff1a.png - * effective_time : 1 - * priority : 50 - * privilege_type : 0 - * face : http://i1.hdslb.com/bfs/face/12cb1ea6eea79667e3fb722bbd8995bb96f4cd6f.jpg - */ - - @SerializedName("id") - private long id; - @SerializedName("uid") - private long uid; - @SerializedName("target_id") - private long targetId; - @SerializedName("show_avatar") - private int showAvatar; - @SerializedName("copy_writing") - private String copyWriting; - @SerializedName("highlight_color") - private String highlightColor; - @SerializedName("basemap_url") - private String baseMapUrl; - @SerializedName("effective_time") - private int effectiveTime; - @SerializedName("priority") - private int priority; - @SerializedName("privilege_type") - private int privilegeType; - @SerializedName("face") - private String face; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public long getUid() { - return uid; - } - - public void setUid(long uid) { - this.uid = uid; - } - - public long getTargetId() { - return targetId; - } - - public void setTargetId(long targetId) { - this.targetId = targetId; - } - - public int getShowAvatar() { - return showAvatar; - } - - public void setShowAvatar(int showAvatar) { - this.showAvatar = showAvatar; - } - - public String getCopyWriting() { - return copyWriting; - } - - public void setCopyWriting(String copyWriting) { - this.copyWriting = copyWriting; - } - - public String getHighlightColor() { - return highlightColor; - } - - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - public String getBaseMapUrl() { - return baseMapUrl; - } - - public void setBaseMapUrl(String baseMapUrl) { - this.baseMapUrl = baseMapUrl; - } - - public int getEffectiveTime() { - return effectiveTime; - } - - public void setEffectiveTime(int effectiveTime) { - this.effectiveTime = effectiveTime; - } - - public int getPriority() { - return priority; - } - - public void setPriority(int priority) { - this.priority = priority; - } - - public int getPrivilegeType() { - return privilegeType; - } - - public void setPrivilegeType(int privilegeType) { - this.privilegeType = privilegeType; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EventCmdEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EventCmdEntity.java deleted file mode 100644 index 51edba7..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/EventCmdEntity.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class EventCmdEntity implements DataEntity { - /** - * roomid : 234024 - * cmd : EVENT_CMD - * data : {"event_type":"flower_rain-16915","event_img":"http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/activity/lover_2018/raffle.png"} - */ - - @SerializedName("roomid") - private long roomId; - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * event_type : flower_rain-16915 - * event_img : http://s1.hdslb.com/bfs/static/blive/live-assets/mobile/activity/lover_2018/raffle.png - */ - - @SerializedName("event_type") - private String eventType; - @SerializedName("event_img") - private String eventImg; - - public String getEventType() { - return eventType; - } - - public void setEventType(String eventType) { - this.eventType = eventType; - } - - public String getEventImg() { - return eventImg; - } - - public void setEventImg(String eventImg) { - this.eventImg = eventImg; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardBuyEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardBuyEntity.java deleted file mode 100644 index 4603eba..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardBuyEntity.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class GuardBuyEntity implements DataEntity { - /** - * cmd : GUARD_BUY - * data : {"uid":4561799,"username":"微笑The迪妮莎","guard_level":1,"num":1} - * roomid : 5279 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - @SerializedName("roomid") - private String roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public String getRoomId() { - return roomId; - } - - public void setRoomId(String roomId) { - this.roomId = roomId; - } - - public static class Data { - /** - * uid : 4561799 - * username : 微笑The迪妮莎 - * guard_level : 1 - * num : 1 - */ - - @SerializedName("uid") - private long userId; - @SerializedName("username") - private String username; - @SerializedName("guard_level") - private int guardLevel; - @SerializedName("num") - private int number; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardLotteryStartEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardLotteryStartEntity.java deleted file mode 100644 index 2fbaba5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardLotteryStartEntity.java +++ /dev/null @@ -1,248 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class GuardLotteryStartEntity implements DataEntity { - /** - * cmd : GUARD_LOTTERY_START - * data : {"id":396410,"roomid":56998,"message":"ちゆき蝙蝠公主 在【56998】购买了舰长,请前往抽奖","type":"guard","privilege_type":3,"link":"https://live.bilibili.com/56998","lottery":{"id":396410,"sender":{"uid":11206312,"uname":"ちゆき蝙蝠公主","face":"http://i0.hdslb.com/bfs/face/06d0d58131100acf13d75d3c092b1a58d41b0129.jpg"},"keyword":"guard","time":1200,"status":1,"mobile_display_mode":2,"mobile_static_asset":"","mobile_animation_asset":""}} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * id : 396410 - * roomid : 56998 - * message : ちゆき蝙蝠公主 在【56998】购买了舰长,请前往抽奖 - * type : guard - * privilege_type : 3 - * link : https://live.bilibili.com/56998 - * lottery : {"id":396410,"sender":{"uid":11206312,"uname":"ちゆき蝙蝠公主","face":"http://i0.hdslb.com/bfs/face/06d0d58131100acf13d75d3c092b1a58d41b0129.jpg"},"keyword":"guard","time":1200,"status":1,"mobile_display_mode":2,"mobile_static_asset":"","mobile_animation_asset":""} - */ - - @SerializedName("id") - private long id; - @SerializedName("roomid") - private long roomId; - @SerializedName("message") - private String message; - @SerializedName("type") - private String type; - @SerializedName("privilege_type") - private int privilegeType; - @SerializedName("link") - private String link; - @SerializedName("lottery") - private Lottery lottery; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getPrivilegeType() { - return privilegeType; - } - - public void setPrivilegeType(int privilegeType) { - this.privilegeType = privilegeType; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public Lottery getLottery() { - return lottery; - } - - public void setLottery(Lottery lottery) { - this.lottery = lottery; - } - - public static class Lottery { - /** - * id : 396410 - * sender : {"uid":11206312,"uname":"ちゆき蝙蝠公主","face":"http://i0.hdslb.com/bfs/face/06d0d58131100acf13d75d3c092b1a58d41b0129.jpg"} - * keyword : guard - * time : 1200 - * status : 1 - * mobile_display_mode : 2 - * mobile_static_asset : - * mobile_animation_asset : - */ - - @SerializedName("id") - private long id; - @SerializedName("sender") - private Sender sender; - @SerializedName("keyword") - private String keyword; - @SerializedName("time") - private int time; - @SerializedName("status") - private int status; - @SerializedName("mobile_display_mode") - private int mobileDisplayMode; - @SerializedName("mobile_static_asset") - private String mobileStaticAsset; - @SerializedName("mobile_animation_asset") - private String mobileAnimationAsset; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public Sender getSender() { - return sender; - } - - public void setSender(Sender sender) { - this.sender = sender; - } - - public String getKeyword() { - return keyword; - } - - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public int getMobileDisplayMode() { - return mobileDisplayMode; - } - - public void setMobileDisplayMode(int mobileDisplayMode) { - this.mobileDisplayMode = mobileDisplayMode; - } - - public String getMobileStaticAsset() { - return mobileStaticAsset; - } - - public void setMobileStaticAsset(String mobileStaticAsset) { - this.mobileStaticAsset = mobileStaticAsset; - } - - public String getMobileAnimationAsset() { - return mobileAnimationAsset; - } - - public void setMobileAnimationAsset(String mobileAnimationAsset) { - this.mobileAnimationAsset = mobileAnimationAsset; - } - - public static class Sender { - /** - * uid : 11206312 - * uname : ちゆき蝙蝠公主 - * face : http://i0.hdslb.com/bfs/face/06d0d58131100acf13d75d3c092b1a58d41b0129.jpg - */ - - @SerializedName("uid") - private long userId; - @SerializedName("uname") - private String userName; - @SerializedName("face") - private String face; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardMsgEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardMsgEntity.java deleted file mode 100644 index f283da0..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/GuardMsgEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class GuardMsgEntity implements DataEntity { - /** - * cmd : GUARD_MSG - * msg : 乘客 :?想不想joice:? 成功购买1313366房间总督船票1张,欢迎登船! - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("msg") - private String msg; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/LiveEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/LiveEntity.java deleted file mode 100644 index f8078c2..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/LiveEntity.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class LiveEntity implements RoomStatusEntity { - /** - * cmd : LIVE - * roomid : 1110317 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private String roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - @Override - public String getRoomId() { - return roomId; - } - - public void setRoomId(String roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/NoticeMsgEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/NoticeMsgEntity.java deleted file mode 100644 index 557329c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/NoticeMsgEntity.java +++ /dev/null @@ -1,297 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class NoticeMsgEntity implements DataEntity { - /** - * cmd : NOTICE_MSG - * full : {"head_icon":"","is_anim":1,"tail_icon":"","background":"#33ffffff","color":"#33ffffff","highlight":"#33ffffff","border":"#33ffffff","time":10} - * half : {"head_icon":"","is_anim":0,"tail_icon":"","background":"#33ffffff","color":"#33ffffff","highlight":"#33ffffff","border":"#33ffffff","time":8} - * roomid : 11415406 - * real_roomid : 0 - * msg_common : 恭喜<%汤圆老师%>获得大奖<%23333x银瓜子%>, 感谢<%林发发爱林小兔%>的赠送 - * msg_self : 恭喜<%汤圆老师%>获得大奖<%23333x银瓜子%>, 感谢<%林发发爱林小兔%>的赠送 - * link_url : http://live.bilibili.com/0 - * msg_type : 4 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("full") - private Full full; - @SerializedName("half") - private Half half; - @SerializedName("roomid") - private String roomId; - @SerializedName("real_roomid") - private String realRoomId; - @SerializedName("msg_common") - private String messageCommon; - @SerializedName("msg_self") - private String messageSelf; - @SerializedName("link_url") - private String linkUrl; - @SerializedName("msg_type") - private int messageType; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Full getFull() { - return full; - } - - public void setFull(Full full) { - this.full = full; - } - - public Half getHalf() { - return half; - } - - public void setHalf(Half half) { - this.half = half; - } - - public String getRoomId() { - return roomId; - } - - public void setRoomId(String roomId) { - this.roomId = roomId; - } - - public String getRealRoomId() { - return realRoomId; - } - - public void setRealRoomId(String realRoomId) { - this.realRoomId = realRoomId; - } - - public String getMessageCommon() { - return messageCommon; - } - - public void setMessageCommon(String messageCommon) { - this.messageCommon = messageCommon; - } - - public String getMessageSelf() { - return messageSelf; - } - - public void setMessageSelf(String messageSelf) { - this.messageSelf = messageSelf; - } - - public String getLinkUrl() { - return linkUrl; - } - - public void setLinkUrl(String linkUrl) { - this.linkUrl = linkUrl; - } - - public int getMessageType() { - return messageType; - } - - public void setMessageType(int messageType) { - this.messageType = messageType; - } - - public static class Full { - /** - * head_icon : - * is_anim : 1 - * tail_icon : - * background : #33ffffff - * color : #33ffffff - * highlight : #33ffffff - * border : #33ffffff - * time : 10 - */ - - @SerializedName("head_icon") - private String headIcon; - @SerializedName("is_anim") - private int isAnimation; - @SerializedName("tail_icon") - private String tailIcon; - @SerializedName("background") - private String background; - @SerializedName("color") - private String color; - @SerializedName("highlight") - private String highlight; - @SerializedName("border") - private String border; - @SerializedName("time") - private int time; - - public String getHeadIcon() { - return headIcon; - } - - public void setHeadIcon(String headIcon) { - this.headIcon = headIcon; - } - - public int getIsAnimation() { - return isAnimation; - } - - public void setIsAnimation(int isAnimation) { - this.isAnimation = isAnimation; - } - - public String getTailIcon() { - return tailIcon; - } - - public void setTailIcon(String tailIcon) { - this.tailIcon = tailIcon; - } - - public String getBackground() { - return background; - } - - public void setBackground(String background) { - this.background = background; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String getHighlight() { - return highlight; - } - - public void setHighlight(String highlight) { - this.highlight = highlight; - } - - public String getBorder() { - return border; - } - - public void setBorder(String border) { - this.border = border; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - } - - public static class Half { - /** - * head_icon : - * is_anim : 0 - * tail_icon : - * background : #33ffffff - * color : #33ffffff - * highlight : #33ffffff - * border : #33ffffff - * time : 8 - */ - - @SerializedName("head_icon") - private String headIcon; - @SerializedName("is_anim") - private int isAnimation; - @SerializedName("tail_icon") - private String tailIcon; - @SerializedName("background") - private String background; - @SerializedName("color") - private String color; - @SerializedName("highlight") - private String highlight; - @SerializedName("border") - private String border; - @SerializedName("time") - private int time; - - public String getHeadIcon() { - return headIcon; - } - - public void setHeadIcon(String headIcon) { - this.headIcon = headIcon; - } - - public int getIsAnimation() { - return isAnimation; - } - - public void setIsAnimation(int isAnimation) { - this.isAnimation = isAnimation; - } - - public String getTailIcon() { - return tailIcon; - } - - public void setTailIcon(String tailIcon) { - this.tailIcon = tailIcon; - } - - public String getBackground() { - return background; - } - - public void setBackground(String background) { - this.background = background; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String getHighlight() { - return highlight; - } - - public void setHighlight(String highlight) { - this.highlight = highlight; - } - - public String getBorder() { - return border; - } - - public void setBorder(String border) { - this.border = border; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkAgainEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkAgainEntity.java deleted file mode 100644 index ab6973e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkAgainEntity.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkAgainEntity implements DataEntity { - /** - * cmd : PK_AGAIN - * pk_id : 60672 - * pk_status : 400 - * data : {"new_pk_id":60678,"init_id":10817769,"match_id":1489926,"escape_all_time":10,"escape_time":10,"is_portrait":false,"uname":"穆阿是给你的mua","face":"http://i0.hdslb.com/bfs/face/07fa1057b60afe74cdd477f123c6ccf460ee8f2c.jpg","uid":38105366} - * roomid : 1489926 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public static class Data { - /** - * new_pk_id : 60678 - * init_id : 10817769 - * match_id : 1489926 - * escape_all_time : 10 - * escape_time : 10 - * is_portrait : false - * uname : 穆阿是给你的mua - * face : http://i0.hdslb.com/bfs/face/07fa1057b60afe74cdd477f123c6ccf460ee8f2c.jpg - * uid : 38105366 - */ - - @SerializedName("new_pk_id") - private long newPkId; - @SerializedName("init_id") - private long initId; - @SerializedName("match_id") - private long matchId; - @SerializedName("escape_all_time") - private int escapeAllTime; - @SerializedName("escape_time") - private int escapeTime; - @SerializedName("is_portrait") - private boolean isPortrait; - @SerializedName("uname") - private String userName; - @SerializedName("face") - private String face; - @SerializedName("uid") - private long uid; - - public long getNewPkId() { - return newPkId; - } - - public void setNewPkId(long newPkId) { - this.newPkId = newPkId; - } - - public long getInitId() { - return initId; - } - - public void setInitId(long initId) { - this.initId = initId; - } - - public long getMatchId() { - return matchId; - } - - public void setMatchId(long matchId) { - this.matchId = matchId; - } - - public int getEscapeAllTime() { - return escapeAllTime; - } - - public void setEscapeAllTime(int escapeAllTime) { - this.escapeAllTime = escapeAllTime; - } - - public int getEscapeTime() { - return escapeTime; - } - - public void setEscapeTime(int escapeTime) { - this.escapeTime = escapeTime; - } - - public boolean isIsPortrait() { - return isPortrait; - } - - public void setIsPortrait(boolean isPortrait) { - this.isPortrait = isPortrait; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getUid() { - return uid; - } - - public void setUid(long uid) { - this.uid = uid; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkClickAgainEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkClickAgainEntity.java deleted file mode 100644 index 8940049..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkClickAgainEntity.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkClickAgainEntity implements DataEntity { - /** - * pk_status : 400 - * pk_id : 60672 - * cmd : PK_CLICK_AGAIN - * roomid : 1489926 - */ - - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("pk_id") - private long pkId; - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private long roomId; - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkEndEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkEndEntity.java deleted file mode 100644 index bc4fae1..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkEndEntity.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkEndEntity implements DataEntity { - /** - * cmd : PK_END - * pk_id : 8797 - * pk_status : 400 - * data : {"init_id":8049573,"match_id":1409458,"punish_topic":"惩罚:模仿面筋哥"} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * init_id : 8049573 - * match_id : 1409458 - * punish_topic : 惩罚:模仿面筋哥 - */ - - @SerializedName("init_id") - private long initId; - @SerializedName("match_id") - private long matchId; - @SerializedName("punish_topic") - private String punishTopic; - - public long getInitId() { - return initId; - } - - public void setInitId(long initId) { - this.initId = initId; - } - - public long getMatchId() { - return matchId; - } - - public void setMatchId(long matchId) { - this.matchId = matchId; - } - - public String getPunishTopic() { - return punishTopic; - } - - public void setPunishTopic(String punishTopic) { - this.punishTopic = punishTopic; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteFailEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteFailEntity.java deleted file mode 100644 index e8efa2e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteFailEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkInviteFailEntity implements DataEntity { - /** - * cmd : PK_INVITE_FAIL - * pk_invite_status : 1100 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_invite_status") - private int pkInviteStatus; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public int getPkInviteStatus() { - return pkInviteStatus; - } - - public void setPkInviteStatus(int pkInviteStatus) { - this.pkInviteStatus = pkInviteStatus; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteInitEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteInitEntity.java deleted file mode 100644 index ff2811d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteInitEntity.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkInviteInitEntity implements DataEntity { - /** - * cmd : PK_INVITE_INIT - * pk_invite_status : 200 - * invite_id : 408 - * face : http://i0.hdslb.com/bfs/face/e1ad4df39e95180e990fdd565b216662bdb2503c.jpg - * uname : Tocci椭奇 - * area_name : 视频聊天 - * user_level : 24 - * master_level : 31 - * roomid : 883802 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_invite_status") - private int pkInviteStatus; - @SerializedName("invite_id") - private long inviteId; - @SerializedName("face") - private String face; - @SerializedName("uname") - private String userName; - @SerializedName("area_name") - private String areaName; - @SerializedName("user_level") - private int userLevel; - @SerializedName("master_level") - private int masterLevel; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public int getPkInviteStatus() { - return pkInviteStatus; - } - - public void setPkInviteStatus(int pkInviteStatus) { - this.pkInviteStatus = pkInviteStatus; - } - - public long getInviteId() { - return inviteId; - } - - public void setInviteId(long inviteId) { - this.inviteId = inviteId; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public int getUserLevel() { - return userLevel; - } - - public void setUserLevel(int userLevel) { - this.userLevel = userLevel; - } - - public int getMasterLevel() { - return masterLevel; - } - - public void setMasterLevel(int masterLevel) { - this.masterLevel = masterLevel; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteSwitchCloseEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteSwitchCloseEntity.java deleted file mode 100644 index 44a5baa..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteSwitchCloseEntity.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkInviteSwitchCloseEntity implements DataEntity { - /** - * cmd : PK_INVITE_SWITCH_CLOSE - * roomid : 1938890 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private long roomId; - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteSwitchOpenEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteSwitchOpenEntity.java deleted file mode 100644 index 49b1806..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkInviteSwitchOpenEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkInviteSwitchOpenEntity implements DataEntity { - /** - * cmd : PK_INVITE_SWITCH_OPEN - * roomid : 9615419 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkMatchEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkMatchEntity.java deleted file mode 100644 index 91ba2ff..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkMatchEntity.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkMatchEntity implements DataEntity { - /** - * cmd : PK_MATCH - * pk_status : 100 - * pk_id : 3596 - * data : {"init_id":9615419,"match_id":10185039,"escape_time":5,"is_portrait":false,"uname":"茉莉艿","face":"http://i2.hdslb.com/bfs/face/3f2833a3ac598d9757ba33b79ec219cf941bdda8.jpg","uid":18963076} - * roomid : 9615419 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("pk_id") - private long pkId; - @SerializedName("data") - private Data data; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public static class Data { - /** - * init_id : 9615419 - * match_id : 10185039 - * escape_time : 5 - * is_portrait : false - * uname : 茉莉艿 - * face : http://i2.hdslb.com/bfs/face/3f2833a3ac598d9757ba33b79ec219cf941bdda8.jpg - * uid : 18963076 - */ - - @SerializedName("init_id") - private long initId; - @SerializedName("match_id") - private long matchId; - @SerializedName("escape_time") - private int escapeTime; - @SerializedName("is_portrait") - private boolean isPortrait; - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("uid") - private long userId; - - public long getInitId() { - return initId; - } - - public void setInitId(long initId) { - this.initId = initId; - } - - public long getMatchId() { - return matchId; - } - - public void setMatchId(long matchId) { - this.matchId = matchId; - } - - public int getEscapeTime() { - return escapeTime; - } - - public void setEscapeTime(int escapeTime) { - this.escapeTime = escapeTime; - } - - public boolean isIsPortrait() { - return isPortrait; - } - - public void setIsPortrait(boolean isPortrait) { - this.isPortrait = isPortrait; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkMicEndEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkMicEndEntity.java deleted file mode 100644 index ecb09bd..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkMicEndEntity.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkMicEndEntity implements DataEntity { - /** - * cmd : PK_MIC_END - * pk_id : 3596 - * pk_status : 1300 - * data : {"type":0} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * type : 0 - */ - - @SerializedName("type") - private int type; - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkPreEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkPreEntity.java deleted file mode 100644 index 0d48548..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkPreEntity.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkPreEntity implements DataEntity { - /** - * cmd : PK_PRE - * pk_id : 3597 - * pk_status : 200 - * data : {"init_id":9615419,"match_id":10185039,"count_down":5,"pk_topic":"模仿游戏角色让对方猜","pk_pre_time":1529476609,"pk_start_time":1529476614,"pk_end_time":1529476914,"end_time":1529477034} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * init_id : 9615419 - * match_id : 10185039 - * count_down : 5 - * pk_topic : 模仿游戏角色让对方猜 - * pk_pre_time : 1529476609 - * pk_start_time : 1529476614 - * pk_end_time : 1529476914 - * end_time : 1529477034 - */ - - @SerializedName("init_id") - private long initId; - @SerializedName("match_id") - private long matchId; - @SerializedName("count_down") - private int countDown; - @SerializedName("pk_topic") - private String pkTopic; - @SerializedName("pk_pre_time") - private long pkPreTime; - @SerializedName("pk_start_time") - private long pkStartTime; - @SerializedName("pk_end_time") - private long pkEndTime; - @SerializedName("end_time") - private long endTime; - - public long getInitId() { - return initId; - } - - public void setInitId(long initId) { - this.initId = initId; - } - - public long getMatchId() { - return matchId; - } - - public void setMatchId(long matchId) { - this.matchId = matchId; - } - - public int getCountDown() { - return countDown; - } - - public void setCountDown(int countDown) { - this.countDown = countDown; - } - - public String getPkTopic() { - return pkTopic; - } - - public void setPkTopic(String pkTopic) { - this.pkTopic = pkTopic; - } - - public long getPkPreTime() { - return pkPreTime; - } - - public void setPkPreTime(long pkPreTime) { - this.pkPreTime = pkPreTime; - } - - public long getPkStartTime() { - return pkStartTime; - } - - public void setPkStartTime(long pkStartTime) { - this.pkStartTime = pkStartTime; - } - - public long getPkEndTime() { - return pkEndTime; - } - - public void setPkEndTime(long pkEndTime) { - this.pkEndTime = pkEndTime; - } - - public long getEndTime() { - return endTime; - } - - public void setEndTime(long endTime) { - this.endTime = endTime; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkProcessEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkProcessEntity.java deleted file mode 100644 index 49e7404..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkProcessEntity.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkProcessEntity implements DataEntity { - /** - * cmd : PK_PROCESS - * pk_id : 8798 - * pk_status : 300 - * data : {"uid":0,"init_votes":30,"match_votes":20,"user_votes":0} - * roomid : 346075 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public static class Data { - /** - * uid : 0 - * init_votes : 30 - * match_votes : 20 - * user_votes : 0 - */ - - @SerializedName("uid") - private long userId; - @SerializedName("init_votes") - private int initVotes; - @SerializedName("match_votes") - private int matchVotes; - @SerializedName("user_votes") - private int userVotes; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public int getInitVotes() { - return initVotes; - } - - public void setInitVotes(int initVotes) { - this.initVotes = initVotes; - } - - public int getMatchVotes() { - return matchVotes; - } - - public void setMatchVotes(int matchVotes) { - this.matchVotes = matchVotes; - } - - public int getUserVotes() { - return userVotes; - } - - public void setUserVotes(int userVotes) { - this.userVotes = userVotes; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkSettleEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkSettleEntity.java deleted file mode 100644 index 16d0ea6..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkSettleEntity.java +++ /dev/null @@ -1,688 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkSettleEntity implements DataEntity { - /** - * cmd : PK_SETTLE - * pk_id : 8806 - * pk_status : 400 - * data : {"pk_id":8806,"init_info":{"uid":7799328,"init_id":10979759,"uname":"筱宇淅淅","face":"http://i0.hdslb.com/bfs/face/e16515ac39329aa125bb8de5bb1fa9455f06337c.jpg","votes":0,"is_winner":false},"match_info":{"uid":18654316,"match_id":430063,"uname":"卖丸子尕害羞","face":"http://i1.hdslb.com/bfs/face/1c579a244ec0c66bbb6e2ad6c770a2a498268735.jpg","votes":129,"is_winner":true,"vip_type":0,"exp":{"color":5805790,"user_level":31,"master_level":{"level":26,"color":10512625}},"vip":{"vip":0,"svip":0},"face_frame":"","badge":{"url":"http://i0.hdslb.com/bfs/live/74b2f9a48ce14d752dd27559c4a0df297243a3fd.png","desc":"bilibili直播签约主播\r\n","position":3}},"best_user":{"uid":31459309,"uname":"七友球球","face":"http://i1.hdslb.com/bfs/face/09406a4fe632dda9d523da14f3e3735ee02efbab.jpg","vip_type":0,"exp":{"color":6406234,"user_level":19,"master_level":{"level":1,"color":6406234}},"vip":{"vip":0,"svip":0},"privilege_type":0,"face_frame":"","badge":{"url":"","desc":"","position":0}},"punish_topic":"惩罚:模仿一款表情包"} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * pk_id : 8806 - * init_info : {"uid":7799328,"init_id":10979759,"uname":"筱宇淅淅","face":"http://i0.hdslb.com/bfs/face/e16515ac39329aa125bb8de5bb1fa9455f06337c.jpg","votes":0,"is_winner":false} - * match_info : {"uid":18654316,"match_id":430063,"uname":"卖丸子尕害羞","face":"http://i1.hdslb.com/bfs/face/1c579a244ec0c66bbb6e2ad6c770a2a498268735.jpg","votes":129,"is_winner":true,"vip_type":0,"exp":{"color":5805790,"user_level":31,"master_level":{"level":26,"color":10512625}},"vip":{"vip":0,"svip":0},"face_frame":"","badge":{"url":"http://i0.hdslb.com/bfs/live/74b2f9a48ce14d752dd27559c4a0df297243a3fd.png","desc":"bilibili直播签约主播\r\n","position":3}} - * best_user : {"uid":31459309,"uname":"七友球球","face":"http://i1.hdslb.com/bfs/face/09406a4fe632dda9d523da14f3e3735ee02efbab.jpg","vip_type":0,"exp":{"color":6406234,"user_level":19,"master_level":{"level":1,"color":6406234}},"vip":{"vip":0,"svip":0},"privilege_type":0,"face_frame":"","badge":{"url":"","desc":"","position":0}} - * punish_topic : 惩罚:模仿一款表情包 - */ - - @SerializedName("pk_id") - private long pkId; - @SerializedName("init_info") - private InitInfo initInfo; - @SerializedName("match_info") - private MatchInfo matchInfo; - @SerializedName("best_user") - private BestUser bestUser; - @SerializedName("punish_topic") - private String punishTopic; - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public InitInfo getInitInfo() { - return initInfo; - } - - public void setInitInfo(InitInfo initInfo) { - this.initInfo = initInfo; - } - - public MatchInfo getMatchInfo() { - return matchInfo; - } - - public void setMatchInfo(MatchInfo matchInfo) { - this.matchInfo = matchInfo; - } - - public BestUser getBestUser() { - return bestUser; - } - - public void setBestUser(BestUser bestUser) { - this.bestUser = bestUser; - } - - public String getPunishTopic() { - return punishTopic; - } - - public void setPunishTopic(String punishTopic) { - this.punishTopic = punishTopic; - } - - public static class InitInfo { - /** - * uid : 7799328 - * init_id : 10979759 - * uname : 筱宇淅淅 - * face : http://i0.hdslb.com/bfs/face/e16515ac39329aa125bb8de5bb1fa9455f06337c.jpg - * votes : 0 - * is_winner : false - */ - - @SerializedName("uid") - private long userId; - @SerializedName("init_id") - private long initId; - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("votes") - private int votes; - @SerializedName("is_winner") - private boolean isWinner; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public long getInitId() { - return initId; - } - - public void setInitId(long initId) { - this.initId = initId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getVotes() { - return votes; - } - - public void setVotes(int votes) { - this.votes = votes; - } - - public boolean isIsWinner() { - return isWinner; - } - - public void setIsWinner(boolean isWinner) { - this.isWinner = isWinner; - } - } - - public static class MatchInfo { - /** - * uid : 18654316 - * match_id : 430063 - * uname : 卖丸子尕害羞 - * face : http://i1.hdslb.com/bfs/face/1c579a244ec0c66bbb6e2ad6c770a2a498268735.jpg - * votes : 129 - * is_winner : true - * vip_type : 0 - * exp : {"color":5805790,"user_level":31,"master_level":{"level":26,"color":10512625}} - * vip : {"vip":0,"svip":0} - * face_frame : - * badge : {"url":"http://i0.hdslb.com/bfs/live/74b2f9a48ce14d752dd27559c4a0df297243a3fd.png","desc":"bilibili直播签约主播\r\n","position":3} - */ - - @SerializedName("uid") - private long userId; - @SerializedName("match_id") - private long matchId; - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("votes") - private int votes; - @SerializedName("is_winner") - private boolean isWinner; - @SerializedName("vip_type") - private int vipType; - @SerializedName("exp") - private Exp exp; - @SerializedName("vip") - private Vip vip; - @SerializedName("face_frame") - private String faceFrame; - @SerializedName("badge") - private Badge badge; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public long getMatchId() { - return matchId; - } - - public void setMatchId(long matchId) { - this.matchId = matchId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getVotes() { - return votes; - } - - public void setVotes(int votes) { - this.votes = votes; - } - - public boolean isIsWinner() { - return isWinner; - } - - public void setIsWinner(boolean isWinner) { - this.isWinner = isWinner; - } - - public int getVipType() { - return vipType; - } - - public void setVipType(int vipType) { - this.vipType = vipType; - } - - public Exp getExp() { - return exp; - } - - public void setExp(Exp exp) { - this.exp = exp; - } - - public Vip getVip() { - return vip; - } - - public void setVip(Vip vip) { - this.vip = vip; - } - - public String getFaceFrame() { - return faceFrame; - } - - public void setFaceFrame(String faceFrame) { - this.faceFrame = faceFrame; - } - - public Badge getBadge() { - return badge; - } - - public void setBadge(Badge badge) { - this.badge = badge; - } - - public static class Exp { - /** - * color : 5805790 - * user_level : 31 - * master_level : {"level":26,"color":10512625} - */ - - @SerializedName("color") - private int color; - @SerializedName("user_level") - private int userLevel; - @SerializedName("master_level") - private MasterLevel masterLevel; - - public int getColor() { - return color; - } - - public void setColor(int color) { - this.color = color; - } - - public int getUserLevel() { - return userLevel; - } - - public void setUserLevel(int userLevel) { - this.userLevel = userLevel; - } - - public MasterLevel getMasterLevel() { - return masterLevel; - } - - public void setMasterLevel(MasterLevel masterLevel) { - this.masterLevel = masterLevel; - } - - public static class MasterLevel { - /** - * level : 26 - * color : 10512625 - */ - - @SerializedName("level") - private int level; - @SerializedName("color") - private int color; - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - public int getColor() { - return color; - } - - public void setColor(int color) { - this.color = color; - } - } - } - - public static class Vip { - /** - * vip : 0 - * svip : 0 - */ - - @SerializedName("vip") - private int vip; - @SerializedName("svip") - private int svip; - - public int getVip() { - return vip; - } - - public void setVip(int vip) { - this.vip = vip; - } - - public int getSvip() { - return svip; - } - - public void setSvip(int svip) { - this.svip = svip; - } - } - - public static class Badge { - /** - * url : http://i0.hdslb.com/bfs/live/74b2f9a48ce14d752dd27559c4a0df297243a3fd.png - * desc : bilibili直播签约主播 - * <p> - * position : 3 - */ - - @SerializedName("url") - private String url; - @SerializedName("desc") - private String description; - @SerializedName("position") - private int position; - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public int getPosition() { - return position; - } - - public void setPosition(int position) { - this.position = position; - } - } - } - - public static class BestUser { - /** - * uid : 31459309 - * uname : 七友球球 - * face : http://i1.hdslb.com/bfs/face/09406a4fe632dda9d523da14f3e3735ee02efbab.jpg - * vip_type : 0 - * exp : {"color":6406234,"user_level":19,"master_level":{"level":1,"color":6406234}} - * vip : {"vip":0,"svip":0} - * privilege_type : 0 - * face_frame : - * badge : {"url":"","desc":"","position":0} - */ - - @SerializedName("uid") - private long userId; - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("vip_type") - private int vipType; - @SerializedName("exp") - private ExpX exp; - @SerializedName("vip") - private VipX vip; - @SerializedName("privilege_type") - private int privilegeType; - @SerializedName("face_frame") - private String faceFrame; - @SerializedName("badge") - private BadgeX badge; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getVipType() { - return vipType; - } - - public void setVipType(int vipType) { - this.vipType = vipType; - } - - public ExpX getExp() { - return exp; - } - - public void setExp(ExpX exp) { - this.exp = exp; - } - - public VipX getVip() { - return vip; - } - - public void setVip(VipX vip) { - this.vip = vip; - } - - public int getPrivilegeType() { - return privilegeType; - } - - public void setPrivilegeType(int privilegeType) { - this.privilegeType = privilegeType; - } - - public String getFaceFrame() { - return faceFrame; - } - - public void setFaceFrame(String faceFrame) { - this.faceFrame = faceFrame; - } - - public BadgeX getBadge() { - return badge; - } - - public void setBadge(BadgeX badge) { - this.badge = badge; - } - - public static class ExpX { - /** - * color : 6406234 - * user_level : 19 - * master_level : {"level":1,"color":6406234} - */ - - @SerializedName("color") - private int color; - @SerializedName("user_level") - private int userLevel; - @SerializedName("master_level") - private MasterLevelX masterLevel; - - public int getColor() { - return color; - } - - public void setColor(int color) { - this.color = color; - } - - public int getUserLevel() { - return userLevel; - } - - public void setUserLevel(int userLevel) { - this.userLevel = userLevel; - } - - public MasterLevelX getMasterLevel() { - return masterLevel; - } - - public void setMasterLevel(MasterLevelX masterLevel) { - this.masterLevel = masterLevel; - } - - public static class MasterLevelX { - /** - * level : 1 - * color : 6406234 - */ - - @SerializedName("level") - private int level; - @SerializedName("color") - private int color; - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - public int getColor() { - return color; - } - - public void setColor(int color) { - this.color = color; - } - } - } - - public static class VipX { - /** - * vip : 0 - * svip : 0 - */ - - @SerializedName("vip") - private int vip; - @SerializedName("svip") - private int svip; - - public int getVip() { - return vip; - } - - public void setVip(int vip) { - this.vip = vip; - } - - public int getSvip() { - return svip; - } - - public void setSvip(int svip) { - this.svip = svip; - } - } - - public static class BadgeX { - /** - * url : - * desc : - * position : 0 - */ - - @SerializedName("url") - private String url; - @SerializedName("desc") - private String description; - @SerializedName("position") - private int position; - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public int getPosition() { - return position; - } - - public void setPosition(int position) { - this.position = position; - } - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkStartEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkStartEntity.java deleted file mode 100644 index 4755c47..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PkStartEntity.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PkStartEntity implements DataEntity { - /** - * cmd : PK_START - * pk_id : 3597 - * pk_status : 300 - * data : {"init_id":9615419,"match_id":10185039,"pk_topic":"模仿游戏角色让对方猜"} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("pk_id") - private long pkId; - @SerializedName("pk_status") - private int pkStatus; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getPkId() { - return pkId; - } - - public void setPkId(long pkId) { - this.pkId = pkId; - } - - public int getPkStatus() { - return pkStatus; - } - - public void setPkStatus(int pkStatus) { - this.pkStatus = pkStatus; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * init_id : 9615419 - * match_id : 10185039 - * pk_topic : 模仿游戏角色让对方猜 - */ - - @SerializedName("init_id") - private long initId; - @SerializedName("match_id") - private long matchId; - @SerializedName("pk_topic") - private String pkTopic; - - public long getInitId() { - return initId; - } - - public void setInitId(long initId) { - this.initId = initId; - } - - public long getMatchId() { - return matchId; - } - - public void setMatchId(long matchId) { - this.matchId = matchId; - } - - public String getPkTopic() { - return pkTopic; - } - - public void setPkTopic(String pkTopic) { - this.pkTopic = pkTopic; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PreparingEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PreparingEntity.java deleted file mode 100644 index c34a98d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/PreparingEntity.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class PreparingEntity implements RoomStatusEntity { - /** - * cmd : PREPARING - * roomid : 1110317 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private String roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - @Override - public String getRoomId() { - return roomId; - } - - public void setRoomId(String roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RaffleEndEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RaffleEndEntity.java deleted file mode 100644 index d332cd9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RaffleEndEntity.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class RaffleEndEntity implements DataEntity { - /** - * cmd : RAFFLE_END - * roomid : 521429 - * data : {"raffleId":16897,"type":"flower_rain","from":"鷺沢怜人","fromFace":"http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg","win":{"uname":"nbqgd","face":"http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg","giftId":115,"giftName":"桃花","giftNum":66}} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private long roomId; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * raffleId : 16897 - * type : flower_rain - * from : 鷺沢怜人 - * fromFace : http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg - * win : {"uname":"nbqgd","face":"http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg","giftId":115,"giftName":"桃花","giftNum":66} - */ - - @SerializedName("raffleId") - private int raffleId; - @SerializedName("type") - private String type; - @SerializedName("from") - private String from; - @SerializedName("fromFace") - private String fromFace; - @SerializedName("win") - private Win win; - - public int getRaffleId() { - return raffleId; - } - - public void setRaffleId(int raffleId) { - this.raffleId = raffleId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getFrom() { - return from; - } - - public void setFrom(String from) { - this.from = from; - } - - public String getFromFace() { - return fromFace; - } - - public void setFromFace(String fromFace) { - this.fromFace = fromFace; - } - - public Win getWin() { - return win; - } - - public void setWin(Win win) { - this.win = win; - } - - public static class Win { - /** - * uname : nbqgd - * face : http://i1.hdslb.com/bfs/face/09eafe44f913012512014e91f25001edf6e072d0.jpg - * giftId : 115 - * giftName : 桃花 - * giftNum : 66 - */ - - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("giftId") - private String giftId; //礼物如果是 经验原石 一类的东西, 它的 id 是个字符串, 例如 "stuff-1" - @SerializedName("giftName") - private String giftName; - @SerializedName("giftNum") - private int giftNum; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public String getGiftId() { - return giftId; - } - - public void setGiftId(String giftId) { - this.giftId = giftId; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public int getGiftNum() { - return giftNum; - } - - public void setGiftNum(int giftNum) { - this.giftNum = giftNum; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RaffleStartEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RaffleStartEntity.java deleted file mode 100644 index 89323e7..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RaffleStartEntity.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class RaffleStartEntity implements DataEntity { - /** - * cmd : RAFFLE_START - * roomid : 234024 - * data : {"raffleId":16915,"type":"flower_rain","from":"爱吃喵姐的鱼","time":60} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private long roomId; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * raffleId : 16915 - * type : flower_rain - * from : 爱吃喵姐的鱼 - * time : 60 - */ - - @SerializedName("raffleId") - private int raffleId; - @SerializedName("type") - private String type; - @SerializedName("from") - private String from; - @SerializedName("time") - private int time; - - public int getRaffleId() { - return raffleId; - } - - public void setRaffleId(int raffleId) { - this.raffleId = raffleId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getFrom() { - return from; - } - - public void setFrom(String from) { - this.from = from; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomAdminsEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomAdminsEntity.java deleted file mode 100644 index 3dd2c65..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomAdminsEntity.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class RoomAdminsEntity implements DataEntity { - /** - * cmd : ROOM_ADMINS - * uids : [4561799,432672,2179804,7928207,94380,1626161,3168349,13182672] - * roomid : 5279 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private long roomId; - @SerializedName("uids") - private List<Long> userIds; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public List<Long> getUserIds() { - return userIds; - } - - public void setUserIds(List<Long> userIds) { - this.userIds = userIds; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomBlockMsgEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomBlockMsgEntity.java deleted file mode 100644 index b0e91c9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomBlockMsgEntity.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class RoomBlockMsgEntity implements DataEntity { - /** - * cmd : ROOM_BLOCK_MSG - * uid : 60244207 - * uname : 承包rose - * roomid : 5279 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("uid") - private String userId; - @SerializedName("uname") - private String username; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomLockEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomLockEntity.java deleted file mode 100644 index be1d3f3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomLockEntity.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class RoomLockEntity implements DataEntity { - /** - * cmd : ROOM_LOCK - * expire : 2018-03-15 10:24:18 - * roomid : 6477301 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("expire") - private String expire; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getExpire() { - return expire; - } - - public void setExpire(String expire) { - this.expire = expire; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomRankEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomRankEntity.java deleted file mode 100644 index ec36df8..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomRankEntity.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class RoomRankEntity implements DataEntity { - /** - * cmd : ROOM_RANK - * data : {"roomid":1241012,"rank_desc":"小时榜 182","color":"#FB7299","h5_url":"https://live.bilibili.com/p/eden/rank-h5-current?anchor_uid=35577726","timestamp":1527148082} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * roomid : 1241012 - * rank_desc : 小时榜 182 - * color : #FB7299 - * h5_url : https://live.bilibili.com/p/eden/rank-h5-current?anchor_uid=35577726 - * timestamp : 1527148082 - */ - - @SerializedName("roomid") - private long roomId; - @SerializedName("rank_desc") - private String rankDescription; - @SerializedName("color") - private String color; - @SerializedName("h5_url") - private String h5Url; - @SerializedName("timestamp") - private long timestamp; - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public String getRankDescription() { - return rankDescription; - } - - public void setRankDescription(String rankDescription) { - this.rankDescription = rankDescription; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String getH5Url() { - return h5Url; - } - - public void setH5Url(String h5Url) { - this.h5Url = h5Url; - } - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomShieldEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomShieldEntity.java deleted file mode 100644 index 14d32b6..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomShieldEntity.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -public class RoomShieldEntity implements DataEntity { - /** - * cmd : ROOM_SHIELD - * type : 1 - * user : [] - * keyword : ["暗号","摄像头","色相头"] - * roomid : 505447 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("type") - private int type; - @SerializedName("roomid") - private long roomId; - //user 可能是 JsonArray 也可能是 String - @SerializedName("user") - private JsonElement user; - //同上 - @SerializedName("keyword") - private JsonElement keyword; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public JsonElement getUser() { - return user; - } - - public void setUser(JsonElement user) { - this.user = user; - } - - public JsonElement getKeyword() { - return keyword; - } - - public void setKeyword(JsonElement keyword) { - this.keyword = keyword; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomSilentOffEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomSilentOffEntity.java deleted file mode 100644 index 44ef6aa..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomSilentOffEntity.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class RoomSilentOffEntity implements DataEntity { - /** - * cmd : ROOM_SILENT_OFF - * data : [] - * roomid : 29434 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("roomid") - private String roomId; - @SerializedName("data") - private List<JsonElement> data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getRoomId() { - return roomId; - } - - public void setRoomId(String roomId) { - this.roomId = roomId; - } - - public List<JsonElement> getData() { - return data; - } - - public void setData(List<JsonElement> data) { - this.data = data; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomSilentOnEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomSilentOnEntity.java deleted file mode 100644 index 14eef57..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomSilentOnEntity.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class RoomSilentOnEntity implements DataEntity { - /** - * cmd : ROOM_SILENT_ON - * data : {"type":"level","level":1,"second":1520424615} - * roomid : 5279 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public static class Data { - /** - * type : level - * level : 1 - * second : 1520424615 - */ - - @SerializedName("type") - private String type; - @SerializedName("level") - private int level; - @SerializedName("second") - private long second; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - public long getSecond() { - return second; - } - - public void setSecond(long second) { - this.second = second; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomStatusEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomStatusEntity.java deleted file mode 100644 index 893af97..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/RoomStatusEntity.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -public interface RoomStatusEntity extends DataEntity { - String getRoomId(); -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SendGiftEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SendGiftEntity.java deleted file mode 100644 index ce4286a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SendGiftEntity.java +++ /dev/null @@ -1,801 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.JsonElement; -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SendGiftEntity implements DataEntity { - /** - * cmd : SEND_GIFT - * data : {"giftName":"节奏风暴","num":1,"uname":"爱上熹","rcost":569788,"uid":230845505,"top_list":[{"uid":288348879,"uname":"我爱我家一生","face":"http://i1.hdslb.com/bfs/face/dd52e4f2dfe881751816e45522f504f10458b514.jpg","rank":1,"score":1852300,"guard_level":0,"isSelf":0},{"uid":287551243,"uname":"熹上城的专属天使菲","face":"http://i1.hdslb.com/bfs/face/c3ef04ba6c267c41067cd7708b7abd60c0c5c49f.jpg","rank":2,"score":1245200,"guard_level":3,"isSelf":0},{"uid":32416351,"uname":"镜子。。","face":"http://i1.hdslb.com/bfs/face/08c54c2c97434811a99e9d070d621ccbb5d3f2c4.jpg","rank":3,"score":332862,"guard_level":3,"isSelf":0}],"timestamp":1520992553,"giftId":39,"giftType":0,"action":"赠送","super":1,"price":100000,"rnd":"1980508331","newMedal":0,"newTitle":0,"medal":{"medalId":"95723","medalName":"布丁诶","level":1},"title":"","beatId":"4","biz_source":"live","metadata":"","remain":0,"gold":88570,"silver":127492,"eventScore":0,"eventNum":0,"smalltv_msg":[],"specialGift":{"id":207945,"time":90,"hadJoin":0,"num":1,"content":"你们城里人真会玩","action":"start","storm_gif":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901"},"notice_msg":[],"capsule":{"normal":{"coin":166,"change":10,"progress":{"now":3630,"max":10000}},"colorful":{"coin":2,"change":0,"progress":{"now":0,"max":5000}}},"addFollow":0,"effect_block":0,"coin_type":"gold","total_coin":100000} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * giftName : 节奏风暴 - * num : 1 - * uname : 爱上熹 - * rcost : 569788 - * uid : 230845505 - * top_list : [{"uid":288348879,"uname":"我爱我家一生","face":"http://i1.hdslb.com/bfs/face/dd52e4f2dfe881751816e45522f504f10458b514.jpg","rank":1,"score":1852300,"guard_level":0,"isSelf":0},{"uid":287551243,"uname":"熹上城的专属天使菲","face":"http://i1.hdslb.com/bfs/face/c3ef04ba6c267c41067cd7708b7abd60c0c5c49f.jpg","rank":2,"score":1245200,"guard_level":3,"isSelf":0},{"uid":32416351,"uname":"镜子。。","face":"http://i1.hdslb.com/bfs/face/08c54c2c97434811a99e9d070d621ccbb5d3f2c4.jpg","rank":3,"score":332862,"guard_level":3,"isSelf":0}] - * timestamp : 1520992553 - * giftId : 39 - * giftType : 0 - * action : 赠送 - * super : 1 - * super_gift_num : 1 - * price : 100000 - * rnd : 1980508331 - * newMedal : 0 - * newTitle : 0 - * medal : {"medalId":"95723","medalName":"布丁诶","level":1} - * title : - * beatId : 4 - * biz_source : live - * metadata : - * remain : 0 - * gold : 88570 - * silver : 127492 - * eventScore : 0 - * eventNum : 0 - * smalltv_msg : [] - * specialGift : {"id":"316221038798","time":90,"hadJoin":0,"num":1,"content":"你们城里人真会玩","action":"start","storm_gif":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901"} - * notice_msg : [] - * capsule : {"normal":{"coin":166,"change":10,"progress":{"now":3630,"max":10000}},"colorful":{"coin":2,"change":0,"progress":{"now":0,"max":5000}},"move": 1} - * addFollow : 0 - * effect_block : 0 - * coin_type : gold - * total_coin : 100000 - */ - - @SerializedName("giftName") - private String giftName; - @SerializedName("num") - private int number; - @SerializedName("uname") - private String username; - @SerializedName("rcost") - private int roomCost; - @SerializedName("uid") - private long userId; - @SerializedName("timestamp") - private long timestamp; - @SerializedName("giftId") - private int giftId; - @SerializedName("giftType") - private int giftType; - @SerializedName("action") - private String action; - @SerializedName("super") - private int superX; - @SerializedName("super_gift_num") - private int superGiftNumber; - @SerializedName("price") - private int price; - @SerializedName("rnd") - private String rnd; - @SerializedName("newMedal") - private int newMedal; - @SerializedName("newTitle") - private int newTitle; - /** - * medal 字段可能是一个空的 JsonArray, 也可能是 JsonObject - * 为 JsonObject 时, 内部字段如下 - * { - * "medalId": "95723", - * "medalName": "布丁诶", - * "level": 1 - * } - */ - @SerializedName("medal") - private JsonElement medal; - @SerializedName("title") - private String title; - @SerializedName("beatId") - private String beatId; - @SerializedName("biz_source") - private String bizSource; - @SerializedName("metadata") - private String metadata; - @SerializedName("remain") - private int remain; - @SerializedName("gold") - private int gold; - @SerializedName("silver") - private int silver; - @SerializedName("eventScore") - private int eventScore; - @SerializedName("eventNum") - private int eventNum; - @SerializedName("specialGift") - private SpecialGift specialGift; - @SerializedName("capsule") - private Capsule capsule; - @SerializedName("addFollow") - private int addFollow; - @SerializedName("effect_block") - private int effectBlock; - @SerializedName("coin_type") - private String coinType; - @SerializedName("total_coin") - private int totalCoin; - @SerializedName("top_list") - private List<TopList> topList; - @SerializedName("smalltv_msg") - private JsonElement smallTvMsg; - @SerializedName("notice_msg") - private JsonElement noticeMsg; - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getRoomCost() { - return roomCost; - } - - public void setRoomCost(int roomCost) { - this.roomCost = roomCost; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public int getGiftId() { - return giftId; - } - - public void setGiftId(int giftId) { - this.giftId = giftId; - } - - public int getGiftType() { - return giftType; - } - - public void setGiftType(int giftType) { - this.giftType = giftType; - } - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public int getSuperX() { - return superX; - } - - public void setSuperX(int superX) { - this.superX = superX; - } - - public int getSuperGiftNumber() { - return superGiftNumber; - } - - public void setSuperGiftNumber(int superGiftNumber) { - this.superGiftNumber = superGiftNumber; - } - - public int getPrice() { - return price; - } - - public void setPrice(int price) { - this.price = price; - } - - public String getRnd() { - return rnd; - } - - public void setRnd(String rnd) { - this.rnd = rnd; - } - - public int getNewMedal() { - return newMedal; - } - - public void setNewMedal(int newMedal) { - this.newMedal = newMedal; - } - - public int getNewTitle() { - return newTitle; - } - - public void setNewTitle(int newTitle) { - this.newTitle = newTitle; - } - - public JsonElement getMedal() { - return medal; - } - - public void setMedal(JsonElement medal) { - this.medal = medal; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getBeatId() { - return beatId; - } - - public void setBeatId(String beatId) { - this.beatId = beatId; - } - - public String getBizSource() { - return bizSource; - } - - public void setBizSource(String bizSource) { - this.bizSource = bizSource; - } - - public String getMetadata() { - return metadata; - } - - public void setMetadata(String metadata) { - this.metadata = metadata; - } - - public int getRemain() { - return remain; - } - - public void setRemain(int remain) { - this.remain = remain; - } - - public int getGold() { - return gold; - } - - public void setGold(int gold) { - this.gold = gold; - } - - public int getSilver() { - return silver; - } - - public void setSilver(int silver) { - this.silver = silver; - } - - public int getEventScore() { - return eventScore; - } - - public void setEventScore(int eventScore) { - this.eventScore = eventScore; - } - - public int getEventNum() { - return eventNum; - } - - public void setEventNum(int eventNum) { - this.eventNum = eventNum; - } - - public SpecialGift getSpecialGift() { - return specialGift; - } - - public void setSpecialGift(SpecialGift specialGift) { - this.specialGift = specialGift; - } - - public Capsule getCapsule() { - return capsule; - } - - public void setCapsule(Capsule capsule) { - this.capsule = capsule; - } - - public int getAddFollow() { - return addFollow; - } - - public void setAddFollow(int addFollow) { - this.addFollow = addFollow; - } - - public int getEffectBlock() { - return effectBlock; - } - - public void setEffectBlock(int effectBlock) { - this.effectBlock = effectBlock; - } - - public String getCoinType() { - return coinType; - } - - public void setCoinType(String coinType) { - this.coinType = coinType; - } - - public int getTotalCoin() { - return totalCoin; - } - - public void setTotalCoin(int totalCoin) { - this.totalCoin = totalCoin; - } - - public List<TopList> getTopList() { - return topList; - } - - public void setTopList(List<TopList> topList) { - this.topList = topList; - } - - public JsonElement getSmallTvMsg() { - return smallTvMsg; - } - - public void setSmallTvMsg(JsonElement smallTvMsg) { - this.smallTvMsg = smallTvMsg; - } - - public JsonElement getNoticeMsg() { - return noticeMsg; - } - - public void setNoticeMsg(JsonElement noticeMsg) { - this.noticeMsg = noticeMsg; - } - - public static class Medal { - /** - * medalId : 95723 - * medalName : 布丁诶 - * level : 1 - */ - - @SerializedName("medalId") - private String medalId; - @SerializedName("medalName") - private String medalName; - @SerializedName("level") - private int level; - - public String getMedalId() { - return medalId; - } - - public void setMedalId(String medalId) { - this.medalId = medalId; - } - - public String getMedalName() { - return medalName; - } - - public void setMedalName(String medalName) { - this.medalName = medalName; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - } - - public static class SpecialGift { - /** - * id : 316221038798 - * time : 90 - * hadJoin : 0 - * num : 1 - * content : 你们城里人真会玩 - * action : start - * storm_gif : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901 - */ - - @SerializedName("id") - private String id; - @SerializedName("time") - private int time; - @SerializedName("hadJoin") - private int hadJoin; - @SerializedName("num") - private int number; - @SerializedName("content") - private String content; - @SerializedName("action") - private String action; - @SerializedName("storm_gif") - private String stormGif; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - - public int getHadJoin() { - return hadJoin; - } - - public void setHadJoin(int hadJoin) { - this.hadJoin = hadJoin; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public String getStormGif() { - return stormGif; - } - - public void setStormGif(String stormGif) { - this.stormGif = stormGif; - } - } - - public static class Capsule { - /** - * normal : {"coin":166,"change":10,"progress":{"now":3630,"max":10000}} - * colorful : {"coin":2,"change":0,"progress":{"now":0,"max":5000}} - * move : 1 - */ - - @SerializedName("normal") - private Normal normal; - @SerializedName("colorful") - private Colorful colorful; - @SerializedName("move") - private int move; - - public Normal getNormal() { - return normal; - } - - public void setNormal(Normal normal) { - this.normal = normal; - } - - public Colorful getColorful() { - return colorful; - } - - public void setColorful(Colorful colorful) { - this.colorful = colorful; - } - - public int getMove() { - return move; - } - - public void setMove(int move) { - this.move = move; - } - - public static class Normal { - /** - * coin : 166 - * change : 10 - * progress : {"now":3630,"max":10000} - */ - - @SerializedName("coin") - private int coin; - @SerializedName("change") - private int change; - @SerializedName("progress") - private Progress progress; - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public int getChange() { - return change; - } - - public void setChange(int change) { - this.change = change; - } - - public Progress getProgress() { - return progress; - } - - public void setProgress(Progress progress) { - this.progress = progress; - } - - public static class Progress { - /** - * now : 3630 - * max : 10000 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - } - - public static class Colorful { - /** - * coin : 2 - * change : 0 - * progress : {"now":0,"max":5000} - */ - - @SerializedName("coin") - private int coin; - @SerializedName("change") - private int change; - @SerializedName("progress") - private ProgressX progress; - - public int getCoin() { - return coin; - } - - public void setCoin(int coin) { - this.coin = coin; - } - - public int getChange() { - return change; - } - - public void setChange(int change) { - this.change = change; - } - - public ProgressX getProgress() { - return progress; - } - - public void setProgress(ProgressX progress) { - this.progress = progress; - } - - public static class ProgressX { - /** - * now : 0 - * max : 5000 - */ - - @SerializedName("now") - private int now; - @SerializedName("max") - private int max; - - public int getNow() { - return now; - } - - public void setNow(int now) { - this.now = now; - } - - public int getMax() { - return max; - } - - public void setMax(int max) { - this.max = max; - } - } - } - } - - public static class TopList { - /** - * uid : 288348879 - * uname : 我爱我家一生 - * face : http://i1.hdslb.com/bfs/face/dd52e4f2dfe881751816e45522f504f10458b514.jpg - * rank : 1 - * score : 1852300 - * guard_level : 0 - * isSelf : 0 - */ - - @SerializedName("uid") - private long userId; - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("rank") - private int rank; - @SerializedName("score") - private int score; - @SerializedName("guard_level") - private int guardLevel; - @SerializedName("isSelf") - private int isSelf; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getRank() { - return rank; - } - - public void setRank(int rank) { - this.rank = rank; - } - - public int getScore() { - return score; - } - - public void setScore(int score) { - this.score = score; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - - public int getIsSelf() { - return isSelf; - } - - public void setIsSelf(int isSelf) { - this.isSelf = isSelf; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SpecialGiftEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SpecialGiftEntity.java deleted file mode 100644 index 37cf63d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SpecialGiftEntity.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class SpecialGiftEntity implements DataEntity { - /** - * cmd : SPECIAL_GIFT - * data : {"39":{"id":202090,"time":90,"hadJoin":0,"num":1,"content":"月轮来袭","action":"start","storm_gif":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901"}} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * 39 : {"id":202090,"time":90,"hadJoin":0,"num":1,"content":"月轮来袭","action":"start","storm_gif":"http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901"} - */ - - @SerializedName("39") - private _$39 $39; - - public _$39 get$39() { - return $39; - } - - public void set$39(_$39 $39) { - this.$39 = $39; - } - - public static class _$39 { - /** - * id : 202090 - * time : 90 - * hadJoin : 0 - * num : 1 - * content : 月轮来袭 - * action : start - * storm_gif : http://static.hdslb.com/live-static/live-room/images/gift-section/mobilegift/2/jiezou.gif?2017011901 - */ - - @SerializedName("id") - private long id; - @SerializedName("time") - private Integer time; - @SerializedName("hadJoin") - private Integer hadJoin; - @SerializedName("num") - private Integer num; - @SerializedName("content") - private String content; - @SerializedName("action") - private String action; - @SerializedName("storm_gif") - private String stormGif; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public Integer getTime() { - return time; - } - - public void setTime(Integer time) { - this.time = time; - } - - public Integer getHadJoin() { - return hadJoin; - } - - public void setHadJoin(Integer hadJoin) { - this.hadJoin = hadJoin; - } - - public Integer getNum() { - return num; - } - - public void setNum(Integer num) { - this.num = num; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public String getStormGif() { - return stormGif; - } - - public void setStormGif(String stormGif) { - this.stormGif = stormGif; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SysGiftEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SysGiftEntity.java deleted file mode 100644 index a35fd8b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SysGiftEntity.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class SysGiftEntity implements DataEntity { - /** - * cmd : SYS_GIFT - * msg : あさひなみよう在直播间5135178开启了丰收祭典,一起来分享收获的福利吧! - * msg_text : あさひなみよう在直播间5135178开启了丰收祭典,一起来分享收获的福利吧! - * tips : あさひなみよう在直播间5135178开启了丰收祭典,一起来分享收获的福利吧! - * url : http://live.bilibili.com/5135178 - * roomid : 5135178 - * real_roomid : 5135178 - * giftId : 103 - * msgTips : 0 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("msg") - private String msg; - @SerializedName("msg_text") - private String msgText; - @SerializedName("tips") - private String tips; - @SerializedName("url") - private String url; - @SerializedName("roomid") - private Long roomId; - @SerializedName("real_roomid") - private Long realRoomId; - @SerializedName("giftId") - private Long giftId; - @SerializedName("msgTips") - private Integer msgTips; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public String getMsgText() { - return msgText; - } - - public void setMsgText(String msgText) { - this.msgText = msgText; - } - - public String getTips() { - return tips; - } - - public void setTips(String tips) { - this.tips = tips; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Long getRoomId() { - return roomId; - } - - public void setRoomId(Long roomId) { - this.roomId = roomId; - } - - public Long getRealRoomId() { - return realRoomId; - } - - public void setRealRoomId(Long realRoomId) { - this.realRoomId = realRoomId; - } - - public Long getGiftId() { - return giftId; - } - - public void setGiftId(Long giftId) { - this.giftId = giftId; - } - - public Integer getMsgTips() { - return msgTips; - } - - public void setMsgTips(Integer msgTips) { - this.msgTips = msgTips; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SysMsgEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SysMsgEntity.java deleted file mode 100644 index e7c0eff..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/SysMsgEntity.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class SysMsgEntity implements DataEntity { - /** - * cmd : SYS_MSG - * msg : 【瑾然-】:?在直播间:?【3939852】:?赠送 小电视一个,请前往抽奖 - * msg_text : 【瑾然-】:?在直播间:?【3939852】:?赠送 小电视一个,请前往抽奖 - * rep : 1 - * styleType : 2 - * url : http://live.bilibili.com/3939852 - * roomid : 3939852 - * real_roomid : 3939852 - * rnd : 1510499432 - * tv_id : 29318 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("msg") - private String msg; - //B站自己的广告, msgText 可能是空的 - @SerializedName("msg_text") - private String msgText; - @SerializedName("rep") - private int rep; - @SerializedName("styleType") - private int styleType; - @SerializedName("url") - private String url; - @SerializedName("roomid") - private long roomId; - @SerializedName("real_roomid") - private long realRoomId; - @SerializedName("rnd") - private long rnd; - @SerializedName("tv_id") - private String tvId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public String getMsgText() { - return msgText; - } - - public void setMsgText(String msgText) { - this.msgText = msgText; - } - - public int getRep() { - return rep; - } - - public void setRep(int rep) { - this.rep = rep; - } - - public int getStyleType() { - return styleType; - } - - public void setStyleType(int styleType) { - this.styleType = styleType; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public long getRealRoomId() { - return realRoomId; - } - - public void setRealRoomId(long realRoomId) { - this.realRoomId = realRoomId; - } - - public long getRnd() { - return rnd; - } - - public void setRnd(long rnd) { - this.rnd = rnd; - } - - public String getTvId() { - return tvId; - } - - public void setTvId(String tvId) { - this.tvId = tvId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/TVEndEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/TVEndEntity.java deleted file mode 100644 index d6d1955..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/TVEndEntity.java +++ /dev/null @@ -1,209 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class TVEndEntity implements DataEntity { - /** - * cmd : TV_END - * data : {"id":"39077","uname":"かこゆきこvew","sname":"是你的苏苏吖","giftName":"10W银瓜子","mobileTips":"恭喜 かこゆきこvew 获得10W银瓜子","raffleId":"39077","type":"small_tv","from":"是你的苏苏吖","fromFace":"http://i0.hdslb.com/bfs/face/147f137d24138d1cfec5443d98ac8b03c4332398.jpg","win":{"uname":"かこゆきこvew","face":"http://i0.hdslb.com/bfs/face/4d63bd62322e7f3ef38723a91440bc6930626d9f.jpg","giftName":"银瓜子","giftId":"silver","giftNum":100000}} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * id : 39077 - * uname : かこゆきこvew - * sname : 是你的苏苏吖 - * giftName : 10W银瓜子 - * mobileTips : 恭喜 かこゆきこvew 获得10W银瓜子 - * raffleId : 39077 - * type : small_tv - * from : 是你的苏苏吖 - * fromFace : http://i0.hdslb.com/bfs/face/147f137d24138d1cfec5443d98ac8b03c4332398.jpg - * win : {"uname":"かこゆきこvew","face":"http://i0.hdslb.com/bfs/face/4d63bd62322e7f3ef38723a91440bc6930626d9f.jpg","giftName":"银瓜子","giftId":"silver","giftNum":100000} - */ - - @SerializedName("id") - private String id; - @SerializedName("uname") - private String username; - @SerializedName("sname") - private String sname; - @SerializedName("giftName") - private String giftName; - @SerializedName("mobileTips") - private String mobileTips; - @SerializedName("raffleId") - private String raffleId; - @SerializedName("type") - private String type; - @SerializedName("from") - private String from; - @SerializedName("fromFace") - private String fromFace; - @SerializedName("win") - private Win win; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getSname() { - return sname; - } - - public void setSname(String sname) { - this.sname = sname; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public String getMobileTips() { - return mobileTips; - } - - public void setMobileTips(String mobileTips) { - this.mobileTips = mobileTips; - } - - public String getRaffleId() { - return raffleId; - } - - public void setRaffleId(String raffleId) { - this.raffleId = raffleId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getFrom() { - return from; - } - - public void setFrom(String from) { - this.from = from; - } - - public String getFromFace() { - return fromFace; - } - - public void setFromFace(String fromFace) { - this.fromFace = fromFace; - } - - public Win getWin() { - return win; - } - - public void setWin(Win win) { - this.win = win; - } - - public static class Win { - /** - * uname : かこゆきこvew - * face : http://i0.hdslb.com/bfs/face/4d63bd62322e7f3ef38723a91440bc6930626d9f.jpg - * giftName : 银瓜子 - * giftId : silver - * giftNum : 100000 - */ - - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("giftName") - private String giftName; - @SerializedName("giftId") - private String giftId; - @SerializedName("giftNum") - private int giftNum; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public String getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public String getGiftId() { - return giftId; - } - - public void setGiftId(String giftId) { - this.giftId = giftId; - } - - public int getGiftNum() { - return giftNum; - } - - public void setGiftNum(int giftNum) { - this.giftNum = giftNum; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/TVStartEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/TVStartEntity.java deleted file mode 100644 index cc4f863..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/TVStartEntity.java +++ /dev/null @@ -1,231 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class TVStartEntity implements DataEntity { - /** - * cmd : TV_START - * data : {"id":"40072","dtime":180,"msg":{"cmd":"SYS_MSG","msg":"【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖","msg_text":"【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖","rep":1,"styleType":2,"url":"http://live.bilibili.com/102","roomid":102,"real_roomid":5279,"rnd":12987955,"tv_id":"40072"},"raffleId":40072,"type":"small_tv","from":"杰宝Yvan生命倒计时","time":180} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * id : 40072 - * dtime : 180 - * msg : {"cmd":"SYS_MSG","msg":"【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖","msg_text":"【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖","rep":1,"styleType":2,"url":"http://live.bilibili.com/102","roomid":102,"real_roomid":5279,"rnd":12987955,"tv_id":"40072"} - * raffleId : 40072 - * type : small_tv - * from : 杰宝Yvan生命倒计时 - * time : 180 - */ - - @SerializedName("id") - private String id; - @SerializedName("dtime") - private int dtime; - @SerializedName("msg") - private Msg msg; - @SerializedName("raffleId") - private int raffleId; - @SerializedName("type") - private String type; - @SerializedName("from") - private String from; - @SerializedName("time") - private int time; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public int getDtime() { - return dtime; - } - - public void setDtime(int dtime) { - this.dtime = dtime; - } - - public Msg getMsg() { - return msg; - } - - public void setMsg(Msg msg) { - this.msg = msg; - } - - public int getRaffleId() { - return raffleId; - } - - public void setRaffleId(int raffleId) { - this.raffleId = raffleId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getFrom() { - return from; - } - - public void setFrom(String from) { - this.from = from; - } - - public int getTime() { - return time; - } - - public void setTime(int time) { - this.time = time; - } - - public static class Msg { - /** - * cmd : SYS_MSG - * msg : 【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖 - * msg_text : 【杰宝Yvan生命倒计时】:?在直播间:?【102】:?赠送 小电视一个,请前往抽奖 - * rep : 1 - * styleType : 2 - * url : http://live.bilibili.com/102 - * roomid : 102 - * real_roomid : 5279 - * rnd : 12987955 - * tv_id : 40072 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("msg") - private String msg; - @SerializedName("msg_text") - private String msgText; - @SerializedName("rep") - private int rep; - @SerializedName("styleType") - private int styleType; - @SerializedName("url") - private String url; - @SerializedName("roomid") - private int roomId; - @SerializedName("real_roomid") - private int realRoomId; - @SerializedName("rnd") - private int rnd; - @SerializedName("tv_id") - private String tvId; - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public String getMsgText() { - return msgText; - } - - public void setMsgText(String msgText) { - this.msgText = msgText; - } - - public int getRep() { - return rep; - } - - public void setRep(int rep) { - this.rep = rep; - } - - public int getStyleType() { - return styleType; - } - - public void setStyleType(int styleType) { - this.styleType = styleType; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public int getRoomId() { - return roomId; - } - - public void setRoomId(int roomId) { - this.roomId = roomId; - } - - public int getRealRoomId() { - return realRoomId; - } - - public void setRealRoomId(int realRoomId) { - this.realRoomId = realRoomId; - } - - public int getRnd() { - return rnd; - } - - public void setRnd(int rnd) { - this.rnd = rnd; - } - - public String getTvId() { - return tvId; - } - - public void setTvId(String tvId) { - this.tvId = tvId; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WarningEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WarningEntity.java deleted file mode 100644 index 2a6da3f..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WarningEntity.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class WarningEntity implements DataEntity { - /** - * cmd : WARNING - * msg : 违反直播分区规范,请立即更换至游戏区 - * roomid : 1365604 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("msg") - private String message; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeActivityEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeActivityEntity.java deleted file mode 100644 index 0b6699b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeActivityEntity.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class WelcomeActivityEntity implements DataEntity { - /** - * cmd : WELCOME_ACTIVITY - * data : {"uid":49427998,"uname":"起个名真tm费事","type":"forever_love","display_mode":1} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * uid : 49427998 - * uname : 起个名真tm费事 - * type : forever_love - * display_mode : 1 - */ - - @SerializedName("uid") - private long userId; - @SerializedName("uname") - private String username; - @SerializedName("type") - private String type; - @SerializedName("display_mode") - private int displayMode; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getDisplayMode() { - return displayMode; - } - - public void setDisplayMode(int displayMode) { - this.displayMode = displayMode; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeEntity.java deleted file mode 100644 index da7512b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeEntity.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class WelcomeEntity implements DataEntity { - /** - * cmd : WELCOME - * data : {"uid":516505,"uname":"圣蝎","is_admin":false,"vip":1} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * uid : 516505 - * uname : 圣蝎 - * is_admin : false - * vip : 1 - */ - - @SerializedName("uid") - private long uid; - @SerializedName("uname") - private String userName; - @SerializedName("is_admin") - private boolean isAdmin; - @SerializedName("vip") - private int vip; - - public long getUid() { - return uid; - } - - public void setUid(long uid) { - this.uid = uid; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public boolean isAdmin() { - return isAdmin; - } - - public void setAdmin(boolean isAdmin) { - this.isAdmin = isAdmin; - } - - public int getVip() { - return vip; - } - - public void setVip(int vip) { - this.vip = vip; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeGuardEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeGuardEntity.java deleted file mode 100644 index 40c8044..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WelcomeGuardEntity.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -public class WelcomeGuardEntity implements DataEntity { - /** - * cmd : WELCOME_GUARD - * data : {"uid":23598108,"username":"lovevael","guard_level":3,"water_god":0} - * roomid : 43001 - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - @SerializedName("roomid") - private long roomId; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public static class Data { - /** - * uid : 23598108 - * username : lovevael - * guard_level : 3 - * water_god : 0 - */ - - @SerializedName("uid") - private long userId; - @SerializedName("username") - private String username; - @SerializedName("guard_level") - private int guardLevel; - @SerializedName("water_god") - private Integer waterGod; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public int getGuardLevel() { - return guardLevel; - } - - public void setGuardLevel(int guardLevel) { - this.guardLevel = guardLevel; - } - - public Integer getWaterGod() { - return waterGod; - } - - public void setWaterGod(Integer waterGod) { - this.waterGod = waterGod; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WishBottleEntity.java b/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WishBottleEntity.java deleted file mode 100644 index baf15ba..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/entity/WishBottleEntity.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.entity; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class WishBottleEntity implements DataEntity { - /** - * cmd : WISH_BOTTLE - * data : {"action":"update","id":1832,"wish":{"id":1832,"uid":110631,"type":1,"type_id":7,"wish_limit":99999,"wish_progress":14381,"status":1,"content":"女装直播","ctime":"2018-01-12 17:25:58","count_map":[1,3,5]}} - */ - - @SerializedName("cmd") - private String cmd; - @SerializedName("data") - private Data data; - - @Override - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * action : update - * id : 1832 - * wish : {"id":1832,"uid":110631,"type":1,"type_id":7,"wish_limit":99999,"wish_progress":14381,"status":1,"content":"女装直播","ctime":"2018-01-12 17:25:58","count_map":[1,3,5]} - */ - - @SerializedName("action") - private String action; - @SerializedName("id") - private long id; - @SerializedName("wish") - private Wish wish; - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public Wish getWish() { - return wish; - } - - public void setWish(Wish wish) { - this.wish = wish; - } - - public static class Wish { - /** - * id : 1832 - * uid : 110631 - * type : 1 - * type_id : 7 - * wish_limit : 99999 - * wish_progress : 14381 - * status : 1 - * content : 女装直播 - * ctime : 2018-01-12 17:25:58 - * count_map : [1,3,5] - */ - - @SerializedName("id") - private long id; - @SerializedName("uid") - private long userId; - @SerializedName("type") - private int type; - @SerializedName("type_id") - private int typeId; - @SerializedName("wish_limit") - private int wishLimit; - @SerializedName("wish_progress") - private int wishProgress; - @SerializedName("status") - private int status; - @SerializedName("content") - private String content; - @SerializedName("ctime") - private String ctime; - @SerializedName("count_map") - private List<Integer> countMap; - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public int getTypeId() { - return typeId; - } - - public void setTypeId(int typeId) { - this.typeId = typeId; - } - - public int getWishLimit() { - return wishLimit; - } - - public void setWishLimit(int wishLimit) { - this.wishLimit = wishLimit; - } - - public int getWishProgress() { - return wishProgress; - } - - public void setWishProgress(int wishProgress) { - this.wishProgress = wishProgress; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getCtime() { - return ctime; - } - - public void setCtime(String ctime) { - this.ctime = ctime; - } - - public List<Integer> getCountMap() { - return countMap; - } - - public void setCountMap(List<Integer> countMap) { - this.countMap = countMap; - } - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ActivityEventPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ActivityEventPackageEvent.java deleted file mode 100644 index 7c62c60..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ActivityEventPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.ActivityEventEntity; - -public class ActivityEventPackageEvent extends ReceiveDataPackageEvent<ActivityEventEntity> { - public ActivityEventPackageEvent(LiveClient source, ActivityEventEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ChangeRoomInfoPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ChangeRoomInfoPackageEvent.java deleted file mode 100644 index f95b2ea..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ChangeRoomInfoPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.ChangeRoomInfoEntity; - -public class ChangeRoomInfoPackageEvent extends ReceiveDataPackageEvent<ChangeRoomInfoEntity> { - public ChangeRoomInfoPackageEvent(LiveClient source, ChangeRoomInfoEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ComboEndPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ComboEndPackageEvent.java deleted file mode 100644 index a6c87d5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ComboEndPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.ComboEndEntity; - -public class ComboEndPackageEvent extends ReceiveDataPackageEvent<ComboEndEntity> { - public ComboEndPackageEvent(LiveClient source, ComboEndEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ComboSendPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ComboSendPackageEvent.java deleted file mode 100644 index ce4cc9a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ComboSendPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.ComboSendEntity; - -public class ComboSendPackageEvent extends ReceiveDataPackageEvent<ComboSendEntity> { - public ComboSendPackageEvent(LiveClient source, ComboSendEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ConnectSucceedEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ConnectSucceedEvent.java deleted file mode 100644 index 70229e8..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ConnectSucceedEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; - -public class ConnectSucceedEvent extends Event { - public ConnectSucceedEvent(LiveClient source) { - super(source); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ConnectionCloseEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ConnectionCloseEvent.java deleted file mode 100644 index 1b02561..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ConnectionCloseEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; - -public class ConnectionCloseEvent extends Event { - public ConnectionCloseEvent(LiveClient source) { - super(source); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/CutOffPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/CutOffPackageEvent.java deleted file mode 100644 index 8b4094d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/CutOffPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.CutOffEntity; - -public class CutOffPackageEvent extends ReceiveDataPackageEvent<CutOffEntity> { - public CutOffPackageEvent(LiveClient source, CutOffEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/DanMuMsgPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/DanMuMsgPackageEvent.java deleted file mode 100644 index 8943671..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/DanMuMsgPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.DanMuMsgEntity; - -public class DanMuMsgPackageEvent extends ReceiveDataPackageEvent<DanMuMsgEntity> { - public DanMuMsgPackageEvent(LiveClient source, DanMuMsgEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/EntryEffectPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/EntryEffectPackageEvent.java deleted file mode 100644 index cd7525c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/EntryEffectPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.EntryEffectEntity; - -public class EntryEffectPackageEvent extends ReceiveDataPackageEvent<EntryEffectEntity> { - public EntryEffectPackageEvent(LiveClient source, EntryEffectEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/Event.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/Event.java deleted file mode 100644 index 090da65..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/Event.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; - -import java.util.EventObject; - -public abstract class Event extends EventObject { - Event(LiveClient source) { - super(source); - } - - @Override - public Object getSource() { - return source; - } - - public LiveClient getSource0() { - return (LiveClient) source; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/EventCmdPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/EventCmdPackageEvent.java deleted file mode 100644 index 29e152a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/EventCmdPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.EventCmdEntity; - -public class EventCmdPackageEvent extends ReceiveDataPackageEvent<EventCmdEntity> { - public EventCmdPackageEvent(LiveClient source, EventCmdEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardBuyPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardBuyPackageEvent.java deleted file mode 100644 index ed37c79..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardBuyPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.GuardBuyEntity; - -public class GuardBuyPackageEvent extends ReceiveDataPackageEvent<GuardBuyEntity> { - public GuardBuyPackageEvent(LiveClient source, GuardBuyEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardLotteryStartPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardLotteryStartPackageEvent.java deleted file mode 100644 index ecb8dd3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardLotteryStartPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.GuardLotteryStartEntity; - -public class GuardLotteryStartPackageEvent extends ReceiveDataPackageEvent<GuardLotteryStartEntity> { - public GuardLotteryStartPackageEvent(LiveClient source, GuardLotteryStartEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardMsgPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardMsgPackageEvent.java deleted file mode 100644 index 2388eb4..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/GuardMsgPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.GuardMsgEntity; - -public class GuardMsgPackageEvent extends ReceiveDataPackageEvent<GuardMsgEntity> { - public GuardMsgPackageEvent(LiveClient source, GuardMsgEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/LivePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/LivePackageEvent.java deleted file mode 100644 index c45ece1..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/LivePackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.LiveEntity; - -public class LivePackageEvent extends ReceiveRoomStatusPackageEvent<LiveEntity> { - public LivePackageEvent(LiveClient source, LiveEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/NoticeMsgPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/NoticeMsgPackageEvent.java deleted file mode 100644 index 2e2e582..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/NoticeMsgPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.NoticeMsgEntity; - -public class NoticeMsgPackageEvent extends ReceiveDataPackageEvent<NoticeMsgEntity> { - public NoticeMsgPackageEvent(LiveClient source, NoticeMsgEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkAgainPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkAgainPackageEvent.java deleted file mode 100644 index 527357e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkAgainPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkAgainEntity; - -public class PkAgainPackageEvent extends ReceiveDataPackageEvent<PkAgainEntity> { - public PkAgainPackageEvent(LiveClient source, PkAgainEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkClickAgainPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkClickAgainPackageEvent.java deleted file mode 100644 index f5b385d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkClickAgainPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkClickAgainEntity; - -public class PkClickAgainPackageEvent extends ReceiveDataPackageEvent<PkClickAgainEntity> { - public PkClickAgainPackageEvent(LiveClient source, PkClickAgainEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkEndPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkEndPackageEvent.java deleted file mode 100644 index bd45fd9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkEndPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkEndEntity; - -public class PkEndPackageEvent extends ReceiveDataPackageEvent<PkEndEntity> { - public PkEndPackageEvent(LiveClient source, PkEndEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteFailPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteFailPackageEvent.java deleted file mode 100644 index 32553ac..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteFailPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkInviteFailEntity; - -public class PkInviteFailPackageEvent extends ReceiveDataPackageEvent<PkInviteFailEntity> { - public PkInviteFailPackageEvent(LiveClient source, PkInviteFailEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteInitPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteInitPackageEvent.java deleted file mode 100644 index 5f8b2a2..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteInitPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkInviteInitEntity; - -public class PkInviteInitPackageEvent extends ReceiveDataPackageEvent<PkInviteInitEntity> { - public PkInviteInitPackageEvent(LiveClient source, PkInviteInitEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteSwitchClosePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteSwitchClosePackageEvent.java deleted file mode 100644 index 18a10e9..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteSwitchClosePackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkInviteSwitchCloseEntity; - -public class PkInviteSwitchClosePackageEvent extends ReceiveDataPackageEvent<PkInviteSwitchCloseEntity> { - public PkInviteSwitchClosePackageEvent(LiveClient source, PkInviteSwitchCloseEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteSwitchOpenPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteSwitchOpenPackageEvent.java deleted file mode 100644 index b2db1aa..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkInviteSwitchOpenPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkInviteSwitchOpenEntity; - -public class PkInviteSwitchOpenPackageEvent extends ReceiveDataPackageEvent<PkInviteSwitchOpenEntity> { - public PkInviteSwitchOpenPackageEvent(LiveClient source, PkInviteSwitchOpenEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkMatchPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkMatchPackageEvent.java deleted file mode 100644 index ee8aa27..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkMatchPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkMatchEntity; - -public class PkMatchPackageEvent extends ReceiveDataPackageEvent<PkMatchEntity> { - public PkMatchPackageEvent(LiveClient source, PkMatchEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkMicEndPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkMicEndPackageEvent.java deleted file mode 100644 index dbb8648..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkMicEndPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkMicEndEntity; - -public class PkMicEndPackageEvent extends ReceiveDataPackageEvent<PkMicEndEntity> { - public PkMicEndPackageEvent(LiveClient source, PkMicEndEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkPrePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkPrePackageEvent.java deleted file mode 100644 index a1e293c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkPrePackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkPreEntity; - -public class PkPrePackageEvent extends ReceiveDataPackageEvent<PkPreEntity> { - public PkPrePackageEvent(LiveClient source, PkPreEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkProcessPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkProcessPackageEvent.java deleted file mode 100644 index e6dc6a8..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkProcessPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkProcessEntity; - -public class PkProcessPackageEvent extends ReceiveDataPackageEvent<PkProcessEntity> { - public PkProcessPackageEvent(LiveClient source, PkProcessEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkSettlePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkSettlePackageEvent.java deleted file mode 100644 index 573a51e..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkSettlePackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkSettleEntity; - -public class PkSettlePackageEvent extends ReceiveDataPackageEvent<PkSettleEntity> { - public PkSettlePackageEvent(LiveClient source, PkSettleEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkStartPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkStartPackageEvent.java deleted file mode 100644 index 357d10a..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PkStartPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PkStartEntity; - -public class PkStartPackageEvent extends ReceiveDataPackageEvent<PkStartEntity> { - public PkStartPackageEvent(LiveClient source, PkStartEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PreparingPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/PreparingPackageEvent.java deleted file mode 100644 index 7df9177..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/PreparingPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.PreparingEntity; - -public class PreparingPackageEvent extends ReceiveRoomStatusPackageEvent<PreparingEntity> { - public PreparingPackageEvent(LiveClient source, PreparingEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RaffleEndPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RaffleEndPackageEvent.java deleted file mode 100644 index 80a23f0..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RaffleEndPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RaffleEndEntity; - -public class RaffleEndPackageEvent extends ReceiveDataPackageEvent<RaffleEndEntity> { - public RaffleEndPackageEvent(LiveClient source, RaffleEndEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RaffleStartPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RaffleStartPackageEvent.java deleted file mode 100644 index ac80f4f..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RaffleStartPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RaffleStartEntity; - -public class RaffleStartPackageEvent extends ReceiveDataPackageEvent<RaffleStartEntity> { - public RaffleStartPackageEvent(LiveClient source, RaffleStartEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveDataPackageDebugEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveDataPackageDebugEvent.java deleted file mode 100644 index b2eae06..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveDataPackageDebugEvent.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.google.gson.JsonObject; -import com.hiczp.bilibili.api.live.socket.LiveClient; - -/** - * 这个事件用于调试, 任何 Data 数据包都会触发一次这个事件 - */ -public class ReceiveDataPackageDebugEvent extends Event { - private JsonObject jsonObject; - private String cmd; - - public ReceiveDataPackageDebugEvent(LiveClient source, JsonObject jsonObject, String cmd) { - super(source); - this.jsonObject = jsonObject; - this.cmd = cmd; - } - - public JsonObject getJsonObject() { - return jsonObject; - } - - public String getCmd() { - return cmd; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveDataPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveDataPackageEvent.java deleted file mode 100644 index c6d2876..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveDataPackageEvent.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.DataEntity; - -public abstract class ReceiveDataPackageEvent<T extends DataEntity> extends ReceivePackageEvent<T> { - ReceiveDataPackageEvent(LiveClient source, T entity) { - super(source, entity); - } - - public DataEntity getEntity0() { - return entity; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceivePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceivePackageEvent.java deleted file mode 100644 index ceb049c..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceivePackageEvent.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; - -public abstract class ReceivePackageEvent<T> extends Event { - protected T entity; - - ReceivePackageEvent(LiveClient source, T entity) { - super(source); - this.entity = entity; - } - - public T getEntity() { - return entity; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveRoomStatusPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveRoomStatusPackageEvent.java deleted file mode 100644 index 4463e77..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ReceiveRoomStatusPackageEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomStatusEntity; - -public abstract class ReceiveRoomStatusPackageEvent<T extends RoomStatusEntity> extends ReceiveDataPackageEvent<T> { - ReceiveRoomStatusPackageEvent(LiveClient source, T entity) { - super(source, entity); - } - - @Override - public RoomStatusEntity getEntity0() { - return entity; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomAdminsPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomAdminsPackageEvent.java deleted file mode 100644 index 1700091..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomAdminsPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomAdminsEntity; - -public class RoomAdminsPackageEvent extends ReceiveDataPackageEvent<RoomAdminsEntity> { - public RoomAdminsPackageEvent(LiveClient source, RoomAdminsEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomBlockMsgPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomBlockMsgPackageEvent.java deleted file mode 100644 index 6bbd443..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomBlockMsgPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomBlockMsgEntity; - -public class RoomBlockMsgPackageEvent extends ReceiveDataPackageEvent<RoomBlockMsgEntity> { - public RoomBlockMsgPackageEvent(LiveClient source, RoomBlockMsgEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomLockPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomLockPackageEvent.java deleted file mode 100644 index 2e80aac..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomLockPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomLockEntity; - -public class RoomLockPackageEvent extends ReceiveDataPackageEvent<RoomLockEntity> { - public RoomLockPackageEvent(LiveClient source, RoomLockEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomRankPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomRankPackageEvent.java deleted file mode 100644 index 1efe117..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomRankPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomRankEntity; - -public class RoomRankPackageEvent extends ReceiveDataPackageEvent<RoomRankEntity> { - public RoomRankPackageEvent(LiveClient source, RoomRankEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomShieldPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomShieldPackageEvent.java deleted file mode 100644 index bb6bd9b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomShieldPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomShieldEntity; - -public class RoomShieldPackageEvent extends ReceiveDataPackageEvent<RoomShieldEntity> { - public RoomShieldPackageEvent(LiveClient source, RoomShieldEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomSilentOffPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomSilentOffPackageEvent.java deleted file mode 100644 index 3751f3b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomSilentOffPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomSilentOffEntity; - -public class RoomSilentOffPackageEvent extends ReceiveDataPackageEvent<RoomSilentOffEntity> { - public RoomSilentOffPackageEvent(LiveClient source, RoomSilentOffEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomSilentOnPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomSilentOnPackageEvent.java deleted file mode 100644 index e6691bf..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/RoomSilentOnPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.RoomSilentOnEntity; - -public class RoomSilentOnPackageEvent extends ReceiveDataPackageEvent<RoomSilentOnEntity> { - public RoomSilentOnPackageEvent(LiveClient source, RoomSilentOnEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SendGiftPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/SendGiftPackageEvent.java deleted file mode 100644 index 5a19aac..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SendGiftPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.SendGiftEntity; - -public class SendGiftPackageEvent extends ReceiveDataPackageEvent<SendGiftEntity> { - public SendGiftPackageEvent(LiveClient source, SendGiftEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SendHeartBeatPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/SendHeartBeatPackageEvent.java deleted file mode 100644 index 6b53fff..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SendHeartBeatPackageEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; - -public class SendHeartBeatPackageEvent extends Event { - public SendHeartBeatPackageEvent(LiveClient source) { - super(source); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SpecialGiftPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/SpecialGiftPackageEvent.java deleted file mode 100644 index 7a953ec..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SpecialGiftPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.SpecialGiftEntity; - -public class SpecialGiftPackageEvent extends ReceiveDataPackageEvent<SpecialGiftEntity> { - public SpecialGiftPackageEvent(LiveClient source, SpecialGiftEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SysGiftPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/SysGiftPackageEvent.java deleted file mode 100644 index 99c13e1..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SysGiftPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.SysGiftEntity; - -public class SysGiftPackageEvent extends ReceiveDataPackageEvent<SysGiftEntity> { - public SysGiftPackageEvent(LiveClient source, SysGiftEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SysMsgPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/SysMsgPackageEvent.java deleted file mode 100644 index 2c75899..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/SysMsgPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.SysMsgEntity; - -public class SysMsgPackageEvent extends ReceiveDataPackageEvent<SysMsgEntity> { - public SysMsgPackageEvent(LiveClient source, SysMsgEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/TVEndPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/TVEndPackageEvent.java deleted file mode 100644 index 95e4a64..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/TVEndPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.TVEndEntity; - -public class TVEndPackageEvent extends ReceiveDataPackageEvent<TVEndEntity> { - public TVEndPackageEvent(LiveClient source, TVEndEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/TVStartPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/TVStartPackageEvent.java deleted file mode 100644 index ae73738..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/TVStartPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.TVStartEntity; - -public class TVStartPackageEvent extends ReceiveDataPackageEvent<TVStartEntity> { - public TVStartPackageEvent(LiveClient source, TVStartEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/UnknownPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/UnknownPackageEvent.java deleted file mode 100644 index 7dbf808..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/UnknownPackageEvent.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.google.gson.JsonObject; -import com.hiczp.bilibili.api.live.socket.LiveClient; - -/** - * 这个事件在收到 cmd 为未知值的 Data 数据包时触发 - */ -public class UnknownPackageEvent extends Event { - private JsonObject jsonObject; - private String cmd; - - public UnknownPackageEvent(LiveClient source, JsonObject jsonObject, String cmd) { - super(source); - this.jsonObject = jsonObject; - this.cmd = cmd; - } - - public JsonObject getJsonObject() { - return jsonObject; - } - - public String getCmd() { - return cmd; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ViewerCountPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/ViewerCountPackageEvent.java deleted file mode 100644 index 20b2233..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/ViewerCountPackageEvent.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; - -public class ViewerCountPackageEvent extends Event { - private int viewerCount; - - public ViewerCountPackageEvent(LiveClient source, int viewerCount) { - super(source); - this.viewerCount = viewerCount; - } - - public int getViewerCount() { - return viewerCount; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WarningPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/WarningPackageEvent.java deleted file mode 100644 index 8bc65d3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WarningPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.WarningEntity; - -public class WarningPackageEvent extends ReceiveDataPackageEvent<WarningEntity> { - public WarningPackageEvent(LiveClient source, WarningEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomeActivityPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomeActivityPackageEvent.java deleted file mode 100644 index 2391772..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomeActivityPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.WelcomeActivityEntity; - -public class WelcomeActivityPackageEvent extends ReceiveDataPackageEvent<WelcomeActivityEntity> { - public WelcomeActivityPackageEvent(LiveClient source, WelcomeActivityEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomeGuardPackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomeGuardPackageEvent.java deleted file mode 100644 index 72ea8a3..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomeGuardPackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.WelcomeGuardEntity; - -public class WelcomeGuardPackageEvent extends ReceiveDataPackageEvent<WelcomeGuardEntity> { - public WelcomeGuardPackageEvent(LiveClient source, WelcomeGuardEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomePackageEvent.java deleted file mode 100644 index 4610f52..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WelcomePackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.WelcomeEntity; - -public class WelcomePackageEvent extends ReceiveDataPackageEvent<WelcomeEntity> { - public WelcomePackageEvent(LiveClient source, WelcomeEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WishBottlePackageEvent.java b/src/main/java/com/hiczp/bilibili/api/live/socket/event/WishBottlePackageEvent.java deleted file mode 100644 index 975bebe..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/event/WishBottlePackageEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.event; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.WishBottleEntity; - -public class WishBottlePackageEvent extends ReceiveDataPackageEvent<WishBottleEntity> { - public WishBottlePackageEvent(LiveClient source, WishBottleEntity entity) { - super(source, entity); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/handler/LiveClientHandler.java b/src/main/java/com/hiczp/bilibili/api/live/socket/handler/LiveClientHandler.java deleted file mode 100644 index e7d25db..0000000 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/handler/LiveClientHandler.java +++ /dev/null @@ -1,195 +0,0 @@ -package com.hiczp.bilibili.api.live.socket.handler; - -import com.google.common.eventbus.EventBus; -import com.google.gson.*; -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.Package; -import com.hiczp.bilibili.api.live.socket.PackageHelper; -import com.hiczp.bilibili.api.live.socket.entity.DataEntity; -import com.hiczp.bilibili.api.live.socket.event.*; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.handler.timeout.IdleState; -import io.netty.handler.timeout.IdleStateEvent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.ByteArrayInputStream; -import java.io.InputStreamReader; -import java.lang.reflect.ParameterizedType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -public class LiveClientHandler extends SimpleChannelInboundHandler<Package> { - private static final Logger LOGGER = LoggerFactory.getLogger(LiveClientHandler.class); - private static final Gson GSON = new Gson(); - private static final Gson PRETTY_PRINTING_GSON = new GsonBuilder().setPrettyPrinting().create(); - private static final JsonParser JSON_PARSER = new JsonParser(); - private static final Object[] CMD_AND_EVENT_ARRAY = new Object[]{ - "ACTIVITY_EVENT", ActivityEventPackageEvent.class, //活动事件 - "CHANGE_ROOM_INFO", ChangeRoomInfoPackageEvent.class, //更换房间背景图片 - "COMBO_END", ComboEndPackageEvent.class, //COMBO - "COMBO_SEND", ComboSendPackageEvent.class, - "CUT_OFF", CutOffPackageEvent.class, //被 B站 管理员强制中断 - "DANMU_MSG", DanMuMsgPackageEvent.class, //弹幕消息 - "ENTRY_EFFECT", EntryEffectPackageEvent.class, //TODO 尚不明确 EntryEffect 和普通 Welcome 的区别 - "EVENT_CMD", EventCmdPackageEvent.class, //TODO 尚不明确 EVENT_CMD 的含义 - "GUARD_BUY", GuardBuyPackageEvent.class, //船票购买 - "GUARD_LOTTERY_START", GuardLotteryStartPackageEvent.class, //船票购买后的抽奖活动 - "GUARD_MSG", GuardMsgPackageEvent.class, //舰队消息(登船) - "LIVE", LivePackageEvent.class, //开始直播 - "NOTICE_MSG", NoticeMsgPackageEvent.class, //获得大奖的通知消息 - "PK_AGAIN", PkAgainPackageEvent.class, //PK - "PK_CLICK_AGAIN", PkClickAgainPackageEvent.class, - "PK_END", PkEndPackageEvent.class, - "PK_INVITE_FAIL", PkInviteFailPackageEvent.class, - "PK_INVITE_INIT", PkInviteInitPackageEvent.class, - "PK_INVITE_SWITCH_CLOSE", PkInviteSwitchClosePackageEvent.class, - "PK_INVITE_SWITCH_OPEN", PkInviteSwitchOpenPackageEvent.class, - "PK_MATCH", PkMatchPackageEvent.class, - "PK_MIC_END", PkMicEndPackageEvent.class, - "PK_PRE", PkPrePackageEvent.class, - "PK_PROCESS", PkProcessPackageEvent.class, - "PK_SETTLE", PkSettlePackageEvent.class, - "PK_START", PkStartPackageEvent.class, - "PREPARING", PreparingPackageEvent.class, //停止直播 - "RAFFLE_END", RaffleEndPackageEvent.class, //抽奖结束 - "RAFFLE_START", RaffleStartPackageEvent.class, //抽奖开始(小奖, 通常是不定期活动) - "ROOM_ADMINS", RoomAdminsPackageEvent.class, //房管变更 - "ROOM_BLOCK_MSG", RoomBlockMsgPackageEvent.class, //房间黑名单(房间管理员添加了一个用户到黑名单) - "ROOM_LOCK", RoomLockPackageEvent.class, //房间被封 - "ROOM_RANK", RoomRankPackageEvent.class, //小时榜 - "ROOM_SHIELD", RoomShieldPackageEvent.class, //房间屏蔽 - "ROOM_SILENT_OFF", RoomSilentOffPackageEvent.class, //房间结束禁言 - "ROOM_SILENT_ON", RoomSilentOnPackageEvent.class, //房间开启了禁言(禁止某一等级以下的用户发言) - "SEND_GIFT", SendGiftPackageEvent.class, //送礼 - "SPECIAL_GIFT", SpecialGiftPackageEvent.class, //节奏风暴(20 倍以下的) - "SYS_GIFT", SysGiftPackageEvent.class, //系统礼物(节奏风暴, 活动抽奖等) - "SYS_MSG", SysMsgPackageEvent.class, //系统消息(小电视等) - "TV_END", TVEndPackageEvent.class, //小电视抽奖结束(大奖的获得者信息) - "TV_START", TVStartPackageEvent.class, //小电视抽奖开始 - "WARNING", WarningPackageEvent.class, //警告消息 - "WELCOME_ACTIVITY", WelcomeActivityPackageEvent.class, //欢迎(活动) - "WELCOME", WelcomePackageEvent.class, //欢迎(通常是 VIP) - "WELCOME_GUARD", WelcomeGuardPackageEvent.class, //欢迎(舰队) - "WISH_BOTTLE", WishBottlePackageEvent.class //许愿瓶 - }; - private static final Map<String, Class<? extends ReceiveDataPackageEvent>> EVENT_MAP = new HashMap<>(); - - static { - for (int i = 0; i < CMD_AND_EVENT_ARRAY.length; i += 2) { - //noinspection unchecked - EVENT_MAP.put((String) CMD_AND_EVENT_ARRAY[i], (Class<? extends ReceiveDataPackageEvent>) CMD_AND_EVENT_ARRAY[i + 1]); - } - } - - private final LiveClient liveClient; - private final EventBus eventBus; - private final long roomId; - private final long userId; - - public LiveClientHandler(LiveClient liveClient, long roomId, long userId) { - this.liveClient = liveClient; - this.eventBus = liveClient.getEventBus(); - this.roomId = roomId; - this.userId = userId; - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - super.channelActive(ctx); - LOGGER.debug("Sending Enter Room package"); - ctx.writeAndFlush(PackageHelper.createEnterRoomPackage(roomId, userId)); - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - super.channelInactive(ctx); - eventBus.post(new ConnectionCloseEvent(liveClient)); - } - - @Override - public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { - super.userEventTriggered(ctx, evt); - if (evt instanceof IdleStateEvent) { - IdleStateEvent idleStateEvent = (IdleStateEvent) evt; - if (idleStateEvent.state() == IdleState.READER_IDLE) { - ctx.close(); - } - } - } - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Package msg) throws Exception { - switch (msg.getPackageType()) { - case DATA: { - JsonObject jsonObject; - String cmd; - try { - //强制使用 UTF-8, 避免在 NT 平台可能出现的乱码问题 - jsonObject = JSON_PARSER.parse(new InputStreamReader(new ByteArrayInputStream(msg.getContent()), StandardCharsets.UTF_8)) - .getAsJsonObject(); - cmd = jsonObject.get("cmd").getAsString(); - } catch (JsonSyntaxException | IllegalStateException | NullPointerException e) { //json 无法解析或者 cmd 字段不存在 - LOGGER.error("Receive invalid json in room {}: \n{}", - liveClient.getRoomIdOrShowRoomId(), - new String(msg.getContent(), StandardCharsets.UTF_8) - ); - e.printStackTrace(); - break; - } - eventBus.post(new ReceiveDataPackageDebugEvent(liveClient, jsonObject, cmd)); //debug 用 - - Class<? extends ReceiveDataPackageEvent> eventType = EVENT_MAP.get(cmd); - - //UnknownPackage - if (eventType == null) { - LOGGER.error("Received unknown json below in room {}: \n{}", - liveClient.getRoomIdOrShowRoomId(), - PRETTY_PRINTING_GSON.toJson(jsonObject) - ); - eventBus.post(new UnknownPackageEvent(liveClient, jsonObject, cmd)); - break; - } - - @SuppressWarnings("unchecked") - Class<? extends DataEntity> entityType = (Class<? extends DataEntity>) ((ParameterizedType) eventType.getGenericSuperclass()).getActualTypeArguments()[0]; - DataEntity entityInstance; - try { - entityInstance = GSON.fromJson(jsonObject, entityType); - } catch (JsonParseException e) { //json 无法解析 - LOGGER.error("Json parse error in room {}: {}, json below: \n{}", - liveClient.getRoomIdOrShowRoomId(), - e.getMessage(), - PRETTY_PRINTING_GSON.toJson(jsonObject) - ); - break; - } - - ReceiveDataPackageEvent eventInstance = eventType.getConstructor(LiveClient.class, entityType).newInstance(liveClient, entityInstance); - eventBus.post(eventInstance); - } - break; - case VIEWER_COUNT: { - eventBus.post(new ViewerCountPackageEvent(liveClient, ByteBuffer.wrap(msg.getContent()).getInt())); - } - break; - case ENTER_ROOM_SUCCESS: { - eventBus.post(new ConnectSucceedEvent(liveClient)); - ctx.executor().scheduleAtFixedRate( - () -> { - ctx.writeAndFlush(PackageHelper.createHeartBeatPackage()); - eventBus.post(new SendHeartBeatPackageEvent(liveClient)); - }, - 0L, - 30L, - TimeUnit.SECONDS - ); - } - break; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/CaptchaService.java b/src/main/java/com/hiczp/bilibili/api/passport/CaptchaService.java deleted file mode 100644 index 2578a95..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/CaptchaService.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hiczp.bilibili.api.passport; - -import okhttp3.ResponseBody; -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Header; - -import java.io.IOException; -import java.io.InputStream; - -public interface CaptchaService { - /** - * 获得验证码(图形) - * - * @param cookies 请求时使用的 cookies 与返回的验证码是配对的 - * @return 返回一张 PNG - */ - @GET("captcha") - Call<ResponseBody> getCaptcha(@Header("Cookie") String cookies); - - /** - * 以流的形式获得验证码 - * - * @param cookies 请求时使用的 cookies 与返回的验证码是配对的 - * @return 一张 PNG 图片的输入流 - * @throws IOException 网络错误 - */ - default InputStream getCaptchaAsStream(String cookies) throws IOException { - return getCaptcha(cookies) - .execute() - .body() - .byteStream(); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/PassportService.java b/src/main/java/com/hiczp/bilibili/api/passport/PassportService.java deleted file mode 100644 index 3a9fd04..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/PassportService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.hiczp.bilibili.api.passport; - -import com.hiczp.bilibili.api.passport.entity.*; -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.POST; -import retrofit2.http.Query; - -public interface PassportService { - /** - * 获得公钥 - */ - @POST("api/oauth2/getKey") - Call<KeyEntity> getKey(); - - /** - * 登录 - * - * @param username 用户名 - * @param password 密码 - */ - @POST("api/oauth2/login") - Call<LoginResponseEntity> login(@Query("username") String username, @Query("password") String password); - - /** - * 带验证码的登录 - * 在一段时间内进行多次错误的登录, 将被要求输入验证码 - * - * @param username 用户名 - * @param password 密码 - * @param captcha 验证码 - * @param cookies cookies - * @see CaptchaService - */ - @POST("api/oauth2/login") - Call<LoginResponseEntity> login(@Query("username") String username, @Query("password") String password, @Query("captcha") String captcha, @Header("Cookie") String cookies); - - /** - * 获得账户信息 - * - * @param accessToken token - */ - @GET("api/oauth2/info") - Call<InfoEntity> getInfo(@Query("access_token") String accessToken); - - /** - * 刷新 token - * - * @param accessToken token - * @param refreshToken refreshToken - */ - @POST("api/oauth2/refreshToken") - Call<RefreshTokenResponseEntity> refreshToken(@Query("access_token") String accessToken, @Query("refresh_token") String refreshToken); - - /** - * 注销 - * - * @param accessToken token - */ - @POST("api/oauth2/revoke") - Call<LogoutResponseEntity> logout(@Query("access_token") String accessToken); -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/SsoService.java b/src/main/java/com/hiczp/bilibili/api/passport/SsoService.java deleted file mode 100644 index 3ce6e39..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/SsoService.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hiczp.bilibili.api.passport; - -import okhttp3.ResponseBody; -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Query; - -import javax.annotation.Nullable; - -/** - * sso 很特别, 它可能返回的是一个 HTML 页面, 所以单独分出来 - * sso 会经过两次 302 跳转, 需要保存其中的 cookie, 然后才能抵达最终页面并且进入 cookie 登录状态 - */ -public interface SsoService { - /** - * 通过 token 得到 cookie - * - * @param goUrl 全部的跳转完成后, 会进入指定的 URL, 如果 goUrl 为 null, 则跳转到 B站 首页 - * @return 最终跳转完成后的页面 - */ - @GET("api/login/sso") - Call<ResponseBody> sso(@Nullable @Query("gourl") String goUrl); -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/entity/InfoEntity.java b/src/main/java/com/hiczp/bilibili/api/passport/entity/InfoEntity.java deleted file mode 100644 index 6d0dd9b..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/entity/InfoEntity.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.hiczp.bilibili.api.passport.entity; - -import com.google.gson.annotations.SerializedName; - -public class InfoEntity extends ResponseEntity { - /** - * ts : 1509555703 - * code : 0 - * data : {"mid":20293030,"appid":878,"access_token":"ef3981aefcf27013dce6d0571eca79d9","expires_in":1465966,"userid":"bili_1178318619","uname":"czp3009"} - */ - - @SerializedName("ts") - private long timestamp; - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * mid : 20293030 - * appid : 878 - * access_token : ef3981aefcf27013dce6d0571eca79d9 - * expires_in : 1465966 - * userid : bili_1178318619 - * uname : czp3009 - */ - - @SerializedName("mid") - private long userId; - @SerializedName("appid") - private int appId; - @SerializedName("access_token") - private String accessToken; - @SerializedName("expires_in") - private long expiresIn; - @SerializedName("userid") - private String userIdString; - @SerializedName("uname") - private String username; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public int getAppId() { - return appId; - } - - public void setAppId(int appId) { - this.appId = appId; - } - - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public long getExpiresIn() { - return expiresIn; - } - - public void setExpiresIn(long expiresIn) { - this.expiresIn = expiresIn; - } - - public String getUserIdString() { - return userIdString; - } - - public void setUserIdString(String userIdString) { - this.userIdString = userIdString; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/entity/KeyEntity.java b/src/main/java/com/hiczp/bilibili/api/passport/entity/KeyEntity.java deleted file mode 100644 index 0abf482..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/entity/KeyEntity.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.hiczp.bilibili.api.passport.entity; - -import com.google.gson.annotations.SerializedName; - -public class KeyEntity extends ResponseEntity { - /** - * ts : 1509555699 - * code : 0 - * data : {"hash":"8b9030ef5ff6d9f6","key":"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdScM09sZJqFPX7bvmB2y6i08J\nbHsa0v4THafPbJN9NoaZ9Djz1LmeLkVlmWx1DwgHVW+K7LVWT5FV3johacVRuV98\n37+RNntEK6SE82MPcl7fA++dmW2cLlAjsIIkrX+aIvvSGCuUfcWpWFy3YVDqhuHr\nNDjdNcaefJIQHMW+sQIDAQAB\n-----END PUBLIC KEY-----\n"} - */ - - @SerializedName("ts") - private long timestamp; - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * hash : 8b9030ef5ff6d9f6 - * key : -----BEGIN PUBLIC KEY----- - * MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdScM09sZJqFPX7bvmB2y6i08J - * bHsa0v4THafPbJN9NoaZ9Djz1LmeLkVlmWx1DwgHVW+K7LVWT5FV3johacVRuV98 - * 37+RNntEK6SE82MPcl7fA++dmW2cLlAjsIIkrX+aIvvSGCuUfcWpWFy3YVDqhuHr - * NDjdNcaefJIQHMW+sQIDAQAB - * -----END PUBLIC KEY----- - */ - - @SerializedName("hash") - private String hash; - @SerializedName("key") - private String key; - - public String getHash() { - return hash; - } - - public void setHash(String hash) { - this.hash = hash; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/entity/LoginResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/passport/entity/LoginResponseEntity.java deleted file mode 100644 index ca18b12..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/entity/LoginResponseEntity.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.hiczp.bilibili.api.passport.entity; - -import com.google.gson.annotations.SerializedName; -import com.hiczp.bilibili.api.BilibiliAccount; - -public class LoginResponseEntity extends ResponseEntity { - /** - * code : 0 - * data : {"access_token":"8501735069b043dd62c3bb88810444fd","refresh_token":"d41affc888082ffa11d7d2c37ad0cf2c","mid":20293030,"expires_in":2592000} - * ts : 1509734025 - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - @SerializedName("ts") - private long timestamp; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public BilibiliAccount toBilibiliAccount() { - return new BilibiliAccount( - this.data.accessToken, - this.data.refreshToken, - this.data.userId, - this.data.expiresIn, - this.timestamp - ); - } - - public static class Data { - /** - * access_token : 8501735069b043dd62c3bb88810444fd - * refresh_token : d41affc888082ffa11d7d2c37ad0cf2c - * mid : 20293030 - * expires_in : 2592000 - */ - - @SerializedName("access_token") - private String accessToken; - @SerializedName("refresh_token") - private String refreshToken; - @SerializedName("mid") - private long userId; - @SerializedName("expires_in") - private long expiresIn; - - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public String getRefreshToken() { - return refreshToken; - } - - public void setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public long getExpiresIn() { - return expiresIn; - } - - public void setExpiresIn(long expiresIn) { - this.expiresIn = expiresIn; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/entity/LogoutResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/passport/entity/LogoutResponseEntity.java deleted file mode 100644 index ab10e71..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/entity/LogoutResponseEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hiczp.bilibili.api.passport.entity; - -import com.google.gson.annotations.SerializedName; - -public class LogoutResponseEntity extends ResponseEntity { - /** - * message : access_key not found. - * ts : 1509555707 - * code : -901 - */ - - @SerializedName("ts") - private long timestamp; - @SerializedName("code") - private int code; - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/entity/RefreshTokenResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/passport/entity/RefreshTokenResponseEntity.java deleted file mode 100644 index bfc32e1..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/entity/RefreshTokenResponseEntity.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.hiczp.bilibili.api.passport.entity; - -import com.google.gson.annotations.SerializedName; -import com.hiczp.bilibili.api.BilibiliAccount; - -public class RefreshTokenResponseEntity extends ResponseEntity { - /** - * ts : 1509734125 - * code : 0 - * data : {"mid":20293030,"refresh_token":"19d64022154e033574df4c753fc7926d","access_token":"f64530df1fb491ae090b67e191d86f58","expires_in":2592000} - */ - - @SerializedName("ts") - private long ts; - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public long getTs() { - return ts; - } - - public void setTs(long ts) { - this.ts = ts; - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public BilibiliAccount toBilibiliAccount() { - return new BilibiliAccount( - this.data.accessToken, - this.data.refreshToken, - this.data.userId, - this.data.expiresIn, - this.ts - ); - } - - public static class Data { - /** - * mid : 20293030 - * refresh_token : 19d64022154e033574df4c753fc7926d - * access_token : f64530df1fb491ae090b67e191d86f58 - * expires_in : 2592000 - */ - - @SerializedName("mid") - private long userId; - @SerializedName("refresh_token") - private String refreshToken; - @SerializedName("access_token") - private String accessToken; - @SerializedName("expires_in") - private long expiresIn; - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getRefreshToken() { - return refreshToken; - } - - public void setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - } - - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public long getExpiresIn() { - return expiresIn; - } - - public void setExpiresIn(long expiresIn) { - this.expiresIn = expiresIn; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/entity/ResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/passport/entity/ResponseEntity.java deleted file mode 100644 index f98a624..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/entity/ResponseEntity.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.hiczp.bilibili.api.passport.entity; - -import com.google.gson.annotations.SerializedName; - -public abstract class ResponseEntity { - //有一些返回的模型中的 code 是字符串, 所以这个父类不能包含 code - @SerializedName("message") - private String message; - - public String getMessage() { - return message; - } - - public ResponseEntity setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/passport/exception/CaptchaMismatchException.java b/src/main/java/com/hiczp/bilibili/api/passport/exception/CaptchaMismatchException.java deleted file mode 100644 index 36ad9f5..0000000 --- a/src/main/java/com/hiczp/bilibili/api/passport/exception/CaptchaMismatchException.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.hiczp.bilibili.api.passport.exception; - -public class CaptchaMismatchException extends RuntimeException { - public CaptchaMismatchException(String message) { - super(message); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliCaptchaProvider.java b/src/main/java/com/hiczp/bilibili/api/provider/BilibiliCaptchaProvider.java deleted file mode 100644 index 82dbe4d..0000000 --- a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliCaptchaProvider.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.hiczp.bilibili.api.provider; - -import com.hiczp.bilibili.api.passport.CaptchaService; - -public interface BilibiliCaptchaProvider { - CaptchaService getCaptchaService(); -} diff --git a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliServiceProvider.java b/src/main/java/com/hiczp/bilibili/api/provider/BilibiliServiceProvider.java deleted file mode 100644 index 07a0112..0000000 --- a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliServiceProvider.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.provider; - -import com.hiczp.bilibili.api.live.LiveService; -import com.hiczp.bilibili.api.passport.PassportService; - -public interface BilibiliServiceProvider { - PassportService getPassportService(); - - LiveService getLiveService(); -} diff --git a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliSsoProvider.java b/src/main/java/com/hiczp/bilibili/api/provider/BilibiliSsoProvider.java deleted file mode 100644 index fcaf2e8..0000000 --- a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliSsoProvider.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hiczp.bilibili.api.provider; - -import com.hiczp.bilibili.api.passport.SsoService; -import okhttp3.Cookie; -import okhttp3.CookieJar; -import okhttp3.HttpUrl; - -import java.io.IOException; -import java.util.List; -import java.util.Map; - -public interface BilibiliSsoProvider { - SsoService getSsoService(CookieJar cookieJar); - - //获取用于进行 sso 登录的初始 URL - HttpUrl getSsoUrl(String goUrl); - - //获取当前 token 对应的 cookies - Map<String, List<Cookie>> toCookies() throws IOException; -} diff --git a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliWebAPIProvider.java b/src/main/java/com/hiczp/bilibili/api/provider/BilibiliWebAPIProvider.java deleted file mode 100644 index d4b33b1..0000000 --- a/src/main/java/com/hiczp/bilibili/api/provider/BilibiliWebAPIProvider.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.hiczp.bilibili.api.provider; - -import com.hiczp.bilibili.api.web.BilibiliWebAPI; - -import java.io.IOException; - -public interface BilibiliWebAPIProvider { - BilibiliWebAPI getBilibiliWebAPI() throws IOException; -} diff --git a/src/main/java/com/hiczp/bilibili/api/provider/LiveClientProvider.java b/src/main/java/com/hiczp/bilibili/api/provider/LiveClientProvider.java deleted file mode 100644 index cc26664..0000000 --- a/src/main/java/com/hiczp/bilibili/api/provider/LiveClientProvider.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.hiczp.bilibili.api.provider; - -import com.hiczp.bilibili.api.live.socket.LiveClient; -import io.netty.channel.EventLoopGroup; - -public interface LiveClientProvider { - LiveClient getLiveClient(EventLoopGroup eventLoopGroup, long roomId, boolean isRealRoomId); - - default LiveClient getLiveClient(EventLoopGroup eventLoopGroup, long showRoomId) { - return getLiveClient(eventLoopGroup, showRoomId, false); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/BilibiliWebAPI.java b/src/main/java/com/hiczp/bilibili/api/web/BilibiliWebAPI.java deleted file mode 100644 index 1e744b1..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/BilibiliWebAPI.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.hiczp.bilibili.api.web; - -import com.hiczp.bilibili.api.BaseUrlDefinition; -import com.hiczp.bilibili.api.interceptor.AddFixedHeadersInterceptor; -import com.hiczp.bilibili.api.interceptor.ErrorResponseConverterInterceptor; -import com.hiczp.bilibili.api.web.cookie.SimpleCookieJar; -import com.hiczp.bilibili.api.web.live.LiveService; -import okhttp3.Cookie; -import okhttp3.Interceptor; -import okhttp3.OkHttpClient; -import okhttp3.logging.HttpLoggingInterceptor; -import retrofit2.Retrofit; -import retrofit2.converter.gson.GsonConverterFactory; - -import javax.annotation.Nonnull; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class BilibiliWebAPI { - private final BrowserProperties browserProperties; - private final SimpleCookieJar cookieJar; - - private LiveService liveService; - - public BilibiliWebAPI(BrowserProperties browserProperties, Map<String, List<Cookie>> cookiesMap) { - this.browserProperties = browserProperties; - this.cookieJar = new SimpleCookieJar(cookiesMap); - } - - public BilibiliWebAPI(SimpleCookieJar cookieJar) { - this(BrowserProperties.defaultSetting(), cookieJar.getCookiesMap()); - } - - public BilibiliWebAPI(Map<String, List<Cookie>> cookiesMap) { - this(BrowserProperties.defaultSetting(), cookiesMap); - } - - public BilibiliWebAPI(BrowserProperties browserProperties, SimpleCookieJar cookieJar) { - this(browserProperties, cookieJar.getCookiesMap()); - } - - public LiveService getLiveService() { - if (liveService == null) { - liveService = getLiveService(Collections.emptyList(), HttpLoggingInterceptor.Level.BASIC); - } - return liveService; - } - - public LiveService getLiveService(@Nonnull List<Interceptor> interceptors, @Nonnull HttpLoggingInterceptor.Level logLevel) { - OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder(); - - okHttpClientBuilder - .cookieJar(cookieJar) - .addInterceptor(new AddFixedHeadersInterceptor( - "User-Agent", browserProperties.getUserAgent() - )) - .addInterceptor(new ErrorResponseConverterInterceptor()); - - interceptors.forEach(okHttpClientBuilder::addInterceptor); - - okHttpClientBuilder - .addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(logLevel)); - - return new Retrofit.Builder() - .baseUrl(BaseUrlDefinition.LIVE) - .addConverterFactory(GsonConverterFactory.create()) - .client(okHttpClientBuilder.build()) - .build() - .create(LiveService.class); - } - - public SimpleCookieJar getCookieJar() { - return cookieJar; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/BrowserProperties.java b/src/main/java/com/hiczp/bilibili/api/web/BrowserProperties.java deleted file mode 100644 index 2705f98..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/BrowserProperties.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hiczp.bilibili.api.web; - -public class BrowserProperties { - private String userAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"; - - private BrowserProperties() { - - } - - public static BrowserProperties defaultSetting() { - return new BrowserProperties(); - } - - public String getUserAgent() { - return userAgent; - } - - public BrowserProperties setUserAgent(String userAgent) { - this.userAgent = userAgent; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/cookie/SimpleCookieJar.java b/src/main/java/com/hiczp/bilibili/api/web/cookie/SimpleCookieJar.java deleted file mode 100644 index 0ad96f6..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/cookie/SimpleCookieJar.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.hiczp.bilibili.api.web.cookie; - -import okhttp3.Cookie; -import okhttp3.CookieJar; -import okhttp3.HttpUrl; - -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Vector; -import java.util.concurrent.ConcurrentHashMap; -import java.util.stream.Collectors; - -public class SimpleCookieJar implements CookieJar { - private final Map<String, List<Cookie>> cookiesMap; - - public SimpleCookieJar() { - cookiesMap = new ConcurrentHashMap<>(); - } - - public SimpleCookieJar(@Nonnull Map<String, List<Cookie>> cookiesMap) { - this(); - cookiesMap.forEach((domain, cookies) -> - this.cookiesMap.put(domain, new Vector<>(cookies)) - ); - } - - @Override - public void saveFromResponse(HttpUrl url, List<Cookie> cookies) { - cookies.forEach(cookie -> { - String domain = cookie.domain(); - List<Cookie> savedCookies; - synchronized (cookiesMap) { - savedCookies = cookiesMap.get(domain); - if (savedCookies == null) { - savedCookies = new Vector<>(); - savedCookies.add(cookie); - cookiesMap.put(domain, savedCookies); - return; - } - } - for (int i = savedCookies.size() - 1; i >= 0; i--) { - Cookie current = savedCookies.get(i); - if (current.name().equals(cookie.name())) { - savedCookies.remove(current); - } - } - savedCookies.add(cookie); - }); - } - - @Override - public List<Cookie> loadForRequest(HttpUrl url) { - return getCookiesForHost(url.host()); - } - - public List<Cookie> getCookiesForHost(@Nonnull String host) { - List<Cookie> cookieList = new ArrayList<>(); - cookiesMap.forEach((domain, cookies) -> { - if (host.endsWith(domain)) { - //移除过期的 cookies - for (int i = cookies.size() - 1; i >= 0; i--) { - Cookie current = cookies.get(i); - if (current.expiresAt() < System.currentTimeMillis()) { - cookies.remove(current); - } - } - cookieList.addAll(cookies); - } - }); - return cookieList; - } - - public String getCookiesStringForHost(String host) { - return getCookiesForHost(host).stream() - .map(cookie -> String.format("%s=%s", cookie.name(), cookie.value())) - .collect(Collectors.joining(";")); - } - - public Map<String, List<Cookie>> getCookiesMap() { - return cookiesMap; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/live/LiveService.java b/src/main/java/com/hiczp/bilibili/api/web/live/LiveService.java deleted file mode 100644 index 04f31fc..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/live/LiveService.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.hiczp.bilibili.api.web.live; - -import com.hiczp.bilibili.api.web.live.entity.SendHeartBeatResponseEntity; -import com.hiczp.bilibili.api.web.live.entity.UserInfoEntity; -import retrofit2.Call; -import retrofit2.http.GET; -import retrofit2.http.Query; - -public interface LiveService { - /** - * 直播间心跳包 - * - * @param timestamp 时间戳(不是 unix 时间戳) - * @return 未登录时返回 401 - */ - @GET("feed/v1/feed/heartBeat") - Call<SendHeartBeatResponseEntity> sendHeartBeat(@Query("_") long timestamp); - - default Call<SendHeartBeatResponseEntity> sendHeartBeat() { - return sendHeartBeat(System.currentTimeMillis()); - } - - /** - * 获取用户信息 - * - * @param timestamp 时间戳(不是 unix 时间戳) - * @return 成功时, code 为 "REPONSE_OK", 未登录时返回 500 - */ - @GET("User/getUserInfo") - Call<UserInfoEntity> getUserInfo(@Query("ts") long timestamp); - - default Call<UserInfoEntity> getUserInfo() { - return getUserInfo(System.currentTimeMillis()); - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/live/entity/ResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/web/live/entity/ResponseEntity.java deleted file mode 100644 index 8a51abb..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/live/entity/ResponseEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hiczp.bilibili.api.web.live.entity; - -import com.google.gson.annotations.SerializedName; - -public abstract class ResponseEntity { - //有一些返回的模型中的 code 是字符串, 所以这个父类不能包含 code - @SerializedName("msg") - private String msg; - @SerializedName("message") - private String message; - - public String getMsg() { - return msg; - } - - public ResponseEntity setMsg(String msg) { - this.msg = msg; - return this; - } - - public String getMessage() { - return message; - } - - public ResponseEntity setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/live/entity/SendHeartBeatResponseEntity.java b/src/main/java/com/hiczp/bilibili/api/web/live/entity/SendHeartBeatResponseEntity.java deleted file mode 100644 index 0bb8e60..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/live/entity/SendHeartBeatResponseEntity.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.hiczp.bilibili.api.web.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class SendHeartBeatResponseEntity extends ResponseEntity { - /** - * code : 0 - * msg : success - * message : success - * data : {"open":1,"has_new":0,"count":0} - */ - - @SerializedName("code") - private int code; - @SerializedName("data") - private Data data; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * open : 1 - * has_new : 0 - * count : 0 - */ - - @SerializedName("open") - private int open; - @SerializedName("has_new") - private int hasNew; - @SerializedName("count") - private int count; - - public int getOpen() { - return open; - } - - public void setOpen(int open) { - this.open = open; - } - - public int getHasNew() { - return hasNew; - } - - public void setHasNew(int hasNew) { - this.hasNew = hasNew; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - } -} diff --git a/src/main/java/com/hiczp/bilibili/api/web/live/entity/UserInfoEntity.java b/src/main/java/com/hiczp/bilibili/api/web/live/entity/UserInfoEntity.java deleted file mode 100644 index bf79dc7..0000000 --- a/src/main/java/com/hiczp/bilibili/api/web/live/entity/UserInfoEntity.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.hiczp.bilibili.api.web.live.entity; - -import com.google.gson.annotations.SerializedName; - -public class UserInfoEntity extends ResponseEntity { - /** - * code : REPONSE_OK - * msg : ok - * data : {"uname":"czp3009","face":"http://i2.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg","silver":22528,"gold":0,"achieve":135,"vip":0,"svip":0,"user_level":25,"user_next_level":26,"user_intimacy":926000,"user_next_intimacy":10000000,"user_level_rank":">50000","billCoin":699} - */ - - @SerializedName("code") - private String code; - @SerializedName("data") - private Data data; - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public Data getData() { - return data; - } - - public void setData(Data data) { - this.data = data; - } - - public static class Data { - /** - * uname : czp3009 - * face : http://i2.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg - * silver : 22528 - * gold : 0 - * achieve : 135 - * vip : 0 - * svip : 0 - * user_level : 25 - * user_next_level : 26 - * user_intimacy : 926000 - * user_next_intimacy : 10000000 - * user_level_rank : >50000 - * billCoin : 699 - */ - - @SerializedName("uname") - private String username; - @SerializedName("face") - private String face; - @SerializedName("silver") - private int silver; - @SerializedName("gold") - private int gold; - @SerializedName("achieve") - private int achieve; - @SerializedName("vip") - private int vip; - @SerializedName("svip") - private int svip; - @SerializedName("user_level") - private int userLevel; - @SerializedName("user_next_level") - private int userNextLevel; - @SerializedName("user_intimacy") - private int userIntimacy; - @SerializedName("user_next_intimacy") - private int userNextIntimacy; - @SerializedName("user_level_rank") - private String userLevelRank; - @SerializedName("billCoin") - private int billCoin; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFace() { - return face; - } - - public void setFace(String face) { - this.face = face; - } - - public int getSilver() { - return silver; - } - - public void setSilver(int silver) { - this.silver = silver; - } - - public int getGold() { - return gold; - } - - public void setGold(int gold) { - this.gold = gold; - } - - public int getAchieve() { - return achieve; - } - - public void setAchieve(int achieve) { - this.achieve = achieve; - } - - public int getVip() { - return vip; - } - - public void setVip(int vip) { - this.vip = vip; - } - - public int getSvip() { - return svip; - } - - public void setSvip(int svip) { - this.svip = svip; - } - - public int getUserLevel() { - return userLevel; - } - - public void setUserLevel(int userLevel) { - this.userLevel = userLevel; - } - - public int getUserNextLevel() { - return userNextLevel; - } - - public void setUserNextLevel(int userNextLevel) { - this.userNextLevel = userNextLevel; - } - - public int getUserIntimacy() { - return userIntimacy; - } - - public void setUserIntimacy(int userIntimacy) { - this.userIntimacy = userIntimacy; - } - - public int getUserNextIntimacy() { - return userNextIntimacy; - } - - public void setUserNextIntimacy(int userNextIntimacy) { - this.userNextIntimacy = userNextIntimacy; - } - - public String getUserLevelRank() { - return userLevelRank; - } - - public void setUserLevelRank(String userLevelRank) { - this.userLevelRank = userLevelRank; - } - - public int getBillCoin() { - return billCoin; - } - - public void setBillCoin(int billCoin) { - this.billCoin = billCoin; - } - } -} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/BaseUrl.kt b/src/main/kotlin/com/hiczp/bilibili/api/BaseUrl.kt new file mode 100644 index 0000000..ed8bd4d --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/BaseUrl.kt @@ -0,0 +1,41 @@ +package com.hiczp.bilibili.api + +/** + * 各个站点的域名 + */ +object BaseUrl { + /** + * 用户鉴权 + */ + const val passport = "https://passport.bilibili.com" + + /** + * 消息 + */ + const val message = "https://message.bilibili.com" + + /** + * 主站 + */ + const val app = "https://app.bilibili.com" + + /** + * 这也是主站 + */ + const val main = "https://api.bilibili.com" + + /** + * 小视频 + */ + const val vc = "https://api.vc.bilibili.com" + + /** + * 创作中心 + */ + const val member = "https://member.bilibili.com" + + /** + * 直播 + */ + const val live = "https://api.live.bilibili.com" +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClient.kt b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClient.kt new file mode 100644 index 0000000..edbdcec --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClient.kt @@ -0,0 +1,325 @@ +package com.hiczp.bilibili.api + +import com.hiczp.bilibili.api.app.AppAPI +import com.hiczp.bilibili.api.danmaku.DanmakuAPI +import com.hiczp.bilibili.api.live.LiveAPI +import com.hiczp.bilibili.api.main.MainAPI +import com.hiczp.bilibili.api.member.MemberAPI +import com.hiczp.bilibili.api.message.MessageAPI +import com.hiczp.bilibili.api.passport.PassportAPI +import com.hiczp.bilibili.api.passport.model.LoginResponse +import com.hiczp.bilibili.api.player.PlayerAPI +import com.hiczp.bilibili.api.player.PlayerInterceptor +import com.hiczp.bilibili.api.retrofit.Header +import com.hiczp.bilibili.api.retrofit.Param +import com.hiczp.bilibili.api.retrofit.exception.BilibiliApiException +import com.hiczp.bilibili.api.retrofit.interceptor.CommonHeaderInterceptor +import com.hiczp.bilibili.api.retrofit.interceptor.CommonParamInterceptor +import com.hiczp.bilibili.api.retrofit.interceptor.FailureResponseInterceptor +import com.hiczp.bilibili.api.retrofit.interceptor.SortAndSignInterceptor +import com.hiczp.bilibili.api.vc.VcAPI +import com.jakewharton.retrofit2.adapter.kotlin.coroutines.CoroutineCallAdapterFactory +import okhttp3.ConnectionPool +import okhttp3.Interceptor +import okhttp3.OkHttpClient +import okhttp3.logging.HttpLoggingInterceptor +import retrofit2.Retrofit +import retrofit2.converter.gson.GsonConverterFactory +import java.security.KeyFactory +import java.security.spec.X509EncodedKeySpec +import java.text.SimpleDateFormat +import java.time.Instant +import java.util.* +import javax.crypto.Cipher + +/** + * 此类表示一个模拟的 Bilibili 客户端(Android), 所有调用由此开始. + * 多个 BilibiliClient 实例之间不共享登陆状态. + * 不能严格保证线程安全. + * + * @param billingClientProperties 客户端的固有属性, 是一种常量 + * @param logLevel 日志打印等级 + */ +@Suppress("unused") +class BilibiliClient( + @Suppress("MemberVisibilityCanBePrivate") + val billingClientProperties: BilibiliClientProperties = BilibiliClientProperties(), + private val logLevel: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.NONE +) { + /** + * 客户端被打开的时间(BilibiliClient 被实例化的时间) + */ + private val initTime = Instant.now().epochSecond + + /** + * 登陆操作得到的 Response + */ + var loginResponse: LoginResponse? = null + + /** + * 是否已登录 + */ + val isLogin + get() = loginResponse != null + + //快捷方式 + @Suppress("MemberVisibilityCanBePrivate") + val userId + get() = loginResponse?.userId + @Suppress("MemberVisibilityCanBePrivate") + val token + get() = loginResponse?.token + + @Suppress("SpellCheckingInspection") + private val defaultCommonHeaderInterceptor = CommonHeaderInterceptor( + Header.DISPLAY_ID to { "${billingClientProperties.buildVersionId}-$initTime" }, + Header.BUILD_VERSION_ID to { billingClientProperties.buildVersionId }, + Header.USER_AGENT to { billingClientProperties.defaultUserAgent }, + Header.DEVICE_ID to { billingClientProperties.hardwareId } + ) + + @Suppress("SpellCheckingInspection") + private val defaultCommonParamArray = arrayOf( + Param.ACCESS_KEY to { token }, + Param.APP_KEY to { billingClientProperties.appKey }, + Param.BUILD to { billingClientProperties.build }, + Param.CHANNEL to { billingClientProperties.channel }, + Param.MOBILE_APP to { billingClientProperties.platform }, + Param.PLATFORM to { billingClientProperties.platform }, + Param.TIMESTAMP to { Instant.now().epochSecond.toString() } + ) + + private val defaultCommonParamInterceptor = CommonParamInterceptor(*defaultCommonParamArray) + + /** + * 用户鉴权相关的接口 + */ + @Suppress("SpellCheckingInspection") + val passportAPI by lazy { + createAPI<PassportAPI>(BaseUrl.passport, + defaultCommonHeaderInterceptor, + CommonParamInterceptor( + Param.APP_KEY to { billingClientProperties.appKey }, + Param.BUILD to { billingClientProperties.build }, + Param.CHANNEL to { billingClientProperties.channel }, + Param.MOBILE_APP to { billingClientProperties.platform }, + Param.PLATFORM to { billingClientProperties.platform }, + Param.TIMESTAMP to { Instant.now().epochSecond.toString() } + ) + ) + } + + /** + * 消息通知有关的接口 + */ + @Suppress("SpellCheckingInspection") + val messageAPI by lazy { + createAPI<MessageAPI>(BaseUrl.message, + defaultCommonHeaderInterceptor, + CommonParamInterceptor(*defaultCommonParamArray, + Param.ACTION_KEY to { Param.APP_KEY }, + "has_up" to { "1" } + ) + ) + } + + /** + * 总站 API + */ + @Suppress("SpellCheckingInspection") + val appAPI by lazy { + createAPI<AppAPI>(BaseUrl.app, + defaultCommonHeaderInterceptor, + defaultCommonParamInterceptor + ) + } + + /** + * 这也是总站 API + */ + @Suppress("SpellCheckingInspection") + val mainAPI by lazy { + createAPI<MainAPI>(BaseUrl.main, + CommonHeaderInterceptor( + //如果未登陆则没有 Display-ID + Header.DISPLAY_ID to { userId?.let { "$it-$initTime" } }, + Header.BUILD_VERSION_ID to { billingClientProperties.buildVersionId }, + Header.USER_AGENT to { billingClientProperties.defaultUserAgent }, + Header.DEVICE_ID to { billingClientProperties.hardwareId } + ), + defaultCommonParamInterceptor + ) + } + + /** + * 小视频相关接口 + */ + @Suppress("SpellCheckingInspection") + val vcAPI by lazy { + createAPI<VcAPI>(BaseUrl.vc, + defaultCommonHeaderInterceptor, + CommonParamInterceptor(*defaultCommonParamArray, + Param._DEVICE to { billingClientProperties.platform }, + Param._HARDWARE_ID to { billingClientProperties.hardwareId }, + Param.SOURCE to { billingClientProperties.channel }, + Param.TRACE_ID to { generateTraceId() }, + Param.USER_ID to { userId?.toString() }, + Param.VERSION to { billingClientProperties.version } + ) + ) + } + + /** + * 创作中心 + */ + val memberAPI by lazy { + createAPI<MemberAPI>(BaseUrl.member, + defaultCommonHeaderInterceptor, + defaultCommonParamInterceptor + ) + } + + /** + * 播放器所需的 API, 用于获取视频播放地址 + */ + val playerAPI: PlayerAPI by lazy { + Retrofit.Builder() + .baseUrl("https://bilibili.com") //这里的 baseUrl 是没用的 + .addConverterFactory(gsonConverterFactory) + .addCallAdapterFactory(coroutineCallAdapterFactory) + .client(OkHttpClient.Builder().apply { + addInterceptor(PlayerInterceptor(billingClientProperties) { loginResponse }) + addInterceptor(FailureResponseInterceptor) + addNetworkInterceptor(httpLoggingInterceptor) + connectionPool(connectionPool) + }.build()) + .build() + .create(PlayerAPI::class.java) + } + + /** + * 获取弹幕所用的 API + */ + val danmakuAPI: DanmakuAPI by lazy { + Retrofit.Builder() + .baseUrl(BaseUrl.main) + .addCallAdapterFactory(coroutineCallAdapterFactory) + .client(OkHttpClient.Builder().apply { + addInterceptor(CommonHeaderInterceptor( + Header.ACCEPT to { "application/xhtml+xml,application/xml" }, + Header.ACCEPT_ENCODING to { "gzip, deflate" }, + Header.USER_AGENT to { billingClientProperties.defaultUserAgent } + )) + addInterceptor(defaultCommonParamInterceptor) + addInterceptor(sortAndSignInterceptor) + addNetworkInterceptor(httpLoggingInterceptor) + connectionPool(connectionPool) + }.build()) + .build() + .create(DanmakuAPI::class.java) + } + + /** + * 直播站 + */ + val liveAPI by lazy { + createAPI<LiveAPI>(BaseUrl.live, + CommonHeaderInterceptor( + //如果未登陆则没有 Display-ID + Header.DISPLAY_ID to { userId?.let { "$it-$initTime" } }, + Header.BUILD_VERSION_ID to { billingClientProperties.buildVersionId }, + Header.USER_AGENT to { billingClientProperties.defaultUserAgent }, + Header.DEVICE_ID to { billingClientProperties.hardwareId } + ), + CommonParamInterceptor(*defaultCommonParamArray, + Param.ACTION_KEY to { Param.APP_KEY }, + Param.DEVICE to { billingClientProperties.platform } + ) + ) + } + + /** + * 登陆 + * v3 登陆接口会同时返回 cookies 和 token + * 如果要求验证码, 访问 data 中提供的 url 将打开一个弹窗, 里面会加载 js 并显示极验 + * 极验会调用 https://api.geetest.com/ajax.php 上传滑动轨迹, 然后获得 validate 的值 + * secCode 的值为 "$validate|jordan" + * + * @throws BilibiliApiException 用户名与密码不匹配(-629)或者需要验证码(极验)(-105) + */ + @Throws(BilibiliApiException::class) + suspend fun login( + username: String, password: String, + //如果登陆请求返回了 "验证码错误!"(-105) 的结果, 那么下一次发送登陆请求就需要带上验证码 + challenge: String? = null, + secCode: String? = null, + validate: String? = null + ): LoginResponse { + //取得 hash 和 RSA 公钥 + val (hash, key) = passportAPI.getKey().await().data.let { data -> + data.hash to data.key.split('\n').filterNot { it.startsWith('-') }.joinToString(separator = "") + } + + //解析 RSA 公钥 + val publicKey = X509EncodedKeySpec(Base64.getDecoder().decode(key)).let { + KeyFactory.getInstance("RSA").generatePublic(it) + } + //加密密码 + //兼容 Android + val cipheredPassword = Cipher.getInstance("RSA/ECB/PKCS1Padding").apply { + init(Cipher.ENCRYPT_MODE, publicKey) + }.doFinal((hash + password).toByteArray()).let { + Base64.getEncoder().encode(it) + }.let { + String(it) + } + + return passportAPI.login(username, cipheredPassword, challenge, secCode, validate).await().also { + this.loginResponse = it + } + } + + /** + * 登出 + * 这个方法不一定是线程安全的, 登出的同时如果进行登陆操作可能引发错误 + */ + suspend fun logout() { + val response = loginResponse ?: return + val cookieMap = response.data.cookieInfo.cookies + .associate { + it.name to it.value + } + passportAPI.revoke(cookieMap, response.token).await() + loginResponse = null + } + + private val sortAndSignInterceptor = SortAndSignInterceptor(billingClientProperties.appSecret) + private val httpLoggingInterceptor = HttpLoggingInterceptor().setLevel(logLevel) + private inline fun <reified T : Any> createAPI( + baseUrl: String, + vararg interceptors: Interceptor + ) = Retrofit.Builder() + .baseUrl(baseUrl) + .addConverterFactory(gsonConverterFactory) + .addCallAdapterFactory(coroutineCallAdapterFactory) + .client(OkHttpClient.Builder().apply { + interceptors.forEach { + addInterceptor(it) + } + addInterceptor(sortAndSignInterceptor) + addInterceptor(FailureResponseInterceptor) + addNetworkInterceptor(httpLoggingInterceptor) + connectionPool(connectionPool) + }.build()) + .build() + .create(T::class.java) + + companion object { + @Suppress("SpellCheckingInspection") + private val gsonConverterFactory = GsonConverterFactory.create() + private val coroutineCallAdapterFactory = CoroutineCallAdapterFactory() + private val connectionPool = ConnectionPool() + private val traceIdFormat = SimpleDateFormat("yyyyMMddHHmm000ss") + private fun generateTraceId() = traceIdFormat.format(Date()) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClientProperties.kt b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClientProperties.kt new file mode 100644 index 0000000..d294155 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClientProperties.kt @@ -0,0 +1,74 @@ +package com.hiczp.bilibili.api + +/** + * 客户端固有属性. 包括版本号, 密钥以及硬件编码. + * 默认值对应 5.37.0(release-b220051) 版本. + */ +class BilibiliClientProperties { + /** + * 默认 UA, 用于大多数访问 + */ + @Suppress("SpellCheckingInspection") + var defaultUserAgent = "Mozilla/5.0 BiliDroid/5.37.0 (bbcallen@gmail.com)" + + /** + * Android 平台的 appKey(该默认值为普通版客户端, 非概念版) + */ + var appKey = "1d8b6e7d45233436" + + /** + * 由反编译 so 文件得到的 appSecret, 与 appKey 必须匹配 + */ + @Suppress("SpellCheckingInspection") + var appSecret = "560c52ccd288fed045859ed18bffd973" + + /** + * 获取视频播放地址使用的 appKey, 与访问其他 RestFulAPI 所用的 appKey 是不一样的 + */ + @Suppress("SpellCheckingInspection") + var videoAppKey = "iVGUTjsxvpLeuDCf" + + /** + * 获取视频播放地址所用的 appSecret + */ + @Suppress("SpellCheckingInspection") + var videoAppSecret = "aHRmhWMLkdeMuILqORnYZocwMBpMEOdt" + + /** + * 客户端平台 + */ + var platform = "android" + + /** + * 客户端类型 + * 此属性在旧版客户端不存在 + */ + var channel = "html5_app_bili" + + /** + * 硬件 ID, 尚不明确生成算法 + */ + @Suppress("SpellCheckingInspection") + var hardwareId = "aBRoDWAVeRhsA3FDewMzS3lLMwM" + + /** + * 屏幕尺寸, 大屏手机(已经没有小屏手机了)统一为 xxhdpi + * 此参数在新版客户端已经较少使用 + */ + var scale = "xxhdpi" + + /** + * 版本号 + */ + var version = "5.37.0.5370000" + + /** + * 构建版本号 + */ + var build = "5370000" + + /** + * 构建版本 ID, 可能是某种 Hash + */ + var buildVersionId = "XXD9E43D7A1EBB6669597650E3EE417D9E7F5" +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/CipherExtension.kt b/src/main/kotlin/com/hiczp/bilibili/api/CipherExtension.kt new file mode 100644 index 0000000..c81bb55 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/CipherExtension.kt @@ -0,0 +1,23 @@ +package com.hiczp.bilibili.api + +import java.security.MessageDigest + +//MD5 +private val md5Instance = MessageDigest.getInstance("MD5") + +fun String.md5() = + StringBuilder(32).apply { + //优化过的 md5 字符串生成算法 + md5Instance.digest(toByteArray()).forEach { + val value = it.toInt() and 0xFF + val high = value / 16 + val low = value % 16 + append(if (high <= 9) '0' + high else 'a' - 10 + high) + append(if (low <= 9) '0' + low else 'a' - 10 + low) + } + }.toString() + +/** + * 签名算法为 "$排序后的参数字符串$appSecret".md5() + */ +internal fun calculateSign(sortedQuery: String, appSecret: String) = (sortedQuery + appSecret).md5() diff --git a/src/main/kotlin/com/hiczp/bilibili/api/CollectionExtension.kt b/src/main/kotlin/com/hiczp/bilibili/api/CollectionExtension.kt new file mode 100644 index 0000000..171781d --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/CollectionExtension.kt @@ -0,0 +1,10 @@ +package com.hiczp.bilibili.api + +import kotlin.experimental.ExperimentalTypeInference + +@UseExperimental(ExperimentalTypeInference::class) +internal inline fun <T> list(@BuilderInference block: MutableList<T>.() -> Unit): List<T> { + val list = ArrayList<T>() + block(list) + return list +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/GlobalConstant.kt b/src/main/kotlin/com/hiczp/bilibili/api/GlobalConstant.kt new file mode 100644 index 0000000..092a00d --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/GlobalConstant.kt @@ -0,0 +1,8 @@ +package com.hiczp.bilibili.api + +import com.google.gson.Gson +import com.google.gson.JsonParser + +internal val gson = Gson() + +internal val jsonParser = JsonParser() diff --git a/src/main/kotlin/com/hiczp/bilibili/api/GsonExtension.kt b/src/main/kotlin/com/hiczp/bilibili/api/GsonExtension.kt new file mode 100644 index 0000000..e9a26c4 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/GsonExtension.kt @@ -0,0 +1,9 @@ +package com.hiczp.bilibili.api + +import com.google.gson.JsonArray + +@Suppress("NOTHING_TO_INLINE") +inline fun JsonArray.isEmpty() = size() == 0 + +@Suppress("NOTHING_TO_INLINE") +inline fun JsonArray.isNotEmpty() = size() != 0 diff --git a/src/main/kotlin/com/hiczp/bilibili/api/IOExtension.kt b/src/main/kotlin/com/hiczp/bilibili/api/IOExtension.kt new file mode 100644 index 0000000..c978d65 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/IOExtension.kt @@ -0,0 +1,56 @@ +package com.hiczp.bilibili.api + +import com.hiczp.bilibili.api.thirdpart.commons.BoundedInputStream +import io.ktor.util.InternalAPI +import kotlinx.io.errors.EOFException +import java.io.InputStream + +//减少包引入 +//https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/IOUtils.java +fun InputStream.readFully(length: Int): ByteArray { + if (length < 0) { + throw IllegalArgumentException("Length must not be negative: $length") + } + + val byteArray = ByteArray(length) + var remaining = length + + while (remaining > 0) { + val count = read(byteArray, length - remaining, remaining) + if (count == -1) break + remaining -= count + } + + val actual = length - remaining + if (actual != length) { + throw EOFException("Length to read: $length actual: $actual") + } + + return byteArray +} + +/** + * 以大端模式从流中读取一个 int + */ +@UseExperimental(ExperimentalUnsignedTypes::class) +fun InputStream.readInt(): Int { + val byteArray = readFully(4) + return (byteArray[0].toUByte().toInt() shl 24) or + (byteArray[1].toUByte().toInt() shl 16) or + (byteArray[2].toUByte().toInt() shl 8) or + (byteArray[3].toUByte().toInt()) +} + +/** + * 以大端模式从流中读取一个 unsigned int + */ +@UseExperimental(ExperimentalUnsignedTypes::class) +fun InputStream.readUInt() = readInt().toUInt() + +fun InputStream.bounded(size: Long) = BoundedInputStream(this, size) + +@UseExperimental(ExperimentalUnsignedTypes::class) +fun InputStream.bounded(size: UInt) = bounded(size.toLong()) + +@UseExperimental(InternalAPI::class) +internal fun ByteArray.toPrettyPrintString() = joinToString(prefix = "[", postfix = "]") { "0x%02x".format(it) } diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/AppAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/AppAPI.kt new file mode 100644 index 0000000..d0bff12 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/AppAPI.kt @@ -0,0 +1,383 @@ +package com.hiczp.bilibili.api.app + +import com.google.gson.JsonObject +import com.hiczp.bilibili.api.app.model.* +import com.hiczp.bilibili.api.retrofit.CommonResponse +import kotlinx.coroutines.Deferred +import retrofit2.http.* +import java.time.Instant + +/** + * 总站 API + */ +@Suppress("DeferredIsResult") +interface AppAPI { + /** + * 打开 APP 时将访问此接口来获得 UI 排布顺序 + * 包括下方 tab(首页, 频道, 动态, 会员购), 首页的上方 tab(直播, 推荐, 热门, 追番) 以及右上角的 游戏中心, 离线下载, 消息 + */ + @GET("/x/resource/show/tab") + fun tab(): Deferred<Tab> + + /** + * 登陆完成后将请求一次此接口以获得个人资料 + * 如果未登录将返回 {"code":-101,"message":"账号未登录","ttl":1} + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/account/myinfo") + fun myInfo(): Deferred<MyInfo> + + /** + * 登陆后也会访问此接口, 返回内容大致与 myInfo() 相同 + */ + @GET("/x/v2/account/mine") + fun mine(): Deferred<Mine> + + /** + * 侧边栏中动态增加的按钮, 返回信息包含 URI 地址(到对应的 activity) + * 侧拉抽屉 + */ + @GET("/x/resource/sidebar") + fun sidebar(): Deferred<Sidebar> + + /** + * 首页内容(客户端通过解析返回的内容来生成页面内容, 下同) + * 该 API 没有翻页参数, 同样的参数每次请求都会返回不一样的内容. 刷新和下拉只是简单的重新访问此接口. + * 首页 -> 推荐 + * + * @param pull 如果是通过滑动到最顶端来刷新页面的, 那么将是 true, 将页面滑动到最底端来获取更多内容将是 false + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/feed/index") + fun homePage( + @Query("ad_extra") adExtra: String? = null, + @Query("autoplay_card") autoplayCard: Int = 0, + @Query("banner_hash") bannerHash: String? = null, + @Query("column") column: Int = 2, + @Query("device_type") deviceType: Int = 0, + @Query("flush") flush: Int = 0, + @Query("fnval") fnVal: Int = 16, + @Query("fnver") fnVer: Int = 0, + @Query("force_host") forceHost: Int = 0, + @Query("idx") index: Long = Instant.now().epochSecond, + @Query("login_event") loginEvent: Int = 0, + @Query("network") network: String = "mobile", + @Query("open_event") openEvent: String? = null, + @Query("pull") pull: Boolean = true, + @Query("qn") qn: Int = 32, + @Query("recsys_mode") recsysMode: Int = 0 + ): Deferred<HomePage> + + /** + * 热门页面 + * 首页 -> 热门 + * + * @param index 翻页参数, 一开始为 0, 然后每次滑动到底端就会加 10 + * @param ver 第一次请求时没有这个参数, 第二次开始这个参数为上一次请求此接口时的返回值中的 `ver` + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/show/popular/index") + fun popularPage( + @Query("fnval") fnVal: Int = 16, + @Query("fnver") fnVer: Int = 0, + @Query("force_host") forceHost: Int = 0, + @Query("idx") index: Long = 0, + @Query("last_param") lastParam: String? = null, + @Query("login_event") loginEvent: Int = 0, + @Query("qn") qn: Int = 32, + @Query("ver") ver: Long? = null + ): Deferred<PopularPage> + + /** + * 视频页面(普通视频, 非番剧) + * 包含视频基本信息, 推荐和广告 + * 从这个接口得到视频的 cid + * 如果返回内容里的 pages 有多个表明有多个 p, 每个 p 有自己的 cid(外层的 cid 为默认的那个 p 的 cid) + * + * @param aid av 号 + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/view") + fun view( + @Query("ad_extra") adExtra: String? = null, + @Query("aid") aid: Long, + @Query("autoplay") autoplay: Int = 0, + @Query("fnval") fnVal: Int = 16, + @Query("fnver") fnVer: Int = 0, + @Query("force_host") forceHost: Int = 0, + @Query("from") from: Int? = null, + @Query("plat") plat: Int = 0, + @Query("qn") qn: Int = 32, + @Query("trackid") trackId: String? = null //all_10.shylf-ai-recsys-120.1550674524909.237 + ): Deferred<View> + + /** + * 点赞(视频) + * + * @param aid 视频的唯一标识 + * @param like 为 0 时表示点赞, 为 1 时表示取消点赞 + * @param dislike 正常为 0, 为 1 时(like 为 0)表示 取消不喜欢的同时为该视频点赞(等于做了两个操作, 下同) + */ + @POST("/x/v2/view/like") + @FormUrlEncoded + fun like( + @Field("aid") aid: Long, + @Field("like") like: Int = 0, + @Field("dislike") dislike: Int = 0, + @Field("from") from: Int? = null + ): Deferred<LikeResponse> + + /** + * 不喜欢(视频) + * + * @param aid 视频的唯一标识 + * @param dislike 为 0 时表示不喜欢, 为 1 时表示取消不喜欢 + * @param like 正常为 0, 为 1 时(dislike 为 0)表示 取消点赞的同时不喜欢该视频 + */ + @POST("/x/v2/view/dislike") + @FormUrlEncoded + fun dislike( + @Field("aid") aid: Long, + @Field("like") like: Int = 0, + @Field("dislike") dislike: Int = 0, + @Field("from") from: Int? = null + ): Deferred<CommonResponse> + + /** + * 投币 + * 自制视频能投两个, 转载视频只能投一个. 是转载还是自制在获取视频页面的 API 的 copyright. + * + * @param multiply 投币数量 + * @param selectLike 为 1 表示投币的同时为视频点赞, 对番剧投币时, 该值总为 0 + * @param upId 该值似乎总为 0 + * + * @see view + */ + @Suppress("SpellCheckingInspection") + @POST("/x/v2/view/coin/add") + @FormUrlEncoded + fun addCoin( + @Field("aid") aid: Long, + @Field("avtype") avType: Int = 1, + @Field("from") from: Int? = null, + @Field("multiply") multiply: Int, + @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> + + /** + * 大家都在搜(热搜关键字列表) + * + * 上方搜索栏 -> 搜索提示 + * + * @param limit 分页大小 + */ + @GET("/x/v2/search/hot") + fun searchHot(@Query("limit") limit: Int = 50): Deferred<SearchHot> + + /** + * 默认搜索词, 当点击搜索框但是没输入内容时就会显示该词条. + * + * 上方搜索框 -> placeholder + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/search/defaultwords") + fun searchDefaultWords(): Deferred<SearchDefaultWords> + + /** + * 搜索联想 + * + * 上方搜索框 -> 搜索时的显示的候选项 + */ + @GET("/x/v2/search/suggest3") + fun searchSuggest( + @Query("highlight") highlight: Int = 1, + @Query("keyword") keyword: String + ): Deferred<SearchSuggest> + + /** + * 搜索(综合) + * + * 上方搜索栏 + * + * @param order 排序. null/default 默认排序, view 播放多, pubdate 新发布, danmaku 弹幕多 + * @param duration 视频时长. 0 全部时长, 1 0-10分钟, 2 10-30分钟, 3 30-60分钟, 4 60+分钟 + * @param rid 按某种分区搜索, 编号为数字. null 全部分区. + * @param keyword 搜索的关键字, 下同 + * @param from_source 来源, 如果是直接搜索的则为 app_search, 在历史记录里点击的则为 apphistory_search, 从搜索时的候选项里点的为 appsuggest_search + * @param pageNumber 分页, 从 1 开始 + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/search") + fun search( + @Query("duration") duration: Int = 0, + @Query("from_source") from_source: String = "app_search", + @Query("highlight") highlight: Int = 1, + @Query("keyword") keyword: String, + @Query("order") order: String? = null, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("recommend") recommend: Int = 1, + @Query("rid") rid: Int? = null + ): Deferred<SearchResult> + + /** + * 搜索直播间 + * + * 上方搜索栏 -> 直播 + * + * @param type 搜索的内容的类型, 每种搜索的 type 都是固定的, 下同 + */ + @GET("/x/v2/search/live") + fun searchLive( + @Query("keyword") keyword: String, + @Suppress("SpellCheckingInspection") + @Query("order") order: String = "totalrank", + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 4 + ): Deferred<SearchLiveResult> + + /** + * 根据某个类型来进行搜索(自定义) + */ + @GET("/x/v2/search/type") + fun searchType( + @Query("keyword") keyword: String, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int, + @QueryMap additionParam: Map<String, String> + ): Deferred<JsonObject> + + /** + * 搜索番剧 + * + * 上方搜索栏 -> 番剧 + */ + @GET("/x/v2/search/type") + fun searchBangumi( + @Query("keyword") keyword: String, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 7 + ): Deferred<SearchBangumiResult> + + /** + * 搜索用户 + * + * 上方搜索栏 -> 用户 + * + * @param order 排序维度. totalrank 默认排序,fans 粉丝, level 等级. + * @param orderSort 排序顺序. 0 从高到低, 1 从低到高. + * @param userType 用户类型. 0 全部用户, 1 up主, 2 普通用户, 3 认证用户. + * + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/search/type") + fun searchUser( + @Query("highlight") highlight: Int = 1, + @Query("keyword") keyword: String, + @Query("order") order: String = "totalrank", + @Query("order_sort") orderSort: Int? = null, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 2, + @Query("user_type") userType: Int = 0 + ): Deferred<SearchUserResult> + + /** + * 搜索影视(包括动漫的剧场版和纪录片) + * + * 上方搜索栏 -> 影视 + */ + @GET("/x/v2/search/type") + fun searchMovie( + @Query("keyword") keyword: String, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 8 + ): Deferred<SearchMovieResult> + + /** + * 搜索文章 + * + * 上方搜索栏 -> 专栏 + * + * @param order 排序. null 默认排序, pubdate 发布时间, click 按阅读数, scores 按评论数, attention 按点赞数. + * @param categoryId 分类, 编号为数字. 0 全部分类. + * + * @see com.hiczp.bilibili.api.main.MainAPI.articleCategories + */ + @Suppress("SpellCheckingInspection") + @GET("/x/v2/search/type") + fun searchArticle( + @Query("category_id") categoryId: Int = 0, + @Query("highlight") highlight: Int = 1, + @Query("keyword") keyword: String, + @Query("order") order: String? = null, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 6 + ): Deferred<SearchArticleResult> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/AddCoinResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/AddCoinResponse.kt new file mode 100644 index 0000000..ef511a5 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/AddCoinResponse.kt @@ -0,0 +1,21 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class AddCoinResponse( + @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("like") + var like: Boolean, // false + @SerializedName("prompt") + var prompt: Boolean? // true + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoriteArticle.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoriteArticle.kt new file mode 100644 index 0000000..0f90cd0 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoriteArticle.kt @@ -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 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoritePage.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoritePage.kt new file mode 100644 index 0000000..10eb5a1 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoritePage.kt @@ -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 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoriteVideo.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoriteVideo.kt new file mode 100644 index 0000000..1ad8cd5 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/FavoriteVideo.kt @@ -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 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/HomePage.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/HomePage.kt new file mode 100644 index 0000000..d060718 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/HomePage.kt @@ -0,0 +1,375 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class HomePage( + @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("config") + var config: Config, + @SerializedName("items") + var items: List<Item> + ) { + data class Item( + @SerializedName("ad_info") + var adInfo: AdInfo, + @SerializedName("args") + var args: Args, + @SerializedName("badge") + var badge: String, // 直播 + @SerializedName("banner_item") + var bannerItem: List<BannerItem>, + @SerializedName("can_play") + var canPlay: Int, // 1 + @SerializedName("card_goto") + var cardGoto: String, // av + @SerializedName("card_type") + var cardType: String, // small_cover_v2 + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/archive/884e982379b32ef1dc3281e0da1864e62cf74cc3.jpg + @SerializedName("cover_left_icon_1") + var coverLeftIcon1: Int, // 1 + @SerializedName("cover_left_icon_2") + var coverLeftIcon2: Int, // 3 + @SerializedName("cover_left_text_1") + var coverLeftText1: String, // 2.9万 + @SerializedName("cover_left_text_2") + var coverLeftText2: String, // 471 + @SerializedName("cover_right_text") + var coverRightText: String, // 33:33 + @SerializedName("desc") + var desc: String, // 少年歌行11 + @SerializedName("desc_button") + var descButton: DescButton, + @SerializedName("goto") + var goto: String, // av + @SerializedName("hash") + var hash: String, // 674069931701357536 + @SerializedName("idx") + var idx: Int, // 1550559507 + @SerializedName("official_icon") + var officialIcon: Int, // 17 + @SerializedName("param") + var `param`: String, // 43804922 + @SerializedName("player_args") + var playerArgs: PlayerArgs, + @SerializedName("rcmd_reason") + var rcmdReason: String, // 已关注 + @SerializedName("rcmd_reason_style") + var rcmdReasonStyle: RcmdReasonStyle, + @SerializedName("three_point") + var threePoint: ThreePoint, + @SerializedName("three_point_v2") + var threePointV2: List<ThreePointV2>, + @SerializedName("title") + var title: String, // 宇宙沙盘2娱乐,给地球加1000个月亮,先要准备好灭火器 + @SerializedName("title_right_pic") + var titleRightPic: Int, // 14 + @SerializedName("title_right_text") + var titleRightText: String, // 1 + @SerializedName("uri") + var uri: String // bilibili://video/43804922?page=1&player_preload=%7B%22cid%22%3A76731390%2C%22expire_time%22%3A1550649542%2C%22file_info%22%3A%7B%22112%22%3A%5B%7B%22timelength%22%3A2012565%2C%22filesize%22%3A1416010611%7D%5D%2C%2216%22%3A%5B%7B%22timelength%22%3A2012565%2C%22filesize%22%3A72842412%7D%5D%2C%2232%22%3A%5B%7B%22timelength%22%3A2012565%2C%22filesize%22%3A163018544%7D%5D%2C%2264%22%3A%5B%7B%22timelength%22%3A2012565%2C%22filesize%22%3A360516756%7D%5D%2C%2280%22%3A%5B%7B%22timelength%22%3A2012565%2C%22filesize%22%3A540132030%7D%5D%7D%2C%22support_quality%22%3A%5B112%2C80%2C64%2C32%2C16%5D%2C%22support_formats%22%3A%5B%22hdflv2%22%2C%22flv%22%2C%22flv720%22%2C%22flv480%22%2C%22flv360%22%5D%2C%22support_description%22%3A%5B%22%E9%AB%98%E6%B8%85%201080P%2B%22%2C%22%E9%AB%98%E6%B8%85%201080P%22%2C%22%E9%AB%98%E6%B8%85%20720P%22%2C%22%E6%B8%85%E6%99%B0%20480P%22%2C%22%E6%B5%81%E7%95%85%20360P%22%5D%2C%22quality%22%3A32%2C%22video_codecid%22%3A7%2C%22video_project%22%3Atrue%2C%22fnver%22%3A0%2C%22fnval%22%3A16%2C%22dash%22%3A%7B%22video%22%3A%5B%7B%22id%22%3A16%2C%22base_url%22%3A%22http%3A%2F%2F58.243.177.135%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30015.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3D42OA30l6zhf_btPLBI8CGw%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A391965%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A32%2C%22base_url%22%3A%22http%3A%2F%2F60.12.119.69%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30032.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3Dx1acEg918HekzZ7feezBAA%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A878269%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A64%2C%22base_url%22%3A%22http%3A%2F%2F58.243.177.134%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30064.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3Dg2Ryt0_xwF-bQop6Bers1g%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A1947512%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A80%2C%22base_url%22%3A%22http%3A%2F%2F58.243.177.135%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30080.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3DCe4MJYd4Q8tb1zDiPZ2NPw%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A2920113%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A16%2C%22base_url%22%3A%22http%3A%2F%2F60.12.119.71%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30011.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3DtVLJ9Xy56D8zBIHQpeHnOA%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A289550%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A32%2C%22base_url%22%3A%22http%3A%2F%2F60.12.119.68%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30033.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3DU3bKyOYXHxJDPDsFyTSYRw%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A648003%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A64%2C%22base_url%22%3A%22http%3A%2F%2F60.12.119.69%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30066.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3DQmia_xv_261EEanMCMDLBg%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A1433063%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A80%2C%22base_url%22%3A%22http%3A%2F%2F60.12.119.70%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30077.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3D7KKLcfPoYOtggLt2B8OpSw%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A2147039%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A112%2C%22base_url%22%3A%22http%3A%2F%2Fupos-hz-mirrorwcsu.acgvideo.com%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30112.m4s%3Fe%3Dig8euxZM2rNcNbdlhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8xNEVE5XREto8GuFGv2U7SuxI72X6fTr859IB_%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026oi%3D1699214834%5Cu0026platform%3Dandroid%5Cu0026gen%3Dplayurl%5Cu0026uipk%3D5%5Cu0026os%3Dwcsu%5Cu0026nbs%3D1%5Cu0026deadline%3D1550653142%5Cu0026upsig%3Db1a2c5c4587c9d62c62328fd5fbf5e5d%22%2C%22bandwidth%22%3A5628680%2C%22codecid%22%3A7%7D%5D%2C%22audio%22%3A%5B%7B%22id%22%3A30280%2C%22base_url%22%3A%22http%3A%2F%2F58.243.177.131%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30280.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3DfoKPdZpezm90iRFrxXyj5A%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A167107%2C%22codecid%22%3A0%7D%2C%7B%22id%22%3A30216%2C%22base_url%22%3A%22http%3A%2F%2F222.161.224.6%2Fupgcxcode%2F90%2F13%2F76731390%2F76731390-1-30216.m4s%3Fexpires%3D1550652900%5Cu0026platform%3Dandroid%5Cu0026ssig%3Dfd9cXg9GDLF8Ci-EvSTuXQ%5Cu0026oi%3D1699214834%5Cu0026hfa%3D2120103141%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3D8fae8885111d4e9bacbcdf70a3021572%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A67216%2C%22codecid%22%3A0%7D%5D%7D%7D&player_width=1920&player_height=1080&player_rotate=0&trackid=all_3.shylf-ai-recsys-120.1550645942519.77 + ) { + data class ThreePoint( + @SerializedName("dislike_reasons") + var dislikeReasons: List<DislikeReason>, + @SerializedName("feedbacks") + var feedbacks: List<Feedback>, + @SerializedName("watch_later") + var watchLater: Int // 1 + ) { + data class DislikeReason( + @SerializedName("id") + var id: Int, // 1 + @SerializedName("name") + var name: String // 不感兴趣 + ) + + data class Feedback( + @SerializedName("id") + var id: Int, // 4 + @SerializedName("name") + var name: String // 标题党/封面党 + ) + } + + data class PlayerArgs( + @SerializedName("aid") + var aid: Int, // 43804922 + @SerializedName("cid") + var cid: Int // 76731390 + ) + + data class Args( + @SerializedName("rid") + var rid: Int, // 17 + @SerializedName("rname") + var rname: String, // 单机游戏 + @SerializedName("tid") + var tid: Int, // 9264 + @SerializedName("tname") + var tname: String, // 宇宙 + @SerializedName("up_id") + var upId: Int, // 131565338 + @SerializedName("up_name") + var upName: String // 的夏游戏模拟 + ) + + data class AdInfo( + @SerializedName("ad_cb") + var adCb: String, // CMyzBBDInQwYl7+RAyAeKAEw6Ro46w5CHzE1NTA2NDU5NDI1MTlxMTcyYTIzYTU2YTE0NXE1NjFI97HNzZAtUgbmna3lt55aBua1meaxn2IG5Lit5Zu9aAFwAHiAgICA4ASAAQOIAQCSAQ4xMDEuNzEuMjQ1LjI0MpoBiwNhbGw6Y3BjX2Nyb3dkX3RhcmdldCxlY3BtOmRlZmF1bHQsY3BjVGFnRmlsdGVyOnVuZGVmaW5lZCxlbmhhbmNlQ3RyUUZhY3RvcjpkZWZhdWx0LGFkTWVjaGFuaXNtTW9uaXRvcjpvdGhlcixwbGF5cGFnZWN0cjpkaXNhYmxlLHVwX3JlY19mbG93X2NvbnRyb2w6dW5kZWZpbmVkLGJydXNoX2R1cGxpY2F0ZTpkZWZhdWx0LHBjdHJfY3BtOmNwbSxkZnhfc3BlY2lmaWNfcmF0aW86dW5kZWZpbmVkLHBjdHJfdjI6a2Fma2EsZHluYW1pY19mbG93X2NvbnRyb2w6c3BsaXQgdGhlIGZsb3cgYnkgbWlkLHBjdnI6ZGxkLGZyZXFMaW1pdDpkZWZhdWx0LHNtYWxsQ29uc3VtZVVuaXQ6ZnJlcUxpbWl0TG9vc2Usb3V0ZXJCZWF0SW5uZXI6ZW5hYmxlLG91dGVyUXVpdDpkZWZhdWx0LGZkc19ydHQ6ZGVmYXVsdKABHqgB4QSyASBXbHnmbpOszwTXdVHn7Ki/qhzsnkZKkYFNZgfpS815cLoBLmh0dHBzOi8vbS53ZWliby5jbi82MTkyODc3MjQyLzQzMzM1NDIxMjI4NzM3MTLCAYUBMzA3Ml8xNDI3Xzg0Nl83MjRfNDU3XzQ1MV80MzRfMzg1XzE3NF8xNTBfMTQ4XzE0OF8xNDhfMTQ4XzE0OF8xNDdfMTQ3XzE0N18xNDdfMTQ3XzE0N18xNDdfMTM5XzEzOV8xMzlfMTM5XzEzOV8xMzlfMTM5XzEzOV8xMzlfMTM5XzEzOMoBANIBANgBJuABgIyNngLoAYCMjZ4C8AEA+AEegAICiAIAkgLlAjE4MDIyNl8xNTUwNTM0OTIxLDE5NjEzNV8xNTUwNTM0OTMxLDc3NzA3XzE1NTA1MzQ5MzgsMjAwMzkyXzE1NTA1MzUxNDUsMTc2NzgwXzE1NTA1MzUxNTMsMTgwMjI1XzE1NTA1MzUxNjYsMjA0MDMzXzE1NTA1MzUyMzMsMjAyNDQ5XzE1NTA1MzUyMzMsNzc3MjNfMTU1MDUzNTIzNywyMDA0MTNfMTU1MDUzNTI0MywxMDE3MDNfMTU1MDUzNTczOCwyMDAxNDFfMTU1MDU5MTE1MSwxOTU3MzlfMTU1MDU5MTE1NywxNzY3NDhfMTU1MDYwMTU5OSwyMDA0MTFfMTU1MDYwMTYwMCwxNTE2NTJfMTU1MDYwMTYxMCwxNTE2NTBfMTU1MDYwMTczNiwyMDI0NDVfMTU1MDYwMTc1MCwyMDUyNjBfMTU1MDYxOTAyNiwyMDUyNjNfMTU1MDYxOTAyN5gCrqCjBqAC8qUHqALu/gSwAp8EuAIAwAIAyAIA0AIA2AIA4gISLCzmna3lt54t5LiK5Z+O5Yy6 + @SerializedName("card_index") + var cardIndex: Int, // 5 + @SerializedName("card_type") + var cardType: Int, // 3 + @SerializedName("client_ip") + var clientIp: String, // 101.71.245.242 + @SerializedName("cm_mark") + var cmMark: Int, // 1 + @SerializedName("creative_content") + var creativeContent: CreativeContent, + @SerializedName("creative_id") + var creativeId: Int, // 6578071 + @SerializedName("creative_type") + var creativeType: Int, // 2 + @SerializedName("extra") + var extra: Extra, + @SerializedName("index") + var index: Int, // 2 + @SerializedName("is_ad") + var isAd: Boolean, // true + @SerializedName("is_ad_loc") + var isAdLoc: Boolean, // true + @SerializedName("request_id") + var requestId: String, // 1550645942519q172a23a56a145q561 + @SerializedName("resource") + var resource: Int, // 1897 + @SerializedName("source") + var source: Int // 1899 + ) { + data class CreativeContent( + @SerializedName("description") + var description: String, // 恶搞·剪辑 + @SerializedName("image_md5") + var imageMd5: String, // 23f4d623b4348e86890411f29688fb58 + @SerializedName("image_url") + var imageUrl: String, // https://i0.hdslb.com/bfs/sycp/creative_img/201902/9097a17ff77a3dc03ea4b8841f46078f.jpg_640x400.jpg + @SerializedName("title") + var title: String, // 往老鼠洞里打氢气和氧气,场面瞬间失控 + @SerializedName("url") + var url: String // https://cm.bilibili.com/cm/api/fees/wise/redirect?ad_cb=CMyzBBDInQwYl7%2BRAyAeKAEw6Ro46w5CHzE1NTA2NDU5NDI1MTlxMTcyYTIzYTU2YTE0NXE1NjFI97HNzZAtUgbmna3lt55aBua1meaxn2IG5Lit5Zu9aAFwAHiAgICA4ASAAQOIAQCSAQ4xMDEuNzEuMjQ1LjI0MpoBiwNhbGw6Y3BjX2Nyb3dkX3RhcmdldCxlY3BtOmRlZmF1bHQsY3BjVGFnRmlsdGVyOnVuZGVmaW5lZCxlbmhhbmNlQ3RyUUZhY3RvcjpkZWZhdWx0LGFkTWVjaGFuaXNtTW9uaXRvcjpvdGhlcixwbGF5cGFnZWN0cjpkaXNhYmxlLHVwX3JlY19mbG93X2NvbnRyb2w6dW5kZWZpbmVkLGJydXNoX2R1cGxpY2F0ZTpkZWZhdWx0LHBjdHJfY3BtOmNwbSxkZnhfc3BlY2lmaWNfcmF0aW86dW5kZWZpbmVkLHBjdHJfdjI6a2Fma2EsZHluYW1pY19mbG93X2NvbnRyb2w6c3BsaXQgdGhlIGZsb3cgYnkgbWlkLHBjdnI6ZGxkLGZyZXFMaW1pdDpkZWZhdWx0LHNtYWxsQ29uc3VtZVVuaXQ6ZnJlcUxpbWl0TG9vc2Usb3V0ZXJCZWF0SW5uZXI6ZW5hYmxlLG91dGVyUXVpdDpkZWZhdWx0LGZkc19ydHQ6ZGVmYXVsdKABHqgB4QSyASBXbHnmbpOszwTXdVHn7Ki%2FqhzsnkZKkYFNZgfpS815cLoBLmh0dHBzOi8vbS53ZWliby5jbi82MTkyODc3MjQyLzQzMzM1NDIxMjI4NzM3MTLCAYUBMzA3Ml8xNDI3Xzg0Nl83MjRfNDU3XzQ1MV80MzRfMzg1XzE3NF8xNTBfMTQ4XzE0OF8xNDhfMTQ4XzE0OF8xNDdfMTQ3XzE0N18xNDdfMTQ3XzE0N18xNDdfMTM5XzEzOV8xMzlfMTM5XzEzOV8xMzlfMTM5XzEzOV8xMzlfMTM5XzEzOMoBANIBANgBJuABgIyNngLoAYCMjZ4C8AEA%2BAEegAICiAIAkgLlAjE4MDIyNl8xNTUwNTM0OTIxLDE5NjEzNV8xNTUwNTM0OTMxLDc3NzA3XzE1NTA1MzQ5MzgsMjAwMzkyXzE1NTA1MzUxNDUsMTc2NzgwXzE1NTA1MzUxNTMsMTgwMjI1XzE1NTA1MzUxNjYsMjA0MDMzXzE1NTA1MzUyMzMsMjAyNDQ5XzE1NTA1MzUyMzMsNzc3MjNfMTU1MDUzNTIzNywyMDA0MTNfMTU1MDUzNTI0MywxMDE3MDNfMTU1MDUzNTczOCwyMDAxNDFfMTU1MDU5MTE1MSwxOTU3MzlfMTU1MDU5MTE1NywxNzY3NDhfMTU1MDYwMTU5OSwyMDA0MTFfMTU1MDYwMTYwMCwxNTE2NTJfMTU1MDYwMTYxMCwxNTE2NTBfMTU1MDYwMTczNiwyMDI0NDVfMTU1MDYwMTc1MCwyMDUyNjBfMTU1MDYxOTAyNiwyMDUyNjNfMTU1MDYxOTAyN5gCrqCjBqAC8qUHqALu%2FgSwAp8EuAIAwAIAyAIA0AIA2AIA4gISLCzmna3lt54t5LiK5Z%2BO5Yy6 + ) + + data class Extra( + @SerializedName("card") + var card: Card, + @SerializedName("click_urls") + var clickUrls: List<JsonElement>, + @SerializedName("download_whitelist") + var downloadWhitelist: List<JsonElement>, + @SerializedName("open_whitelist") + var openWhitelist: List<String>, + @SerializedName("preload_landingpage") + var preloadLandingpage: Int, // 0 + @SerializedName("report_time") + var reportTime: Int, // 2000 + @SerializedName("sales_type") + var salesType: Int, // 12 + @SerializedName("show_urls") + var showUrls: List<JsonElement>, + @SerializedName("special_industry") + var specialIndustry: Boolean, // false + @SerializedName("special_industry_tips") + var specialIndustryTips: String, + @SerializedName("use_ad_web_v2") + var useAdWebV2: Boolean // true + ) { + data class Card( + @SerializedName("ad_tag") + var adTag: String, + @SerializedName("callup_url") + var callupUrl: String, // sinaweibo://cardlist?containerid=102803&luicode=10000404&lfid=jixinshengbo_9999_001 + @SerializedName("card_type") + var cardType: Int, // 3 + @SerializedName("covers") + var covers: List<Cover>, + @SerializedName("desc") + var desc: String, // 恶搞·剪辑 + @SerializedName("jump_url") + var jumpUrl: String, // https://cm.bilibili.com/cm/api/fees/wise/redirect?ad_cb=CMyzBBDInQwYl7%2BRAyAeKAEw6Ro46w5CHzE1NTA2NDU5NDI1MTlxMTcyYTIzYTU2YTE0NXE1NjFI97HNzZAtUgbmna3lt55aBua1meaxn2IG5Lit5Zu9aAFwAHiAgICA4ASAAQOIAQCSAQ4xMDEuNzEuMjQ1LjI0MpoBiwNhbGw6Y3BjX2Nyb3dkX3RhcmdldCxlY3BtOmRlZmF1bHQsY3BjVGFnRmlsdGVyOnVuZGVmaW5lZCxlbmhhbmNlQ3RyUUZhY3RvcjpkZWZhdWx0LGFkTWVjaGFuaXNtTW9uaXRvcjpvdGhlcixwbGF5cGFnZWN0cjpkaXNhYmxlLHVwX3JlY19mbG93X2NvbnRyb2w6dW5kZWZpbmVkLGJydXNoX2R1cGxpY2F0ZTpkZWZhdWx0LHBjdHJfY3BtOmNwbSxkZnhfc3BlY2lmaWNfcmF0aW86dW5kZWZpbmVkLHBjdHJfdjI6a2Fma2EsZHluYW1pY19mbG93X2NvbnRyb2w6c3BsaXQgdGhlIGZsb3cgYnkgbWlkLHBjdnI6ZGxkLGZyZXFMaW1pdDpkZWZhdWx0LHNtYWxsQ29uc3VtZVVuaXQ6ZnJlcUxpbWl0TG9vc2Usb3V0ZXJCZWF0SW5uZXI6ZW5hYmxlLG91dGVyUXVpdDpkZWZhdWx0LGZkc19ydHQ6ZGVmYXVsdKABHqgB4QSyASBXbHnmbpOszwTXdVHn7Ki%2FqhzsnkZKkYFNZgfpS815cLoBLmh0dHBzOi8vbS53ZWliby5jbi82MTkyODc3MjQyLzQzMzM1NDIxMjI4NzM3MTLCAYUBMzA3Ml8xNDI3Xzg0Nl83MjRfNDU3XzQ1MV80MzRfMzg1XzE3NF8xNTBfMTQ4XzE0OF8xNDhfMTQ4XzE0OF8xNDdfMTQ3XzE0N18xNDdfMTQ3XzE0N18xNDdfMTM5XzEzOV8xMzlfMTM5XzEzOV8xMzlfMTM5XzEzOV8xMzlfMTM5XzEzOMoBANIBANgBJuABgIyNngLoAYCMjZ4C8AEA%2BAEegAICiAIAkgLlAjE4MDIyNl8xNTUwNTM0OTIxLDE5NjEzNV8xNTUwNTM0OTMxLDc3NzA3XzE1NTA1MzQ5MzgsMjAwMzkyXzE1NTA1MzUxNDUsMTc2NzgwXzE1NTA1MzUxNTMsMTgwMjI1XzE1NTA1MzUxNjYsMjA0MDMzXzE1NTA1MzUyMzMsMjAyNDQ5XzE1NTA1MzUyMzMsNzc3MjNfMTU1MDUzNTIzNywyMDA0MTNfMTU1MDUzNTI0MywxMDE3MDNfMTU1MDUzNTczOCwyMDAxNDFfMTU1MDU5MTE1MSwxOTU3MzlfMTU1MDU5MTE1NywxNzY3NDhfMTU1MDYwMTU5OSwyMDA0MTFfMTU1MDYwMTYwMCwxNTE2NTJfMTU1MDYwMTYxMCwxNTE2NTBfMTU1MDYwMTczNiwyMDI0NDVfMTU1MDYwMTc1MCwyMDUyNjBfMTU1MDYxOTAyNiwyMDUyNjNfMTU1MDYxOTAyN5gCrqCjBqAC8qUHqALu%2FgSwAp8EuAIAwAIAyAIA0AIA2AIA4gISLCzmna3lt54t5LiK5Z%2BO5Yy6 + @SerializedName("long_desc") + var longDesc: String, + @SerializedName("title") + var title: String // 往老鼠洞里打氢气和氧气,场面瞬间失控 + ) { + data class Cover( + @SerializedName("url") + var url: String // https://i0.hdslb.com/bfs/sycp/creative_img/201902/9097a17ff77a3dc03ea4b8841f46078f.jpg_640x400.jpg + ) + } + } + } + + data class ThreePointV2( + @SerializedName("reasons") + var reasons: List<Reason>, + @SerializedName("subtitle") + var subtitle: String, // (选择后将减少相似内容推荐) + @SerializedName("title") + var title: String, // 不感兴趣 + @SerializedName("type") + var type: String // dislike + ) { + data class Reason( + @SerializedName("id") + var id: Int, // 1 + @SerializedName("name") + var name: String // 不感兴趣 + ) + } + + data class BannerItem( + @SerializedName("ad_cb") + var adCb: String, // CMDeARAAGOChASAAKAAwAzjABUIfMTU1MDY0NTk0MjUxNHExNzJhMjJhNTZhMTU5cTcxNkjysc3NkC1SBuadreW3nloG5rWZ5rGfYgbkuK3lm71oAXAAeICAgIAQgAEAiAGCJJIBDjEwMS43MS4yNDUuMjQymgGKA2FsbDpjcGNfY3Jvd2RfdGFyZ2V0LGVjcG06ZGVmYXVsdCxjcGNUYWdGaWx0ZXI6dW5kZWZpbmVkLGVuaGFuY2VDdHJRRmFjdG9yOmRlZmF1bHQsYWRNZWNoYW5pc21Nb25pdG9yOm90aGVyLHBsYXlwYWdlY3RyOmRpc2FibGUsdXBfcmVjX2Zsb3dfY29udHJvbDp1bmRlZmluZWQsYnJ1c2hfZHVwbGljYXRlOmRlZmF1bHQscGN0cl9jcG06Y3BtLGRmeF9zcGVjaWZpY19yYXRpbzp1bmRlZmluZWQscGN0cl92MjpkZnQsZHluYW1pY19mbG93X2NvbnRyb2w6c3BsaXQgdGhlIGZsb3cgYnkgbWlkLHBjdnI6ZGxkLGZyZXFMaW1pdDpkZWZhdWx0LHNtYWxsQ29uc3VtZVVuaXQ6ZnJlcUxpbWl0TG9vc2Usb3V0ZXJCZWF0SW5uZXI6ZGVmYXVsdCxvdXRlclF1aXQ6ZGVmYXVsdCxmZHNfcnR0OmRlZmF1bHSgAQCoAQCyASBzEMEnoPF8mLhSbbL8kmKEYNtD/f3W63yJX7yJ/ZmpN7oBQ2JpbGliaWxpOi8vZ2FtZV9jZW50ZXIvZGV0YWlsP2lkPTgwJnNvdXJjZUZyb209NzgyJnNvdXJjZVR5cGU9YWRQdXTCAQDKAQDSAQDYAQHgAQDoAQDwAQD4AQCAAgCIAgC4AgDAAqCsT8gCANACANgCAOICEiws5p2t5beeLeS4iuWfjuWMug== + @SerializedName("click_url") + var clickUrl: String, // https://ad-bili-data.biligame.com/api/mobile/clickBili?ad_plan_id=1670&mid=__MID__&os=0&idfa=__IDFA__&buvid=__BUVID__&android_id=43d7a1ebb6669597650e3ee417d9e7f5&imei=__IMEI__&mac=1035d532877200d6598f96118c2821e8&duid=__DUID__&ip=101.71.245.242&request_id=1550645942514q172a22a56a159q716&ts=__TS__&ua=Dalvik%252F2.1.0%2B%2528Linux%253B%2BU%253B%2BAndroid%2B6.0%253B%2BAndroid%2BSDK%2Bbuilt%2Bfor%2Bx86%2BBuild%252FMASTER%2529 + @SerializedName("client_ip") + var clientIp: String, // 101.71.245.242 + @SerializedName("cm_mark") + var cmMark: Int, // 0 + @SerializedName("creative_id") + var creativeId: Int, // 20704 + @SerializedName("extra") + var extra: Extra, + @SerializedName("hash") + var hash: String, // 036073dcc265f595ce2a0d331fe404c0 + @SerializedName("id") + var id: Int, // 229421 + @SerializedName("image") + var image: String, // http://i0.hdslb.com/bfs/archive/91318bfd6076f4c5fd59b945120f346eda43cc59.jpg + @SerializedName("index") + var index: Int, // 5 + @SerializedName("is_ad") + var isAd: Boolean, // true + @SerializedName("is_ad_loc") + var isAdLoc: Boolean, // true + @SerializedName("request_id") + var requestId: String, // 1550645942462 + @SerializedName("resource_id") + var resourceId: Int, // 631 + @SerializedName("server_type") + var serverType: Int, // 0 + @SerializedName("src_id") + var srcId: Int, // 704 + @SerializedName("title") + var title: String, // 还有哪些特别的过年习俗呢? + @SerializedName("uri") + var uri: String // https://www.bilibili.com/blackboard/topic/activity-Dp6imaUka.html + ) { + data class Extra( + @SerializedName("card") + var card: Card, + @SerializedName("click_urls") + var clickUrls: List<String>, + @SerializedName("open_whitelist") + var openWhitelist: List<String>, + @SerializedName("preload_landingpage") + var preloadLandingpage: Int, // 0 + @SerializedName("report_time") + var reportTime: Int, // 2000 + @SerializedName("sales_type") + var salesType: Int, // 31 + @SerializedName("show_urls") + var showUrls: List<JsonElement>, + @SerializedName("special_industry") + var specialIndustry: Boolean, // false + @SerializedName("special_industry_tips") + var specialIndustryTips: String, + @SerializedName("use_ad_web_v2") + var useAdWebV2: Boolean // false + ) { + data class Card( + @SerializedName("ad_tag") + var adTag: String, + @SerializedName("button") + var button: Button, + @SerializedName("callup_url") + var callupUrl: String, + @SerializedName("card_type") + var cardType: Int, // 0 + @SerializedName("covers") + var covers: List<Cover>, + @SerializedName("desc") + var desc: String, + @SerializedName("jump_url") + var jumpUrl: String, // bilibili://game_center/detail?id=80&sourceFrom=782&sourceType=adPut + @SerializedName("long_desc") + var longDesc: String, + @SerializedName("title") + var title: String + ) { + data class Cover( + @SerializedName("url") + var url: String // https://i0.hdslb.com/bfs/sycp/creative_img/201902/abd37b988b7f043a8aba3f173ef5c220.jpg + ) + + data class Button( + @SerializedName("dlsuc_callup_url") + var dlsucCallupUrl: String, + @SerializedName("jump_url") + var jumpUrl: String, // bilibili://game_center/detail?id=80&sourceFrom=782&sourceType=adPut + @SerializedName("report_urls") + var reportUrls: List<JsonElement>, + @SerializedName("text") + var text: String, + @SerializedName("type") + var type: Int // 1 + ) + } + } + } + + data class RcmdReasonStyle( + @SerializedName("bg_color") + var bgColor: String, // #FFFB9E60 + @SerializedName("bg_style") + var bgStyle: Int, // 1 + @SerializedName("border_color") + var borderColor: String, // #FFFB9E60 + @SerializedName("text") + var text: String, // 已关注 + @SerializedName("text_color") + var textColor: String // #FFFFFFFF + ) + + data class DescButton( + @SerializedName("event") + var event: String, // channel_click + @SerializedName("text") + var text: String, // 单机游戏 · 宇宙 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("uri") + var uri: String // bilibili://pegasus/channel/9264 + ) + } + + data class Config( + @SerializedName("autoplay_card") + var autoplayCard: Int, // 2 + @SerializedName("column") + var column: Int, // 2 + @SerializedName("feed_clean_abtest") + var feedCleanAbtest: Int // 0 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/LikeResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/LikeResponse.kt new file mode 100644 index 0000000..d35753b --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/LikeResponse.kt @@ -0,0 +1,22 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class LikeResponse( + @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( + /** + * 取消点赞时 toast 为 "" + */ + @SerializedName("toast") + var toast: String // 点赞收到!视频可能推荐哦 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/Mine.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Mine.kt new file mode 100644 index 0000000..5d9f34e --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Mine.kt @@ -0,0 +1,60 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class Mine( + @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("audio_type") + var audioType: Int, // 0 + @SerializedName("bcoin") + var bcoin: Int, // 5 + @SerializedName("coin") + var coin: Double, // 892.7 + @SerializedName("dynamic") + var `dynamic`: Int, // 8 + @SerializedName("face") + var face: String, // http://i0.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg + @SerializedName("follower") + var follower: Int, // 512 + @SerializedName("following") + var following: Int, // 106 + @SerializedName("level") + var level: Int, // 5 + @SerializedName("mid") + var mid: Long, // 2866663 + @SerializedName("name") + var name: String, // hyx5020 + @SerializedName("new_followers") + var newFollowers: Int, // 0 + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("rank") + var rank: Int, // 10000 + @SerializedName("sex") + var sex: Int, // 0 + @SerializedName("show_creative") + var showCreative: Int, // 1 + @SerializedName("show_videoup") + var showVideoup: Int, // 1 + @SerializedName("silence") + var silence: Int, // 0 + @SerializedName("vip_type") + var vipType: Int // 2 + ) { + data class OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/MyInfo.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/MyInfo.kt new file mode 100644 index 0000000..361470a --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/MyInfo.kt @@ -0,0 +1,67 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class MyInfo( + @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("birthday") + var birthday: String, // 1995-11-18 + @SerializedName("coins") + var coins: Int, // 1025 + @SerializedName("email_status") + var emailStatus: Int, // 0 + @SerializedName("face") + var face: String, // http://i1.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg + @SerializedName("identification") + var identification: Int, // 1 + @SerializedName("level") + var level: Int, // 4 + @SerializedName("mid") + var mid: Long, // 20293030 + @SerializedName("name") + var name: String, // czp3009 + @SerializedName("official") + var official: Official, + @SerializedName("rank") + var rank: Int, // 10000 + @SerializedName("sex") + var sex: Int, // 0 + @SerializedName("sign") + var sign: String, + @SerializedName("silence") + var silence: Int, // 0 + @SerializedName("tel_status") + var telStatus: Int, // 1 + @SerializedName("vip") + var vip: Vip + ) { + data class Official( + @SerializedName("desc") + var desc: String, + @SerializedName("role") + var role: Int, // 0 + @SerializedName("title") + var title: String + ) + + data class Vip( + @SerializedName("due_date") + var dueDate: Long, // 0 + @SerializedName("status") + var status: Int, // 0 + @SerializedName("type") + var type: Int, // 0 + @SerializedName("vip_pay_type") + var vipPayType: Int // 0 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/PopularPage.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/PopularPage.kt new file mode 100644 index 0000000..4394d88 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/PopularPage.kt @@ -0,0 +1,88 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class PopularPage( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("config") + var config: Config, + @SerializedName("data") + var `data`: List<Data>, + @SerializedName("message") + var message: String, // 0 + @SerializedName("ver") + var ver: String // 1550674482 +) { + data class Data( + @SerializedName("args") + var args: JsonElement, // {} + @SerializedName("card_goto") + var cardGoto: String, // av + @SerializedName("card_type") + var cardType: String, // small_cover_v5 + @SerializedName("cover") + var cover: String, // http://i1.hdslb.com/bfs/archive/92c41f8fd16ccc7c9fb8ff4c302c8cd28f98500c.jpg + @SerializedName("cover_right_text_1") + var coverRightText1: String, // 2:22:47 + @SerializedName("from_type") + var fromType: String, // recommend + @SerializedName("goto") + var goto: String, // av + @SerializedName("idx") + var idx: Int, // 10 + @SerializedName("param") + var `param`: String, // 44139240 + @SerializedName("rcmd_reason_style") + var rcmdReasonStyle: RcmdReasonStyle, + @SerializedName("right_desc_1") + var rightDesc1: String, // Alessa0 + @SerializedName("right_desc_2") + var rightDesc2: String, // 17.5万观看 · 11小时前 + @SerializedName("three_point") + var threePoint: ThreePoint, + @SerializedName("three_point_v2") + var threePointV2: List<ThreePointV2>, + @SerializedName("title") + var title: String, // 【莫璃】还愿-Devotion 实况解说 + @SerializedName("uri") + var uri: String // bilibili://video/44139240?page=1&player_preload=%7B%22cid%22%3A77299630%2C%22expire_time%22%3A1550678082%2C%22file_info%22%3A%7B%22116%22%3A%5B%7B%22timelength%22%3A1650317%2C%22filesize%22%3A1203029539%7D%5D%2C%2216%22%3A%5B%7B%22timelength%22%3A1650264%2C%22filesize%22%3A59700129%7D%5D%2C%2232%22%3A%5B%7B%22timelength%22%3A1650264%2C%22filesize%22%3A133510883%7D%5D%2C%2264%22%3A%5B%7B%22timelength%22%3A1650264%2C%22filesize%22%3A295466703%7D%5D%2C%2274%22%3A%5B%7B%22timelength%22%3A1650317%2C%22filesize%22%3A601916177%7D%5D%2C%2280%22%3A%5B%7B%22timelength%22%3A1650264%2C%22filesize%22%3A442710018%7D%5D%7D%2C%22support_quality%22%3A%5B116%2C74%2C80%2C64%2C32%2C16%5D%2C%22support_formats%22%3A%5B%22flv_p60%22%2C%22flv720_p60%22%2C%22flv%22%2C%22flv720%22%2C%22flv480%22%2C%22flv360%22%5D%2C%22support_description%22%3A%5B%22%E9%AB%98%E6%B8%85%201080P60%22%2C%22%E9%AB%98%E6%B8%85%20720P60%22%2C%22%E9%AB%98%E6%B8%85%201080P%22%2C%22%E9%AB%98%E6%B8%85%20720P%22%2C%22%E6%B8%85%E6%99%B0%20480P%22%2C%22%E6%B5%81%E7%95%85%20360P%22%5D%2C%22quality%22%3A32%2C%22video_codecid%22%3A7%2C%22video_project%22%3Atrue%2C%22fnver%22%3A0%2C%22fnval%22%3A16%2C%22dash%22%3A%7B%22video%22%3A%5B%7B%22id%22%3A16%2C%22base_url%22%3A%22http%3A%2F%2F112.13.92.201%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30015.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DpB2mBK-uUt8J2FR7gpRkMw%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A380120%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A32%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.199%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30032.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DQnAj8uehkASEqd0d4x2qng%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A722044%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A64%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.200%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30064.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DQrLc5Upez1bBgiBKy18EAA%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A967572%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A80%2C%22base_url%22%3A%22http%3A%2F%2F112.13.92.209%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30080.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3D_mTir3zLWUP6l1IkebdNxA%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A1901584%2C%22codecid%22%3A7%7D%2C%7B%22id%22%3A16%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.195%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30011.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DC0KJJqQGAv_ZnGPvLFCxKA%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A289408%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A32%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.197%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30033.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3D7qlxqk9UW65zMM87EROiTQ%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A647221%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A64%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.195%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30066.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DESc65T0K8um6aFJwFT0ATg%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A1432336%2C%22codecid%22%3A12%7D%2C%7B%22id%22%3A80%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.196%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30077.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DmxkPp_P0Z4p665jFbM6Yeg%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A2146129%2C%22codecid%22%3A12%7D%5D%2C%22audio%22%3A%5B%7B%22id%22%3A30280%2C%22base_url%22%3A%22http%3A%2F%2F112.16.2.202%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30280.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DFSfFHiKsuIi26dSiVD1R1A%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A258739%2C%22codecid%22%3A0%7D%2C%7B%22id%22%3A30216%2C%22base_url%22%3A%22http%3A%2F%2F117.149.37.134%2Fupgcxcode%2F30%2F96%2F77299630%2F77299630-1-30216.m4s%3Fexpires%3D1550681400%5Cu0026platform%3Dandroid%5Cu0026ssig%3DMkkmNF2KLHxp826xbglC7w%5Cu0026oi%3D3670888805%5Cu0026hfa%3D2120131681%5Cu0026hfb%3DNzUxMjI5MWJlMDBjMDY0YTQxNjFjMTJiYWE0MjEwYmQ%3D%5Cu0026trid%3Ddfa70793caa4422581b4291f4a4f9a0d%5Cu0026nfc%3D1%22%2C%22bandwidth%22%3A67093%2C%22codecid%22%3A0%7D%5D%7D%7D&player_width=1920&player_height=1080&player_rotate=0 + ) { + data class ThreePoint( + @SerializedName("watch_later") + var watchLater: Int // 1 + ) + + data class ThreePointV2( + @SerializedName("title") + var title: String, // 添加至稍后再看 + @SerializedName("type") + var type: String // watch_later + ) + + data class RcmdReasonStyle( + @SerializedName("bg_color") + var bgColor: String, // #FFFB9E60 + @SerializedName("bg_style") + var bgStyle: Int, // 1 + @SerializedName("border_color") + var borderColor: String, // #FFFB9E60 + @SerializedName("text") + var text: String, // 新 + @SerializedName("text_color") + var textColor: String // #FFFFFFFF + ) + } + + data class Config( + @SerializedName("bottom_text") + var bottomText: String, // 已经到达热门的尽头惹,<em class="keyword">关于热门</em> + @SerializedName("bottom_text_cover") + var bottomTextCover: String, // http://i0.hdslb.com/bfs/archive/10814950191d33ba6eb6f29439e27399c3eeee37.png + @SerializedName("bottom_text_url") + var bottomTextUrl: String, // https://www.bilibili.com/blackboard/activity-RKWxGjjMb.html + @SerializedName("item_title") + var itemTitle: String // 当前热门 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchArticleResult.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchArticleResult.kt new file mode 100644 index 0000000..26163a7 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchArticleResult.kt @@ -0,0 +1,58 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchArticleResult( + @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("items") + var items: List<Item>, + @SerializedName("pages") + var pages: Int, // 50 + @SerializedName("total") + var total: Int, // 0 + @SerializedName("trackid") + var trackid: String // 2251647613743955310 + ) { + data class Item( + @SerializedName("badge") + var badge: String, // 专栏 + @SerializedName("desc") + var desc: String, // 今天来和大家说下《刀剑神域3》第19集的先行图剧情,与其说是第19集,确切的讲应该是18.5集,根据先行图来看,这一集是前面的合集,主要讲的是桐人和尤吉欧的经历。在第18集结尾,桐人不小心说出了赛鲁卡的名字,导致爱丽丝记忆发生了错乱,隐约想起了自己的妹妹,而接下来就是桐人会和爱丽丝说关于她的事了,而所说的方式根据先行图来看事回忆杀方式。下面就简单和大家说下官方给出的先行图。先行图01:a姐植入记忆水晶桐人既然要告诉爱丽丝真相,也会给她说这一切的元凶就是最高祭师a姐,从上图先行图可以看出,这是a姐 + @SerializedName("goto") + var goto: String, // article + @SerializedName("id") + var id: Long, // 2052980 + @SerializedName("image_urls") + var imageUrls: List<String>, + @SerializedName("like") + var like: Int, // 116 + @SerializedName("mid") + var mid: Int, // 12043763 + @SerializedName("name") + var name: String, // 老白与动漫 + @SerializedName("param") + var `param`: String, // 2052980 + @SerializedName("play") + var play: Int, // 19101 + @SerializedName("reply") + var reply: Int, // 82 + @SerializedName("template_id") + var templateId: Int, // 3 + @SerializedName("title") + var title: String, // <em class="keyword">刀剑神域</em>3第19集先行:桐人告诉爱丽丝真相,又是回忆杀剧情! + @SerializedName("uri") + var uri: String, // bilibili://article/2052980 + @SerializedName("view") + var view: Int // 19101 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchBangumiResult.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchBangumiResult.kt new file mode 100644 index 0000000..65f7687 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchBangumiResult.kt @@ -0,0 +1,100 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchBangumiResult( + @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("items") + var items: List<Item>, + @SerializedName("pages") + var pages: Int, // 1 + @SerializedName("total") + var total: Int, // 1 + @SerializedName("trackid") + var trackid: String // 1357843021891149439 + ) { + data class Item( + @SerializedName("area") + var area: String, // 日本 + @SerializedName("badge") + var badge: String, // 番剧 + @SerializedName("badges") + var badges: List<Badge>, + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/bangumi/4d9f43eb3dba572797f8915f8f28efce9e58d756.jpg + @SerializedName("cv") + var cv: String, // 桐人(桐谷和人):松冈祯丞亚丝娜(结城明日奈):户松遥爱丽丝:茅野爱衣尤吉欧:岛崎信长赛鲁卡:前田佳织里罗妮耶·亚拉贝尔:近藤玲奈蒂洁·修特利尼:石原夏织神代凛子:小林沙苗菊冈诚二郎:森川智之莱欧斯·安提诺斯:岩濑周平温贝尔·吉泽克:木岛隆一索尔狄丽娜·塞路尔特:潘惠美沃罗·利凡玎:村田太志诗乃(朝田诗乃):泽城美雪 强尼·布莱克(金本敦):逢坂良太 西莉卡(绫野珪子):日高里菜 莉兹贝特(筱崎里香):高垣彩阳 + @SerializedName("episodes") + var episodes: List<Episode>, + @SerializedName("goto") + var goto: String, // bangumi + @SerializedName("is_atten") + var isAtten: Int, // 1 + @SerializedName("is_selection") + var isSelection: Int, // 1 + @SerializedName("label") + var label: String, // 小说改/热血/奇幻/战斗/励志 + @SerializedName("media_type") + var mediaType: Int, // 1 + @SerializedName("param") + var `param`: String, // 130412 + @SerializedName("ptime") + var ptime: Int, // 1538841600 + @SerializedName("rating") + var rating: Double, // 9.2 + @SerializedName("season_id") + var seasonId: Int, // 25510 + @SerializedName("season_type") + var seasonType: Int, // 1 + @SerializedName("season_type_name") + var seasonTypeName: String, // 番剧 + @SerializedName("staff") + var staff: String, // 原作:川原砾原作插画 / 角色设计草案:abec导演:小野学助理导演:佐久间贵史角色设计:足立慎吾、铃木豪、西口智也总作画监督:铃木豪、西口智也动作作画监督:菅野芳弘、竹内哲也美术导演:小川友佳子、渡边佳人美术设定:森冈贤一、谷内优穗色彩设计:中野尚美CG导演:云藤隆太音响导演:岩浪美和效果:小山恭正音响制作:ソニルード音乐:梶浦由记制片:EGG FIRM、Straight Edge制作:A-1 Pictures + @SerializedName("style") + var style: String, // 小说改/热血/奇幻/战斗/励志 + @SerializedName("title") + var title: String, // 刀剑神域 Alicization + @SerializedName("uri") + var uri: String, // https://www.bilibili.com/bangumi/play/ss25510/ + @SerializedName("vote") + var vote: Int // 48497 + ) { + data class Badge( + @SerializedName("bg_color") + var bgColor: String, // #FB7299 + @SerializedName("bg_color_night") + var bgColorNight: String, // #BB5B76 + @SerializedName("bg_style") + var bgStyle: Int, // 1 + @SerializedName("border_color") + var borderColor: String, // #FB7299 + @SerializedName("border_color_night") + var borderColorNight: String, // #BB5B76 + @SerializedName("text") + var text: String, // 会员抢先 + @SerializedName("text_color") + var textColor: String, // #FFFFFF + @SerializedName("text_color_night") + var textColorNight: String // #E5E5E5 + ) + + data class Episode( + @SerializedName("index") + var index: String, // 21 + @SerializedName("param") + var `param`: String, // 250557 + @SerializedName("uri") + var uri: String // https://www.bilibili.com/bangumi/play/ep250557 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchDefaultWords.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchDefaultWords.kt new file mode 100644 index 0000000..4a0842c --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchDefaultWords.kt @@ -0,0 +1,25 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchDefaultWords( + @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("param") + var `param`: String, // 5157193909505109430 + @SerializedName("show") + var show: String, // 如果绝地求生也能滑铲 + @SerializedName("trackid") + var trackid: String, // 14016083035920227490 + @SerializedName("word") + var word: String // av46169875 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchHot.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchHot.kt new file mode 100644 index 0000000..9d814bd --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchHot.kt @@ -0,0 +1,30 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchHot( + @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("list") + var list: List<Hot>, + @SerializedName("trackid") + var trackid: String // 3482080616107297898 + ) { + data class Hot( + @SerializedName("keyword") + var keyword: String, // 凹凸世界 + @SerializedName("name_type") + var nameType: String, + @SerializedName("status") + var status: String + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchLiveResult.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchLiveResult.kt new file mode 100644 index 0000000..fde2772 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchLiveResult.kt @@ -0,0 +1,82 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchLiveResult( + @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("live_master") + var liveMaster: LiveMaster, + @SerializedName("live_room") + var liveRoom: LiveRoom, + @SerializedName("pages") + var pages: Int, // 3 + @SerializedName("total") + var total: Int, // 0 + @SerializedName("trackid") + var trackid: String // 14587616663833842975 + ) { + data class LiveRoom( + @SerializedName("items") + var items: List<Item>, + @SerializedName("pages") + var pages: Int, // 3 + @SerializedName("total") + var total: Int, // 57 + @SerializedName("trackid") + var trackid: String + ) { + data class Item( + @SerializedName("area_v2_name") + var areaV2Name: String, // 300英雄 + @SerializedName("attentions") + var attentions: Int, // 2 + @SerializedName("badge") + var badge: String, // 直播 + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/live/16181996f2260024f861db58d0d3dea2dd390930.jpg + @SerializedName("goto") + var goto: String, // live + @SerializedName("live_status") + var liveStatus: Int, // 2 + @SerializedName("mid") + var mid: Long, // 82542745 + @SerializedName("name") + var name: String, // SAO刀剑神域丶 + @SerializedName("online") + var online: Int, // 7 + @SerializedName("param") + var `param`: String, // 3387258 + @SerializedName("region") + var region: Int, // 4 + @SerializedName("roomid") + var roomid: Long, // 3387258 + @SerializedName("tags") + var tags: String, // 点点关注 + @SerializedName("title") + var title: String, // SAO刀剑神域丶的直播间 + @SerializedName("type") + var type: String, // live_room + @SerializedName("uri") + var uri: String // bilibili://live/3387258?broadcast_type=0 + ) + } + + data class LiveMaster( + @SerializedName("pages") + var pages: Int, // 0 + @SerializedName("total") + var total: Int, // 0 + @SerializedName("trackid") + var trackid: String + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchMovieResult.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchMovieResult.kt new file mode 100644 index 0000000..026b5ca --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchMovieResult.kt @@ -0,0 +1,92 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchMovieResult( + @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("items") + var items: List<Item>, + @SerializedName("pages") + var pages: Int, // 1 + @SerializedName("total") + var total: Int, // 2 + @SerializedName("trackid") + var trackid: String // 11415000413319714311 + ) { + data class Item( + @SerializedName("area") + var area: String, // 日本 + @SerializedName("badge") + var badge: String, // 电影 + /** + * badge 的特殊样式 + */ + @SerializedName("badges") + var badges: List<Map<String, String>>, + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/bangumi/aef914fac9edfa518c4df9a82d5d3d0cba08a451.jpg + /** + * 类型为 纪录片 时没有 cv, 其他一些字段同理 + */ + @SerializedName("cv") + var cv: String?, // 曹旭鹏、阎萌萌、碧涓、惠霖、梦娇 + /** + * 有些纪录片有分集, 有些没有 + */ + @SerializedName("episodes") + var episodes: List<Episode>?, + @SerializedName("goto") + var goto: String, // movie + /** + * 一些纪录片没有 label, 其他一些字段同理 + */ + @SerializedName("label") + var label: String?, // 演员:曹旭鹏、阎萌萌、碧涓、惠霖、梦娇 + /** + * 2 为剧场版动画, 3 为纪录片 + */ + @SerializedName("media_type") + var mediaType: Int, // 2 + @SerializedName("param") + var `param`: String, // 115472 + @SerializedName("ptime") + var ptime: Long, // 1505404800 + @SerializedName("rating") + var rating: Double, // 5.8 + @SerializedName("season_id") + var seasonId: Int, // 12767 + @SerializedName("season_type") + var seasonType: Int, // 2 + @SerializedName("season_type_name") + var seasonTypeName: String, // 电影 + @SerializedName("staff") + var staff: String?, // 导演:伊藤智彦编剧:川原砾 + @SerializedName("style") + var style: String, // 科幻/动画 + @SerializedName("title") + var title: String, // 刀剑神域:序列之争(中文) + @SerializedName("uri") + var uri: String, // https://www.bilibili.com/bangumi/play/ss12767/ + @SerializedName("vote") + var vote: Int? // 581 + ) { + data class Episode( + @SerializedName("index") + var index: String, // 4 + @SerializedName("param") + var `param`: String, // 250006 + @SerializedName("uri") + var uri: String // https://www.bilibili.com/bangumi/play/ep250006 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchResult.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchResult.kt new file mode 100644 index 0000000..faadb80 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchResult.kt @@ -0,0 +1,186 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class SearchResult( + @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("array") + var array: Int, // 1 + @SerializedName("attribute") + var attribute: Int, // 1 + @SerializedName("item") + var item: List<Item>, + @SerializedName("items") + var items: JsonElement, + @SerializedName("nav") + var nav: List<Nav>, + @SerializedName("page") + var page: Int, // 1 + @SerializedName("trackid") + var trackid: String // 9256129479667154639 + ) { + data class Nav( + @SerializedName("name") + var name: String, // 专栏 + @SerializedName("pages") + var pages: Int, // 50 + @SerializedName("total") + var total: Int, // 1000 + @SerializedName("type") + var type: Int // 6 + ) + + data class Item( + @SerializedName("area") + var area: String, // 日本 + @SerializedName("author") + var author: String, // 那位滑稽 + @SerializedName("badge") + var badge: String, // 专栏 + @SerializedName("badges") + var badges: List<Badge>, + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/archive/a4a58b6772d0de16df6e9a7d3e208fd52a552710.jpg + @SerializedName("cv") + var cv: String, // 曹旭鹏、阎萌萌、碧涓、惠霖、梦娇 + @SerializedName("danmaku") + var danmaku: Int, // 196 + @SerializedName("desc") + var desc: String, // 刀剑神域第一季作品以 2022 年为舞台,大厂牌电子机械制造商“ARGUS”开发出-“NERvGear”-能连结虚拟世界的机器。完全的虚拟实境终于能够实现。主角桐人使用 NERvGear 游玩 VR MMORPG《Sword Art Online》的玩家,幸运地参与过封测并买下正式版的桐人,和正式营运就马上“完全潜行”享受着正式版的 SAO 世界。就在游戏四小时多后,桐人发现到“登出”指令竟然消失。认为只是系统暂时出错的桐人和开始陷入混乱的所有玩家们一起被传送到开始地点广场,并传来游戏设计者的死亡游戏 + @SerializedName("duration") + var duration: String, // 591:52 + @SerializedName("episodes") + var episodes: List<Episode>, + @SerializedName("face") + var face: String, // http://i0.hdslb.com/bfs/face/d34c34fca6471f07e60db3a7007cc5c2eb6bd785.jpg + @SerializedName("goto") + var goto: String, // recommend_word + @SerializedName("id") + var id: Int, // 2227576 + @SerializedName("image_urls") + var imageUrls: List<String>, + @SerializedName("is_atten") + var isAtten: Int, // 1 + @SerializedName("is_selection") + var isSelection: Int, // 1 + @SerializedName("label") + var label: String, // 演员:曹旭鹏、阎萌萌、碧涓、惠霖、梦娇 + @SerializedName("like") + var like: Int, // 13 + @SerializedName("linktype") + var linktype: String, // query_rec + @SerializedName("list") + var list: List<X>, + @SerializedName("media_type") + var mediaType: Int, // 2 + @SerializedName("mid") + var mid: Long, // 382820503 + @SerializedName("new_rec_tags") + var newRecTags: List<NewRecTag>, + @SerializedName("param") + var `param`: String, // 33673993 + @SerializedName("play") + var play: Int, // 324938 + @SerializedName("position") + var position: Int, // 21 + @SerializedName("ptime") + var ptime: Long, // 1505404800 + @SerializedName("rating") + var rating: Double, // 5.8 + @SerializedName("rec_tags") + var recTags: List<String>, + @SerializedName("reply") + var reply: Int, // 4 + @SerializedName("season_id") + var seasonId: Int, // 12767 + @SerializedName("season_type") + var seasonType: Int, // 2 + @SerializedName("season_type_name") + var seasonTypeName: String, // 电影 + @SerializedName("staff") + var staff: String, // 导演:伊藤智彦编剧:川原砾 + @SerializedName("style") + var style: String, // 科幻/动画 + @SerializedName("template_id") + var templateId: Int, // 4 + @SerializedName("title") + var title: String, // 相关推荐 + @SerializedName("trackid") + var trackid: String, // 9256129479667154639 + @SerializedName("uri") + var uri: String, // bilibili://video/33673993?player_width=352&player_height=288&player_rotate=0 + @SerializedName("view") + var view: Int, // 2310 + @SerializedName("vote") + var vote: Int // 581 + ) { + data class NewRecTag( + @SerializedName("bg_color") + var bgColor: String, // #FAAB4B + @SerializedName("bg_color_night") + var bgColorNight: String, // #BA833F + @SerializedName("bg_style") + var bgStyle: Int, // 1 + @SerializedName("border_color") + var borderColor: String, // #FAAB4B + @SerializedName("border_color_night") + var borderColorNight: String, // #BA833F + @SerializedName("text") + var text: String, // MINECRAFT + @SerializedName("text_color") + var textColor: String, // #FFFFFFFF + @SerializedName("text_color_night") + var textColorNight: String // #E5E5E5 + ) + + data class Badge( + @SerializedName("bg_color") + var bgColor: String, // #FB7299 + @SerializedName("bg_color_night") + var bgColorNight: String, // #BB5B76 + @SerializedName("bg_style") + var bgStyle: Int, // 1 + @SerializedName("border_color") + var borderColor: String, // #FB7299 + @SerializedName("border_color_night") + var borderColorNight: String, // #BB5B76 + @SerializedName("text") + var text: String, // 会员抢先 + @SerializedName("text_color") + var textColor: String, // #FFFFFF + @SerializedName("text_color_night") + var textColorNight: String // #E5E5E5 + ) + + data class X( + @SerializedName("from_source") + var fromSource: String, // query_rec_search + @SerializedName("param") + var `param`: String, // 7852399559249609627 + @SerializedName("title") + var title: String, // FATE 刀剑神域 + @SerializedName("type") + var type: String // query_rec + ) + + data class Episode( + @SerializedName("index") + var index: String, // 21 + @SerializedName("param") + var `param`: String, // 250557 + @SerializedName("uri") + var uri: String // https://www.bilibili.com/bangumi/play/ep250557 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchSuggest.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchSuggest.kt new file mode 100644 index 0000000..f894fec --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchSuggest.kt @@ -0,0 +1,36 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchSuggest( + @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("list") + var list: List<Suggest>, + @SerializedName("trackid") + var trackid: String // 8544564822819789247 + ) { + data class Suggest( + @SerializedName("from") + var from: String, // search + @SerializedName("keyword") + var keyword: String, // 刀剑神域 ALICIZATION + @SerializedName("position") + var position: Int, // 10 + @SerializedName("sug_type") + var sugType: String?, // 番剧 + @SerializedName("term_type") + var termType: Int, // 8 + @SerializedName("title") + var title: String // 刀剑神域 ALICIZATION + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchUserResult.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchUserResult.kt new file mode 100644 index 0000000..453ae22 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/SearchUserResult.kt @@ -0,0 +1,86 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class SearchUserResult( + @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("items") + var items: List<Item>, + @SerializedName("pages") + var pages: Int, // 2 + @SerializedName("total") + var total: Int, // 0 + @SerializedName("trackid") + var trackid: String // 15623048138266462990 + ) { + data class Item( + @SerializedName("archives") + var archives: Int, // 1 + @SerializedName("av_items") + var avItems: List<AvItem>, + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/face/c3200c52ae76004fbbab44010990431d0604aee5.jpg + @SerializedName("fans") + var fans: Int, // 3 + @SerializedName("goto") + var goto: String, // author + @SerializedName("is_up") + var isUp: Boolean, // true + @SerializedName("level") + var level: Int, // 3 + @SerializedName("live_status") + var liveStatus: Int, // 1 + @SerializedName("live_uri") + var liveUri: String, // bilibili://live/3234638?broadcast_type=0 + @SerializedName("mid") + var mid: Long, // 32557668 + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("param") + var `param`: String, // 32557668 + @SerializedName("roomid") + var roomid: Long, // 3234638 + @SerializedName("sign") + var sign: String, // 担心额刚好阿西 + @SerializedName("title") + var title: String, // 刀剑神域小漠 + @SerializedName("uri") + var uri: String // bilibili://author/32557668 + ) { + data class OfficialVerify( + @SerializedName("type") + var type: Int // 127 + ) + + data class AvItem( + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/archive/95be7c1a940dda2bbf4c33213df94eb650e44d10.jpg + @SerializedName("ctime") + var ctime: Int, // 1535755416 + @SerializedName("danmaku") + var danmaku: Int, // 1 + @SerializedName("duration") + var duration: String, // 3:1 + @SerializedName("goto") + var goto: String, // av + @SerializedName("param") + var `param`: String, // 30843572 + @SerializedName("play") + var play: Int, // 15 + @SerializedName("title") + var title: String, // 官方认证:非洲正品大酋长 + @SerializedName("uri") + var uri: String // bilibili://video/30843572?player_width=1920&player_height=1080&player_rotate=0 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/Sidebar.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Sidebar.kt new file mode 100644 index 0000000..bbc5bd8 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Sidebar.kt @@ -0,0 +1,33 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class Sidebar( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: List<SidebarElement>, + @SerializedName("message") + var message: String, // 0 + @SerializedName("ttl") + var ttl: Int // 1 +) { + data class SidebarElement( + @SerializedName("id") + var id: Int, // 13 + @SerializedName("logo") + var logo: String, // http://i0.hdslb.com/bfs/archive/91f7ba40e54502f7479c8d355e4298989bb8ebce.png + @SerializedName("module") + var module: Int, // 1 + @SerializedName("name") + var name: String, // 会员购中心 + @SerializedName("online_time") + var onlineTime: Int, // 0 + @SerializedName("param") + var `param`: String, // bilibili://mall/mine?msource=mine + @SerializedName("rank") + var rank: Int, // 300 + @SerializedName("tip") + var tip: Int // 1 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/Space.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Space.kt new file mode 100644 index 0000000..678dcc0 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Space.kt @@ -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 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/Tab.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Tab.kt new file mode 100644 index 0000000..2685dfc --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/Tab.kt @@ -0,0 +1,29 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.annotations.SerializedName + +data class Tab( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Map<String, List<UIElement>>, + @SerializedName("message") + var message: String, // 0 + @SerializedName("ver") + var ver: String // 5720051238481856755 +) { + data class UIElement( + @SerializedName("default_selected") + var defaultSelected: Int, // 1 + @SerializedName("id") + var id: Int, // 30 + @SerializedName("name") + var name: String, // 追番 + @SerializedName("pos") + var pos: Int, // 4 + @SerializedName("tab_id") + var tabId: String, // 追番Tab + @SerializedName("uri") + var uri: String // bilibili://pgc/home + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/app/model/View.kt b/src/main/kotlin/com/hiczp/bilibili/api/app/model/View.kt new file mode 100644 index 0000000..cef5684 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/app/model/View.kt @@ -0,0 +1,449 @@ +package com.hiczp.bilibili.api.app.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class View( + @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("aid") + var aid: Int, // 44172743 + @SerializedName("attribute") + var attribute: Int, // 16512 + @SerializedName("cid") + var cid: Int, // 77356986 + @SerializedName("cm_config") + var cmConfig: CmConfig, + @SerializedName("cms") + var cms: List<Cm>, + /** + * copyright 为 1 时表示自制, 2 表示转载 + */ + @SerializedName("copyright") + var copyright: Int, // 1 + @SerializedName("ctime") + var ctime: Int, // 1550654012 + @SerializedName("desc") + var desc: String, + @SerializedName("dimension") + var dimension: Dimension, + @SerializedName("dislike_reasons") + var dislikeReasons: List<DislikeReason>, + @SerializedName("dm_seg") + var dmSeg: Int, // 1 + @SerializedName("duration") + var duration: Int, // 444 + @SerializedName("dynamic") + var `dynamic`: String, // #流浪地球##木星##太阳# + @SerializedName("elec") + var elec: Elec, + @SerializedName("owner") + var owner: Owner, + @SerializedName("owner_ext") + var ownerExt: OwnerExt, + @SerializedName("pages") + var pages: List<Page>, + @SerializedName("pic") + var pic: String, // http://i0.hdslb.com/bfs/archive/783445f04541299ee84de21a2479cce88d8268ff.jpg + @SerializedName("pubdate") + var pubdate: Int, // 1550654012 + @SerializedName("relates") + var relates: List<Relate>, + @SerializedName("req_user") + var reqUser: ReqUser, + @SerializedName("rights") + var rights: Rights, + @SerializedName("staff") + var staff: List<Staff>, + @SerializedName("stat") + var stat: Stat, + @SerializedName("state") + var state: Int, // 0 + @SerializedName("tag") + var tag: List<Tag>, + @SerializedName("tid") + var tid: Int, // 96 + @SerializedName("title") + var title: String, // 模拟流浪地球进入木星的洛希极限,太阳要膨胀吞没地球这事是真的吗? + @SerializedName("tname") + var tname: String, // 星海 + @SerializedName("videos") + var videos: Int // 1 + ) { + data class Cm( + @SerializedName("ad_info") + var adInfo: JsonElement, // {} + @SerializedName("client_ip") + var clientIp: String, // 218.205.81.101 + @SerializedName("index") + var index: Int, // 1 + @SerializedName("is_ad_loc") + var isAdLoc: Boolean, // true + @SerializedName("request_id") + var requestId: String, // 1550675871470q172a22a56a79q738 + @SerializedName("rsc_id") + var rscId: Int, // 2337 + @SerializedName("src_id") + var srcId: Int // 2338 + ) + + data class Owner( + @SerializedName("face") + var face: String, // http://i1.hdslb.com/bfs/face/9a586d1ef659b322af150c925976a134ad046a74.jpg + @SerializedName("mid") + var mid: Long, // 393484294 + @SerializedName("name") + var name: String // 娱乐酱鸭 + ) + + data class Elec( + @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 ReqUser( + @SerializedName("attention") + var attention: Int, // -999 + @SerializedName("coin") + var coin: Int, // 0 + @SerializedName("dislike") + var dislike: Int, // 0 + @SerializedName("favorite") + var favorite: Int, // 0 + @SerializedName("like") + var like: Int // 0 + ) + + data class Stat( + @SerializedName("aid") + var aid: Int, // 44172743 + @SerializedName("coin") + var coin: Int, // 23 + @SerializedName("danmaku") + var danmaku: Int, // 19 + @SerializedName("dislike") + var dislike: Int, // 0 + @SerializedName("favorite") + var favorite: Int, // 10 + @SerializedName("his_rank") + var hisRank: Int, // 0 + @SerializedName("like") + var like: Int, // 35 + @SerializedName("now_rank") + var nowRank: Int, // 0 + @SerializedName("reply") + var reply: Int, // 11 + @SerializedName("share") + var share: Int, // 0 + @SerializedName("view") + var view: Int // 1995 + ) + + data class OwnerExt( + @SerializedName("assists") + var assists: JsonElement?, // null + @SerializedName("fans") + var fans: Int, // 275 + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("vip") + var vip: Vip + ) { + data class OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 0 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 0 + ) + } + + data class Tag( + @SerializedName("attribute") + var attribute: Int, // 0 + @SerializedName("cover") + var cover: String, + @SerializedName("hated") + var hated: Int, // 0 + @SerializedName("hates") + var hates: Int, // 0 + @SerializedName("is_activity") + var isActivity: Int, // 0 + @SerializedName("liked") + var liked: Int, // 0 + @SerializedName("likes") + var likes: Int, // 0 + @SerializedName("tag_id") + var tagId: Int, // 7534 + @SerializedName("tag_name") + var tagName: String // 未来 + ) + + data class Staff( + @SerializedName("attention") + var attention: Int, // 0 + @SerializedName("face") + var face: String, // http://i1.hdslb.com/bfs/face/9a586d1ef659b322af150c925976a134ad046a74.jpg + @SerializedName("mid") + var mid: Long, // 393484294 + @SerializedName("name") + var name: String, // 娱乐酱鸭 + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("title") + var title: String, // UP主 + @SerializedName("vip") + var vip: Vip + ) { + data class OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 0 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 0 + ) + } + + data class DislikeReason( + @SerializedName("reason_id") + var reasonId: Int, // 8 + @SerializedName("reason_name") + var reasonName: String // 营销广告 + ) + + data class Relate( + @SerializedName("ad_index") + var adIndex: Int, // 2 + @SerializedName("aid") + var aid: Int, // 38496110 + @SerializedName("card_index") + var cardIndex: Int, // 3 + @SerializedName("cid") + var cid: Int, // 67669037 + @SerializedName("client_ip") + var clientIp: String, // 218.205.81.101 + @SerializedName("duration") + var duration: Int, // 189 + @SerializedName("goto") + var goto: String, // av + @SerializedName("is_ad_loc") + var isAdLoc: Boolean, // true + @SerializedName("owner") + var owner: Owner, + @SerializedName("param") + var `param`: String, // 38496110 + @SerializedName("pic") + var pic: String, // http://i2.hdslb.com/bfs/archive/ca80fb7c554e083716feb910370b77caa5e124b3.jpg + @SerializedName("request_id") + var requestId: String, // 1550675871470q172a22a56a79q738 + @SerializedName("src_id") + var srcId: Int, // 2334 + @SerializedName("stat") + var stat: Stat, + @SerializedName("title") + var title: String, // 《流浪地球》发布创想特辑,从无到有呈现刘慈欣科幻想象 + @SerializedName("trackid") + var trackid: String, // related_0.shylf-ai-recsys-87.1550675871470.909 + @SerializedName("uri") + var uri: String // bilibili://video/38496110?player_width=1920&player_height=1080&player_rotate=0&trackid=related_0.shylf-ai-recsys-87.1550675871470.909 + ) { + data class Owner( + @SerializedName("face") + var face: String, // http://static.hdslb.com/images/member/noface.gif + @SerializedName("mid") + var mid: Long, // 334512441 + @SerializedName("name") + var name: String // 达岸电影2018 + ) + + data class Stat( + @SerializedName("aid") + var aid: Int, // 38496110 + @SerializedName("coin") + var coin: Int, // 130 + @SerializedName("danmaku") + var danmaku: Int, // 152 + @SerializedName("dislike") + var dislike: Int, // 0 + @SerializedName("favorite") + var favorite: Int, // 194 + @SerializedName("his_rank") + var hisRank: Int, // 0 + @SerializedName("like") + var like: Int, // 341 + @SerializedName("now_rank") + var nowRank: Int, // 0 + @SerializedName("reply") + var reply: Int, // 264 + @SerializedName("share") + var share: Int, // 278 + @SerializedName("view") + var view: Int // 19397 + ) + } + + data class Page( + @SerializedName("cid") + var cid: Int, // 77356986 + @SerializedName("dimension") + var dimension: Dimension, + @SerializedName("dm") + var dm: Dm, + @SerializedName("dmlink") + var dmlink: String, // http://comment.bilibili.com/77356986.xml + @SerializedName("duration") + var duration: Int, // 444 + @SerializedName("from") + var from: String, // vupload + @SerializedName("metas") + var metas: List<Meta>, + @SerializedName("page") + var page: Int, // 1 + @SerializedName("part") + var part: String, // 2.20.2 + @SerializedName("vid") + var vid: String, + @SerializedName("weblink") + var weblink: String + ) { + data class Dm( + @SerializedName("closed") + var closed: Boolean, // false + @SerializedName("count") + var count: Int, // 19 + @SerializedName("mask") + var mask: JsonElement, // {} + @SerializedName("real_name") + var realName: Boolean, // false + @SerializedName("subtitles") + var subtitles: JsonElement? // null + ) + + data class Dimension( + @SerializedName("height") + var height: Int, // 720 + @SerializedName("rotate") + var rotate: Int, // 0 + @SerializedName("width") + var width: Int // 1280 + ) + + data class Meta( + @SerializedName("format") + var format: String, + @SerializedName("quality") + var quality: Int, // 48 + @SerializedName("size") + var size: Int // 81074 + ) + } + + data class Rights( + @SerializedName("autoplay") + var autoplay: Int, // 1 + @SerializedName("bp") + var bp: Int, // 0 + @SerializedName("download") + var download: Int, // 1 + @SerializedName("elec") + var elec: Int, // 1 + @SerializedName("hd5") + var hd5: Int, // 0 + @SerializedName("is_cooperation") + var isCooperation: Int, // 0 + @SerializedName("movie") + var movie: Int, // 0 + @SerializedName("no_reprint") + var noReprint: Int, // 1 + @SerializedName("pay") + var pay: Int, // 0 + @SerializedName("ugc_pay") + var ugcPay: Int // 0 + ) + + data class Dimension( + @SerializedName("height") + var height: Int, // 720 + @SerializedName("rotate") + var rotate: Int, // 0 + @SerializedName("width") + var width: Int // 1280 + ) + + data class CmConfig( + @SerializedName("ads_control") + var adsControl: AdsControl + ) { + data class AdsControl( + @SerializedName("has_danmu") + var hasDanmu: Int // 0 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/danmaku/Danmaku.kt b/src/main/kotlin/com/hiczp/bilibili/api/danmaku/Danmaku.kt new file mode 100644 index 0000000..8ff968c --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/danmaku/Danmaku.kt @@ -0,0 +1,66 @@ +package com.hiczp.bilibili.api.danmaku + +import com.hiczp.crc32crack.Crc32Cracker + +data class Danmaku( + /** + * 弹幕 id + */ + val id: Long, + + /** + * TODO 下标 1, 不明属性 + */ + val unknownAttribute1: String, + + /** + * 弹幕出现时间(播放器时间)(ms) + */ + val time: Long, + + /** + * 弹幕模式 + * (1从右至左滚动弹幕|6从左至右滚动弹幕|5顶端固定弹幕|4底端固定弹幕|7高级弹幕|8脚本弹幕) + */ + val mode: Int, + + /** + * 字号 + */ + val fontSize: Int, + + /** + * 颜色 + */ + val color: Int, + + /** + * 弹幕的发送时间(时间戳)(s) + */ + val timestamp: Long, + + /** + * TODO 下标 7, 不明属性 + */ + val unknownAttribute7: String, + + /** + * 弹幕发送者的 hash(用户 id 的 CRC32 校验和) + */ + val user: String, + + /** + * 弹幕的内容 + * 注意, 不一定是一个自然语言字符串, 可能是以 [ 开头的具有语义的文本, 如下所示 + * [0,0,"1-1",4.5,"天下第一电击公主,贯穿天地的惊艳落雷!我炮傲娇永世长存!",0,0,0,0.99,500,0,1,"SimHei",true] + * 这可能表示某种特殊的输出格式 + */ + val content: String +) { + /** + * 计算弹幕发送者 ID(可能有多个) + * 第一次调用 Crc32Cracker 将花费大约 300ms 来生成反查表 + * hash 反查通常不超过 1ms + */ + fun calculatePossibleUserIds() = Crc32Cracker.crack(user) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/danmaku/DanmakuAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/danmaku/DanmakuAPI.kt new file mode 100644 index 0000000..8565378 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/danmaku/DanmakuAPI.kt @@ -0,0 +1,26 @@ +package com.hiczp.bilibili.api.danmaku + +import kotlinx.coroutines.Deferred +import okhttp3.ResponseBody +import retrofit2.http.GET +import retrofit2.http.Query + +@Suppress("DeferredIsResult") +interface DanmakuAPI { + /** + * 获取弹幕(视频或者番剧) + * + * @param aid 视频的唯一标识 + * @param oid 注意, 此处的 oid 是 cid + * + * @return 返回的内容是二进制数据, 由于数据量可能很大, 此处不做解析 + */ + @GET("/x/v2/dm/list.so") + fun list( + @Query("aid") aid: Long, + @Query("oid") oid: Long, + @Query("plat") plat: Int? = 2, + @Query("ps") pageSize: Int = 0, + @Query("type") type: Int = 1 + ): Deferred<ResponseBody> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/danmaku/DanmakuParser.kt b/src/main/kotlin/com/hiczp/bilibili/api/danmaku/DanmakuParser.kt new file mode 100644 index 0000000..bd1bcad --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/danmaku/DanmakuParser.kt @@ -0,0 +1,120 @@ +package com.hiczp.bilibili.api.danmaku + +import com.google.gson.stream.JsonReader +import com.hiczp.bilibili.api.bounded +import com.hiczp.bilibili.api.readUInt +import java.io.InputStream +import java.util.* +import java.util.zip.GZIPInputStream +import javax.xml.namespace.QName +import javax.xml.stream.XMLInputFactory +import javax.xml.stream.XMLStreamConstants + +/** + * 弹幕文件解析器. + * 弹幕文件(list.so)有三个部分 + * 第一个部分为一个 Int, 表示第二部分的长度 + * 第二部分为一个 Json, 标识各个弹幕的等级(用于屏蔽设置) + * 第三部分为一个 gzip 压缩过的 xml + * + * Web 端的弹幕是一个明文 xml, 与 APP 的接口是不一样的. + * + * json 部分形如 {"dmflags":[{"dmid":12551893546958848,"flag":10}],"rec_flag":1,"rec_text":"开启后,全站视频将按等级等优化弹幕","rec_switch":1} + * xml 部分形如 <d p="12509048833835076,0,117373,5,25,16777215,1551001292,0,d2c5fc5">硬核劈柴</d> + * + * @see com.hiczp.bilibili.api.danmaku.DanmakuAPI.list + */ +@Suppress("SpellCheckingInspection") +object DanmakuParser { + /** + * 解析弹幕文件 + * + * @param inputStream 输入流, 可以指向任何位置 + * + * @return 返回 flags map 与 弹幕序列. 注意, 原始的弹幕顺序是按发送时间来排的, 而非播放器时间. + */ + fun parse(inputStream: InputStream): Pair<Map<Long, Int>, Sequence<Danmaku>> { + //Json 的长度 + val jsonLength = inputStream.readUInt() + + //弹幕ID-Flag + val danmakuFlags = HashMap<Long, Int>() + //gson 会从 reader 中自行缓冲 1024 个字符, 这会导致额外的字符被消费. 因此要限制其读取数量 + //流式解析 Json + with(JsonReader(inputStream.bounded(jsonLength).reader())) { + beginObject() + while (hasNext()) { + when (nextName()) { + "dmflags" -> { + beginArray() + while (hasNext()) { + var danmakuId = 0L + var flag = 0 + beginObject() + while (hasNext()) { + when (nextName()) { + "dmid" -> danmakuId = nextLong() + "flag" -> flag = nextInt() + else -> skipValue() + } + } + endObject() + danmakuFlags[danmakuId] = flag + } + endArray() + } + else -> skipValue() + } + } + endObject() + } + + //json 解析完毕后, 剩下的内容是一个 gzip 压缩过的 xml + val reader = GZIPInputStream(inputStream).reader() + //流式解析 xml + val xmlEventReader = XMLInputFactory.newInstance().createXMLEventReader(reader) + //lazy sequence + val danmakus = sequence { + var startD = false //之前解析到的 element 是否是 d + var p: String? = null //之前解析到的 p 的值 + while (xmlEventReader.hasNext()) { + val event = xmlEventReader.nextEvent() + when (event.eventType) { + XMLStreamConstants.START_ELEMENT -> { + with(event.asStartElement()) { + startD = name.localPart == "d" + if (startD) { + p = getAttributeByName(P).value + } + } + } + XMLStreamConstants.CHARACTERS -> { + //如果前一个解析到的是 d 标签, 那么此处得到的一定是 d 标签的 body + if (startD) { + val danmaku = with(StringTokenizer(p, ",")) { + Danmaku( + nextToken().toLong(), + nextToken(), + nextToken().toLong(), + nextToken().toInt(), + nextToken().toInt(), + nextToken().toInt(), + nextToken().toLong(), + nextToken(), + nextToken(), + event.asCharacters().data + ) + } + yield(danmaku) + } + } + } + } + } + + return danmakuFlags to danmakus + } + + //常量, 用于加快速度 + private val P = QName("p") +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/LiveAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/LiveAPI.kt new file mode 100644 index 0000000..cda22b4 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/LiveAPI.kt @@ -0,0 +1,233 @@ +package com.hiczp.bilibili.api.live + +import com.hiczp.bilibili.api.live.model.* +import com.hiczp.bilibili.api.retrofit.CommonResponse +import com.hiczp.bilibili.api.retrofit.Header +import kotlinx.coroutines.Deferred +import retrofit2.http.* +import kotlin.random.Random + +/** + * 直播站 API + */ +@Suppress("DeferredIsResult") +interface LiveAPI { + /** + * 获取一个房间的基本信息 + * + * @param id 房间号或房间短号 + */ + @GET("/room/v1/Room/mobileRoomInit") + fun mobileRoomInit(@Query("id") id: Long): Deferred<MobileRoom> + + /** + * 进入房间时客户端将访问该接口 + * 访问该接口将在自己的账户中产生一条观看直播的历史记录 + * + * @param roomId 房间号(没试过能不能用短号, 下同) + */ + @POST("/room/v1/Room/room_entry_action") + @FormUrlEncoded + fun roomEntryAction( + @Field("room_id") roomId: Long, + @Field("jumpFrom") jumpFrom: Int? = 0 + ): Deferred<CommonResponse> + + /** + * 获取一个房间的详细信息 + * + * @param id 房间号 + */ + @GET("/room/v1/Room/get_info") + fun getInfo(@Query("id") id: Long): Deferred<RoomInfo> + + /** + * 获取弹幕服务器 + * + * @param roomId 房间号 + */ + @GET("/room/v1/Danmu/getConf") + fun getDanmakuConfig( + @Query("room_id") roomId: Long + ): Deferred<DanmakuConfig> + + /** + * 获取该房间的主播的头像和等级一类的信息 + * + * @param roomId 房间号 + */ + @Suppress("SpellCheckingInspection") + @GET("/live_user/v1/UserInfo/get_anchor_in_room") + fun getAnchorInRoom(@Query("roomid") roomId: Long): Deferred<AnchorInRoom> + + /** + * 获取自己在直播站的基本信息, 包括自己的直播间号, 银瓜子, 金瓜子数量等 + */ + @GET("/mobile/getUser") + fun getUser(): Deferred<User> + + /** + * 获取自己在当前直播间的信息, 包括自己的权限以及是否是管理员等 + * + * @param roomId 房间号 + */ + @Suppress("SpellCheckingInspection") + @GET("/live_user/v1/UserInfo/get_info_in_room") + fun getUserInfoInRoom(@Query("roomid") roomId: Long): Deferred<UserInfoInRoom> + + /** + * 获取所有头衔 + * + * @param scale 屏幕尺寸 + */ + @GET("/appUser/getTitle") + fun getTitle(@Query("scale") scale: String = "xxhdpi"): Deferred<Title> + + /** + * 查询是否关注了当前主播 + * + * @param follow 所查询的主播的用户 ID + */ + @POST("/relation/v1/Feed/isFollowed") + @FormUrlEncoded + fun isFollowed(@Field("follow") follow: Long): Deferred<Follow> + + /** + * 进入直播间的时候, 客户端会访问该接口来动态获取上方的 Tab. 包括 互动, 主播, 贡献榜 等 + * + * @param roomId 房间号 + */ + @Suppress("SpellCheckingInspection") + @GET("/room/v2/Room/mobileTab") + fun mobileTab(@Query("roomid") roomId: Long): Deferred<MobileTab> + + /** + * 获取房间的历史弹幕(10条) + * + * @param roomId 房间号 + */ + @GET("/AppRoom/msg") + fun roomMessage(@Query("room_id") roomId: Long): Deferred<RoomMessage> + + /** + * 获取进房后右下角显示的那些东西, 通常是一些活动, 它们导向 H5 页面 + * + * @param roomId 房间号 + * @param roomUserId 主播的用户 ID + */ + @Suppress("SpellCheckingInspection") + @GET("/activity/v1/Common/mobileRoomBanner") + fun mobileRoomBanner( + @Query("area_v2_id") areaV2Id: Int, + @Query("area_v2_parent_id") areaV2ParentId: Int, + @Query("roomid") roomId: Long, + @Query("ruid") roomUserId: Long + ): Deferred<MobileRoomBanner> + + /** + * 获取各种礼物的基本信息, 包括贴图地址, 描述, 价格等 + */ + @Suppress("SpellCheckingInspection") + @GET("/gift/v3/live/gift_config") + fun getGiftConfig( + @Query("area_v2_id") areaV2Id: Int, + @Query("area_v2_parent_id") areaV2ParentId: Int, + @Query("roomid") roomId: Long + ): Deferred<GiftConfig> + + /** + * 获取访问 小时总榜 的地址(H5) + */ + @Suppress("SpellCheckingInspection") + @GET("/rankdb/v1/Common/roomRank") + fun roomRank( + @Query("area_v2_id") areaV2Id: Int, + @Query("area_v2_parent_id") areaV2ParentId: Int, + @Query("roomid") roomId: Long, + @Query("ruid") roomUserId: Long + ): Deferred<RoomRank> + + /** + * 直播站首页 + * 首页 -> 直播 + */ + @Suppress("SpellCheckingInspection") + @GET("/xlive/app-interface/v2/index/getAllList") + fun homePage( + @Query("quality") quality: Int = 0, + @Query("rec_page") recPage: Int = 2, + @Query("relation_page") relationPage: Int = 2, + @Query("scale") scale: String = "xxhdpi" + ): Deferred<HomePage> + + /** + * 获取某个直播分类下的全部子分类 + */ + @GET("/room/v1/Area/getList") + fun getAreaList(@Query("parent_id") parentId: Int): Deferred<AreaList> + + /** + * 根据某种维度来获取房间列表 + * area, parent, category 为 0 表示不筛选这些维度 + * sortType 为 null 表示不排序 + * + * 首页 -> 直播 -> 查看更多/全部直播 + * + * @param page 分页, 从 1 开始 + * @param sortType 排序维度, 已知的有 online(最热直播), live_time(最新开播) + */ + @GET("/room/v3/Area/getRoomList") + fun getRoomList( + @Query("area_id") areaId: Int = 0, + @Query("parent_area_id") parentAreaId: Int = 0, + @Query("cate_id") categoryId: Int = 0, + @Query("page") page: Int = 1, + @Query("page_size") pageSize: Int = 30, + @Query("sort_type") sortType: String? = null + ): Deferred<RoomList> + + /** + * 发送弹幕(直播) + * + * @param bubble 气泡, 不明确含义 + * @param cid 房间号 + * @param mid 发送者的用户 ID + * @param message 弹幕内容 + * @param random 随机数, 不包括符号位有 9 位 或者 10 位 + * @param mode 弹幕模式, 可能与视频弹幕的模式含义相同, 可能需要特殊身份才能使用额外模式, 下同 + * @param pool 弹幕池 + * @param type 固定为 "json" + * @param color 弹幕颜色 + * @param fontSize 弹幕字号 + * @param playTime 不明确 + */ + @Suppress("SpellCheckingInspection") + @POST("/api/sendmsg") + @FormUrlEncoded + @Headers(Header.FORCE_QUERY) + fun sendMessage( + @Field("bubble") bubble: Int = 0, + @Field("cid") cid: Long, + @Field("mid") mid: Long, + @Field("msg") message: String, + @Field("rnd") random: Int = (if (Random.nextBoolean()) 1 else -1) * Random.nextInt(100000000, Int.MAX_VALUE), + @Field("mode") mode: Int = 1, + @Field("pool") pool: Int = 0, + @Field("type") type: String = "json", + @Field("color") color: Int = 16777215, + @Field("fontsize") fontSize: Int = 25, + @Field("playTime") playTime: Float = 0.0f + ): Deferred<CommonResponse> + + /** + * 用于确认客户端在看直播的心跳包(与弹幕推送无关) + * 每五分钟发送一次 + */ + @POST("/mobile/userOnlineHeart") + @FormUrlEncoded + @Headers(Header.FORCE_QUERY) + fun userOnlineHeart( + @Field("room_id") roomId: Long, + @Field("scale") scale: String = "xxhdpi" + ): Deferred<CommonResponse> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/AnchorInRoom.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/AnchorInRoom.kt new file mode 100644 index 0000000..bec783f --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/AnchorInRoom.kt @@ -0,0 +1,103 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class AnchorInRoom( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("info") + var info: Info, + @SerializedName("level") + var level: Level, + @SerializedName("san") + var san: Int // 12 + ) { + data class Info( + @SerializedName("face") + var face: String, // https://i0.hdslb.com/bfs/face/0434dccc0ec4de223e8ca374dea06a6e1e8eb471.jpg + @SerializedName("gender") + var gender: Int, // 0 + @SerializedName("identification") + var identification: Int?, // 1 + @SerializedName("mobile_verify") + var mobileVerify: Int, // 0 + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("platform_user_level") + var platformUserLevel: Int, // 5 + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("uid") + var uid: Long, // 2866663 + @SerializedName("uname") + var uname: String, // hyx5020 + @SerializedName("vip_type") + var vipType: Int // 2 + ) { + data class OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("role") + var role: Int, // 0 + @SerializedName("type") + var type: Int // -1 + ) + } + + data class Level( + @SerializedName("anchor_score") + var anchorScore: Int, // 36685 + @SerializedName("color") + var color: Int, // 5805790 + @SerializedName("cost") + var cost: Int, // 29431298 + @SerializedName("master_level") + var masterLevel: MasterLevel, + @SerializedName("rcost") + var rcost: Long, // 3668592 + @SerializedName("svip") + var svip: Int, // 0 + @SerializedName("svip_time") + var svipTime: String, // 2019-02-09 11:03:54 + @SerializedName("uid") + var uid: Int, // 2866663 + @SerializedName("update_time") + var updateTime: String, // 2019-03-12 23:00:42 + @SerializedName("user_level") + var userLevel: Int, // 22 + @SerializedName("user_score") + var userScore: String, // 0 + @SerializedName("vip") + var vip: Int, // 0 + @SerializedName("vip_time") + var vipTime: String // 2019-02-09 11:03:54 + ) { + data class MasterLevel( + @SerializedName("anchor_score") + var anchorScore: Int, // 36685 + @SerializedName("color") + var color: Int, // 5805790 + @SerializedName("current") + var current: List<Int>, + @SerializedName("level") + var level: Int, // 11 + @SerializedName("master_level_color") + var masterLevelColor: Int, // 5805790 + @SerializedName("next") + var next: List<Int>, + @SerializedName("sort") + var sort: String, // >10000 + @SerializedName("upgrade_score") + var upgradeScore: Int // 2925 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/AreaList.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/AreaList.kt new file mode 100644 index 0000000..9c34a38 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/AreaList.kt @@ -0,0 +1,39 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class AreaList( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: List<Data>, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("act_id") + var actId: String, // 0 + @SerializedName("area_type") + var areaType: Int, // 0 + @SerializedName("hot_status") + var hotStatus: Int, // 0 + @SerializedName("id") + var id: String, // 34 + @SerializedName("lock_status") + var lockStatus: String, // 0 + @SerializedName("name") + var name: String, // 音乐台 + @SerializedName("old_area_id") + var oldAreaId: String, // 7 + @SerializedName("parent_id") + var parentId: String, // 1 + @SerializedName("parent_name") + var parentName: String, // 娱乐 + @SerializedName("pic") + var pic: String, // https://i0.hdslb.com/bfs/vc/8537694f4fe68ab0798dd5d493d3ca5deb908088.png + @SerializedName("pk_status") + var pkStatus: String // 0 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/DanmakuConfig.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/DanmakuConfig.kt new file mode 100644 index 0000000..3105c25 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/DanmakuConfig.kt @@ -0,0 +1,67 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class DanmakuConfig( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // ok + @SerializedName("msg") + var msg: String // ok +) { + data class Data( + /** + * 推荐服务器 + */ + @SerializedName("host") + var host: String, // broadcastlv.chat.bilibili.com + /** + * 服务器列表 + */ + @SerializedName("host_server_list") + var hostServerList: List<HostServer>, + @SerializedName("max_delay") + var maxDelay: Int, // 5000 + /** + * 这里的端口是非 TSL 的 websocket 端口, 需要到 host_server_list 中寻找推荐服务器对应的 websocket TSL 端口(通常是 443) + */ + @SerializedName("port") + var port: Int, // 2243 + @SerializedName("refresh_rate") + var refreshRate: Int, // 100 + @SerializedName("refresh_row_factor") + var refreshRowFactor: Double, // 0.125 + /** + * 如果 DNS 失效可以使用该列表中的 IP + */ + @SerializedName("server_list") + var serverList: List<Server> + ) { + data class Server( + @SerializedName("host") + var host: String, // broadcastlv.chat.bilibili.com + @SerializedName("port") + var port: Int // 80 + ) + + data class HostServer( + @SerializedName("host") + var host: String, // broadcastlv.chat.bilibili.com + @SerializedName("port") + var port: Int, // 2243 + /** + * websocket 端口 + */ + @SerializedName("ws_port") + var wsPort: Int, // 2244 + /** + * websocket TSL 端口 + */ + @SerializedName("wss_port") + var wssPort: Int // 443 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/Follow.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/Follow.kt new file mode 100644 index 0000000..c4f16e4 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/Follow.kt @@ -0,0 +1,19 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class Follow( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("follow") + var follow: Int // 0 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/GiftConfig.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/GiftConfig.kt new file mode 100644 index 0000000..c932c17 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/GiftConfig.kt @@ -0,0 +1,88 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class GiftConfig( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: List<Data>, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("animation_frame_num") + var animationFrameNum: Int, // 12 + @SerializedName("bag_gift") + var bagGift: Int, // 0 + @SerializedName("broadcast") + var broadcast: Int, // 0 + @SerializedName("bullet_head") + var bulletHead: String, + @SerializedName("bullet_tail") + var bulletTail: String, + @SerializedName("coin_type") + var coinType: String, // gold + @SerializedName("corner_background") + var cornerBackground: String, + @SerializedName("corner_mark") + var cornerMark: String, // 祈愿 + @SerializedName("count_map") + var countMap: List<CountMap>, + @SerializedName("desc") + var desc: String, // 祥瑞御免,家宅平安。 + @SerializedName("draw") + var draw: Int, // 0 + @SerializedName("effect") + var effect: Int, // 0 + @SerializedName("frame_animation") + var frameAnimation: String, // https://i0.hdslb.com/bfs/live/4e19f947d0bd346d38fe4838d7ab431d003f9d7f.png + @SerializedName("full_sc_horizontal") + var fullScHorizontal: String, + @SerializedName("full_sc_horizontal_svga") + var fullScHorizontalSvga: String, + @SerializedName("full_sc_vertical") + var fullScVertical: String, + @SerializedName("full_sc_vertical_svga") + var fullScVerticalSvga: String, + @SerializedName("full_sc_web") + var fullScWeb: String, + @SerializedName("gif") + var gif: String, // https://i0.hdslb.com/bfs/live/a90ff57209661b309f121116682bdee1f3937a98.gif + @SerializedName("gift_type") + var giftType: Int, // 1 + @SerializedName("id") + var id: Int, // 30136 + @SerializedName("img_basic") + var imgBasic: String, // https://s1.hdslb.com/bfs/live/a7c750335ed42ae4dfeb70570804326d3ecaf61c.png + @SerializedName("img_dynamic") + var imgDynamic: String, // https://i0.hdslb.com/bfs/live/f6f314227e7ed8065c4f7266ada913289971f806.png + @SerializedName("limit_interval") + var limitInterval: Int, // 0 + @SerializedName("name") + var name: String, // 御守 + @SerializedName("price") + var price: Int, // 1000 + @SerializedName("privilege_required") + var privilegeRequired: Int, // 0 + @SerializedName("rights") + var rights: String, // 当前主播亲密度+10 经验值+1000 + @SerializedName("rule") + var rule: String, // 赠送御守即可参与“敬祈照准”活动。 + @SerializedName("stay_time") + var stayTime: Int, // 3 + @SerializedName("type") + var type: Int, // 0 + @SerializedName("webp") + var webp: String // https://i0.hdslb.com/bfs/live/6d8a7907cf89556d074b8ce220e7dd56ccaf5160.webp + ) { + data class CountMap( + @SerializedName("num") + var num: Int, // 2333 + @SerializedName("text") + var text: String + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/HomePage.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/HomePage.kt new file mode 100644 index 0000000..93d1afd --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/HomePage.kt @@ -0,0 +1,393 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class HomePage( + @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("activity_card") + var activityCard: List<JsonElement>, + @SerializedName("area_entrance") + var areaEntrance: List<AreaEntrance>, + @SerializedName("area_entrance_v2") + var areaEntranceV2: List<JsonElement>, + @SerializedName("banner") + var banner: List<Banner>, + @SerializedName("hour_rank") + var hourRank: List<HourRank>, + @SerializedName("interval") + var interval: Int, // 10 + @SerializedName("is_sky_horse_gray") + var isSkyHorseGray: Int, // 0 + @SerializedName("my_idol") + var myIdol: List<MyIdol>, + @SerializedName("my_tag") + var myTag: List<MyTag>, + @SerializedName("room_list") + var roomList: List<Room>, + @SerializedName("sea_patrol") + var seaPatrol: List<JsonElement> + ) { + data class MyTag( + @SerializedName("extra_info") + var extraInfo: ExtraInfo, + @SerializedName("list") + var list: List<X>, + @SerializedName("module_info") + var moduleInfo: ModuleInfo + ) { + data class X( + @SerializedName("area_v2_id") + var areaV2Id: Int, // 0 + @SerializedName("area_v2_name") + var areaV2Name: String, // 全部标签 + @SerializedName("area_v2_parent_id") + var areaV2ParentId: Int, // 0 + @SerializedName("area_v2_parent_name") + var areaV2ParentName: String, + @SerializedName("is_advice") + var isAdvice: Int, // 1 + @SerializedName("link") + var link: String, // http://live.bilibili.com/app/mytag/ + @SerializedName("pic") + var pic: String // http://i0.hdslb.com/bfs/vc/ff03528785fc8c91491d79e440398484811d6d87.png + ) + + data class ModuleInfo( + @SerializedName("count") + var count: Int, // 0 + @SerializedName("id") + var id: Int, // 28 + @SerializedName("link") + var link: String, + @SerializedName("pic") + var pic: String, + @SerializedName("sort") + var sort: Int, // 1 + @SerializedName("title") + var title: String, // 常用标签 + @SerializedName("type") + var type: Int // 12 + ) + + data class ExtraInfo( + @SerializedName("is_gray") + var isGray: Int, // 0 + @SerializedName("offline") + var offline: List<JsonElement> + ) + } + + data class Room( + @SerializedName("list") + var list: List<X>, + @SerializedName("module_info") + var moduleInfo: ModuleInfo + ) { + data class X( + @SerializedName("accept_quality") + var acceptQuality: List<Int>, + @SerializedName("area_v2_id") + var areaV2Id: Int, // 96 + @SerializedName("area_v2_name") + var areaV2Name: String, // 其他绘画 + @SerializedName("area_v2_parent_id") + var areaV2ParentId: Int, // 4 + @SerializedName("area_v2_parent_name") + var areaV2ParentName: String, // 绘画 + @SerializedName("broadcast_type") + var broadcastType: Int, // 0 + @SerializedName("click_callback") + var clickCallback: String, + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/live/room_cover/6ef5b522bdf4de9fe2535b6031ae9b32c405cea0.jpg + @SerializedName("current_quality") + var currentQuality: Int, // 4 + @SerializedName("face") + var face: String, // http://i0.hdslb.com/bfs/face/c165088330c1bd7f671b427b610379603aa002ae.jpg + @SerializedName("group_id") + var groupId: Int, // 0 + @SerializedName("link") + var link: String, + @SerializedName("online") + var online: Int, // 5584 + @SerializedName("pendent_ru") + var pendentRu: String, + @SerializedName("pendent_ru_color") + var pendentRuColor: String, + @SerializedName("pendent_ru_pic") + var pendentRuPic: String, + @SerializedName("pk_id") + var pkId: Int, // 0 + @SerializedName("play_url") + var playUrl: String, // http://ws.live-play.acgvideo.com/live-ws/403834/live_397298321_43558493.flv?wsSecret=9dc8725a77c8ef5c68545e436f53b917&wsTime=1552470101&trid=9179fec58e79438aab34a9bbe5087e33&sig=no + @SerializedName("play_url_h265") + var playUrlH265: String, + @SerializedName("rec_type") + var recType: Int, // 0 + @SerializedName("roomid") + var roomid: Long, // 21218600 + @SerializedName("session_id") + var sessionId: String, // 456BB3BF-16D6-4BD3-9B4E-4570C274CEE5 + @SerializedName("show_callback") + var showCallback: String, + @SerializedName("title") + var title: String, // 学员答疑13:00~21:00 + @SerializedName("uname") + var uname: String // 轻微课魔鬼绘画特训班 + ) + + data class ModuleInfo( + @SerializedName("count") + var count: Int, // 0 + @SerializedName("id") + var id: Int, // 8 + @SerializedName("link") + var link: String, // http://live.bilibili.com/app/area?parent_area_id=4&parent_area_name=绘画&area_id=&area_name= + @SerializedName("pic") + var pic: String, // http://i0.hdslb.com/bfs/live/7c54d7cc64e022845fccd63221de069b71eb6f67.png + @SerializedName("sort") + var sort: Int, // 25 + @SerializedName("title") + var title: String, // 绘画 + @SerializedName("type") + var type: Int // 9 + ) + } + + data class AreaEntrance( + @SerializedName("list") + var list: List<X>, + @SerializedName("module_info") + var moduleInfo: ModuleInfo + ) { + data class ModuleInfo( + @SerializedName("count") + var count: Int, // 0 + @SerializedName("id") + var id: Int, // 2 + @SerializedName("link") + var link: String, + @SerializedName("pic") + var pic: String, + @SerializedName("sort") + var sort: Int, // 2 + @SerializedName("title") + var title: String, // 分区入口 + @SerializedName("type") + var type: Int // 2 + ) + + data class X( + @SerializedName("content") + var content: String, + @SerializedName("id") + var id: Int, // 45 + @SerializedName("link") + var link: String, // http://live.bilibili.com/app/area?parent_area_id=1&parent_area_name=娱乐&area_id=199&area_name=虚拟主播 + @SerializedName("pic") + var pic: String, // http://i0.hdslb.com/bfs/vc/7725a45469b776ee91f2d42afca1e5711f84ac51.png + @SerializedName("title") + var title: String // 虚拟主播 + ) + } + + data class Banner( + @SerializedName("list") + var list: List<X>, + @SerializedName("module_info") + var moduleInfo: ModuleInfo + ) { + data class X( + @SerializedName("content") + var content: String, + @SerializedName("id") + var id: Int, // 1117 + @SerializedName("link") + var link: String, // https://www.bilibili.com/blackboard/live/activity-flower-girl2-h5.html + @SerializedName("pic") + var pic: String, // http://i0.hdslb.com/bfs/vc/523a719b51a647eeb969956865a20781d7e6d994.jpg + @SerializedName("title") + var title: String // 花之初少女 + ) + + data class ModuleInfo( + @SerializedName("count") + var count: Int, // 0 + @SerializedName("id") + var id: Int, // 1 + @SerializedName("link") + var link: String, + @SerializedName("pic") + var pic: String, + @SerializedName("sort") + var sort: Int, // 0 + @SerializedName("title") + var title: String, // banner位 + @SerializedName("type") + var type: Int // 1 + ) + } + + data class MyIdol( + @SerializedName("extra_info") + var extraInfo: ExtraInfo, + @SerializedName("list") + var list: List<X>, + @SerializedName("module_info") + var moduleInfo: ModuleInfo + ) { + data class ExtraInfo( + @SerializedName("card_type") + var cardType: Int, // 1 + @SerializedName("relation_page") + var relationPage: Int, // 1 + @SerializedName("tags_desc") + var tagsDesc: String, + @SerializedName("time_desc") + var timeDesc: String, + @SerializedName("total_count") + var totalCount: Int, // 1 + @SerializedName("uname_desc") + var unameDesc: String + ) + + data class ModuleInfo( + @SerializedName("count") + var count: Int, // 0 + @SerializedName("id") + var id: Int, // 13 + @SerializedName("link") + var link: String, // http://live.bilibili.com/app/myfollow/ + @SerializedName("pic") + var pic: String, // http://i0.hdslb.com/bfs/live/484abcd8940ee43ec8b4409cbfe0c1e52f09a338.png + @SerializedName("sort") + var sort: Int, // 4 + @SerializedName("title") + var title: String, // 我的关注 + @SerializedName("type") + var type: Int // 8 + ) + + data class X( + @SerializedName("accept_quality") + var acceptQuality: List<Int>, + @SerializedName("area") + var area: Int, // 7 + @SerializedName("area_name") + var areaName: String, // 放映厅 + @SerializedName("area_v2_id") + var areaV2Id: Int, // 34 + @SerializedName("area_v2_name") + var areaV2Name: String, // 音乐台 + @SerializedName("area_v2_parent_id") + var areaV2ParentId: Int, // 1 + @SerializedName("area_v2_parent_name") + var areaV2ParentName: String, // 娱乐 + @SerializedName("broadcast_type") + var broadcastType: Int, // 0 + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/live/6029764557e3cbe91475faae26e6e244de8c1d3c.jpg + @SerializedName("current_quality") + var currentQuality: Int, // 4 + @SerializedName("face") + var face: String, // http://i0.hdslb.com/bfs/face/5d35da6e93fbfb1a77ad6d1f1004b08413913f9a.jpg + @SerializedName("link") + var link: String, // http://live.bilibili.com/23058?broadcast_type=0 + @SerializedName("live_tag_name") + var liveTagName: String, // 音乐台 + @SerializedName("live_time") + var liveTime: Int, // 1552406400 + @SerializedName("official_verify") + var officialVerify: Int, // 1 + @SerializedName("online") + var online: Int, // 9961 + @SerializedName("pendent_ru") + var pendentRu: String, + @SerializedName("pendent_ru_color") + var pendentRuColor: String, + @SerializedName("pendent_ru_pic") + var pendentRuPic: String, + @SerializedName("pk_id") + var pkId: Int, // 0 + @SerializedName("play_url") + var playUrl: String, // http://ws.live-play.acgvideo.com/live-ws/637609/live_11153765_9369560.flv?wsSecret=49e118106b827b5008e10b0c74fa1a5a&wsTime=1552470101&trid=fe3b3a0b017a439c86d792ab5dd6fcd5&sig=no + @SerializedName("play_url_h265") + var playUrlH265: String, + @SerializedName("roomid") + var roomid: Long, // 23058 + @SerializedName("special_attention") + var specialAttention: Int, // 0 + @SerializedName("title") + var title: String, // 哔哩哔哩音悦台 + @SerializedName("uid") + var uid: Long, // 11153765 + @SerializedName("uname") + var uname: String // 3号直播间 + ) + } + + data class HourRank( + @SerializedName("extra_info") + var extraInfo: ExtraInfo, + @SerializedName("list") + var list: List<X>, + @SerializedName("module_info") + var moduleInfo: ModuleInfo + ) { + data class ModuleInfo( + @SerializedName("count") + var count: Int, // 0 + @SerializedName("id") + var id: Int, // 4 + @SerializedName("link") + var link: String, // https://live.bilibili.com/p/html/live-app-rank/index.html?is_live_webview=1&nav=hour + @SerializedName("pic") + var pic: String, // http://i0.hdslb.com/bfs/live/39cd413f6bc72fb9da8c10ff2686b537477294ab.png + @SerializedName("sort") + var sort: Int, // 11 + @SerializedName("title") + var title: String, // 小时榜 + @SerializedName("type") + var type: Int // 5 + ) + + data class X( + @SerializedName("area_v2_id") + var areaV2Id: Int, // 145 + @SerializedName("area_v2_name") + var areaV2Name: String, // 视频聊天 + @SerializedName("area_v2_parent_id") + var areaV2ParentId: Int, // 1 + @SerializedName("area_v2_parent_name") + var areaV2ParentName: String, // 娱乐 + @SerializedName("face") + var face: String, // http://i2.hdslb.com/bfs/face/cdc9866d09ed82e6fae610f5ba4b8706db509802.jpg + @SerializedName("live_status") + var liveStatus: Int, // 1 + @SerializedName("rank") + var rank: Int, // 3 + @SerializedName("roomid") + var roomid: Long, // 274926 + @SerializedName("uid") + var uid: Long, // 24601383 + @SerializedName("uname") + var uname: String // 蛋黄姬GAT-X105 + ) + + data class ExtraInfo( + @SerializedName("sub_title") + var subTitle: String // 15:00-16:00 总榜排名 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileRoom.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileRoom.kt new file mode 100644 index 0000000..a46a9c0 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileRoom.kt @@ -0,0 +1,58 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class MobileRoom( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // ok + @SerializedName("msg") + var msg: String // ok +) { + data class Data( + @SerializedName("encrypted") + var encrypted: Boolean, // false + @SerializedName("hidden_till") + var hiddenTill: Int, // 0 + @SerializedName("is_hidden") + var isHidden: Boolean, // false + @SerializedName("is_locked") + var isLocked: Boolean, // false + @SerializedName("is_portrait") + var isPortrait: Boolean, // false + @SerializedName("is_sp") + var isSp: Int, // 0 + @SerializedName("live_status") + var liveStatus: Int, // 0 + @SerializedName("live_time") + var liveTime: Long, // -62170012800 + @SerializedName("lock_till") + var lockTill: Int, // 0 + @SerializedName("need_p2p") + var needP2p: Int, // 0 + @SerializedName("pwd_verified") + var pwdVerified: Boolean, // true + /** + * 实际房间号 + */ + @SerializedName("room_id") + var roomId: Long, // 1110317 + /** + * 如果房间有短号则 roomShield 为 1 + */ + @SerializedName("room_shield") + var roomShield: Int, // 0 + /** + * 短房间号 + */ + @SerializedName("short_id") + var shortId: Int, // 0 + @SerializedName("special_type") + var specialType: Int, // 0 + @SerializedName("uid") + var uid: Long // 20293030 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileRoomBanner.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileRoomBanner.kt new file mode 100644 index 0000000..5627d59 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileRoomBanner.kt @@ -0,0 +1,74 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class MobileRoomBanner( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // OK + @SerializedName("msg") + var msg: String // OK +) { + data class Data( + @SerializedName("bottom") + var bottom: List<JsonElement>, + @SerializedName("gift") + var gift: JsonElement?, // null + @SerializedName("gift_banner") + var giftBanner: JsonElement?, // null + @SerializedName("inputBanner") + var inputBanner: List<JsonElement>, + @SerializedName("lol_activity") + var lolActivity: LolActivity, + @SerializedName("superBanner") + var superBanner: JsonElement?, // null + @SerializedName("top") + var top: List<Top> + ) { + data class Top( + @SerializedName("activity_title") + var activityTitle: String, // 周星 + @SerializedName("color") + var color: String, + @SerializedName("cover") + var cover: String, // https://i0.hdslb.com/bfs/vc/5cfb2a7dc2a25db580f130a55f475f74e2bd3202.png + @SerializedName("expire_hour") + var expireHour: Int, // 24 + @SerializedName("gift_img") + var giftImg: String, // https://s1.hdslb.com/bfs/vc/39aee4bf13b170f22f19ef1c278cebf3a6e40332.png + @SerializedName("id") + var id: Int, // 199 + @SerializedName("is_close") + var isClose: Int, // 0 + @SerializedName("jump_url") + var jumpUrl: String, // https://live.bilibili.com/p/html/live-app-weekstar/index.html?is_live_half_webview=1&hybrid_biz=live-app-weekStar&hybrid_rotate_d=1&hybrid_half_ui=1,3,100p,70p,300e51,0,30,100;2,2,375,100p,300e51,0,30,100;3,3,100p,70p,300e51,0,30,100;4,2,375,100p,300e51,0,30,100;5,3,100p,70p,300e51,0,30,100;6,3,100p,70p,300e51,0,30,100;7,3,100p,70p,300e51,0,30,100&room_id=29434 + @SerializedName("rank") + var rank: String, // 999+ + @SerializedName("rank_name") + var rankName: String, // 打榜 + @SerializedName("title") + var title: String, // 排名 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("week_gift_color") + var weekGiftColor: String, // #ffffff + @SerializedName("week_rank_color") + var weekRankColor: String, // #ffffff + @SerializedName("week_text_color") + var weekTextColor: String // #ffffff + ) + + data class LolActivity( + @SerializedName("guess_cover") + var guessCover: String, // https://i0.hdslb.com/bfs/live/61d1c4bcce470080a5408d6c03b7b48e0a0fa8d7.png + @SerializedName("status") + var status: Int, // 0 + @SerializedName("vote_cover") + var voteCover: String // https://i0.hdslb.com/bfs/live/6030cb2847f4d197caacb12fbe12f2656b999bcf.png + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileTab.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileTab.kt new file mode 100644 index 0000000..7970769 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/MobileTab.kt @@ -0,0 +1,36 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class MobileTab( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: List<Tab>, + @SerializedName("message") + var message: String, + @SerializedName("msg") + var msg: String +) { + data class Tab( + /** + * 如果是非顶层 Tab 则 default 为 null + */ + @SerializedName("default") + var default: Int?, // 0 + @SerializedName("default_sub_tab") + var defaultSubTab: String, + @SerializedName("desc") + var desc: String, // 友爱社 + @SerializedName("order") + var order: Int, // 600 + @SerializedName("status") + var status: Int, // 0 + @SerializedName("sub_tab") + var subTab: List<Tab>, + @SerializedName("type") + var type: String, // love-club + @SerializedName("url") + var url: String + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomInfo.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomInfo.kt new file mode 100644 index 0000000..a2311c9 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomInfo.kt @@ -0,0 +1,105 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class RoomInfo( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // ok + @SerializedName("msg") + var msg: String // ok +) { + data class Data( + @SerializedName("allow_change_area_time") + var allowChangeAreaTime: Int, // 0 + @SerializedName("allow_upload_cover_time") + var allowUploadCoverTime: Int, // 0 + /** + * 没有 old 前缀的表示 v2 版本, 例如 area_v2_id. 下同 + */ + @SerializedName("area_id") + var areaId: Int, // 107 + @SerializedName("area_name") + var areaName: String, // 其他游戏 + @SerializedName("area_pendants") + var areaPendants: String, + /** + * 粉丝数 + */ + @SerializedName("attention") + var attention: Int, // 62 + @SerializedName("background") + var background: String, + @SerializedName("description") + var description: String, // <p>立即安装Jetbrains, 享受精彩人生!</p> + @SerializedName("hot_words") + var hotWords: List<String>, + @SerializedName("hot_words_status") + var hotWordsStatus: Int, // 0 + @SerializedName("is_anchor") + var isAnchor: Int, // 1 + @SerializedName("is_portrait") + var isPortrait: Boolean, // false + @SerializedName("is_strict_room") + var isStrictRoom: Boolean, // false + @SerializedName("keyframe") + var keyframe: String, // https://i0.hdslb.com/bfs/live/1110317.jpg?03092037 + @SerializedName("live_status") + var liveStatus: Int, // 0 + @SerializedName("live_time") + var liveTime: String, // 0000-00-00 00:00:00 + @SerializedName("new_pendants") + var newPendants: NewPendants, + @SerializedName("old_area_id") + var oldAreaId: Int, // 1 + @SerializedName("online") + var online: Int, // 18 + @SerializedName("parent_area_id") + var parentAreaId: Int, // 2 + @SerializedName("parent_area_name") + var parentAreaName: String, // 网游 + @SerializedName("pendants") + var pendants: String, + @SerializedName("pk_id") + var pkId: Int, // 0 + @SerializedName("pk_status") + var pkStatus: Int, // 0 + @SerializedName("room_id") + var roomId: Long, // 1110317 + @SerializedName("room_silent_level") + var roomSilentLevel: Int, // 0 + @SerializedName("room_silent_second") + var roomSilentSecond: Int, // 0 + @SerializedName("room_silent_type") + var roomSilentType: String, + @SerializedName("short_id") + var shortId: Int, // 0 + @SerializedName("tags") + var tags: String, // 编程 + @SerializedName("title") + var title: String, // 太空程序员 + @SerializedName("uid") + var uid: Long, // 20293030 + @SerializedName("up_session") + var upSession: String, + @SerializedName("user_cover") + var userCover: String, // https://i0.hdslb.com/bfs/live/b4d4dbf35f7a30fb6b0a2ea4077514235262797e.jpg + @SerializedName("verify") + var verify: String + ) { + data class NewPendants( + @SerializedName("badge") + var badge: JsonElement?, // null + @SerializedName("frame") + var frame: JsonElement?, // null + @SerializedName("mobile_badge") + var mobileBadge: JsonElement?, // null + @SerializedName("mobile_frame") + var mobileFrame: JsonElement? // null + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomList.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomList.kt new file mode 100644 index 0000000..9dcca4b --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomList.kt @@ -0,0 +1,136 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class RoomList( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("banner") + var banner: List<Banner>, + @SerializedName("count") + var count: Int, // 5116 + @SerializedName("list") + var list: List<X>, + @SerializedName("tags") + var tags: List<Tag> + ) { + data class Banner( + @SerializedName("id") + var id: String, // 1117 + @SerializedName("link") + var link: String, // https://www.bilibili.com/blackboard/live/activity-flower-girl2-h5.html + @SerializedName("pic") + var pic: String, // https://i0.hdslb.com/bfs/vc/523a719b51a647eeb969956865a20781d7e6d994.jpg + @SerializedName("position") + var position: String, // 5 + @SerializedName("sort_num") + var sortNum: String, // 1 + @SerializedName("title") + var title: String // 花之初少女 + ) + + data class X( + @SerializedName("accept_quality") + var acceptQuality: String, // 4 + @SerializedName("accept_quality_v2") + var acceptQualityV2: List<JsonElement>, + @SerializedName("area_id") + var areaId: Int, // 107 + @SerializedName("area_name") + var areaName: String, // 其他游戏 + @SerializedName("area_v2_id") + var areaV2Id: Int, // 107 + @SerializedName("area_v2_name") + var areaV2Name: String, // 其他游戏 + @SerializedName("area_v2_parent_id") + var areaV2ParentId: Int, // 2 + @SerializedName("area_v2_parent_name") + var areaV2ParentName: String, // 网游 + @SerializedName("broadcast_type") + var broadcastType: Int, // 0 + @SerializedName("corner") + var corner: String, + @SerializedName("cover_size") + var coverSize: CoverSize, + @SerializedName("current_quality") + var currentQuality: Int, // 4 + @SerializedName("face") + var face: String, // https://i0.hdslb.com/bfs/face/9c9ad7d21784e70dfa57cdae40cfdca1b58424c4.jpg + @SerializedName("game_live_num") + var gameLiveNum: Int, // 30 + @SerializedName("group_id") + var groupId: Int, // 0 + @SerializedName("is_tv") + var isTv: Int, // 0 + @SerializedName("link") + var link: String, // /21142258 + @SerializedName("online") + var online: Int, // 0 + @SerializedName("parent_id") + var parentId: Int, // 2 + @SerializedName("parent_name") + var parentName: String, // 网游 + @SerializedName("pendent") + var pendent: String, + @SerializedName("pendent_ld") + var pendentLd: String, + @SerializedName("pendent_ld_color") + var pendentLdColor: String, + @SerializedName("pendent_ru") + var pendentRu: String, + @SerializedName("pendent_ru_color") + var pendentRuColor: String, + @SerializedName("pendent_ru_pic") + var pendentRuPic: String, + @SerializedName("pk_id") + var pkId: Int, // 0 + @SerializedName("play_url") + var playUrl: String, + @SerializedName("roomid") + var roomid: Long, // 21142258 + @SerializedName("session_id") + var sessionId: String, // E9168524-EA1A-9F86-7A88-E33B58B9C8A8 + @SerializedName("show_cover") + var showCover: String, + @SerializedName("system_cover") + var systemCover: String, // https://i0.hdslb.com/bfs/live/21142258.jpg?03131614 + @SerializedName("title") + var title: String, // DNF除了肝啥都没 + @SerializedName("uid") + var uid: Long, // 278287794 + @SerializedName("uname") + var uname: String, // wz85699909 + @SerializedName("user_cover") + var userCover: String, // https://i0.hdslb.com/bfs/live/room_cover/dbfd1bbb5f936620a7bccac4b5e51b54342284d1.jpg + @SerializedName("user_cover_flag") + var userCoverFlag: Int, // 1 + @SerializedName("web_pendent") + var webPendent: String + ) { + data class CoverSize( + @SerializedName("height") + var height: Int, // 180 + @SerializedName("width") + var width: Int // 320 + ) + } + + data class Tag( + @SerializedName("id") + var id: Int, // -2 + @SerializedName("name") + var name: String, // 最新 + @SerializedName("sort_type") + var sortType: String // live_time + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomMessage.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomMessage.kt new file mode 100644 index 0000000..5f42f4f --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomMessage.kt @@ -0,0 +1,116 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class RoomMessage( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, + @SerializedName("msg") + var msg: String +) { + data class Data( + @SerializedName("admin") + var admin: List<Admin>, + @SerializedName("room") + var room: List<Message> + ) { + data class Message( + @SerializedName("bubble") + var bubble: Int, // 0 + @SerializedName("check_info") + var checkInfo: CheckInfo, + @SerializedName("guard_level") + var guardLevel: Int, // 0 + @SerializedName("isadmin") + var isadmin: Int, // 0 + @SerializedName("medal") + var medal: List<String>, //[ 17, "毛菇","猫菇椰汁",923614,16752445,""] + @SerializedName("nickname") + var nickname: String, // 柠檬味狗凉゜ + @SerializedName("rank") + var rank: Int, // 10000 + @SerializedName("rnd") + var rnd: String, // 1552452731 + @SerializedName("svip") + var svip: Int, // 1 + @SerializedName("teamid") + var teamid: Int, // 0 + @SerializedName("text") + var text: String, // 当前有效总督房:14979272;146 + @SerializedName("timeline") + var timeline: String, // 2019-03-13 12:52:09 + @SerializedName("title") + var title: List<String>, + @SerializedName("uid") + var uid: Int, // 1615204 + @SerializedName("uname_color") + var unameColor: String, + /** + * 有可能是 >50000 这样的东西, 下同 + */ + @SerializedName("user_level") + var userLevel: List<String>, + @SerializedName("user_title") + var userTitle: String, + @SerializedName("vip") + var vip: Int // 1 + ) { + data class CheckInfo( + @SerializedName("ct") + var ct: String, // 4B9A2E41 + @SerializedName("ts") + var ts: Int // 1552452729 + ) + } + + data class Admin( + @SerializedName("bubble") + var bubble: Int, // 2 + @SerializedName("check_info") + var checkInfo: CheckInfo, + @SerializedName("guard_level") + var guardLevel: Int, // 2 + @SerializedName("isadmin") + var isadmin: Int, // 1 + @SerializedName("medal") + var medal: List<String>, + @SerializedName("nickname") + var nickname: String, // 沧澜ベ + @SerializedName("rank") + var rank: Int, // 10000 + @SerializedName("rnd") + var rnd: String, // 350761541 + @SerializedName("svip") + var svip: Int, // 1 + @SerializedName("teamid") + var teamid: Int, // 0 + @SerializedName("text") + var text: String, // 下个号见 + @SerializedName("timeline") + var timeline: String, // 2019-03-13 12:54:42 + @SerializedName("title") + var title: List<String>, + @SerializedName("uid") + var uid: Long, // 11626554 + @SerializedName("uname_color") + var unameColor: String, // #e91e63 + @SerializedName("user_level") + var userLevel: List<String>, + @SerializedName("user_title") + var userTitle: String, // title-181-1 + @SerializedName("vip") + var vip: Int // 1 + ) { + data class CheckInfo( + @SerializedName("ct") + var ct: String, // D1012BA7 + @SerializedName("ts") + var ts: Long // 1552452882 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomRank.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomRank.kt new file mode 100644 index 0000000..6c60c56 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/RoomRank.kt @@ -0,0 +1,29 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class RoomRank( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // OK + @SerializedName("msg") + var msg: String // OK +) { + data class Data( + @SerializedName("color") + var color: String, // #FB7299 + @SerializedName("h5_url") + var h5Url: String, // https://live.bilibili.com/p/html/live-app-rankcurrent/index.html?is_live_half_webview=1&hybrid_half_ui=1,5,85p,70p,FFE293,0,30,100,10;2,2,320,100p,FFE293,0,30,100,0;4,2,320,100p,FFE293,0,30,100,0;6,5,65p,60p,FFE293,0,30,100,10;5,5,55p,60p,FFE293,0,30,100,10;3,5,85p,70p,FFE293,0,30,100,10;7,5,65p,60p,FFE293,0,30,100,10;&anchor_uid=2866663&rank_type=master_realtime_hour_room&area_hour=1&area_v2_id=145&area_v2_parent_id=1 + @SerializedName("rank_desc") + var rankDesc: String, // 小时总榜 + @SerializedName("roomid") + var roomid: Long, // 29434 + @SerializedName("timestamp") + var timestamp: Long, // 1552451099 + @SerializedName("web_url") + var webUrl: String // https://live.bilibili.com/blackboard/room-current-rank.html?rank_type=master_realtime_hour_room&area_hour=1&area_v2_id=145&area_v2_parent_id=1 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/Title.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/Title.kt new file mode 100644 index 0000000..6938158 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/Title.kt @@ -0,0 +1,37 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.annotations.SerializedName + +data class Title( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: List<Title>, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Title( + @SerializedName("colorful") + var colorful: Int, // 0 + @SerializedName("height") + var height: Int, // 20 + @SerializedName("id") + var id: String, // cake-flour + @SerializedName("img") + var img: String, // https://s1.hdslb.com/bfs/static/blive/live-assets/mobile/titles/title/3/cake-flour.png?20180726173300 + @SerializedName("is_lihui") + var isLihui: Int, // 0 + @SerializedName("lihui_height") + var lihuiHeight: Int, // 0 + @SerializedName("lihui_img") + var lihuiImg: String, + @SerializedName("lihui_width") + var lihuiWidth: Int, // 0 + @SerializedName("title") + var title: String, // 2016 新春活动 + @SerializedName("width") + var width: Int // 68 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/User.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/User.kt new file mode 100644 index 0000000..7ee5e46 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/User.kt @@ -0,0 +1,55 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class User( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // OK + @SerializedName("msg") + var msg: String // OK +) { + data class Data( + @SerializedName("gold") + var gold: Int, // 0 + @SerializedName("isSign") + var isSign: Int, // 0 + @SerializedName("medal") + var medal: JsonElement?, // null + @SerializedName("new") + var new: Int, // 1 + @SerializedName("room_id") + var roomId: Long, // 1110317 + @SerializedName("silver") + var silver: Int, // 140258 + @SerializedName("svip") + var svip: Int, // 0 + @SerializedName("svip_time") + var svipTime: String, // 0000-00-00 00:00:00 + @SerializedName("use_count") + var useCount: Int, // 0 + @SerializedName("user_level") + var userLevel: Int, // 25 + @SerializedName("user_level_color") + var userLevelColor: Int, // 5805790 + @SerializedName("vip") + var vip: Int, // 0 + @SerializedName("vip_time") + var vipTime: String, // 2018-05-15 12:00:50 + @SerializedName("vip_view_status") + var vipViewStatus: Int, // 1 + @SerializedName("wearTitle") + var wearTitle: WearTitle + ) { + data class WearTitle( + @SerializedName("activity") + var activity: String, // 0 + @SerializedName("title") + var title: String // 0 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/model/UserInfoInRoom.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/model/UserInfoInRoom.kt new file mode 100644 index 0000000..9888a74 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/model/UserInfoInRoom.kt @@ -0,0 +1,181 @@ +package com.hiczp.bilibili.api.live.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class UserInfoInRoom( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("entry_effect") + var entryEffect: EntryEffect, + @SerializedName("gift") + var gift: Gift, + @SerializedName("info") + var info: Info, + @SerializedName("level") + var level: Level, + @SerializedName("new") + var new: Int, // 1 + @SerializedName("privilege") + var privilege: Privilege, + @SerializedName("role") + var role: Role, + @SerializedName("room_admin") + var roomAdmin: RoomAdmin, + @SerializedName("wallet") + var wallet: Wallet + ) { + data class Wallet( + @SerializedName("gold") + var gold: String, // 0 + @SerializedName("silver") + var silver: String // 140258 + ) + + data class Info( + @SerializedName("bili_vip") + var biliVip: Int, // 0 + @SerializedName("face") + var face: String, // https://i1.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg + @SerializedName("gender") + var gender: Int, // 0 + @SerializedName("identification") + var identification: Int, // 1 + @SerializedName("mobile_verify") + var mobileVerify: Int, // 1 + @SerializedName("mobile_virtual") + var mobileVirtual: Int, // 0 + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("platform_user_level") + var platformUserLevel: Int, // 4 + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("uid") + var uid: Long, // 20293030 + @SerializedName("uname") + var uname: String, // czp3009 + @SerializedName("vip_type") + var vipType: Int // 0 + ) { + data class OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("role") + var role: Int, // 0 + @SerializedName("type") + var type: Int // -1 + ) + } + + data class Level( + @SerializedName("color") + var color: Int, // 5805790 + @SerializedName("cost") + var cost: Int, // 52187800 + @SerializedName("is_show_vip_broadcast") + var isShowVipBroadcast: Int, // 0 + @SerializedName("master_level") + var masterLevel: MasterLevel, + @SerializedName("rcost") + var rcost: Long, // 2737665 + @SerializedName("svip") + var svip: Int, // 0 + @SerializedName("svip_time") + var svipTime: String, // 0000-00-00 00:00:00 + @SerializedName("uid") + var uid: Int, // 20293030 + @SerializedName("update_time") + var updateTime: String, // 0000-00-00 00:00:00 + @SerializedName("user_level") + var userLevel: Int, // 25 + @SerializedName("user_level_rank") + var userLevelRank: String, // >50000 + @SerializedName("user_score") + var userScore: String, // 0 + @SerializedName("vip") + var vip: Int, // 0 + @SerializedName("vip_time") + var vipTime: String // 2018-05-15 12:00:50 + ) { + data class MasterLevel( + @SerializedName("color") + var color: Int, // 5805790 + @SerializedName("current") + var current: List<Int>, + @SerializedName("level") + var level: Int, // 11 + @SerializedName("next") + var next: List<Int> + ) + } + + data class RoomAdmin( + @SerializedName("is_admin") + var isAdmin: Int // 0 + ) + + data class Role( + @SerializedName("info") + var info: Info, + @SerializedName("role_id") + var roleId: Int, // 2 + @SerializedName("role_name") + var roleName: String // 播主 + ) { + data class Info( + @SerializedName("roomid") + var roomid: Long // 1110317 + ) + } + + data class EntryEffect( + @SerializedName("basemap_url") + var basemapUrl: String, + @SerializedName("copy_writing") + var copyWriting: String, + @SerializedName("effective_time") + var effectiveTime: Int, // 0 + @SerializedName("face") + var face: String, // https://i1.hdslb.com/bfs/face/4f65e79399ad5a1bf3f877851b2f819d5870b494.jpg + @SerializedName("highlight_color") + var highlightColor: String, + @SerializedName("id") + var id: Int, // 0 + @SerializedName("mock_effect") + var mockEffect: Int, // 0 + @SerializedName("priority") + var priority: Int, // 0 + @SerializedName("privilege_type") + var privilegeType: Int, // 0 + @SerializedName("show_avatar") + var showAvatar: Int, // 0 + @SerializedName("target_id") + var targetId: Long, // 2866663 + @SerializedName("uid") + var uid: Long // 20293030 + ) + + data class Privilege( + @SerializedName("broadcast") + var broadcast: JsonElement?, // null + @SerializedName("notice_status") + var noticeStatus: Int // 1 + ) + + data class Gift( + @SerializedName("is_show") + var isShow: String, // 1 + @SerializedName("uid") + var uid: Long // 20293030 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/LiveClient.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/LiveClient.kt new file mode 100644 index 0000000..7405a8b --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/LiveClient.kt @@ -0,0 +1,219 @@ +package com.hiczp.bilibili.api.live.websocket + +import com.github.salomonbrys.kotson.obj +import com.google.gson.JsonObject +import com.hiczp.bilibili.api.BilibiliClient +import com.hiczp.bilibili.api.jsonParser +import io.ktor.client.HttpClient +import io.ktor.client.engine.cio.CIO +import io.ktor.client.features.websocket.WebSockets +import io.ktor.client.features.websocket.wss +import io.ktor.http.cio.websocket.CloseReason +import io.ktor.http.cio.websocket.close +import io.ktor.util.InternalAPI +import io.ktor.util.KtorExperimentalAPI +import io.ktor.util.decodeString +import io.ktor.util.error +import kotlinx.coroutines.* +import mu.KotlinLogging + +private val logger = KotlinLogging.logger { } + +/** + * 直播客户端 + * 注意该类是有状态的 + * + * @param maybeShortRoomId 可能为短房间号的房间号 + * @param fetchRoomId 是否在连接前先获取房间号(长号) + * @param fetchDanmakuConfig 是否在连接前先获取弹幕推送服务器地址 + * @param doEntryRoomAction 是否产生直播间观看历史记录 + * @param sendUserOnlineHeart 是否发送 rest 心跳包, 这会增加观看直播的时长, 用于服务端统计(与弹幕推送无关) + * @param callback 回调 + */ +@Suppress("CanBeParameter") +class LiveClient( + private val bilibiliClient: BilibiliClient, + maybeShortRoomId: Long, + private val fetchRoomId: Boolean = true, + private val fetchDanmakuConfig: Boolean = true, + private val doEntryRoomAction: Boolean = false, + private val sendUserOnlineHeart: Boolean = false, + callback: LiveClientCallbackDSL.() -> Unit +) { + private val callback = LiveClientCallbackDSL().apply { callback() } + private val liveAPI = bilibiliClient.liveAPI + + var roomId = maybeShortRoomId + private set + + /** + * 开启连接 + */ + @UseExperimental(KtorExperimentalAPI::class, ObsoleteCoroutinesApi::class, InternalAPI::class) + fun launch() = GlobalScope.launch(CoroutineExceptionHandler { _, throwable -> + callback.onError?.invoke(this, throwable) ?: logger.error(throwable) + }) { + //得到原始房间号和主播的用户ID + var anchorUserId = 0L + if (fetchRoomId) { + liveAPI.mobileRoomInit(roomId).await().data.also { + roomId = it.roomId + anchorUserId = it.uid + } + } + + //获得 wss 地址和端口(推荐服务器) + @Suppress("SpellCheckingInspection") + var host = "broadcastlv.chat.bilibili.com" + var port = 443 + if (fetchDanmakuConfig) { + liveAPI.getDanmakuConfig(roomId).await().data.also { data -> + host = data.host + data.hostServerList.find { it.host == host }?.wssPort?.also { + port = it + } + } + } + + //产生历史记录 + @Suppress("DeferredResultUnused") + if (doEntryRoomAction && bilibiliClient.isLogin) liveAPI.roomEntryAction(roomId) + + //开启 websocket + HttpClient(CIO).config { install(WebSockets) }.wss(host = host, port = port, path = "/sub") { + //发送进房数据包 + send(PresetPacket.enterRoomPacket(anchorUserId, roomId)) + val enterRoomResponsePacket = incoming.receive().toPackets()[0] + if (enterRoomResponsePacket.packetType == PacketType.ENTER_ROOM_RESPONSE) { + try { + callback.onConnect?.invoke(this@LiveClient) + } catch (e: Exception) { + logger.error(e) + } + } else { + //impossible + logger.error { "Receive unreadable server response: $enterRoomResponsePacket" } + close(CloseReason(CloseReason.Codes.NOT_CONSISTENT, "")) + return@wss + } + + //发送 rest 心跳包 + //五分钟一次 + val restHeartBeatJob = if (sendUserOnlineHeart && bilibiliClient.isLogin) { + launch { + val scale = bilibiliClient.billingClientProperties.scale + while (true) { + liveAPI.userOnlineHeart(roomId, scale).invokeOnCompletion { + if (it != null) logger.error(it) + } + delay(300_000) + } + } + } else { + null + } + + //发送 websocket 心跳包 + //30 秒一次 + val websocketHeartBeatJob = launch { + try { + while (true) { + send(PresetPacket.heartbeatPacket()) + delay(30_000) + } + } catch (ignore: CancellationException) { + //ignore + } catch (e: Exception) { + logger.error(e) + } + } + + try { + while (true) { + withTimeout(40_000) { + incoming.receive() + }.toPackets().forEach { + try { + @Suppress("NON_EXHAUSTIVE_WHEN") + when (it.packetType) { + PacketType.POPULARITY -> callback.onPopularityPacket?.invoke( + this@LiveClient, + it.content.int + ) + PacketType.COMMAND -> callback.onCommandPacket?.invoke( + this@LiveClient, + jsonParser.parse(it.content.decodeString()).obj + ) + } + } catch (e: Exception) { + logger.error(e) + } + } + } + } catch (e: TimeoutCancellationException) { + throw e + } catch (e: CancellationException) { + close() + } finally { + restHeartBeatJob?.cancel() + websocketHeartBeatJob.cancel() + launch { + val closeReason = closeReason.await() + try { + callback.onClose?.invoke(this@LiveClient, closeReason) + } catch (e: Exception) { + logger.error(e) + } + } + } + } + } + + /** + * 发送弹幕 + */ + fun sendMessage(message: String) = + liveAPI.sendMessage(cid = roomId, mid = bilibiliClient.userId ?: 0, message = message) +} + +class LiveClientCallbackDSL { + /** + * 成功进入房间时触发 + */ + var onConnect: ((LiveClient) -> Unit)? = null + + /** + * 抛出异常时触发 + */ + var onError: ((LiveClient, Throwable) -> Unit)? = null + + /** + * 收到人气值数据包 + */ + var onPopularityPacket: ((LiveClient, Int) -> Unit)? = null + + /** + * 收到 command 数据包 + */ + var onCommandPacket: ((LiveClient, JsonObject) -> Unit)? = null + + /** + * 连接关闭时触发 + */ + var onClose: ((LiveClient, CloseReason?) -> Unit)? = null +} + +/** + * 打开一个直播客户端 + */ +fun BilibiliClient.liveClient( + roomId: Long, + fetchRoomId: Boolean = true, + fetchDanmakuConfig: Boolean = true, + doEntryRoomAction: Boolean = false, + sendUserOnlineHeart: Boolean = false, + callback: LiveClientCallbackDSL.() -> Unit +) = LiveClient( + this, roomId, fetchRoomId, fetchDanmakuConfig, doEntryRoomAction, sendUserOnlineHeart, + callback +) diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/Packet.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/Packet.kt new file mode 100644 index 0000000..8202ddd --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/Packet.kt @@ -0,0 +1,66 @@ +package com.hiczp.bilibili.api.live.websocket + +import io.ktor.http.cio.websocket.Frame +import io.ktor.http.cio.websocket.WebSocketSession +import java.nio.ByteBuffer + +/** + * 数据包模型 + * 由于 Android APP 并未全线换成 wss, 以下用的是移动版网页的协议 + * 数据包头部结构 00 00 00 65 00 10 00 01 00 00 00 07 00 00 00 01 + * |数据包总长度| |头长| |tag| |数据包类型 | | tag | + * + * @param shortTag 一种 tag, 如果是非 command 数据包则为 1, 否则为 0, short 类型 + * @param packetType 数据包类型 + * @param tag 同 tagShort, 但是为 int 类型 + * @param content 正文内容 + */ +@Suppress("MemberVisibilityCanBePrivate") +data class Packet( + val shortTag: Short = 1, + val packetType: PacketType, + val tag: Int = 1, + val content: ByteBuffer +) { + val totalLength + get() = headerLength + content.limit() + + val headerLength: Short = 0x10 + + fun toFrame() = Frame.Binary( + true, + ByteBuffer.allocate(totalLength) + .putInt(totalLength) + .putShort(headerLength) + .putShort(shortTag) + .putInt(packetType.value) + .putInt(tag) + .put(content).apply { + flip() + }!! + ) +} + +/** + * 一个 Message 中可能包含多个数据包 + */ +internal fun Frame.toPackets(): List<Packet> { + val bufferLength = buffer.limit() + val list = ArrayList<Packet>() + while (buffer.hasRemaining()) { + val startPosition = buffer.position() + val totalLength = buffer.int + buffer.position(buffer.position() + 2) //skip headerLength + val shortTag = buffer.short + val packetType = PacketType.getByValue(buffer.int) + val tag = buffer.int + buffer.limit(startPosition + totalLength) + val content = buffer.slice() + buffer.position(buffer.limit()) + buffer.limit(bufferLength) + list.add(Packet(shortTag, packetType, tag, content)) + } + return list +} + +internal suspend inline fun WebSocketSession.send(packet: Packet) = send(packet.toFrame()) diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/PacketType.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/PacketType.kt new file mode 100644 index 0000000..e6bdf2c --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/PacketType.kt @@ -0,0 +1,22 @@ +package com.hiczp.bilibili.api.live.websocket + +enum class PacketType(val value: Int) { + //impossible + UNKNOWN(0), + + HEARTBEAT(2), + + POPULARITY(3), + + COMMAND(5), + + ENTER_ROOM(7), + + ENTER_ROOM_RESPONSE(8); + + companion object { + private val byValueMap = PacketType.values().associateBy { it.value } + + fun getByValue(value: Int) = byValueMap[value] ?: UNKNOWN + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/Parser.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/Parser.kt new file mode 100644 index 0000000..d48726d --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/Parser.kt @@ -0,0 +1,161 @@ +package com.hiczp.bilibili.api.live.websocket + +import com.github.salomonbrys.kotson.* +import com.google.gson.JsonArray +import com.google.gson.JsonObject +import com.hiczp.bilibili.api.isEmpty + +/** + * 用于解析 DANMU_MSG 的工具类 + * 注意, 并非所有字段的含义都已明确. 例如 bubble, guardLevel, teamid + * + * @see com.hiczp.bilibili.api.live.model.RoomMessage + */ +@Suppress("MemberVisibilityCanBePrivate") +inline class DanmakuMessage(val data: JsonObject) { + inline val info: JsonArray + get() = data.get("info").array + + inline val basicInfo + get() = info[0].array + + /** + * 弹幕池 + */ + inline val pool + get() = basicInfo[0].int + + /** + * 弹幕模式, 可能和视频弹幕一致 + * (1从右至左滚动弹幕|6从左至右滚动弹幕|5顶端固定弹幕|4底端固定弹幕|7高级弹幕|8脚本弹幕) + */ + inline val mode + get() = basicInfo[1].int + + /** + * 弹幕字号 + */ + inline val fontSize + get() = basicInfo[2].int + + /** + * 弹幕颜色 + */ + inline val color + get() = basicInfo[3].int + + /** + * 弹幕发送时间 + */ + inline val timestamp + get() = basicInfo[4].long + + /** + * 发送此弹幕的客户端进入直播间的时间. + * 注意, 如果弹幕来自一个 Android 客户端, 那么此字段是一个随机数(不包括符号位有9位或者10位), 可能为负数 + */ + inline val enterRoomTime + get() = basicInfo[5].long + + /** + * 用户 ID 的 CRC32 校验和 + * 注意, 不需要用此字段来得到用户 ID + */ + inline val userIdCrc32 + get() = basicInfo[7].string + + /** + * 弹幕的内容 + */ + inline val message + get() = info[1].string + + inline val userInfo + get() = info[2].array + + inline val userId + get() = userInfo[0].long + + inline val nickname + get() = userInfo[1].string + + inline val isAdmin + get() = userInfo[2].int + + inline val isVip + get() = userInfo[3].int + + inline val isSVip + get() = userInfo[4].int + + /** + * 粉丝勋章信息 + * 注意, 如果弹幕发送者没有佩戴勋章则该字段为一个空 JsonArray + * 未佩戴粉丝勋章时, 下面几个字段都会返回 null + */ + inline val fansMedalInfo + get() = info[3].array + + inline val fansMedalLevel + get() = if (fansMedalInfo.isEmpty()) null else fansMedalInfo[0].int + + inline val fansMedalName + get() = if (fansMedalInfo.isEmpty()) null else fansMedalInfo[1].string + + /** + * 粉丝勋章对应的主播的用户名 + */ + inline val fansMedalAnchorNickname + get() = if (fansMedalInfo.isEmpty()) null else fansMedalInfo[2].string + + /** + * 粉丝勋章对应的主播的直播间号码 + */ + inline val fansMedalAnchorRoomId + get() = if (fansMedalInfo.isEmpty()) null else fansMedalInfo[3].long + + /** + * 粉丝勋章的背景颜色 + */ + inline val fansMedalBackgroundColor + get() = if (fansMedalInfo.isEmpty()) null else fansMedalInfo[4].int + + inline val userLevelInfo + get() = info[4].array + + /** + * UL, 发送者的用户等级, 非主播等级 + */ + inline val userLevel + get() = userLevelInfo[0].int + + /** + * 用户等级标识的边框的颜色, 通常为最后一个佩戴的粉丝勋章的颜色 + */ + inline val userLevelBorderColor + get() = userLevelInfo[2].int + + /** + * 用户排名, 可能为数字, 也可能是 ">50000" + */ + inline val userRank + get() = userLevelInfo[3].string + + /** + * 用户头衔 + * 可能为空列表, 也可能是值为 "" 的列表 + * 可能有两项, 两项的值可能一样 + */ + inline val userTitles + get() = info[5].array.map { it.string } + + /** + * 校验信息 + * { + * "ts": 1553368447, + * "ct": "98688F2F" + * } + */ + inline val checkInfo + get() = info[9].obj +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/PresetPacket.kt b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/PresetPacket.kt new file mode 100644 index 0000000..e557b95 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/live/websocket/PresetPacket.kt @@ -0,0 +1,37 @@ +package com.hiczp.bilibili.api.live.websocket + +import com.github.salomonbrys.kotson.jsonObject +import java.nio.ByteBuffer + +/** + * 预设数据包 + */ +object PresetPacket { + /** + * 进房数据包 + * {"uid":50333369,"roomid":14073662,"protover":0} + * + * @param anchorUserId 房间主的用户 ID + * @param roomId 房间号 + */ + @Suppress("SpellCheckingInspection") + fun enterRoomPacket(anchorUserId: Long, roomId: Long) = Packet( + packetType = PacketType.ENTER_ROOM, + content = ByteBuffer.wrap( + jsonObject( + "uid" to anchorUserId, + "roomid" to roomId, + "protover" to 0 //该值总为 0 + ).toString().toByteArray() + ) + ) + + /** + * 心跳包 + * 心跳包的正文内容可能是故意的, 为固定值 "[object Object]" + */ + fun heartbeatPacket(content: ByteBuffer = ByteBuffer.wrap("[object Object]".toByteArray())) = Packet( + packetType = PacketType.HEARTBEAT, + content = content + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/MainAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/MainAPI.kt new file mode 100644 index 0000000..568586f --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/MainAPI.kt @@ -0,0 +1,373 @@ +package com.hiczp.bilibili.api.main + +import com.hiczp.bilibili.api.main.model.* +import com.hiczp.bilibili.api.retrofit.CommonResponse +import com.hiczp.bilibili.api.retrofit.Header +import kotlinx.coroutines.Deferred +import retrofit2.http.* + +/** + * 这也是总站 API + */ +@Suppress("DeferredIsResult") +interface MainAPI { + /** + * 获取一个视频下的评论 + * 注意, 评论是倒序排序的, 即楼层大的楼排在前面, 所以返回值中的 next 会比 prev 小 + * 返回值中的 rpid 为评论 id. parent 为父评论的 id, parent 为 0 的是顶级评论 + * + * @param oid 就是 aid, 视频的唯一标识 + * @param pageSize 分页大小, 最大值 50 + * @param next 下一页的起始楼层(这一层不包含在返回值内), 注意, 翻页是越翻楼层越小的. 如果为 null 则从最后一楼(最新的评论)开始 + */ + @GET("/x/v2/reply/main") + fun reply( + @Query("mode") mode: Int = 1, + @Query("next") next: Long? = null, + @Query("oid") oid: Long, + @Query("plat") plat: Int? = 2, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 1 + ): Deferred<Reply> + + /** + * 获取一个视频下的评论的子评论 + * + * @param minId 想要请求的子评论(复数)的第一个子评论的 id(子评论默认升序排序), 为 null 时从 0 楼开始 + * @param oid aid + * @param root 根评论的 id + * @param size 分页大小 + */ + @GET("/x/v2/reply/reply/cursor") + fun childReply( + @Query("min_id") minId: Long? = null, + @Query("oid") oid: Long, + @Query("plat") plat: Int? = 2, + @Query("root") root: Long, + @Query("size") size: Int = 20, + @Query("sort") sort: Int = 0, + @Query("type") type: Int = 1 + ): Deferred<ChildReply> + + /** + * 查看 "对话列表" + * 当一个子评论中有多组人在互相 at 时, 旁边就会有一个按钮 "查看对话", 将启动一个 dialog 展示内容 + * parentId 与 rootId 在请求子评论列表时取得 + * + * @param dialog "查看对话" 按钮所在的评论所 at 的那条评论的 id, 即 parentId + * @param minFloor 最小楼层, 翻页参数 + * @param oid aid + * @param root "查看对话" 按钮所在的根评论 id, 即 rootId + * @param size 分页大小 + * + * @see childReply + */ + @GET("/x/v2/reply/dialog/cursor") + fun chatList( + @Query("dialog") dialog: Long, + @Query("min_floor") minFloor: Long? = null, + @Query("oid") oid: Long, + @Query("plat") plat: Int? = 2, + @Query("root") root: Long, + @Query("size") size: Int = 20, + @Query("type") type: Int = 1 + ): Deferred<ChatList> + + /** + * 获得一个番剧的分季信息(生成番剧页面所需的信息), 包含当前选择的季的分集信息 + * seasonId 或 episodeId 必须有一个, 如果用 episodeId 将跳转到对应的 season 的页面 + * 返回值中, 每个 episode 都有 aid 和 cid + * + * @param seasonId 季的唯一标识 + * @param episodeId 集的唯一标识 + */ + @GET("/pgc/view/app/season") + fun season( + @Query("season_id") seasonId: Long? = null, + @Query("ep_id") episodeId: Long? = null, + @Query("track_path") trackPath: Int? = null + ): Deferred<Season> + + /** + * 番剧页面下方的推荐(对当前季进行推荐) + * 返回值中的 relates 是 "相关推荐"(广告), season 是 "更多推荐"(其他番, 目标为季) + * + * @param seasonId 季的唯一标识 + */ + @GET("/pgc/season/app/related/recommend") + fun recommend(@Query("season_id") seasonId: Long): Deferred<Recommend> + + /** + * 我的追番动态(追番页面上方的那一条 "我的追番") + * 首页 -> 追番 -> 我的追番 + */ + @Suppress("SpellCheckingInspection") + @GET("/pgc/app/page/bangumi/mine") + fun myBangumiNews( + @Query("fnval") fnval: Int = 16, + @Query("fnver") fnver: Int = 0 + ): Deferred<MyBangumiNews> + + /** + * 追番页面(客户端用这里面的数据来生成追番页面) + * 每个模块(module)的数据(item)全部超过三个. + * 每个板块下面的 换一换 按钮并不重新请求数据, 而是从每个模块的数据里选出另一批 + * 首页 -> 追番 + * + * @param pgcHomeTimelineABTest 与 A/B Test 有关, 不明确其值含义, 有可能使得返回内容不一样 + */ + @Suppress("SpellCheckingInspection") + @GET("/pgc/app/page/bangumi") + fun bangumiPage( + @Query("fnval") fnval: Int = 16, + @Query("fnver") fnver: Int = 0, + @Query("pgc_home_timeline_abtest") pgcHomeTimelineABTest: Int? = 13 + ): Deferred<BangumiPage> + + /** + * 获得更多 "编辑推荐" + * 首页 -> 追番 -> (下拉) + * + * @param cursor 表示时间(ms), 但是可能是科学计数法. 每次请求所用的 cursor 在上一次的返回值里的最后一个 item 里. 第一次请求所用的 cursor 在追番页面的返回值的最后. + * @param size 分页大小 + * @param wid 不明确, 有可能是一些 padding, margin, 用于计算位置 + * + * @see bangumiPage + */ + fun bangumiMore( + @Query("cursor") cursor: String, + @Query("size") size: Int = 10, + @Query("wid") wid: String? = "78,79,80,81,59" + ): Deferred<BangumiMore> + + /** + * 发送评论 + * 如果发送根评论则 root 和 parent 为 null + * 如果发送子评论则 root 和 parent 均为根评论的 id + * 如果在子评论中 at 别人(即对子评论进行评论), 那么 root 为所属根评论的 id, parent 为所 at 的那个评论的 id + * at 别人时, 评论的内容必须符合以下格式 "回复 @$username :$message" + * + * @param message 发送的内容 + * @param oid aid + * @param parent 父评论 id + * @param root 根评论 id + */ + @POST("/x/v2/reply/add") + @FormUrlEncoded + fun sendReply( + @Field("from") from: Int? = null, + @Field("message") message: String, + @Field("oid") oid: Long, + @Field("parent") parent: Long? = null, + @Field("plat") plat: Int = 2, + @Field("root") root: Long? = null, + @Field("type") type: Int = 1 + ): Deferred<SendReplyResponse> + + /** + * 点赞(评论) + * + * @param action 为 1 时表示点赞, 0 表示取消点赞 + * @param oid aid + * @param replyId 评论的 ID + */ + @Suppress("SpellCheckingInspection") + @POST("/x/v2/reply/action") + @FormUrlEncoded + fun likeReply( + @Field("action") action: Int, + @Field("oid") oid: Long, + @Field("rpid") replyId: Long, + @Field("type") type: Int = 1 + ): Deferred<CommonResponse> + + /** + * 不喜欢(评论) + * + * @param action 为 1 时表示不喜欢, 为 0 时表示取消不喜欢 + * @param oid aid + * @param replyId 评论的 ID + */ + @Suppress("SpellCheckingInspection") + @POST("/x/v2/reply/hate") + @FormUrlEncoded + fun dislikeReply( + @Field("action") action: Int, + @Field("oid") oid: Long, + @Field("rpid") replyId: Long, + @Field("type") type: Int = 1 + ): Deferred<CommonResponse> + + /** + * 查看视频的删除日志 + * 这个 API 看起来有翻页, 其实没有页 + * 视频 -> 评论 -> 右上角三个点 ->查看删除日志 + * + * @return 有$replyCount条评论因$reportCount次举报已被管理员移除 + */ + @GET("/x/v2/reply/log") + fun deleteLog( + @Query("oid") oid: Long, + @Query("pn") pageNumber: Int = 1, + @Query("ps") pageSize: Int = 20, + @Query("type") type: Int = 1 + ): Deferred<DeleteLog> + + /** + * 改变与某用户的关系(关注, 取消关注) + * + * @param action 动作类型(1: 关注;2: 取消关注) + * @param followId 操作对象的 ID(例如欲关注的那个用户的 ID) + * @param reSrc 不明确 + */ + @POST("/x/relation/modify") + @FormUrlEncoded + fun modifyRelation( + @Field("act") action: Int, + @Field("fid") followId: Long, + @Field("re_src") reSrc: Int? = 32 + ): Deferred<CommonResponse> + + /** + * 查看关注分组 + * 默认分组永远是 0 + */ + @GET("/x/relation/tag/m/tags") + fun relationTags(): Deferred<RelationTags> + + /** + * 创建关注分组 + * + * @param tag 不能包含绝大部分符号 + */ + @POST("/x/relation/tag/create") + @FormUrlEncoded + fun createRelationTag(@Field("tag") tag: String): Deferred<CreateRelationTagResponse> + + /** + * 设置分组(对某个用户的关注的分组) + * 用户 -> 关注 -> 设置分组 + * + * @param followIds 关注的人(不明确能不能有多个) + * @param tagIds 分组 id. 可以有多个, 用逗号隔开, 例如 "-10,110641" + */ + @Suppress("SpellCheckingInspection") + @POST("/x/relation/tags/addUsers") + @FormUrlEncoded + fun relationAddUsers( + @Field("fids") followIds: String, + @Field("tagids") tagIds: String + ): Deferred<CommonResponse> + + /** + * 收藏文章 + * + * @param id 文章的 id + */ + @POST("/x/article/favorites/add") + @FormUrlEncoded + fun addFavoriteArticle(@Field("id") id: Long): Deferred<CommonResponse> + + /** + * 点赞(文章) + * + * @param id 文章的 id + * @param type 操作类型, 1 为点赞, 2 为取消点赞 + */ + @POST("/x/article/like") + @FormUrlEncoded + 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 + 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 + 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 + fun deleteFavoriteVideo( + @Field("aid") aid: Long, + @Field("fid") fid: String + ): Deferred<CommonResponse> + + /** + * 发送弹幕(视频, 番剧) + * + * @param oid cid + * @param random 9 位的随机数字 + * @param progress 播放器时间(ms) + */ + @POST("/x/v2/dm/post") + @FormUrlEncoded + @Headers(Header.FORCE_QUERY) + fun sendDanmaku( + @Query("aid") aid: Long, + @Query("oid") oid: Long, + @Field("pool") pool: Int = 0, + @Field("rnd") random: Int = (100000000..999999999).random(), + @Field("oid") oidInBody: Long, + @Field("fontsize") fontSize: Int = 25, + @Field("msg") message: String, + @Field("mode") mode: Int = 1, + @Field("progress") progress: Long, + @Field("color") color: Int = 16777215, + @Field("plat") plat: Int = 2, + @Field("screen_state") screenState: Int = 0, + @Field("from") from: Int? = null, + @Field("type") type: Int = 1 + ): Deferred<SendDanmakuResponse> + + /** + * 发送弹幕的快捷方式 + */ + @JvmDefault + fun sendDanmaku(aid: Long, cid: Long, progress: Long, message: String) = + sendDanmaku(aid = aid, oid = cid, oidInBody = cid, progress = progress, message = message) + + /** + * 获取文章分类列表 + */ + @GET("/x/article/categories") + fun articleCategories(): Deferred<ArticleCategories> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/ArticleCategories.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/ArticleCategories.kt new file mode 100644 index 0000000..cb85c75 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/ArticleCategories.kt @@ -0,0 +1,25 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.annotations.SerializedName + +data class ArticleCategories( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: List<Category>, + @SerializedName("message") + var message: String, // 0 + @SerializedName("ttl") + var ttl: Int // 1 +) { + data class Category( + @SerializedName("children") + var children: List<Category>, + @SerializedName("id") + var id: Int, // 17 + @SerializedName("name") + var name: String, // 科技 + @SerializedName("parent_id") + var parentId: Int // 0 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/BangumiMore.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/BangumiMore.kt new file mode 100644 index 0000000..282ab62 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/BangumiMore.kt @@ -0,0 +1,43 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.annotations.SerializedName + +data class BangumiMore( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String, // success + @SerializedName("result") + var result: List<Result> +) { + data class Result( + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/bangumi/5bac9515a50c880e55a772c194241ff9943e0004.png + /** + * cursor 的值有可能是科学计数法, 例如 1.550210400638E12 + * 如果不是最后一个 item 将没有这个字段 + */ + @SerializedName("cursor") + var cursor: String?, // 1548172800112.0 + @SerializedName("desc") + var desc: String, // 正在就读白凰女学院3年级的加藤茉莉香,是个拥有“私掠船免状”的合法宇宙海贼。她不仅是学生、宇宙艇部的部长、咖啡馆的服务员,还是宇宙海贼船·弁天丸的船长,每天都过着繁忙而充实的生活。某天,正在豪华客船上开展工作的茉莉香,在乘客名单中发现了拥有银河通行证的少年·无限彼方的名字……。少年与海贼的亚空冒险就此展开! + @SerializedName("id") + var id: Int, // 33409 + @SerializedName("is_new") + var isNew: Int, // 0 + @SerializedName("link") + var link: String, // https://www.bilibili.com/read/cv1831506 + @SerializedName("link_type") + var linkType: Int, // 4 + @SerializedName("link_value") + var linkValue: Int, // 0 + @SerializedName("pub_time") + var pubTime: String, // 2019-01-23 00:00:00 + @SerializedName("simg") + var simg: String, + @SerializedName("title") + var title: String, // 化身为刃,除魔四方——《多罗罗》 + @SerializedName("wid") + var wid: Int // 81 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/BangumiPage.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/BangumiPage.kt new file mode 100644 index 0000000..4279c79 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/BangumiPage.kt @@ -0,0 +1,80 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class BangumiPage( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String, // success + @SerializedName("result") + var result: Result +) { + data class Result( + @SerializedName("modules") + var modules: List<Module>, + @SerializedName("regions") + var regions: List<Region> + ) { + data class Module( + @SerializedName("attr") + var attr: Attr, + @SerializedName("headers") + var headers: List<JsonElement>, + @SerializedName("items") + var items: List<Item>, + @SerializedName("module_id") + var moduleId: Int, // 6 + @SerializedName("size") + var size: Int, // 10 + @SerializedName("style") + var style: String, // fall + @SerializedName("title") + var title: String, // 编辑推荐 + @SerializedName("wid") + var wid: List<Int> + ) { + data class Item( + @SerializedName("badge") + var badge: String, // NEW + @SerializedName("badge_type") + var badgeType: Int, // 0 + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/bangumi/57e00f9995459ab0cf40800358ee7f3b392b38a4.jpg + @SerializedName("cursor") + var cursor: String, // 1.55021040036E12 + @SerializedName("desc") + var desc: String, // 明明是最差劲的相遇,但雏却不知何时开始无法停止心动。雏被初中时的学长·恋雪所吸引,决定和他进入同所高中而拼命学习。并且,和青梅竹马的虎太朗一同进入了樱丘高中。曾经单调乏味的恋雪,为了自己单相思的对象,而在假日结束后改换了形象,变得受欢迎起来。在这种状况下,雏决定要「告白」,但是——!? + @SerializedName("is_new") + var isNew: Int, // 0 + @SerializedName("item_id") + var itemid: Long, // 34265 + @SerializedName("link") + var link: String, // https://www.bilibili.com/blackboard/topic/activity-dm4qK4-BI.html + @SerializedName("title") + var title: String, // 【资讯档】2019年第7周 + @SerializedName("wid") + var wid: Int // 78 + ) + + data class Attr( + @SerializedName("follow") + var follow: Int, // 0 + @SerializedName("header") + var header: Int, // 1 + @SerializedName("random") + var random: Int // 0 + ) + } + + data class Region( + @SerializedName("icon") + var icon: String, // http://i0.hdslb.com/bfs/bangumi/3b66adc7339e62d469ea5b89a45c74e14e3ae831.png + @SerializedName("title") + var title: String, // 点评 + @SerializedName("url") + var url: String // bilibili://pgc/review/index + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/ChatList.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/ChatList.kt new file mode 100644 index 0000000..7d9a503 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/ChatList.kt @@ -0,0 +1,227 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class ChatList( + @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("config") + var config: Config, + @SerializedName("cursor") + var cursor: Cursor, + @SerializedName("dialog") + var dialog: Dialog, + @SerializedName("replies") + var replies: List<Reply> + ) { + data class Reply( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 8 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 0 + @SerializedName("ctime") + var ctime: Int, // 1541824116 + @SerializedName("dialog") + var dialog: Long, // 1136351035 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 172 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 0 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 161745277 + @SerializedName("oid") + var oid: Long, // 34175504 + @SerializedName("parent") + var parent: Int, // 1136656601 + @SerializedName("parent_str") + var parentStr: String, // 1136656601 + @SerializedName("rcount") + var rcount: Int, // 0 + @SerializedName("replies") + var replies: JsonElement?, // null + @SerializedName("root") + var root: Long, // 1136310360 + @SerializedName("root_str") + var rootStr: String, // 1136310360 + @SerializedName("rpid") + var rpid: Long, // 1175989845 + @SerializedName("rpid_str") + var rpidStr: String, // 1175989845 + @SerializedName("state") + var state: Int, // 2 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://static.hdslb.com/images/member/noface.gif + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 161745277 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 保密 + @SerializedName("sign") + var sign: String, + @SerializedName("uname") + var uname: String, // vo6869 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1544371200000 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 1 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 2 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + } + + data class Content( + @SerializedName("device") + var device: String, // phone + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 回复 @***全副武装 :耶酥是佛教徒 + @SerializedName("plat") + var plat: Int // 3 + ) + + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String + ) + } + + data class Cursor( + @SerializedName("max_floor") + var maxFloor: Int, // 172 + @SerializedName("min_floor") + var minFloor: Int, // 8 + @SerializedName("size") + var size: Int // 11 + ) + + data class Config( + @SerializedName("show_up_flag") + var showUpFlag: Boolean, // true + @SerializedName("showadmin") + var showadmin: Int, // 0 + @SerializedName("showentry") + var showentry: Int, // 0 + @SerializedName("showfloor") + var showfloor: Int, // 1 + @SerializedName("showtopic") + var showtopic: Int // 1 + ) + + data class Dialog( + @SerializedName("max_floor") + var maxFloor: Int, // 172 + @SerializedName("min_floor") + var minFloor: Int // 8 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/ChildReply.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/ChildReply.kt new file mode 100644 index 0000000..5a7ea3b --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/ChildReply.kt @@ -0,0 +1,403 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class ChildReply( + @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("assist") + var assist: Int, // 0 + @SerializedName("blacklist") + var blacklist: Int, // 0 + @SerializedName("config") + var config: Config, + @SerializedName("cursor") + var cursor: Cursor, + @SerializedName("root") + var root: Root, + @SerializedName("upper") + var upper: Upper + ) { + data class Config( + @SerializedName("show_up_flag") + var showUpFlag: Boolean, // true + @SerializedName("showadmin") + var showadmin: Int, // 0 + @SerializedName("showentry") + var showentry: Int, // 0 + @SerializedName("showfloor") + var showfloor: Int, // 1 + @SerializedName("showtopic") + var showtopic: Int // 1 + ) + + data class Upper( + @SerializedName("mid") + var mid: Long // 7584632 + ) + + data class Cursor( + @SerializedName("all_count") + var allCount: Int, // 2 + @SerializedName("max_id") + var maxId: Int, // 2 + @SerializedName("min_id") + var minId: Int, // 1 + @SerializedName("size") + var size: Int // 2 + ) + + data class Root( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 0 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 2 + @SerializedName("ctime") + var ctime: Int, // 1550681500 + @SerializedName("dialog") + var dialog: Long, // 0 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 1348 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 1 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 14363383 + @SerializedName("oid") + var oid: Long, // 16622855 + @SerializedName("parent") + var parent: Long, // 0 + @SerializedName("parent_str") + var parentStr: String, // 0 + @SerializedName("rcount") + var rcount: Int, // 2 + @SerializedName("replies") + var replies: List<Reply>, + @SerializedName("root") + var root: Long, // 0 + @SerializedName("root_str") + var rootStr: String, // 0 + @SerializedName("rpid") + var rpid: Long, // 1405602348 + @SerializedName("rpid_str") + var rpidStr: String, // 1405602348 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String // https://www.bilibili.com/blackboard/foldingreply.html + ) + + data class Reply( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 0 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 0 + @SerializedName("ctime") + var ctime: Int, // 1550682402 + @SerializedName("dialog") + var dialog: Long, // 1405625526 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 2 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 1 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 14363383 + @SerializedName("oid") + var oid: Long, // 16622855 + @SerializedName("parent") + var parent: Long, // 1405602348 + @SerializedName("parent_str") + var parentStr: String, // 1405602348 + @SerializedName("rcount") + var rcount: Int, // 0 + @SerializedName("replies") + var replies: List<JsonElement>, // [] + @SerializedName("root") + var root: Long, // 1405602348 + @SerializedName("root_str") + var rootStr: String, // 1405602348 + @SerializedName("rpid") + var rpid: Long, // 1405625526 + @SerializedName("rpid_str") + var rpidStr: String, // 1405625526 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 导演:你认为是否有人了解你?像你自己一样了解你?老佛爷:这个问题我很难回答,别人对我的想法已根深蒂固,所以我认为几乎是不可能,我想是如此,即使是我深爱的人。我不想在别人生活中显得真实,我想成为幽灵,现身,然后消失,我也不想面对任何人的真实,因为我不想面对真实的自己,那是我的秘密。别跟我说那些关于孤独的陈词滥调,之于我这种人,孤独是一种胜利,这是场人生战役。像我一样从事创意工作的人,必须独处,让自己重新充电,整日生活在聚光灯前是无法创作的。我还要做许多事,例如阅读,身边有人就无法去做。平时几乎已没时间,但我随时都会想阅读,所以我赞成每人都要该独立生活。将别人当成依靠,对于我这样的人来说很危险,我必须时时刻刻如履薄冰,并在它破裂之前跨出下一步。 + @SerializedName("plat") + var plat: Int // 2 + ) + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i2.hdslb.com/bfs/face/63f5da7bda813e470cefd465767035efccff747d.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 14363383 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 保密 + @SerializedName("sign") + var sign: String, // - 故事何必听的真切,自在之人掀雨踏天阙。 + @SerializedName("uname") + var uname: String, // 浮生不思量 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1515686400000 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 1 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 5 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + } + + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String + ) + } + + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 唉有点不敢相信…R.I.P……走好走好 + @SerializedName("plat") + var plat: Int // 2 + ) + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i2.hdslb.com/bfs/face/63f5da7bda813e470cefd465767035efccff747d.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 14363383 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 保密 + @SerializedName("sign") + var sign: String, // - 故事何必听的真切,自在之人掀雨踏天阙。 + @SerializedName("uname") + var uname: String, // 浮生不思量 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1515686400000 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 1 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 5 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + } + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/CreateFavoriteFolderResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/CreateFavoriteFolderResponse.kt new file mode 100644 index 0000000..89f6b19 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/CreateFavoriteFolderResponse.kt @@ -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 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/CreateRelationTagResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/CreateRelationTagResponse.kt new file mode 100644 index 0000000..2275f29 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/CreateRelationTagResponse.kt @@ -0,0 +1,20 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.annotations.SerializedName + +data class CreateRelationTagResponse( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // 0 + @SerializedName("ttl") + var ttl: Int // 1 +) { + @Suppress("SpellCheckingInspection") + data class Data( + @SerializedName("tagid") + var tagid: Int // 110641 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/DeleteLog.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/DeleteLog.kt new file mode 100644 index 0000000..1b34dfb --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/DeleteLog.kt @@ -0,0 +1,37 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class DeleteLog( + @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("logs") + var logs: JsonElement?, // null + @SerializedName("page") + var page: Page, + @SerializedName("reply_count") + var replyCount: Int, // 11 + @SerializedName("report_count") + var reportCount: Int // 28 + ) { + data class Page( + @SerializedName("num") + var num: Int, // 1 + @SerializedName("pages") + var pages: Int, // 0 + @SerializedName("size") + var size: Int, // 20 + @SerializedName("total") + var total: Int // 0 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/FavoriteFolder.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/FavoriteFolder.kt new file mode 100644 index 0000000..a085da8 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/FavoriteFolder.kt @@ -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 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/MyBangumiNews.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/MyBangumiNews.kt new file mode 100644 index 0000000..c6ce957 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/MyBangumiNews.kt @@ -0,0 +1,74 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class MyBangumiNews( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String, // success + @SerializedName("result") + var result: Result +) { + data class Result( + @SerializedName("delay") + var delay: List<JsonElement>, + @SerializedName("follow") + var follow: Int, // 34 + @SerializedName("follows") + var follows: List<Follow>, + @SerializedName("follows_type") + var followsType: Int, // 1 + @SerializedName("update") + var update: Int // 1 + ) { + data class Follow( + @SerializedName("badge") + var badge: String, // 会员抢先 + @SerializedName("badge_type") + var badgeType: Int, // 0 + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/bangumi/f34ff3975c39913af936c133ae60a5891babba08.png + @SerializedName("is_finish") + var isFinish: Int, // 0 + @SerializedName("is_started") + var isStarted: Int, // 1 + @SerializedName("new_ep") + var newEp: NewEp, + /** + * 如果 progress 为 null 说明尚未观看 + */ + @SerializedName("progress") + var progress: Progress?, + @SerializedName("season_id") + var seasonId: Int, // 25681 + @SerializedName("title") + var title: String, // JOJO的奇妙冒险 黄金之风 + @SerializedName("total_count") + var totalCount: Int, // 39 + @SerializedName("url") + var url: String // https://www.bilibili.com/bangumi/play/ss25681 + ) { + data class NewEp( + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/archive/c3af18bf85040dfacb081db46e033f056318a8f0.jpg + @SerializedName("id") + var id: Int, // 250631 + @SerializedName("index_show") + var indexShow: String // 更新至第20话 + ) + + data class Progress( + @SerializedName("last_ep_desc") + var lastEpDesc: String, // 看到第2话 + @SerializedName("last_ep_id") + var lastEpId: Int, // 250837 + @SerializedName("last_ep_index") + var lastEpIndex: String, // 2 + @SerializedName("last_time") + var lastTime: Int // 1377 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/Recommend.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/Recommend.kt new file mode 100644 index 0000000..20093a6 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/Recommend.kt @@ -0,0 +1,89 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class Recommend( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String, // success + @SerializedName("result") + var result: Result +) { + data class Result( + @SerializedName("card") + var card: JsonElement, // [] + @SerializedName("relates") + var relates: List<Relate>, + @SerializedName("season") + var season: List<Season> + ) { + data class Season( + @SerializedName("badge") + var badge: String, // 会员抢先 + @SerializedName("badge_type") + var badgeType: Int, // 0 + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/bangumi/3fc16a667502cbff226e585eb660a96a20c7458c.png + @SerializedName("from") + var from: Int, // 0 + @SerializedName("new_ep") + var newEp: NewEp, + @SerializedName("rating") + var rating: Rating, + @SerializedName("season_id") + var seasonId: Int, // 26146 + @SerializedName("season_type") + var seasonType: Int, // 1 + @SerializedName("stat") + var stat: Stat, + @SerializedName("title") + var title: String, // 多罗罗 + @SerializedName("url") + var url: String // http://www.bilibili.com/bangumi/play/ss26146 + ) { + data class NewEp( + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/archive/7dec9d820b82ee57ebde0ba5c186b63e1e728abd.jpg + @SerializedName("index_show") + var indexShow: String // 更新至第7话 + ) + + data class Rating( + @SerializedName("count") + var count: Long, // 22916 + @SerializedName("score") + var score: Double // 9.8 + ) + + data class Stat( + @SerializedName("danmaku") + var danmaku: Int, // 435439 + @SerializedName("follow") + var follow: Int, // 2073877 + @SerializedName("view") + var view: Int // 24884016 + ) + } + + data class Relate( + @SerializedName("desc1") + var desc1: String, // 【萌羽Moeyu】魔法禁书目录御坂美琴易拉罐保温杯 + @SerializedName("desc2") + var desc2: String, // 295 + @SerializedName("item_id") + var itemid: Long, // 10005816 + @SerializedName("pic") + var pic: String, // https://i0.hdslb.com/bfs/mall/mall/c3/f0/c3f029d8221c6ecc96bd1ab321034bc2.jpg + @SerializedName("title") + var title: String, // 【现货即发】魔法禁书目录正版授权,Moeyu出品。 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("type_name") + var typeName: String, // 商品 + @SerializedName("url") + var url: String // bilibili://mall/web?url=https%3A%2F%2Fmall.bilibili.com%2Fdetail.html%3FitemsId%3D10005816%26msource%3Dfanju_25617_10005816%26noTitleBar%3D1%26loadingShow%3D1 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/RelationTags.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/RelationTags.kt new file mode 100644 index 0000000..5839ae9 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/RelationTags.kt @@ -0,0 +1,38 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.annotations.SerializedName + +data class RelationTags( + @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( + /** + * all 不是指全部, 而是指 公开关注 + */ + @SerializedName("all") + var all: List<Tag>, + @SerializedName("default") + var default: List<Tag>, + @SerializedName("list") + var list: List<Tag>, + @SerializedName("special") + var special: List<Tag> + ) { + @Suppress("SpellCheckingInspection") + data class Tag( + @SerializedName("count") + var count: Int, // 28 + @SerializedName("name") + var name: String, // 公开关注 + @SerializedName("tagid") + var tagid: Int // -1 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/Reply.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/Reply.kt new file mode 100644 index 0000000..68cda14 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/Reply.kt @@ -0,0 +1,1247 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class Reply( + @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("assist") + var assist: Int, // 0 + @SerializedName("blacklist") + var blacklist: Int, // 0 + @SerializedName("config") + var config: Config, + @SerializedName("cursor") + var cursor: Cursor, + @SerializedName("folder") + var folder: Folder, + @SerializedName("hots") + var hots: List<Hot>, + @SerializedName("notice") + var notice: JsonElement?, // null + /** + * 没有评论的视频的 replies 为 null + */ + @SerializedName("replies") + var replies: List<Reply>?, + @SerializedName("top") + var top: Top?, + @SerializedName("upper") + var upper: Upper, + @SerializedName("vote") + var vote: Int // 0 + ) { + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String // https://www.bilibili.com/blackboard/foldingreply.html + ) + + data class Reply( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 0 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 1 + @SerializedName("ctime") + var ctime: Int, // 1550677636 + @SerializedName("dialog") + var dialog: Long, // 0 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 295 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 0 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 14028833 + @SerializedName("oid") + var oid: Long, // 44012857 + @SerializedName("parent") + var parent: Long, // 0 + @SerializedName("parent_str") + var parentStr: String, // 0 + /** + * 评论数量 + */ + @SerializedName("rcount") + var rcount: Int, // 1 + /** + * 如果 replies 为 null 说明没有评论 + */ + @SerializedName("replies") + var replies: List<Reply>?, + @SerializedName("root") + var root: Long, // 0 + @SerializedName("root_str") + var rootStr: String, // 0 + @SerializedName("rpid") + var rpid: Long, // 1405424731 + @SerializedName("rpid_str") + var rpidStr: String, // 1405424731 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String // https://www.bilibili.com/blackboard/foldingreply.html + ) + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Content( + @SerializedName("device") + var device: String, // pad + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 高速公路有盈利吗 + @SerializedName("plat") + var plat: Int // 3 + ) + + data class Reply( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 0 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 0 + @SerializedName("ctime") + var ctime: Int, // 1550677973 + @SerializedName("dialog") + var dialog: Long, // 1405471211 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 1 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 0 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 14674816 + @SerializedName("oid") + var oid: Long, // 44012857 + @SerializedName("parent") + var parent: Long, // 1405424731 + @SerializedName("parent_str") + var parentStr: String, // 1405424731 + @SerializedName("rcount") + var rcount: Int, // 0 + @SerializedName("replies") + var replies: List<JsonElement>, + @SerializedName("root") + var root: Long, // 1405424731 + @SerializedName("root_str") + var rootStr: String, // 1405424731 + @SerializedName("rpid") + var rpid: Long, // 1405471211 + @SerializedName("rpid_str") + var rpidStr: String, // 1405471211 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 有收费站[小电视_笑] + @SerializedName("plat") + var plat: Int // 2 + ) + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String + ) + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i0.hdslb.com/bfs/face/3cb6b6aeea49fa7fd49b198e4e536a8ce4ede4fe.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 14674816 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 保密 + @SerializedName("sign") + var sign: String, // 没错,就是我 + @SerializedName("uname") + var uname: String, // XIzkaZero + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 5 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1653408000000 + @SerializedName("vipStatus") + var vipStatus: Int, // 1 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 2 + ) + } + } + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i0.hdslb.com/bfs/face/275a86b1609f55ec2ea759e4a0ef03d9423961dd.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 14028833 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 男 + @SerializedName("sign") + var sign: String, // 时差党,海贼王,游戏狂,懒人。。。。 + @SerializedName("uname") + var uname: String, // 陆个钢镚儿 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 0 + @SerializedName("image") + var image: String, + @SerializedName("name") + var name: String, + @SerializedName("pid") + var pid: Int // 0 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 4 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 0 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 0 + ) + } + } + + data class Upper( + @SerializedName("mid") + var mid: Long // 11248627 + ) + + data class Config( + @SerializedName("show_up_flag") + var showUpFlag: Boolean, // true + @SerializedName("showadmin") + var showadmin: Int, // 1 + @SerializedName("showentry") + var showentry: Int, // 1 + @SerializedName("showfloor") + var showfloor: Int, // 1 + @SerializedName("showtopic") + var showtopic: Int // 1 + ) + + data class Cursor( + /** + * allCount 的数量为 所有根评论+所有子评论 + * 没有评论的视频的 allCount 为 null + */ + @SerializedName("all_count") + var allCount: Int?, // 904 + @SerializedName("is_begin") + var isBegin: Boolean, // true + @SerializedName("is_end") + var isEnd: Boolean, // false + @SerializedName("mode") + var mode: Int, // 1 + /** + * 如果 next 为 0 说明没有评论 + * next 为 1 说明已经翻到底 + */ + @SerializedName("next") + var next: Long, // 295 + @SerializedName("prev") + var prev: Int, // 314 + @SerializedName("support_mode") + var supportMode: List<Int> + ) + + data class Hot( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 256 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 3 + @SerializedName("ctime") + var ctime: Int, // 1550507590 + @SerializedName("dialog") + var dialog: Long, // 0 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 1 + @SerializedName("floor") + var floor: Int, // 4 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 124 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 7937795 + @SerializedName("oid") + var oid: Long, // 44012857 + @SerializedName("parent") + var parent: Long, // 0 + @SerializedName("parent_str") + var parentStr: String, // 0 + @SerializedName("rcount") + var rcount: Int, // 3 + @SerializedName("replies") + var replies: List<Reply>, + @SerializedName("root") + var root: Long, // 0 + @SerializedName("root_str") + var rootStr: String, // 0 + @SerializedName("rpid") + var rpid: Long, // 1400028639 + @SerializedName("rpid_str") + var rpidStr: String, // 1400028639 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String // https://www.bilibili.com/blackboard/foldingreply.html + ) + + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 最后一个笑出了声[蛆音娘_大笑] + @SerializedName("plat") + var plat: Int // 1 + ) + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i2.hdslb.com/bfs/face/bc5ee06d9df30057064e3450b572da6f793fbd2a.jpg + @SerializedName("fans_detail") + var fansDetail: FansDetail, + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 7937795 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 男 + @SerializedName("sign") + var sign: String, // 你是什么样的人,取决于你选择成为什么样的人。 + @SerializedName("uname") + var uname: String, // 会飞的果酱 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 1565150481 + @SerializedName("image") + var image: String, // http://i2.hdslb.com/bfs/face/5ac24fa22208f48126bfacb42901e932946f6aa3.png + @SerializedName("name") + var name: String, // 2019拜年祭·典藏 + @SerializedName("pid") + var pid: Int // 267 + ) + + 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 Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1570809600000 + @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("type") + var type: Int // -1 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 5 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + + data class FansDetail( + @SerializedName("intimacy") + var intimacy: Int, // 0 + @SerializedName("is_receive") + var isReceive: Int, // 1 + @SerializedName("level") + var level: Int, // 1 + @SerializedName("master_status") + var masterStatus: Int, // 1 + @SerializedName("medal_id") + var medalId: Int, // 143626 + @SerializedName("medal_name") + var medalName: String, // 名禄 + @SerializedName("score") + var score: Int, // 0 + @SerializedName("uid") + var uid: Long // 7937795 + ) + } + + data class UpAction( + @SerializedName("like") + var like: Boolean, // true + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Reply( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 0 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 0 + @SerializedName("ctime") + var ctime: Int, // 1550670930 + @SerializedName("dialog") + var dialog: Long, // 1405107877 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 3 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 0 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 27407505 + @SerializedName("oid") + var oid: Long, // 44012857 + @SerializedName("parent") + var parent: Long, // 1400028639 + @SerializedName("parent_str") + var parentStr: String, // 1400028639 + @SerializedName("rcount") + var rcount: Int, // 0 + @SerializedName("replies") + var replies: List<JsonElement>, + @SerializedName("root") + var root: Long, // 1400028639 + @SerializedName("root_str") + var rootStr: String, // 1400028639 + @SerializedName("rpid") + var rpid: Long, // 1405107877 + @SerializedName("rpid_str") + var rpidStr: String, // 1405107877 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i1.hdslb.com/bfs/face/84aacbd97393f61d84a03cc5500df17ff2f289bf.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 27407505 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 保密 + @SerializedName("sign") + var sign: String, // 欢迎加入小天使动漫交流群,群聊号码Q:953511423 + @SerializedName("uname") + var uname: String, // 小天使de日常 + @SerializedName("vip") + var vip: Vip + ) { + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1543420800000 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 1 + ) + + 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Pendant( + @SerializedName("expire") + var expire: Long, // 1551514981 + @SerializedName("image") + var image: String, // http://i0.hdslb.com/bfs/face/ec152705d82f96381f1150058d55e057396f0576.png + @SerializedName("name") + var name: String, // 2019拜年祭·纪念 + @SerializedName("pid") + var pid: Int // 266 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 5 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + } + + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 迷之自信╮( ̄▽ ̄)╭ + @SerializedName("plat") + var plat: Int // 2 + ) + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String + ) + } + } + + data class Top( + @SerializedName("admin") + var admin: JsonElement?, // null + @SerializedName("upper") + var upper: Upper?, + @SerializedName("vote") + var vote: JsonElement? // null + ) { + data class Upper( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 2 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 5 + @SerializedName("ctime") + var ctime: Int, // 1550553976 + @SerializedName("dialog") + var dialog: Long, // 0 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 82 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 129 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 11248627 + @SerializedName("oid") + var oid: Long, // 44012857 + @SerializedName("parent") + var parent: Long, // 0 + @SerializedName("parent_str") + var parentStr: String, // 0 + @SerializedName("rcount") + var rcount: Int, // 5 + @SerializedName("replies") + var replies: List<Reply>, + @SerializedName("root") + var root: Long, // 0 + @SerializedName("root_str") + var rootStr: String, // 0 + @SerializedName("rpid") + var rpid: Long, // 1401074923 + @SerializedName("rpid_str") + var rpidStr: String, // 1401074923 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String // https://www.bilibili.com/blackboard/foldingreply.html + ) + + data class Reply( + @SerializedName("action") + var action: Int, // 0 + @SerializedName("assist") + var assist: Int, // 0 + @SerializedName("attr") + var attr: Int, // 0 + @SerializedName("content") + var content: Content, + @SerializedName("count") + var count: Int, // 0 + @SerializedName("ctime") + var ctime: Int, // 1550572214 + @SerializedName("dialog") + var dialog: Long, // 1401606362 + @SerializedName("dialog_str") + var dialogStr: String, + @SerializedName("fansgrade") + var fansgrade: Int, // 0 + @SerializedName("floor") + var floor: Int, // 5 + @SerializedName("folder") + var folder: Folder, + @SerializedName("like") + var like: Int, // 0 + @SerializedName("member") + var member: Member, + @SerializedName("mid") + var mid: Long, // 85049857 + @SerializedName("oid") + var oid: Long, // 44012857 + @SerializedName("parent") + var parent: Long, // 1401606362 + @SerializedName("parent_str") + var parentStr: String, // 1401606362 + @SerializedName("rcount") + var rcount: Int, // 0 + @SerializedName("replies") + var replies: List<JsonElement>, + @SerializedName("root") + var root: Long, // 1401074923 + @SerializedName("root_str") + var rootStr: String, // 1401074923 + @SerializedName("rpid") + var rpid: Long, // 1401835347 + @SerializedName("rpid_str") + var rpidStr: String, // 1401835347 + @SerializedName("state") + var state: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("up_action") + var upAction: UpAction + ) { + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i0.hdslb.com/bfs/face/09b0ac305a942fc99391acd6164d3fbad9ee9dfb.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 85049857 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 男 + @SerializedName("sign") + var sign: String, // 车痴 + @SerializedName("uname") + var uname: String, // 没皮没脸的孩纸666 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 0 + @SerializedName("image") + var image: String, + @SerializedName("name") + var name: String, + @SerializedName("pid") + var pid: Int // 0 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 3 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 0 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 0 + ) + } + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<Member>, + @SerializedName("message") + var message: String, // 回复 @搞事的boy111 :tg现在换人了还在B站有合作 + @SerializedName("plat") + var plat: Int // 2 + ) { + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://static.hdslb.com/images/member/noface.gif + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 26318345 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 保密 + @SerializedName("sign") + var sign: String, + @SerializedName("uname") + var uname: String, // 搞事的boy111 + @SerializedName("vip") + var vip: Vip + ) { + data class Pendant( + @SerializedName("expire") + var expire: Long, // 0 + @SerializedName("image") + var image: String, + @SerializedName("name") + var name: String, + @SerializedName("pid") + var pid: Int // 0 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 4 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: 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 OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 0 + @SerializedName("vipStatus") + var vipStatus: Int, // 0 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 0 + ) + } + } + + data class Folder( + @SerializedName("has_folded") + var hasFolded: Boolean, // false + @SerializedName("is_folded") + var isFolded: Boolean, // false + @SerializedName("rule") + var rule: String + ) + } + + data class UpAction( + @SerializedName("like") + var like: Boolean, // false + @SerializedName("reply") + var reply: Boolean // false + ) + + data class Content( + @SerializedName("device") + var device: String, + @SerializedName("members") + var members: List<JsonElement>, + @SerializedName("message") + var message: String, // 点赞、投币和关注UP哦(〜 ̄△ ̄)〜这视频来自TGT最新的一集 + @SerializedName("plat") + var plat: Int // 1 + ) + + data class Member( + @SerializedName("DisplayRank") + var displayRank: String, // 0 + @SerializedName("avatar") + var avatar: String, // http://i0.hdslb.com/bfs/face/2232c221a7f60312c3d63f2b601e0b2c7d8fda51.jpg + @SerializedName("fans_detail") + var fansDetail: JsonElement?, // null + @SerializedName("following") + var following: Int, // 0 + @SerializedName("level_info") + var levelInfo: LevelInfo, + @SerializedName("mid") + var mid: String, // 11248627 + @SerializedName("nameplate") + var nameplate: Nameplate, + @SerializedName("official_verify") + var officialVerify: OfficialVerify, + @SerializedName("pendant") + var pendant: Pendant, + @SerializedName("rank") + var rank: String, // 10000 + @SerializedName("sex") + var sex: String, // 女 + @SerializedName("sign") + var sign: String, // 以古为镜,可以知兴替;以人为镜,可以明得失。对于祖国,勿吹捧入天,亦莫踩入地 ( ̄︶ ̄) + @SerializedName("uname") + var uname: String, // 阿煌看世界 + @SerializedName("vip") + var vip: Vip + ) { + data class Nameplate( + @SerializedName("condition") + var condition: String, // 所有自制视频总播放数>=50万 + @SerializedName("image") + var image: String, // http://i0.hdslb.com/bfs/face/3f2d64f048b39fb6c26f3db39df47e6080ec0f9c.png + @SerializedName("image_small") + var imageSmall: String, // http://i1.hdslb.com/bfs/face/90c35d41d8a19b19474d6bac672394c17b444ce8.png + @SerializedName("level") + var level: String, // 高级勋章 + @SerializedName("name") + var name: String, // 出道偶像 + @SerializedName("nid") + var nid: Int // 9 + ) + + data class OfficialVerify( + @SerializedName("desc") + var desc: String, + @SerializedName("type") + var type: Int // -1 + ) + + data class LevelInfo( + @SerializedName("current_exp") + var currentExp: Int, // 0 + @SerializedName("current_level") + var currentLevel: Int, // 5 + @SerializedName("current_min") + var currentMin: Int, // 0 + @SerializedName("next_exp") + var nextExp: Int // 0 + ) + + data class Pendant( + @SerializedName("expire") + var expire: Long, // 1570032000 + @SerializedName("image") + var image: String, // http://i1.hdslb.com/bfs/face/14738b92760b90675d4bf35dd059b0a666113bae.png + @SerializedName("name") + var name: String, // 春原庄的管理人小姐 + @SerializedName("pid") + var pid: Int // 190 + ) + + data class Vip( + @SerializedName("accessStatus") + var accessStatus: Int, // 0 + @SerializedName("dueRemark") + var dueRemark: String, + @SerializedName("vipDueDate") + var vipDueDate: Long, // 1570032000000 + @SerializedName("vipStatus") + var vipStatus: Int, // 1 + @SerializedName("vipStatusWarn") + var vipStatusWarn: String, + @SerializedName("vipType") + var vipType: Int // 2 + ) + } + } + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/Season.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/Season.kt new file mode 100644 index 0000000..e94dca1 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/Season.kt @@ -0,0 +1,283 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +data class Season( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String, // success + @SerializedName("result") + var result: Result +) { + data class Result( + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/bangumi/a92892921f3209f7784a954c37467c9869a1d4c1.png + @SerializedName("episodes") + var episodes: List<Episode>, + @SerializedName("evaluate") + var evaluate: String, // 位于东京西部的巨大“学园都市”,实施着超能力开发的特殊课程。学生们的能力被给予从“无能力Level 0”到“超能力Level 5”的六阶段评价。高中生上条当麻,由于寄宿在右手中的力量——只要是异能之力... + @SerializedName("link") + var link: String, // http://www.bilibili.com/bangumi/media/md134912/ + @SerializedName("media_id") + var mimediaId: Long, // 134912 + @SerializedName("mode") + var mode: Int, // 2 + @SerializedName("new_ep") + var newEp: NewEp, + @SerializedName("paster") + var paster: Paster, + @SerializedName("payment") + var payment: Payment, + @SerializedName("publish") + var publish: Publish, + @SerializedName("rating") + var rating: Rating, + @SerializedName("record") + var record: String, + @SerializedName("rights") + var rights: Rights, + @SerializedName("season_id") + var seasonId: Long, // 25617 + @SerializedName("season_title") + var seasonTitle: String, // 魔法禁书目录 第三季 + @SerializedName("seasons") + var seasons: List<Season>, + @SerializedName("section") + var section: List<JsonElement>, + @SerializedName("series") + var series: Series, + @SerializedName("share_url") + var shareUrl: String, // http://m.bilibili.com/bangumi/play/ss25617 + @SerializedName("square_cover") + var squareCover: String, // http://i0.hdslb.com/bfs/bangumi/91b29251445f9b808e9c30f34019d3ba4f128d6d.jpg + @SerializedName("stat") + var stat: Stat, + @SerializedName("status") + var status: Int, // 13 + @SerializedName("title") + var title: String, // 魔法禁书目录 第三季 + @SerializedName("total") + var total: Int, // 0 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("user_status") + var userStatus: UserStatus + ) { + data class Series( + @SerializedName("series_id") + var seriesId: Int, // 621 + @SerializedName("series_title") + var seriesTitle: String // 魔法禁书目录 + ) + + data class UserStatus( + @SerializedName("follow") + var follow: Int, // 1 + @SerializedName("pay") + var pay: Int, // 0 + @SerializedName("progress") + var progress: Progress, + @SerializedName("review") + var review: Review, + @SerializedName("sponsor") + var sponsor: Int, // 0 + @SerializedName("vip") + var vip: Int, // 0 + @SerializedName("vip_frozen") + var vipFrozen: Int // 0 + ) { + data class Progress( + @SerializedName("last_ep_id") + var lastEpId: Int, // 250436 + @SerializedName("last_ep_index") + var lastEpIndex: String, // 3 + @SerializedName("last_time") + var lastTime: Int // 1405 + ) + + data class Review( + @SerializedName("is_open") + var isOpen: Int // 0 + ) + } + + data class Season( + @SerializedName("is_new") + var isNew: Int, // 1 + @SerializedName("season_id") + var seasonId: Long, // 25617 + @SerializedName("season_title") + var seasonTitle: String // 第三季 + ) + + data class Episode( + @SerializedName("aid") + var aid: Int, // 44389470 + @SerializedName("badge") + var badge: String, // 会员 + @SerializedName("badge_type") + var badgeType: Int, // 0 + @SerializedName("cid") + var cid: Int, // 77725026 + @SerializedName("cover") + var cover: String, // http://i0.hdslb.com/bfs/archive/c83ef2a961d8b53d6a30f03e8fb631ea4248fede.jpg + @SerializedName("dimension") + var dimension: Dimension, + @SerializedName("from") + var from: String, // bangumi + @SerializedName("id") + var id: Int, // 250453 + @SerializedName("long_title") + var longTitle: String, // 守护的理由 + @SerializedName("share_url") + var shareUrl: String, // https://m.bilibili.com/bangumi/play/ep250453 + @SerializedName("status") + var status: Int, // 13 + @SerializedName("title") + var title: String, // 20 + @SerializedName("vid") + var vid: String + ) { + data class Dimension( + @SerializedName("height") + var height: Int, // 1080 + @SerializedName("rotate") + var rotate: Int, // 0 + @SerializedName("width") + var width: Int // 1920 + ) + } + + data class Rating( + @SerializedName("count") + var count: Int, // 32318 + @SerializedName("score") + var score: Double // 7.8 + ) + + data class Rights( + @SerializedName("allow_bp") + var allowBp: Int, // 0 + @SerializedName("allow_download") + var allowDownload: Int, // 0 + @SerializedName("allow_review") + var allowReview: Int, // 1 + @SerializedName("area_limit") + var areaLimit: Int, // 0 + @SerializedName("ban_area_show") + var banAreaShow: Int, // 1 + @SerializedName("copyright") + var copyright: String, // bilibili + @SerializedName("is_preview") + var isPreview: Int, // 1 + @SerializedName("watch_platform") + var watchPlatform: Int // 0 + ) + + data class NewEp( + @SerializedName("desc") + var desc: String, // 连载中, 每周五22:30更新 + @SerializedName("id") + var id: Int, // 250453 + @SerializedName("is_new") + var isNew: Int, // 1 + @SerializedName("title") + var title: String // 20 + ) + + data class Payment( + @SerializedName("dialog") + var dialog: Dialog, + @SerializedName("pay_tip") + var payTip: PayTip, + @SerializedName("pay_type") + var payType: PayType, + @SerializedName("price") + var price: String, // 0.0 + @SerializedName("vip_promotion") + var vipPromotion: String + ) { + data class Dialog( + @SerializedName("btn_right") + var btnRight: BtnRight, + @SerializedName("desc") + var desc: String, + @SerializedName("title") + var title: String // 开通大会员抢先看 + ) { + data class BtnRight( + @SerializedName("title") + var title: String, // 成为大会员 + @SerializedName("type") + var type: String // vip + ) + } + + data class PayType( + @SerializedName("allow_ticket") + var allowTicket: Int // 0 + ) + + data class PayTip( + @SerializedName("primary") + var primary: Primary + ) { + data class Primary( + @SerializedName("sub_title") + var subTitle: String, + @SerializedName("title") + var title: String, // 开通大会员抢先看 + @SerializedName("type") + var type: Int, // 1 + @SerializedName("url") + var url: String + ) + } + } + + data class Stat( + @SerializedName("coins") + var coins: Long, // 333230 + @SerializedName("danmakus") + var danmakus: Int, // 729836 + @SerializedName("favorites") + var favorites: Int, // 2300833 + @SerializedName("reply") + var reply: Int, // 324057 + @SerializedName("share") + var share: Int, // 18362 + @SerializedName("views") + var views: Int // 41392306 + ) + + data class Publish( + @SerializedName("is_finish") + var isFinish: Int, // 0 + @SerializedName("is_started") + var isStarted: Int, // 1 + @SerializedName("pub_time") + var pubTime: String, // 2018-10-05 22:30:00 + @SerializedName("pub_time_show") + var pubTimeShow: String, // 10月05日22:30 + @SerializedName("weekday") + var weekday: Int // 0 + ) + + data class Paster( + @SerializedName("aid") + var aid: Long, // 0 + @SerializedName("allow_jump") + var allowJump: Int, // 0 + @SerializedName("cid") + var cid: Long, // 0 + @SerializedName("duration") + var duration: Int, // 0 + @SerializedName("type") + var type: Int, // 0 + @SerializedName("url") + var url: String + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/SendDanmakuResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/SendDanmakuResponse.kt new file mode 100644 index 0000000..d833fd2 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/SendDanmakuResponse.kt @@ -0,0 +1,20 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.annotations.SerializedName + +data class SendDanmakuResponse( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // 0 + @SerializedName("ttl") + var ttl: Int // 1 +) { + @Suppress("SpellCheckingInspection") + data class Data( + @SerializedName("dmid") + var dmid: Long // 12699467350278148 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/main/model/SendReplyResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/main/model/SendReplyResponse.kt new file mode 100644 index 0000000..2bd4e07 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/main/model/SendReplyResponse.kt @@ -0,0 +1,33 @@ +package com.hiczp.bilibili.api.main.model + +import com.google.gson.annotations.SerializedName + +data class SendReplyResponse( + @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("dialog") + var dialog: Long, // 0 + @SerializedName("dialog_str") + var dialogStr: String, // 0 + @SerializedName("parent") + var parent: Long, // 0 + @SerializedName("parent_str") + var parentStr: String, // 0 + @SerializedName("root") + var root: Long, // 0 + @SerializedName("root_str") + var rootStr: String, // 0 + @SerializedName("rpid") + var rpid: Long, // 1422858564 + @SerializedName("rpid_str") + var rpidStr: String // 1422858564 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/member/MemberAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/member/MemberAPI.kt new file mode 100644 index 0000000..2234bd1 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/member/MemberAPI.kt @@ -0,0 +1,18 @@ +package com.hiczp.bilibili.api.member + +import com.hiczp.bilibili.api.member.model.Pre +import kotlinx.coroutines.Deferred +import retrofit2.http.GET + +/** + * 创作中心 + */ +@Suppress("DeferredIsResult") +interface MemberAPI { + /** + * 刚登陆时会访问该 API, 使用返回的 url 来创建一个指向一系列 H5 页面的 ListView + * 侧拉抽屉 -> 创作中心 -> 更多功能 + */ + @GET("/x/app/pre") + fun pre(): Deferred<Pre> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/member/model/Pre.kt b/src/main/kotlin/com/hiczp/bilibili/api/member/model/Pre.kt new file mode 100644 index 0000000..4e94908 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/member/model/Pre.kt @@ -0,0 +1,78 @@ +package com.hiczp.bilibili.api.member.model + +import com.google.gson.annotations.SerializedName + +data class Pre( + @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("academy") + var academy: Academy, + @SerializedName("act") + var act: Act, + @SerializedName("creative") + var creative: Creative, + @SerializedName("entrance") + var entrance: Entrance + ) { + data class Entrance( + @SerializedName("guidance") + var guidance: String, // 投稿 + @SerializedName("show") + var show: Int // 1 + ) + + data class Creative( + @SerializedName("portal_list") + var portalList: List<Portal>, + @SerializedName("show") + var show: Int // 1 + ) { + data class Portal( + @SerializedName("icon") + var icon: String, // http://i0.hdslb.com/bfs/archive/31f485451e415bbbc59407f1fddce8f317db6287.png + @SerializedName("id") + var id: Int, // 0 + @SerializedName("more") + var more: Int, // 0 + @SerializedName("mtime") + var mtime: Int, // 1547466050 + @SerializedName("new") + var new: Int, // 1 + @SerializedName("position") + var position: Int, // 8 + @SerializedName("subtitle") + var subtitle: String, + @SerializedName("title") + var title: String, // 更多功能 + @SerializedName("url") + var url: String // activity://uper/user_center/more_portal + ) + } + + data class Act( + @SerializedName("show") + var show: Int, // 1 + @SerializedName("title") + var title: String, // 热门活动 + @SerializedName("url") + var url: String // https://www.bilibili.com/blackboard/x/activity-tougao-h5/all + ) + + data class Academy( + @SerializedName("show") + var show: Int, // 0 + @SerializedName("title") + var title: String, + @SerializedName("url") + var url: String + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/message/MessageAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/message/MessageAPI.kt new file mode 100644 index 0000000..6f6ab83 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/message/MessageAPI.kt @@ -0,0 +1,26 @@ +package com.hiczp.bilibili.api.message + +import com.hiczp.bilibili.api.message.model.NotifyCount +import com.hiczp.bilibili.api.message.model.UplmList +import kotlinx.coroutines.Deferred +import retrofit2.http.GET + +/** + * 消息推送有关的接口 + */ +@Suppress("DeferredIsResult") +interface MessageAPI { + /** + * 获取消息数量 + * 首页 -> 右上角 talk 图标 + */ + @GET("/api/notify/query.notify.count.do") + fun queryNotifyCount(): Deferred<NotifyCount> + + /** + * 荣誉周报 + */ + @Suppress("SpellCheckingInspection") + @GET("/api/notify/get.uplm.list.do") + fun getUplmList(): Deferred<UplmList> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/message/model/NotifyCount.kt b/src/main/kotlin/com/hiczp/bilibili/api/message/model/NotifyCount.kt new file mode 100644 index 0000000..cafcd65 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/message/model/NotifyCount.kt @@ -0,0 +1,38 @@ +package com.hiczp.bilibili.api.message.model + +import com.google.gson.annotations.SerializedName + +data class NotifyCount( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, + @SerializedName("msg") + var msg: String +) { + data class Data( + @SerializedName("_gt_") + var gt: Int, // 0 + /** + * \@我 + */ + @SerializedName("at_me") + var atMe: Int, // 0 + @SerializedName("notify_me") + var notifyMe: Int, // 9 + /** + * 收到的赞 + */ + @SerializedName("praise_me") + var praiseMe: Int, // 0 + /** + * 回复我的 + */ + @SerializedName("reply_me") + var replyMe: Int, // 0 + @SerializedName("up") + var up: Int // 0 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/message/model/UplmList.kt b/src/main/kotlin/com/hiczp/bilibili/api/message/model/UplmList.kt new file mode 100644 index 0000000..59a0675 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/message/model/UplmList.kt @@ -0,0 +1,27 @@ +package com.hiczp.bilibili.api.message.model + +import com.google.gson.annotations.SerializedName + +data class UplmList( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, + @SerializedName("msg") + var msg: String +) { + data class Data( + @SerializedName("_gt_") + var gt: Int, // 0 + @SerializedName("id") + var id: Int, // 2429173 + @SerializedName("time") + var time: String, // 2018-11-25 19:29:22 + @SerializedName("title") + var title: String, // 叮!你有一份荣誉周报待查收! + @SerializedName("unread") + var unread: Int // 0 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/passport/PassportAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/passport/PassportAPI.kt new file mode 100644 index 0000000..cebaffc --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/passport/PassportAPI.kt @@ -0,0 +1,78 @@ +package com.hiczp.bilibili.api.passport + +import com.hiczp.bilibili.api.passport.model.GetKeyResponse +import com.hiczp.bilibili.api.passport.model.LoginResponse +import com.hiczp.bilibili.api.passport.model.OAuth2Info +import com.hiczp.bilibili.api.retrofit.CommonResponse +import kotlinx.coroutines.Deferred +import retrofit2.http.* +import java.util.* + +/** + * 用户鉴权相关的接口 + */ +@Suppress("DeferredIsResult") +interface PassportAPI { + @POST("/api/oauth2/getKey") + fun getKey(): Deferred<GetKeyResponse> + + /** + * 多次错误的登陆尝试后, 服务器将返回 {"ts":1550569982,"code":-105,"data":{"url":"https://passport.bilibili.com/register/verification.html?success=1>=b6e5b7fad7ecd37f465838689732e788&challenge=9a67afa4d42ede71a93aeaaa54a4b6fe&ct=1&hash=105af2e7cc6ea829c4a95205f2371dc5"},"message":"验证码错误!"} + */ + @Suppress("SpellCheckingInspection") + @POST("/api/v3/oauth2/login") + @FormUrlEncoded + fun login( + @Field("username") username: String, @Field("password") password: String, + //以下为极验所需字段 + @Field("challenge") challenge: String? = null, + @Field("seccode") secCode: String? = null, + @Field("validate") validate: String? = null + ): Deferred<LoginResponse> + + /** + * 除了 accessToken, 其他全部都是 cookie 的值 + */ + @Suppress("SpellCheckingInspection") + @POST("/api/v2/oauth2/revoke") + @FormUrlEncoded + fun revoke( + @Field("DedeUserID") dedeUserId: String? = null, + @Field("DedeUserID__ckMd5") ckMd5: String? = null, + @Field("SESSDATA") sessData: String? = null, + @Field("access_token") accessToken: String, + @Field("bili_jct") biliJct: String? = null, + @Field("sid") sid: String? = null + ): Deferred<CommonResponse> + + /** + * 将所有 cookie 以 Map 形式传入 + */ + @POST("/api/v2/oauth2/revoke") + @FormUrlEncoded + fun revoke( + @FieldMap cookieMap: Map<String, String> = Collections.emptyMap(), + @Field("access_token") accessToken: String + ): Deferred<CommonResponse> + + /** + * 获取 OAuth2 信息 + * 如果未登录会返回 {"message":"user not login","ts":1552319204,"code":-101} + */ + @Suppress("SpellCheckingInspection") + @GET("/api/v2/oauth2/info") + fun info( + @Query("DedeUserID") dedeUserId: String? = null, + @Query("DedeUserID__ckMd5") ckMd5: String? = null, + @Query("SESSDATA") sessData: String? = null, + @Query("access_token") accessToken: String, + @Query("bili_jct") biliJct: String? = null, + @Query("sid") sid: String? = null + ): Deferred<OAuth2Info> + + @GET("/api/v2/oauth2/info") + fun info( + @QueryMap cookieMap: Map<String, String> = Collections.emptyMap(), + @Query("access_token") accessToken: String + ): Deferred<OAuth2Info> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/passport/model/GetKeyResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/passport/model/GetKeyResponse.kt new file mode 100644 index 0000000..e5cc97a --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/passport/model/GetKeyResponse.kt @@ -0,0 +1,21 @@ +package com.hiczp.bilibili.api.passport.model + +import com.google.gson.annotations.SerializedName + +data class GetKeyResponse( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String?, + @SerializedName("data") + var `data`: Data, + @SerializedName("ts") + var ts: Long // 1550219688 +) { + data class Data( + @SerializedName("hash") + var hash: String, // 93ac6f60b4789952 + @SerializedName("key") + var key: String // -----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdScM09sZJqFPX7bvmB2y6i08JbHsa0v4THafPbJN9NoaZ9Djz1LmeLkVlmWx1DwgHVW+K7LVWT5FV3johacVRuV9837+RNntEK6SE82MPcl7fA++dmW2cLlAjsIIkrX+aIvvSGCuUfcWpWFy3YVDqhuHrNDjdNcaefJIQHMW+sQIDAQAB-----END PUBLIC KEY----- + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/passport/model/LoginResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/passport/model/LoginResponse.kt new file mode 100644 index 0000000..4a807de --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/passport/model/LoginResponse.kt @@ -0,0 +1,59 @@ +package com.hiczp.bilibili.api.passport.model + +import com.google.gson.annotations.SerializedName +import java.io.Serializable + +data class LoginResponse( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("message") + var message: String?, + @SerializedName("data") + var `data`: Data, + @SerializedName("ts") + var ts: Long // 1550219689 +) : Serializable { + data class Data( + @SerializedName("cookie_info") + var cookieInfo: CookieInfo, + @SerializedName("sso") + var sso: List<String>, + @SerializedName("status") + var status: Int, // 0 + @SerializedName("token_info") + var tokenInfo: TokenInfo + ) : Serializable { + data class CookieInfo( + @SerializedName("cookies") + var cookies: List<Cookie>, + @SerializedName("domains") + var domains: List<String> + ) : Serializable { + data class Cookie( + @SerializedName("expires") + var expires: Long, // 1552811689 + @SerializedName("http_only") + var httpOnly: Int, // 1 + @SerializedName("name") + var name: String, // SESSDATA + @SerializedName("value") + var value: String // 5ff9ba24%2C1552811689%2C04ae9421 + ) : Serializable + } + + data class TokenInfo( + @SerializedName("access_token") + var accessToken: String, // fd0303ff75a6ec6b452c28f4d8621021 + @SerializedName("expires_in") + var expiresIn: Long, // 2592000 + @SerializedName("mid") + var mid: Long, // 20293030 + @SerializedName("refresh_token") + var refreshToken: String // 6a333ebded3c3dbdde65d136b3190d21 + ) : Serializable + } + + //快捷方式 + val userId get() = data.tokenInfo.mid + val token get() = data.tokenInfo.accessToken +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/passport/model/OAuth2Info.kt b/src/main/kotlin/com/hiczp/bilibili/api/passport/model/OAuth2Info.kt new file mode 100644 index 0000000..8a26a04 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/passport/model/OAuth2Info.kt @@ -0,0 +1,21 @@ +package com.hiczp.bilibili.api.passport.model + +import com.google.gson.annotations.SerializedName + +data class OAuth2Info( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("ts") + var ts: Long // 1551865482 +) { + data class Data( + @SerializedName("access_token") + var accessToken: String, // 813b20ea7f229795eba7bd31608e3621 + @SerializedName("expires_in") + var expiresIn: Long, // 1797151 + @SerializedName("mid") + var mid: Long // 20293030 + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/player/PlayerAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/player/PlayerAPI.kt new file mode 100644 index 0000000..7fab9c2 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/player/PlayerAPI.kt @@ -0,0 +1,69 @@ +package com.hiczp.bilibili.api.player + +import com.hiczp.bilibili.api.md5 +import com.hiczp.bilibili.api.player.model.BangumiPlayUrl +import com.hiczp.bilibili.api.player.model.VideoPlayUrl +import kotlinx.coroutines.Deferred +import retrofit2.http.GET +import retrofit2.http.Query +import java.lang.management.ManagementFactory + +/** + * 这里是播放器会访问的 API + * 返回内容中会有多个视频下载地址, 他们代表不同的视频质量(音频同理) + * 音频和视频是分开的 + * 下载视频得到的是一个 m4s 文件, 但是实际上是完整的视频(例如整个番剧而非片段) + * 下载音频得到的也是一个 m4s 文件, 也是完整的 + * 将视频和音频合在一起, 就可以播放了 + */ +@Suppress("DeferredIsResult", "SpellCheckingInspection") +interface PlayerAPI { + /** + * 获得视频的播放地址 + * 这个 API 需要使用特别的 appKey + * + * @param cid 在获取视频详情页面的接口的返回值里 + * @param aid 视频的唯一标识 + * + * @see com.hiczp.bilibili.api.app.AppAPI.view + */ + @GET(videoPlayUrl) + fun videoPlayUrl( + @Query("force_host") forceHost: Int = 0, + @Query("fnval") fnVal: Int = 16, + @Query("qn") qn: Int = 32, + @Query("npcybs") npcybs: Int = 0, + @Query("cid") cid: Long, + @Query("fnver") fnVer: Int = 0, + @Query("aid") aid: Long + ): Deferred<VideoPlayUrl> + + /** + * 获得番剧的播放地址 + * + * @param aid 番剧的唯一标识 + * @param cid 在番剧详情页的返回值里 + * @param seasonType 分季类型, 不明确, 似乎总为 1 + * @param session 其值为 系统已运行时间(ms)的MD5值, 此处的默认值为 JVM 已启动时间, 在 Android 上请使用 SystemClock + * @param trackPath 不明确 + * + * @see com.hiczp.bilibili.api.main.MainAPI.season + */ + @GET("https://api.bilibili.com/pgc/player/api/playurl") + fun bangumiPlayUrl( + @Query("aid") aid: Long, + @Query("cid") cid: Long, + @Query("fnval") fnVal: Int = 16, + @Query("fnver") fnVer: Int = 0, + @Query("module") module: String = "bangumi", + @Query("npcybs") npcybs: Int = 0, + @Query("qn") qn: Int = 32, + @Query("season_type") seasonType: Int = 1, + @Query("session") session: String = (System.currentTimeMillis() - ManagementFactory.getRuntimeMXBean().startTime).toString().md5(), + @Query("track_path") trackPath: Int? = null + ): Deferred<BangumiPlayUrl> + + companion object { + const val videoPlayUrl = "https://app.bilibili.com/x/playurl" + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/player/PlayerInterceptor.kt b/src/main/kotlin/com/hiczp/bilibili/api/player/PlayerInterceptor.kt new file mode 100644 index 0000000..fdd3eff --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/player/PlayerInterceptor.kt @@ -0,0 +1,84 @@ +package com.hiczp.bilibili.api.player + +import com.hiczp.bilibili.api.BilibiliClientProperties +import com.hiczp.bilibili.api.calculateSign +import com.hiczp.bilibili.api.passport.model.LoginResponse +import com.hiczp.bilibili.api.retrofit.Charsets.UTF_8 +import com.hiczp.bilibili.api.retrofit.Header +import com.hiczp.bilibili.api.retrofit.Param +import okhttp3.Interceptor +import okhttp3.Response +import java.net.URLEncoder +import java.time.Instant + +/** + * PlayerAPI 专用的拦截器 + * + * @see PlayerAPI + */ +class PlayerInterceptor( + private val bilibiliClientProperties: BilibiliClientProperties, + private val loginResponseExpression: () -> LoginResponse? +) : Interceptor { + @Suppress("SpellCheckingInspection") + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + + //添加 header + val header = request.headers().newBuilder().apply { + add(Header.ACCEPT, "*/*") + add(Header.USER_AGENT, "Bilibili Freedoooooom/MarkII") + add(Header.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.8") + }.build() + + //添加 Query Params + val oldUrl = request.url() + //如果是视频播放地址这个 API, 要用特殊的 appKey + val isVideo = oldUrl.toString().startsWith(PlayerAPI.videoPlayUrl) + val url = StringBuilder(oldUrl.encodedQuery() ?: "").apply { + //appKey + addParamEncode(Param.APP_KEY, if (isVideo) bilibiliClientProperties.videoAppKey else bilibiliClientProperties.appKey) + //凭证有关 + val loginRespons = loginResponseExpression() + if (loginRespons != null) { + //expire 的值为 token过期时间+2s + addParamEncode(Param.EXPIRE, (loginRespons.ts + loginRespons.data.tokenInfo.expiresIn + 2).toString()) + addParamEncode(Param.ACCESS_KEY, loginRespons.token) + addParamEncode(Param.MID, loginRespons.userId.toString()) + } else { + addParamEncode(Param.EXPIRE, "0") + addParamEncode(Param.MID, "0") + } + //公共参数 + addParamEncode(Param.DEVICE, bilibiliClientProperties.platform) + addParamEncode(Param.MOBILE_APP, bilibiliClientProperties.platform) + addParamEncode(Param.PLATFORM, bilibiliClientProperties.platform) + addParamEncode("otype", "json") + addParamEncode(Param.TIMESTAMP, Instant.now().epochSecond.toString()) + addParamEncode(Param.BUILD, bilibiliClientProperties.build) + addParamEncode(Param.BUILD_VERSION_ID, bilibiliClientProperties.buildVersionId) + }.toString().let { + //排序 + val sortedEncodedQuery = it.split('&').sorted().joinToString(separator = "&") + //添加 sign + val sign = calculateSign(sortedEncodedQuery, if (isVideo) bilibiliClientProperties.videoAppSecret else bilibiliClientProperties.appSecret) + "$sortedEncodedQuery&${Param.SIGN}=$sign" + }.let { + oldUrl.newBuilder().encodedQuery(it).build() + } + + return chain.proceed( + request.newBuilder() + .headers(header) + .url(url) + .build() + ) + } +} + +private fun StringBuilder.addParamEncode(name: String, value: String) { + if (length != 0) append('&') + append(name) + append('=') + append(URLEncoder.encode(value, UTF_8)) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/player/model/BangumiPlayUrl.kt b/src/main/kotlin/com/hiczp/bilibili/api/player/model/BangumiPlayUrl.kt new file mode 100644 index 0000000..3094d94 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/player/model/BangumiPlayUrl.kt @@ -0,0 +1,89 @@ +package com.hiczp.bilibili.api.player.model + +import com.google.gson.annotations.SerializedName + +data class BangumiPlayUrl( + @SerializedName("accept_description") + var acceptDescription: List<String>, + @SerializedName("accept_format") + var acceptFormat: String, // hdflv2,flv,flv720,flv480,mp4 + @SerializedName("accept_quality") + var acceptQuality: List<Int>, + @SerializedName("bp") + var bp: Int, // 0 + @SerializedName("code") + var code: Int, // 0 + @SerializedName("dash") + var dash: Dash, + @SerializedName("fnval") + var fnval: Int, // 16 + @SerializedName("fnver") + var fnver: Int, // 0 + @SerializedName("format") + var format: String, // flv480 + @SerializedName("from") + var from: String, // local + @SerializedName("has_paid") + var hasPaid: Boolean, // false + @SerializedName("is_preview") + var isPreview: Int, // 0 + @SerializedName("quality") + var quality: Int, // 32 + @SerializedName("result") + var result: String, // suee + @SerializedName("seek_param") + var seekParam: String, // start + @SerializedName("seek_type") + var seekType: String, // offset + @SerializedName("status") + var status: Int, // 2 + @SerializedName("timelength") + var timelength: Long, // 1420201 + @SerializedName("video_codecid") + var videoCodecid: Int, // 7 + @SerializedName("video_project") + var videoProject: Boolean, // true + @SerializedName("vip_status") + var vipStatus: Int, // 0 + @SerializedName("vip_type") + var vipType: Int // 0 +) { + data class Dash( + @SerializedName("audio") + var audio: List<Audio>, + @SerializedName("video") + var video: List<Video> + ) { + data class Video( + @SerializedName("backupUrl") + var backupUrl: List<String>, + @SerializedName("backup_url") + var backup_url: List<String>, + @SerializedName("bandwidth") + var bandwidth: Int, // 379067 + @SerializedName("baseUrl") + var baseUrl: String, // http://60.12.119.70/upgcxcode/28/12/74921228/74921228-1-30016.m4s?expires=1550754300&platform=android&ssig=rJUT9lWneFYshCT4p_3YuA&oi=1699214834&trid=83334c4981ed460ea2444f6aab79d1b6&nfb=maPYqpoel5MI3qOUX6YpRA==&nfc=1 + @SerializedName("base_url") + var base_url: String, // http://60.12.119.70/upgcxcode/28/12/74921228/74921228-1-30016.m4s?expires=1550754300&platform=android&ssig=rJUT9lWneFYshCT4p_3YuA&oi=1699214834&trid=83334c4981ed460ea2444f6aab79d1b6&nfb=maPYqpoel5MI3qOUX6YpRA==&nfc=1 + @SerializedName("codecid") + var codecid: Int, // 7 + @SerializedName("id") + var id: Int // 16 + ) + + data class Audio( + @SerializedName("backupUrl") + var backupUrl: List<String>, + @SerializedName("backup_url") + var backup_url: List<String>, + @SerializedName("bandwidth") + var bandwidth: Int, // 193680 + @SerializedName("baseUrl") + var baseUrl: String, // http://60.12.119.68/upgcxcode/28/12/74921228/74921228-1-30280.m4s?expires=1550754300&platform=android&ssig=1-JiBSZvopajZNgVZ3HRdA&oi=1699214834&trid=83334c4981ed460ea2444f6aab79d1b6&nfb=maPYqpoel5MI3qOUX6YpRA==&nfc=1 + @SerializedName("base_url") + var base_url: String, // http://60.12.119.68/upgcxcode/28/12/74921228/74921228-1-30280.m4s?expires=1550754300&platform=android&ssig=1-JiBSZvopajZNgVZ3HRdA&oi=1699214834&trid=83334c4981ed460ea2444f6aab79d1b6&nfb=maPYqpoel5MI3qOUX6YpRA==&nfc=1 + @SerializedName("id") + var id: Int // 30280 + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/player/model/VideoPlayUrl.kt b/src/main/kotlin/com/hiczp/bilibili/api/player/model/VideoPlayUrl.kt new file mode 100644 index 0000000..2795009 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/player/model/VideoPlayUrl.kt @@ -0,0 +1,80 @@ +package com.hiczp.bilibili.api.player.model + +import com.google.gson.annotations.SerializedName + +data class VideoPlayUrl( + @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("accept_description") + var acceptDescription: List<String>, + @SerializedName("accept_format") + var acceptFormat: String, // flv_p60,flv720_p60,flv,flv720,flv480,flv360 + @SerializedName("accept_quality") + var acceptQuality: List<Int>, + @SerializedName("dash") + var dash: Dash, + @SerializedName("fnval") + var fnval: Int, // 16 + @SerializedName("fnver") + var fnver: Int, // 0 + @SerializedName("format") + var format: String, // flv480 + @SerializedName("from") + var from: String, // local + @SerializedName("quality") + var quality: Int, // 32 + @SerializedName("result") + var result: String, // suee + @SerializedName("seek_param") + var seekParam: String, // start + @SerializedName("seek_type") + var seekType: String, // offset + @SerializedName("timelength") + var timelength: Long, // 196367 + @SerializedName("video_codecid") + var videoCodecid: Int, // 7 + @SerializedName("video_project") + var videoProject: Boolean // true + ) { + data class Dash( + @SerializedName("audio") + var audio: List<Audio>, + @SerializedName("video") + var video: List<Video> + ) { + data class Audio( + @SerializedName("backup_url") + var backupUrl: List<String>, + @SerializedName("bandwidth") + var bandwidth: Int, // 191246 + @SerializedName("base_url") + var baseUrl: String, // http://101.75.242.10/upgcxcode/41/36/72913641/72913641-1-30280.m4s?expires=1550754000&platform=android&ssig=2eirz02lIhKUw--w26lpqQ&oi=1699214834&trid=e0d3ad6245d8432887eb12b71f29bb3e&nfb=maPYqpoel5MI3qOUX6YpRA==&nfc=1 + @SerializedName("codecid") + var codecid: Int, // 0 + @SerializedName("id") + var id: Int // 30280 + ) + + data class Video( + @SerializedName("backup_url") + var backupUrl: List<String>, + @SerializedName("bandwidth") + var bandwidth: Int, // 288340 + @SerializedName("base_url") + var baseUrl: String, // http://60.12.119.68/upgcxcode/41/36/72913641/72913641-1-30011.m4s?expires=1550754000&platform=android&ssig=Ven-c2XaxfkQIoMkzuq7MQ&oi=1699214834&trid=e0d3ad6245d8432887eb12b71f29bb3e&nfb=maPYqpoel5MI3qOUX6YpRA==&nfc=1 + @SerializedName("codecid") + var codecid: Int, // 12 + @SerializedName("id") + var id: Int // 16 + ) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/CommonResponse.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/CommonResponse.kt new file mode 100644 index 0000000..417adeb --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/CommonResponse.kt @@ -0,0 +1,36 @@ +package com.hiczp.bilibili.api.retrofit + +import com.google.gson.JsonElement +import com.google.gson.annotations.SerializedName + +/** + * 通用实体, 可表示无 data 的响应 或 错误响应 + * code 为 0 表示正常响应, 此时 message 为 null + * code 不为 0 表示错误响应, 此时 data 可能是各种类型 + * 一些 API 同时有 msg 和 message + */ +data class CommonResponse( + @SerializedName("code") + var code: Int, // 0 + + @SerializedName("msg") + var msg: String?, + + @SerializedName("message") + var message: String?, + + @SerializedName("ts") + var timestamp: Long, // 1550546539 + + /** + * data 可能是各种类型, 例如 array, object, string + */ + @SerializedName("data") + var data: JsonElement?, + + /** + * ttl, 不明确含义, 如果存在则值总为 1 + */ + @SerializedName("ttl") + var ttl: Int? +) diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/HttpConstant.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/HttpConstant.kt new file mode 100644 index 0000000..1b66957 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/HttpConstant.kt @@ -0,0 +1,62 @@ +package com.hiczp.bilibili.api.retrofit + +//该文件用于防止拼写错误 + +object Method { + const val GET = "GET" + const val POST = "POST" + const val PATCH = "PATCH" + const val PUT = "PUT" + const val DELETE = "DELETE" + const val OPTION = "OPTION" +} + +object Header { + const val DISPLAY_ID = "Display-ID" + @Suppress("SpellCheckingInspection") + const val BUILD_VERSION_ID = "Buvid" + const val DEVICE_ID = "Device-ID" + const val USER_AGENT = "User-Agent" + const val ACCEPT = "Accept" + const val ACCEPT_LANGUAGE = "Accept-Language" + const val ACCEPT_ENCODING = "Accept-Encoding" + + //强制公共参数添加位置 + const val FORCE_PARAM = "Retrofit-Force-Param" + const val FORCE_PARAM_QUERY = "query" + @Suppress("MemberVisibilityCanBePrivate") + const val FORCE_PARAM_FORM_BODY = "formBody" + const val FORCE_QUERY = "$FORCE_PARAM: $FORCE_PARAM_QUERY" + const val FORCE_FORM_BODY = "$FORCE_PARAM: $FORCE_PARAM_FORM_BODY" +} + +object Param { + const val ACCESS_KEY = "access_key" + @Suppress("SpellCheckingInspection") + const val APP_KEY = "appkey" + const val ACTION_KEY = "actionKey" + const val BUILD = "build" + @Suppress("SpellCheckingInspection") + const val BUILD_VERSION_ID = "buvid" + const val CHANNEL = "channel" + @Suppress("ObjectPropertyName") + const val _DEVICE = "_device" + const val DEVICE = "device" + @Suppress("ObjectPropertyName", "SpellCheckingInspection") + const val _HARDWARE_ID = "_hwid" + const val SOURCE = "src" + const val TRACE_ID = "trace_id" + const val USER_ID = "uid" + const val VERSION = "version" + @Suppress("SpellCheckingInspection") + const val MOBILE_APP = "mobi_app" + const val PLATFORM = "platform" + const val TIMESTAMP = "ts" + const val EXPIRE = "expire" + const val MID = "mid" + const val SIGN = "sign" +} + +internal object Charsets { + const val UTF_8 = "UTF-8" +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/RetrofitExtension.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/RetrofitExtension.kt new file mode 100644 index 0000000..c841add --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/RetrofitExtension.kt @@ -0,0 +1,54 @@ +package com.hiczp.bilibili.api.retrofit + +import okhttp3.FormBody + +inline fun FormBody.forEach(block: (String, String) -> Unit) { + repeat(size()) { + block(encodedName(it), encodedValue(it)) + } +} + +fun FormBody.raw() = + StringBuilder().apply { + repeat(size()) { + if (it != 0) append('&') + append(encodedName(it)) + append('=') + append(encodedValue(it)) + } + }.toString() + +fun FormBody.sortedRaw(): String { + val nameAndValue = ArrayList<String>() + repeat(size()) { + nameAndValue.add("${encodedName(it)}=${encodedValue(it)}") + } + return nameAndValue.sorted().joinToString(separator = "&") +} + +fun FormBody.containsEncodedName(name: String): Boolean { + repeat(size()) { + if (encodedName(it) == name) return true + } + return false +} + +fun FormBody.Builder.addAllEncoded(formBody: FormBody): FormBody.Builder { + with(formBody) { + repeat(size()) { + addEncoded(encodedName(it), encodedValue(it)) + } + } + return this +} + +internal typealias ParamExpression = Pair<String, () -> String?> + +internal inline fun Array<out ParamExpression>.forEachNonNull(action: (String, String) -> Unit) { + forEach { (name, valueExpression) -> + val value = valueExpression() + if (value != null) { + action(name, value) + } + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/exception/BilibiliApiException.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/exception/BilibiliApiException.kt new file mode 100644 index 0000000..fa8d2ed --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/exception/BilibiliApiException.kt @@ -0,0 +1,11 @@ +package com.hiczp.bilibili.api.retrofit.exception + +import com.hiczp.bilibili.api.retrofit.CommonResponse +import java.io.IOException + +/** + * 当服务器返回的 code 不等于 0 时抛出 + */ +class BilibiliApiException( + commonResponse: CommonResponse +) : IOException(commonResponse.message?.takeIf { it.isNotEmpty() } ?: commonResponse.msg) diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/CommonHeaderInterceptor.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/CommonHeaderInterceptor.kt new file mode 100644 index 0000000..bca9d4c --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/CommonHeaderInterceptor.kt @@ -0,0 +1,22 @@ +package com.hiczp.bilibili.api.retrofit.interceptor + +import com.hiczp.bilibili.api.retrofit.ParamExpression +import com.hiczp.bilibili.api.retrofit.forEachNonNull +import okhttp3.Interceptor +import okhttp3.Response + +/** + * 为请求添加公共 Header + * + * @param additionHeaders HeaderName to HeaderValueExpression + */ +class CommonHeaderInterceptor(private vararg val additionHeaders: ParamExpression) : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request().newBuilder().apply { + additionHeaders.forEachNonNull { name, value -> + addHeader(name, value) + } + }.build() + return chain.proceed(request) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/CommonParamInterceptor.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/CommonParamInterceptor.kt new file mode 100644 index 0000000..675d1bc --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/CommonParamInterceptor.kt @@ -0,0 +1,76 @@ +package com.hiczp.bilibili.api.retrofit.interceptor + +import com.hiczp.bilibili.api.retrofit.* +import mu.KotlinLogging +import okhttp3.FormBody +import okhttp3.Interceptor +import okhttp3.Response + +private val logger = KotlinLogging.logger {} + +/** + * 为请求添加公共参数 + * 如果请求为 GET 方式则添加到 Query, 如果是其他其他方式则尝试添加到 BODY. + * + * @param additionParams ParamName to ParamValueExpression + */ +class CommonParamInterceptor(private vararg val additionParams: ParamExpression) : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + var headers = request.headers() + var httpUrl = request.url() + var body = request.body() + + //是否强制加到 Query(暂不存在强制加到 FormBody 的情况) + var forceQuery = false + val forceParam = headers[Header.FORCE_PARAM] + if (forceParam != null) { + if (forceParam == Header.FORCE_PARAM_QUERY) forceQuery = true + headers = headers.newBuilder().removeAll(Header.FORCE_PARAM).build() + } + + when { + //如果是 GET 则添加到 Query + request.method() == Method.GET || forceQuery -> { + httpUrl = request.url().newBuilder().apply { + additionParams.forEachNonNull { name, value -> + addQueryParameter(name, value) + } + }.build() + } + + //如果 Body 不存在或者为空则创建一个 FormBody + body == null || body.contentLength() == 0L -> { + body = FormBody.Builder().apply { + additionParams.forEachNonNull { name, value -> + add(name, value) + } + }.build() + } + + //如果 Body 为 FormBody 则里面可能已经存在内容 + body is FormBody -> { + body = FormBody.Builder().addAllEncoded(body).apply { + additionParams.forEachNonNull { name, value -> + add(name, value) + } + }.build() + } + + //如果方式不为 GET 且 Body 不为空或者为 FormBody 则无法添加公共参数 + else -> { + logger.error { + "Cannot add params to request: ${request.method()} ${request.url()} ${body.javaClass.simpleName}" + } + } + } + + return chain.proceed( + request.newBuilder() + .headers(headers) + .url(httpUrl) + .method(request.method(), body) + .build() + ) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/FailureResponseInterceptor.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/FailureResponseInterceptor.kt new file mode 100644 index 0000000..4eb0ed1 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/FailureResponseInterceptor.kt @@ -0,0 +1,52 @@ +package com.hiczp.bilibili.api.retrofit.interceptor + +import com.github.salomonbrys.kotson.fromJson +import com.github.salomonbrys.kotson.int +import com.github.salomonbrys.kotson.obj +import com.hiczp.bilibili.api.gson +import com.hiczp.bilibili.api.jsonParser +import com.hiczp.bilibili.api.retrofit.exception.BilibiliApiException +import okhttp3.Interceptor +import okhttp3.Response + +/** + * 如果服务器返回的 code 不为 0 则抛出异常 + */ +object FailureResponseInterceptor : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val response = chain.proceed(chain.request()) + val body = response.body() + if (!response.isSuccessful || body == null || body.contentLength() == 0L) return response + + //获取字符集 + val contentType = body.contentType() + val charset = if (contentType == null) { + Charsets.UTF_8 + } else { + contentType.charset(Charsets.UTF_8)!! + } + + //拷贝流 + val inputStreamReader = body.source().also { + it.request(Long.MAX_VALUE) + }.buffer.clone().inputStream().reader(charset) + + //读取其内容 + val jsonObject = try { + jsonParser.parse(inputStreamReader).obj + } catch (exception: Exception) { + //如果返回内容解析失败, 说明它不是一个合法的 json + //如果在拦截器抛出 MalformedJsonException 会导致 Retrofit 的异步请求一直卡着直到超时 + return response + } finally { + inputStreamReader.close() + } + + //判断 code 是否为 0 + if (jsonObject["code"].int != 0) { + throw BilibiliApiException(gson.fromJson(jsonObject)) + } + + return response + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/SortAndSignInterceptor.kt b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/SortAndSignInterceptor.kt new file mode 100644 index 0000000..933b2b5 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/retrofit/interceptor/SortAndSignInterceptor.kt @@ -0,0 +1,62 @@ +package com.hiczp.bilibili.api.retrofit.interceptor + +import com.hiczp.bilibili.api.calculateSign +import com.hiczp.bilibili.api.retrofit.Param +import com.hiczp.bilibili.api.retrofit.containsEncodedName +import com.hiczp.bilibili.api.retrofit.sortedRaw +import mu.KotlinLogging +import okhttp3.FormBody +import okhttp3.Interceptor +import okhttp3.Response + +private val logger = KotlinLogging.logger {} + +/** + * 排序参数并添加签名 + * 必须保证在进入此拦截器前, 公共参数已被添加 + * 此拦截器将自动识别 appKey 在 Query 还是在 FormBody 并添加 sign 到相应位置 + * + * @param appSecret 密钥 + */ +class SortAndSignInterceptor(private val appSecret: String) : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + var request = chain.request() + val url = request.url() + val body = request.body() + + request = when { + //判断 appKey 是否在 Query 里 + url.queryParameter(Param.APP_KEY) != null -> { + val sortedEncodedQuery = url.encodedQuery()!!.split('&').sorted().joinToString(separator = "&") + request.newBuilder() + .url(url.newBuilder() + .encodedQuery("$sortedEncodedQuery&${Param.SIGN}=${calculateSign(sortedEncodedQuery, appSecret)}") + .build() + ).build() + } + + //在 FormBody 里 + body is FormBody && body.containsEncodedName(Param.APP_KEY) -> { + val sortedRaw = body.sortedRaw() + val formBody = FormBody.Builder().apply { + sortedRaw.split('&').forEach { + val (name, value) = it.split('=') + addEncoded(name, value) + } + addEncoded(Param.SIGN, calculateSign(sortedRaw, appSecret)) + }.build() + request.newBuilder() + .method(request.method(), formBody) + .build() + } + + //不存在 accessKey + else -> { + logger.error { "Fail to sign request because no ${Param.APP_KEY} found in request" } + request + } + } + + return chain.proceed(request) + } +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/thirdpart/commons/BoundedInputStream.java b/src/main/kotlin/com/hiczp/bilibili/api/thirdpart/commons/BoundedInputStream.java new file mode 100644 index 0000000..410f792 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/thirdpart/commons/BoundedInputStream.java @@ -0,0 +1,253 @@ +package com.hiczp.bilibili.api.thirdpart.commons; + +//用于减少包引入 + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.IOException; +import java.io.InputStream; + +/** + * This is a stream that will only supply bytes up to a certain length - if its + * position goes above that, it will stop. + * <p> + * This is useful to wrap ServletInputStreams. The ServletInputStream will block + * if you try to read content from it that isn't there, because it doesn't know + * whether the content hasn't arrived yet or whether the content has finished. + * So, one of these, initialized with the Content-length sent in the + * ServletInputStream's header, will stop it blocking, providing it's been sent + * with a correct content length. + * + * @since 2.0 + */ +public class BoundedInputStream extends InputStream { + private static int EOF = -1; + + /** + * the wrapped input stream + */ + private final InputStream in; + + /** + * the max length to provide + */ + private final long max; + + /** + * the number of bytes already returned + */ + private long pos = 0; + + /** + * the marked position + */ + private long mark = EOF; + + /** + * flag if close should be propagated + */ + private boolean propagateClose = true; + + /** + * Creates a new <code>BoundedInputStream</code> that wraps the given input + * stream and limits it to a certain size. + * + * @param in The wrapped input stream + * @param size The maximum number of bytes to return + */ + public BoundedInputStream(final InputStream in, final long size) { + // Some badly designed methods - eg the servlet API - overload length + // such that "-1" means stream finished + this.max = size; + this.in = in; + } + + /** + * Creates a new <code>BoundedInputStream</code> that wraps the given input + * stream and is unlimited. + * + * @param in The wrapped input stream + */ + public BoundedInputStream(final InputStream in) { + this(in, EOF); + } + + /** + * Invokes the delegate's <code>read()</code> method if + * the current position is less than the limit. + * + * @return the byte read or -1 if the end of stream or + * the limit has been reached. + * @throws IOException if an I/O error occurs + */ + @Override + public int read() throws IOException { + if (max >= 0 && pos >= max) { + return EOF; + } + final int result = in.read(); + pos++; + return result; + } + + /** + * Invokes the delegate's <code>read(byte[])</code> method. + * + * @param b the buffer to read the bytes into + * @return the number of bytes read or -1 if the end of stream or + * the limit has been reached. + * @throws IOException if an I/O error occurs + */ + @Override + public int read(final byte[] b) throws IOException { + return this.read(b, 0, b.length); + } + + /** + * Invokes the delegate's <code>read(byte[], int, int)</code> method. + * + * @param b the buffer to read the bytes into + * @param off The start offset + * @param len The number of bytes to read + * @return the number of bytes read or -1 if the end of stream or + * the limit has been reached. + * @throws IOException if an I/O error occurs + */ + @Override + public int read(final byte[] b, final int off, final int len) throws IOException { + if (max >= 0 && pos >= max) { + return EOF; + } + final long maxRead = max >= 0 ? Math.min(len, max - pos) : len; + final int bytesRead = in.read(b, off, (int) maxRead); + + if (bytesRead == EOF) { + return EOF; + } + + pos += bytesRead; + return bytesRead; + } + + /** + * Invokes the delegate's <code>skip(long)</code> method. + * + * @param n the number of bytes to skip + * @return the actual number of bytes skipped + * @throws IOException if an I/O error occurs + */ + @Override + public long skip(final long n) throws IOException { + final long toSkip = max >= 0 ? Math.min(n, max - pos) : n; + final long skippedBytes = in.skip(toSkip); + pos += skippedBytes; + return skippedBytes; + } + + /** + * {@inheritDoc} + */ + @Override + public int available() throws IOException { + if (max >= 0 && pos >= max) { + return 0; + } + return in.available(); + } + + /** + * Invokes the delegate's <code>toString()</code> method. + * + * @return the delegate's <code>toString()</code> + */ + @Override + public String toString() { + return in.toString(); + } + + /** + * Invokes the delegate's <code>close()</code> method + * if {@link #isPropagateClose()} is {@code true}. + * + * @throws IOException if an I/O error occurs + */ + @Override + public void close() throws IOException { + if (propagateClose) { + in.close(); + } + } + + /** + * Invokes the delegate's <code>reset()</code> method. + * + * @throws IOException if an I/O error occurs + */ + @Override + public synchronized void reset() throws IOException { + in.reset(); + pos = mark; + } + + /** + * Invokes the delegate's <code>mark(int)</code> method. + * + * @param readlimit read ahead limit + */ + @Override + public synchronized void mark(final int readlimit) { + in.mark(readlimit); + mark = pos; + } + + /** + * Invokes the delegate's <code>markSupported()</code> method. + * + * @return true if mark is supported, otherwise false + */ + @Override + public boolean markSupported() { + return in.markSupported(); + } + + /** + * Indicates whether the {@link #close()} method + * should propagate to the underling {@link InputStream}. + * + * @return {@code true} if calling {@link #close()} + * propagates to the <code>close()</code> method of the + * underlying stream or {@code false} if it does not. + */ + public boolean isPropagateClose() { + return propagateClose; + } + + /** + * Set whether the {@link #close()} method + * should propagate to the underling {@link InputStream}. + * + * @param propagateClose {@code true} if calling + * {@link #close()} propagates to the <code>close()</code> + * method of the underlying stream or + * {@code false} if it does not. + */ + public void setPropagateClose(final boolean propagateClose) { + this.propagateClose = propagateClose; + } +} + diff --git a/src/main/kotlin/com/hiczp/bilibili/api/vc/VcAPI.kt b/src/main/kotlin/com/hiczp/bilibili/api/vc/VcAPI.kt new file mode 100644 index 0000000..704939c --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/vc/VcAPI.kt @@ -0,0 +1,30 @@ +package com.hiczp.bilibili.api.vc + +import com.hiczp.bilibili.api.vc.model.AttentionList +import com.hiczp.bilibili.api.vc.model.DynamicNumber +import kotlinx.coroutines.Deferred +import retrofit2.http.GET +import retrofit2.http.Query + +/** + * 小视频(好像 动态 也是在这个站) + */ +@Suppress("DeferredIsResult") +interface VcAPI { + /** + * //TODO 接口意义不明 + * 可能是一个通知接口 + */ + @GET("/dynamic_svr/v1/dynamic_svr/dynamic_num") + fun dynamicNumber( + @Query("rsp_type") rspType: Int, + @Query("type_list") typeList: Long? = null, + @Query("update_num_dy_id") updateNumberDynamicId: Int = 0 + ): Deferred<DynamicNumber> + + /** + * 关注列表 + */ + @GET("/feed/v1/feed/get_attention_list") + fun getAttentionList(): Deferred<AttentionList> +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/vc/model/AttentionList.kt b/src/main/kotlin/com/hiczp/bilibili/api/vc/model/AttentionList.kt new file mode 100644 index 0000000..2b13589 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/vc/model/AttentionList.kt @@ -0,0 +1,19 @@ +package com.hiczp.bilibili.api.vc.model + +import com.google.gson.annotations.SerializedName + +data class AttentionList( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, // success + @SerializedName("msg") + var msg: String // success +) { + data class Data( + @SerializedName("list") + var list: List<String> + ) +} diff --git a/src/main/kotlin/com/hiczp/bilibili/api/vc/model/DynamicNumber.kt b/src/main/kotlin/com/hiczp/bilibili/api/vc/model/DynamicNumber.kt new file mode 100644 index 0000000..9c70126 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/vc/model/DynamicNumber.kt @@ -0,0 +1,25 @@ +package com.hiczp.bilibili.api.vc.model + +import com.google.gson.annotations.SerializedName + +data class DynamicNumber( + @SerializedName("code") + var code: Int, // 0 + @SerializedName("data") + var `data`: Data, + @SerializedName("message") + var message: String, + @SerializedName("msg") + var msg: String +) { + data class Data( + @SerializedName("_gt_") + var gt: Int, // 0 + @SerializedName("exist_gap") + var existGap: Int, // 1 + @SerializedName("new_num") + var newNum: Int, // 30 + @SerializedName("update_num") + var updateNum: Int // 100 + ) +} diff --git a/src/test/java/com/hiczp/bilibili/api/test/AuthenticatorTest.java b/src/test/java/com/hiczp/bilibili/api/test/AuthenticatorTest.java deleted file mode 100644 index b612583..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/AuthenticatorTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.BilibiliAccount; -import org.junit.Test; - -public class AuthenticatorTest { - @Test - public void test() throws Exception { - BilibiliAPI bilibiliAPI = new BilibiliAPI( - new BilibiliAccount( - "123", - "123", - null, - null, - null - ) - ); - bilibiliAPI.getLiveService() - .getPlayerBag() - .execute(); - bilibiliAPI.getLiveService() - .getPlayerBag() - .execute(); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/CaptchaInputDialog.form b/src/test/java/com/hiczp/bilibili/api/test/CaptchaInputDialog.form deleted file mode 100644 index 7663090..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/CaptchaInputDialog.form +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.hiczp.bilibili.api.test.CaptchaInputDialog"> - <grid id="cbd77" binding="contentPane" layout-manager="GridBagLayout"> - <constraints> - <xy x="48" y="54" width="436" height="297"/> - </constraints> - <properties/> - <border type="empty"> - <size top="2" left="2" bottom="2" right="2"/> - </border> - <children> - <grid id="94766" layout-manager="GridBagLayout"> - <constraints> - <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> - <gridbag weightx="1.0" weighty="0.0"/> - </constraints> - <properties> - <preferredSize width="200" height="50"/> - </properties> - <border type="none"/> - <children> - <component id="e7465" class="javax.swing.JButton" binding="buttonOK"> - <constraints> - <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/> - <gridbag weightx="0.0" weighty="1.0"/> - </constraints> - <properties> - <text value="OK"/> - </properties> - </component> - <component id="9335c" class="javax.swing.JTextField" binding="textField"> - <constraints> - <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> - <preferred-size width="150" height="-1"/> - </grid> - <gridbag weightx="1.0" weighty="1.0"/> - </constraints> - <properties/> - </component> - </children> - </grid> - <grid id="e3588" layout-manager="GridBagLayout"> - <constraints> - <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> - <gridbag weightx="1.0" weighty="1.0"/> - </constraints> - <properties> - <preferredSize width="200" height="50"/> - </properties> - <border type="none"/> - <children> - <component id="85fac" class="javax.swing.JLabel" binding="label" custom-create="true"> - <constraints> - <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> - <gridbag weightx="1.0" weighty="1.0"/> - </constraints> - <properties> - <text value="Label"/> - </properties> - </component> - </children> - </grid> - </children> - </grid> -</form> diff --git a/src/test/java/com/hiczp/bilibili/api/test/CaptchaInputDialog.java b/src/test/java/com/hiczp/bilibili/api/test/CaptchaInputDialog.java deleted file mode 100644 index 1903bb7..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/CaptchaInputDialog.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliAPI; - -import javax.imageio.ImageIO; -import javax.swing.*; -import java.awt.*; -import java.io.IOException; - -public class CaptchaInputDialog extends JDialog { - private String cookie; - private String captcha; - - private JPanel contentPane; - private JButton buttonOK; - private JTextField textField; - private JLabel label; - - public CaptchaInputDialog() { - $$$setupUI$$$(); - setContentPane(contentPane); - setModal(true); - getRootPane().setDefaultButton(buttonOK); - buttonOK.addActionListener(e -> { - captcha = textField.getText(); - dispose(); - }); - } - - public static CaptchaInputDialog create() { - CaptchaInputDialog dialog = new CaptchaInputDialog(); - dialog.setTitle("Please input captcha"); - dialog.pack(); - dialog.setModal(true); - dialog.setVisible(true); - return dialog; - } - - public String getCookie() { - return cookie; - } - - public String getCaptcha() { - return captcha; - } - - private void createUIComponents() { - try { - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - cookie = bilibiliAPI.getPassportService().getKey() - .execute() - .headers() - .get("Set-cookie"); - label = new JLabel(new ImageIcon(ImageIO.read(bilibiliAPI.getCaptchaService().getCaptchaAsStream(cookie)))); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Method generated by IntelliJ IDEA GUI Designer - * >>> IMPORTANT!! <<< - * DO NOT edit this method OR call it in your code! - * - * @noinspection ALL - */ - private void $$$setupUI$$$() { - createUIComponents(); - contentPane = new JPanel(); - contentPane.setLayout(new GridBagLayout()); - contentPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2), null)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridBagLayout()); - panel1.setPreferredSize(new Dimension(200, 50)); - GridBagConstraints gbc; - gbc = new GridBagConstraints(); - gbc.gridx = 0; - gbc.gridy = 1; - gbc.weightx = 1.0; - gbc.fill = GridBagConstraints.BOTH; - contentPane.add(panel1, gbc); - buttonOK = new JButton(); - buttonOK.setText("OK"); - gbc = new GridBagConstraints(); - gbc.gridx = 1; - gbc.gridy = 0; - gbc.weighty = 1.0; - gbc.fill = GridBagConstraints.HORIZONTAL; - panel1.add(buttonOK, gbc); - textField = new JTextField(); - gbc = new GridBagConstraints(); - gbc.gridx = 0; - gbc.gridy = 0; - gbc.weightx = 1.0; - gbc.weighty = 1.0; - gbc.anchor = GridBagConstraints.WEST; - gbc.fill = GridBagConstraints.HORIZONTAL; - panel1.add(textField, gbc); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridBagLayout()); - panel2.setPreferredSize(new Dimension(200, 50)); - gbc = new GridBagConstraints(); - gbc.gridx = 0; - gbc.gridy = 0; - gbc.weightx = 1.0; - gbc.weighty = 1.0; - gbc.fill = GridBagConstraints.BOTH; - contentPane.add(panel2, gbc); - label.setText("Label"); - gbc = new GridBagConstraints(); - gbc.gridx = 0; - gbc.gridy = 0; - gbc.weightx = 1.0; - gbc.weighty = 1.0; - gbc.anchor = GridBagConstraints.WEST; - panel2.add(label, gbc); - } - - /** - * @noinspection ALL - */ - public JComponent $$$getRootComponent$$$() { - return contentPane; - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/Config.java b/src/test/java/com/hiczp/bilibili/api/test/Config.java deleted file mode 100644 index 368489c..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/Config.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliAPI; - -public class Config { - private static Config config; - private static final BilibiliAPI bilibiliAPI = new BilibiliAPI(); - - private String username; - private String password; - private long roomId; - - static Config getInstance() { - return config; - } - - static void setConfig(Config config) { - Config.config = config; - } - - String getUsername() { - return username; - } - - void setUsername(String username) { - this.username = username; - } - - String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - long getRoomId() { - return roomId; - } - - public void setRoomId(long roomId) { - this.roomId = roomId; - } - - public static BilibiliAPI getBilibiliAPI() { - return bilibiliAPI; - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/GetAwardTest.java b/src/test/java/com/hiczp/bilibili/api/test/GetAwardTest.java deleted file mode 100644 index b4a62d8..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/GetAwardTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliAPI; -import okhttp3.logging.HttpLoggingInterceptor; -import org.junit.Test; - -import java.util.Collections; - -public class GetAwardTest { - private static final BilibiliAPI BILIBILI_API = Config.getBilibiliAPI(); - - @Test - public void getAwards() throws Exception { - BILIBILI_API - .getLiveService(Collections.emptyList(), HttpLoggingInterceptor.Level.BODY) - .getAwardRecords() - .execute() - .body(); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/LiveClientTest.java b/src/test/java/com/hiczp/bilibili/api/test/LiveClientTest.java deleted file mode 100644 index ee0c176..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/LiveClientTest.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.google.common.eventbus.Subscribe; -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.live.socket.LiveClient; -import com.hiczp.bilibili.api.live.socket.entity.*; -import com.hiczp.bilibili.api.live.socket.event.*; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.nio.NioEventLoopGroup; -import org.junit.FixMethodOrder; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runners.MethodSorters; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; - -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class LiveClientTest { - private static final Logger LOGGER = LoggerFactory.getLogger(LiveClientTest.class); - private static final BilibiliAPI BILIBILI_API = Config.getBilibiliAPI(); - private static final Config CONFIG = Config.getInstance(); - private static final long TEST_TIME = 70 * 1000; - - @Ignore - @Test - public void _0_duplicateConnectAndCloseTest() throws Exception { - EventLoopGroup eventLoopGroup = new NioEventLoopGroup(); - LiveClient liveClient = BILIBILI_API - .getLiveClient(eventLoopGroup, CONFIG.getRoomId()); - LOGGER.debug("Connecting!"); - liveClient.connect(); - Thread.sleep(5000); - LOGGER.debug("Connecting!"); - liveClient.connect(); - Thread.sleep(5000); - LOGGER.debug("Disconnecting!"); - liveClient.closeChannel(); - Thread.sleep(5000); - LOGGER.debug("Disconnecting!"); - liveClient.closeChannel(); - Thread.sleep(5000); - LOGGER.debug("Connecting!"); - liveClient.connect(); - Thread.sleep(5000); - LOGGER.debug("Disconnecting!"); - liveClient.closeChannel(); - Thread.sleep(5000); - eventLoopGroup.shutdownGracefully(); - } - - @Ignore - @Test - public void _1_longTimeTest() throws Exception { - EventLoopGroup eventLoopGroup = new NioEventLoopGroup(); - LiveClient liveClient = BILIBILI_API - .getLiveClient(eventLoopGroup, CONFIG.getRoomId()) - .registerListener(new Listener()); - LOGGER.debug("Start long-time test"); - LOGGER.debug("Connecting!"); - liveClient.connect(); - Thread.sleep(TEST_TIME); - LOGGER.debug("Disconnecting!"); - liveClient.closeChannel(); - eventLoopGroup.shutdownGracefully(); - Thread.sleep(5000); - } - - private class Listener { - private final Logger LOGGER = LoggerFactory.getLogger(Listener.class); - - @Subscribe - public void activityEvent(ActivityEventPackageEvent activityEventPackageEvent) { - ActivityEventEntity.Data data = activityEventPackageEvent.getEntity().getData(); - LOGGER.info("[ActivityEvent] keyword: {}, type: {}, progress: {}%", - data.getKeyword(), - data.getType(), - ((float) data.getProgress() / data.getLimit()) * 100 - ); - } - - @Subscribe - public void connectionClose(ConnectionCloseEvent connectionCloseEvent) { - LOGGER.info("[ConnectionClose] Connection closed"); - } - - @Subscribe - public void connectSucceed(ConnectSucceedEvent connectSucceedEvent) { - LOGGER.info("[ConnectSucceed] Connect succeed"); - } - - @Subscribe - public void danMuMsg(DanMuMsgPackageEvent danMuMsgPackageEvent) { - DanMuMsgEntity danMuMsgEntity = danMuMsgPackageEvent.getEntity(); - StringBuilder stringBuilder = new StringBuilder("[DanMuMsg] "); - - danMuMsgEntity.getFansMedalName().ifPresent(fansMedalName -> - stringBuilder.append(String.format("[%s %d] ", fansMedalName, danMuMsgEntity.getFansMedalLevel().get())) - ); - - List<String> userTitles = danMuMsgEntity.getUserTitles(); - if (!userTitles.isEmpty()) { - stringBuilder.append(userTitles.get(0)) - .append(" "); - } - - stringBuilder.append(String.format("[UL %d] ", danMuMsgEntity.getUserLevel())); - - stringBuilder.append(String.format("%s: ", danMuMsgEntity.getUsername())); - - stringBuilder.append(danMuMsgEntity.getMessage()); - - LOGGER.info(stringBuilder.toString()); - } - - @Subscribe - public void live(LivePackageEvent livePackageEvent) { - LOGGER.info("[Live] Room {} start live", livePackageEvent.getEntity().getRoomId()); - } - - @Subscribe - public void preparing(PreparingPackageEvent preparingPackageEvent) { - LOGGER.info("[Preparing] Room {} stop live", preparingPackageEvent.getEntity().getRoomId()); - } - - @Subscribe - public void sendGift(SendGiftPackageEvent sendGiftPackageEvent) { - SendGiftEntity.Data data = sendGiftPackageEvent.getEntity().getData(); - LOGGER.info("[SendGift] {} give {}*{}", - data.getUsername(), - data.getGiftName(), - data.getNumber() - ); - } - - @Subscribe - public void sysGift(SysGiftPackageEvent sysGiftPackageEvent) { - SysGiftEntity sysGiftEntity = sysGiftPackageEvent.getEntity(); - LOGGER.info("[SysGift] {}: {}", - sysGiftEntity.getMsg(), - sysGiftEntity.getUrl() - ); - } - - @Subscribe - public void sysMsg(SysMsgPackageEvent sysMsgPackageEvent) { - SysMsgEntity sysMsgEntity = sysMsgPackageEvent.getEntity(); - LOGGER.info("[SysMsg] {}: {}", - sysMsgEntity.getMsg(), - sysMsgEntity.getUrl() - ); - } - - @Subscribe - public void tvEnd(TVEndPackageEvent tvEndPackageEvent) { - TVEndEntity tvEndEntity = tvEndPackageEvent.getEntity(); - LOGGER.info("[TVEnd] user {} win the {}", - tvEndEntity.getData().getUsername(), - tvEndEntity.getData().getType() - ); - } - - @Subscribe - public void welcome(WelcomePackageEvent welcomePackageEvent) { - WelcomeEntity.Data data = welcomePackageEvent.getEntity().getData(); - StringBuilder stringBuilder = new StringBuilder("[Welcome] "); - if (data.isAdmin()) { - stringBuilder.append("[ADMIN] "); - } - stringBuilder.append(String.format("[VIP %d] ", data.getVip())) - .append(data.getUserName()); - LOGGER.info(stringBuilder.toString()); - } - - @Subscribe - public void welcomeGuard(WelcomeGuardPackageEvent welcomeGuardPackageEvent) { - WelcomeGuardEntity.Data data = welcomeGuardPackageEvent.getEntity().getData(); - LOGGER.info("[WelcomeGuard] [GL {}] {}", - data.getGuardLevel(), - data.getUsername() - ); - } - - @Subscribe - public void viewerCount(ViewerCountPackageEvent viewerCountPackageEvent) { - LOGGER.info("[ViewerCount] {}", viewerCountPackageEvent.getViewerCount()); - } - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/LoginTest.java b/src/test/java/com/hiczp/bilibili/api/test/LoginTest.java deleted file mode 100644 index 9606648..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/LoginTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.passport.exception.CaptchaMismatchException; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.awt.*; - -public class LoginTest { - private static final Logger LOGGER = LoggerFactory.getLogger(LoginTest.class); - private static final Config CONFIG = Config.getInstance(); - - @Test - public void login() throws Exception { - try { - Config.getBilibiliAPI().login(CONFIG.getUsername(), CONFIG.getPassword()); - } catch (CaptchaMismatchException e) { - LOGGER.info("Need captcha"); - if (GraphicsEnvironment.isHeadless()) { - LOGGER.error("Need graphics support to display captcha, login failed"); - throw new UnsupportedOperationException(e); - } else { - CaptchaInputDialog captchaInputDialog = CaptchaInputDialog.create(); - Config.getBilibiliAPI().login( - CONFIG.getUsername(), - CONFIG.getPassword(), - captchaInputDialog.getCaptcha(), - captchaInputDialog.getCookie() - ); - } - } - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/LogoutTest.java b/src/test/java/com/hiczp/bilibili/api/test/LogoutTest.java deleted file mode 100644 index 7028ce7..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/LogoutTest.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import org.junit.Test; - -public class LogoutTest { - @Test - public void logout() throws Exception { - Config.getBilibiliAPI().logout(); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/ManualLoginTool.java b/src/test/java/com/hiczp/bilibili/api/test/ManualLoginTool.java deleted file mode 100644 index bce4651..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/ManualLoginTool.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.google.gson.GsonBuilder; -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.BilibiliSecurityHelper; -import com.hiczp.bilibili.api.passport.entity.LoginResponseEntity; - -import java.util.Scanner; - -public class ManualLoginTool { - public static void main(String[] args) throws Exception { - Scanner scanner = new Scanner(System.in); - System.out.println("Please input username and password"); - LoginResponseEntity loginResponseEntity = BilibiliSecurityHelper - .login(new BilibiliAPI(), scanner.nextLine(), scanner.nextLine()); - - new GsonBuilder() - .setPrettyPrinting() - .create() - .toJson(loginResponseEntity, System.out); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/ManualSignTool.java b/src/test/java/com/hiczp/bilibili/api/test/ManualSignTool.java deleted file mode 100644 index fa5ab64..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/ManualSignTool.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliClientProperties; -import com.hiczp.bilibili.api.BilibiliSecurityHelper; - -import java.util.Arrays; -import java.util.List; -import java.util.Scanner; -import java.util.stream.Collectors; - -//Insomnia 手动测试时使用 -//拷贝入整个 url, 它将自动计算出 sign -public class ManualSignTool { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - System.out.println("Please input url"); - while (true) { - String input = scanner.nextLine().trim(); - if (input.equals("q")) { - break; - } - if (input.isEmpty()) { - continue; - } - - int index = input.indexOf("?"); - if (index == -1) { - continue; - } - - List<String> nameAndValues = Arrays.stream(input.substring(index + 1) - .split("&")) - .filter(param -> !param.startsWith("sign=")) - .sorted() - .collect(Collectors.toList()); - - System.out.println( - BilibiliSecurityHelper.calculateSign(nameAndValues, BilibiliClientProperties.defaultSetting().getAppSecret()) - ); - } - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/RuleSuite.java b/src/test/java/com/hiczp/bilibili/api/test/RuleSuite.java deleted file mode 100644 index 0ac274a..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/RuleSuite.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.google.gson.Gson; -import org.apache.log4j.BasicConfigurator; -import org.junit.ClassRule; -import org.junit.rules.ExternalResource; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - LoginTest.class, - UserInfoTest.class, - LiveClientTest.class, - SsoTest.class, - SendBulletScreenTest.class, - SecurityHelperTest.class, - AuthenticatorTest.class, - WebAPITest.class, - GetAwardTest.class, - LogoutTest.class -}) -public class RuleSuite { - @ClassRule - public static ExternalResource externalResource = new ExternalResource() { - @Override - protected void before() throws Throwable { - init(); - } - }; - - public static void init() throws Exception { - //初始化 slf4j - BasicConfigurator.configure(); - - //读取配置文件 - try (BufferedReader bufferedReader = Files.newBufferedReader(Paths.get(Config.class.getResource("/config.json").toURI()))) { - Config.setConfig( - new Gson().fromJson( - bufferedReader, - Config.class - ) - ); - } catch (IOException e) { - //抛出异常就可以取消测试 - throw new FileNotFoundException("Please create config file before tests"); - } - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/SecurityHelperTest.java b/src/test/java/com/hiczp/bilibili/api/test/SecurityHelperTest.java deleted file mode 100644 index a09eed1..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/SecurityHelperTest.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.BilibiliSecurityHelper; -import com.hiczp.bilibili.api.ServerErrorCode; -import com.hiczp.bilibili.api.passport.entity.LoginResponseEntity; -import com.hiczp.bilibili.api.passport.entity.RefreshTokenResponseEntity; -import org.junit.Ignore; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SecurityHelperTest { - private static final Logger LOGGER = LoggerFactory.getLogger(SecurityHelperTest.class); - private static final Config CONFIG = Config.getInstance(); - private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); - - @Test - public void normalLogin() throws Exception { - LoginResponseEntity loginResponseEntity = BilibiliSecurityHelper.login( - new BilibiliAPI(), - CONFIG.getUsername(), - CONFIG.getPassword() - ); - if (loginResponseEntity.getCode() == ServerErrorCode.Passport.CAPTCHA_NOT_MATCH) { - LOGGER.error("This account need captcha to login, ignore test"); - return; - } - LOGGER.info("{}", GSON.toJson(loginResponseEntity)); - BilibiliSecurityHelper.logout(new BilibiliAPI(), loginResponseEntity.getData().getAccessToken()); - } - - @Ignore - @Test - public void loginWithWrongUsername() throws Exception { - LoginResponseEntity loginResponseEntity = BilibiliSecurityHelper.login( - new BilibiliAPI(), - "bilibili_account", - "bilibili_password" - ); - LOGGER.info("{}", loginResponseEntity.getMessage()); - } - - @Test - public void normalRefreshToken() throws Exception { - LoginResponseEntity loginResponseEntity = BilibiliSecurityHelper.login( - new BilibiliAPI(), - CONFIG.getUsername(), - CONFIG.getPassword() - ); - if (loginResponseEntity.getCode() == ServerErrorCode.Passport.CAPTCHA_NOT_MATCH) { - LOGGER.error("This account need captcha to login, ignore test"); - return; - } - RefreshTokenResponseEntity refreshTokenResponseEntity = BilibiliSecurityHelper.refreshToken( - new BilibiliAPI(), - loginResponseEntity.getData().getAccessToken(), - loginResponseEntity.getData().getRefreshToken() - ); - LOGGER.info("{}", GSON.toJson(refreshTokenResponseEntity)); - BilibiliSecurityHelper.logout(new BilibiliAPI(), refreshTokenResponseEntity.getData().getAccessToken()); - } - - @Test - public void refreshTokenWithWrongToken() throws Exception { - RefreshTokenResponseEntity refreshTokenResponseEntity = BilibiliSecurityHelper.refreshToken( - new BilibiliAPI(), - "token", - "refreshToken" - ); - LOGGER.info("{}", refreshTokenResponseEntity.getMessage()); - } - - @Test - public void refreshTokenWithWrongRefreshToken() throws Exception { - LoginResponseEntity loginResponseEntity = BilibiliSecurityHelper.login( - new BilibiliAPI(), - CONFIG.getUsername(), - CONFIG.getPassword() - ); - if (loginResponseEntity.getCode() == ServerErrorCode.Passport.CAPTCHA_NOT_MATCH) { - LOGGER.error("This account need captcha to login, ignore test"); - return; - } - String accessToken = loginResponseEntity.getData().getAccessToken(); - RefreshTokenResponseEntity refreshTokenResponseEntity = BilibiliSecurityHelper.refreshToken( - new BilibiliAPI(), - accessToken, - "refreshToken" - ); - LOGGER.info("{}", refreshTokenResponseEntity.getMessage()); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/SendBulletScreenTest.java b/src/test/java/com/hiczp/bilibili/api/test/SendBulletScreenTest.java deleted file mode 100644 index eef26d5..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/SendBulletScreenTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.live.entity.BulletScreenEntity; -import org.junit.Test; - -public class SendBulletScreenTest { - private static final long ROOM_ID = 1110317; - private static final BilibiliAPI BILIBILI_API = Config.getBilibiliAPI(); - - @Test - public void sendBulletScreen() throws Exception { - BILIBILI_API.getLiveService() - .sendBulletScreen( - new BulletScreenEntity( - ROOM_ID, - BILIBILI_API.getBilibiliAccount().getUserId(), - "这是自动发送的弹幕" - ) - ).execute(); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/SsoTest.java b/src/test/java/com/hiczp/bilibili/api/test/SsoTest.java deleted file mode 100644 index bd3007a..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/SsoTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.hiczp.bilibili.api.BilibiliAPI; -import okhttp3.Cookie; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.List; -import java.util.Map; - -public class SsoTest { - private static final Logger LOGGER = LoggerFactory.getLogger(SsoTest.class); - private static final BilibiliAPI BILIBILI_API = Config.getBilibiliAPI(); - - @Test - public void getSsoUrlTest() { - LOGGER.info("SSO Url: {}", BILIBILI_API.getSsoUrl("https://account.bilibili.com/account/home")); - } - - @Test - public void toCookiesTest() throws Exception { - Map<String, List<Cookie>> cookiesMap = BILIBILI_API.toCookies(); - StringBuilder stringBuilder = new StringBuilder(); - cookiesMap.forEach((domain, cookies) -> { - stringBuilder.append("domain: ").append(domain).append("\n"); - cookies.forEach(cookie -> - stringBuilder.append("\t").append(cookie.name()).append("=").append(cookie.value()).append("\n") - ); - }); - LOGGER.info("Cookies below: \n{}", stringBuilder.toString()); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/UserInfoTest.java b/src/test/java/com/hiczp/bilibili/api/test/UserInfoTest.java deleted file mode 100644 index 8b7af14..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/UserInfoTest.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.hiczp.bilibili.api.BilibiliAPI; -import com.hiczp.bilibili.api.passport.entity.InfoEntity; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UserInfoTest { - private static final Logger LOGGER = LoggerFactory.getLogger(UserInfoTest.class); - private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); - private static final BilibiliAPI BILIBILI_API = Config.getBilibiliAPI(); - - @Test - public void getUserInfo() throws Exception { - InfoEntity infoEntity = BILIBILI_API.getAccountInfo(); - LOGGER.info("UserInfo below: \n{}", GSON.toJson(infoEntity)); - } -} diff --git a/src/test/java/com/hiczp/bilibili/api/test/WebAPITest.java b/src/test/java/com/hiczp/bilibili/api/test/WebAPITest.java deleted file mode 100644 index a9e8803..0000000 --- a/src/test/java/com/hiczp/bilibili/api/test/WebAPITest.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hiczp.bilibili.api.test; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.hiczp.bilibili.api.web.BilibiliWebAPI; -import com.hiczp.bilibili.api.web.live.entity.UserInfoEntity; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - -public class WebAPITest { - private static final Logger LOGGER = LoggerFactory.getLogger(WebAPITest.class); - private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); - private BilibiliWebAPI bilibiliWebAPI; - - public WebAPITest() { - try { - this.bilibiliWebAPI = Config.getBilibiliAPI().getBilibiliWebAPI(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Test - public void getUserInfo() throws IOException { - UserInfoEntity userInfoEntity = bilibiliWebAPI.getLiveService().getUserInfo() - .execute() - .body(); - LOGGER.info("User info below: \n{}", GSON.toJson(userInfoEntity)); - } -} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/Config.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/Config.kt new file mode 100644 index 0000000..fbec339 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/Config.kt @@ -0,0 +1,29 @@ +package com.hiczp.bilibili.api.test + +import com.github.salomonbrys.kotson.byString +import com.github.salomonbrys.kotson.fromJson +import com.google.gson.JsonObject +import com.hiczp.bilibili.api.BilibiliClient +import com.hiczp.bilibili.api.gson +import okhttp3.logging.HttpLoggingInterceptor + +//配置文件 +private val config = gson.fromJson<JsonObject>( + Config::class.java.getResourceAsStream("/config.json").reader() +) + +//未登录的实例 +val noLoginBilibiliClient = BilibiliClient(logLevel = HttpLoggingInterceptor.Level.BODY) + +//登陆过的实例 +val bilibiliClient by lazy { + BilibiliClient(logLevel = HttpLoggingInterceptor.Level.BODY).apply { + loginResponse = config["loginResponse"]?.let { gson.fromJson(it) } + } +} + +object Config { + val username by config.byString + + val password by config.byString +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/DanmakuTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/DanmakuTest.kt new file mode 100644 index 0000000..e4c3534 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/DanmakuTest.kt @@ -0,0 +1,21 @@ +package com.hiczp.bilibili.api.test + +import com.hiczp.bilibili.api.danmaku.DanmakuParser +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class DanmakuTest { + //6250 行弹幕的解析加用户 ID 反查在 4098ms 内完成(i7-8700) + @Test + fun fetchAndParseDanmaku() { + runBlocking { + //著名的炮姐视频 你指尖跃动的电光是我此生不变的信仰 + val responseBody = bilibiliClient.danmakuAPI.list(aid = 810872, oid = 1176840).await() + printTimeMillis { + DanmakuParser.parse(responseBody.byteStream()).second.forEach { + println("[${it.time}] ${it.calculatePossibleUserIds()} ${it.content}") + } + } + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/EnterRoomTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/EnterRoomTest.kt new file mode 100644 index 0000000..fd65eb9 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/EnterRoomTest.kt @@ -0,0 +1,32 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class EnterRoomTest { + @Test + fun enterRoom() { + runBlocking { + with(bilibiliClient.liveAPI) { + //下面模拟一个客户端进房时会访问的接口 + val (roomId, uid) = mobileRoomInit(3).await().data.let { it.roomId to it.uid } + roomEntryAction(roomId).await() + val data = getInfo(roomId).await().data + isFollowed(uid).await() + getAnchorInRoom(roomId).await() + getUser().await() + getUserInfoInRoom(roomId).await() + getTitle().await() + mobileTab(roomId).await() + roomMessage(roomId).await().data.room.forEach { + println("${it.nickname}: ${it.text}") + } + val (areaId, parentAreaId) = data.let { it.areaId to it.parentAreaId } + mobileRoomBanner(areaId, parentAreaId, roomId, uid).await() + getGiftConfig(areaId, parentAreaId, roomId).await() + roomRank(areaId, parentAreaId, roomId, uid).await() + getDanmakuConfig(roomId).await() + } + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/FetchReplyTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/FetchReplyTest.kt new file mode 100644 index 0000000..7ec9752 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/FetchReplyTest.kt @@ -0,0 +1,86 @@ +package com.hiczp.bilibili.api.test + +import com.hiczp.bilibili.api.BilibiliClient +import com.hiczp.bilibili.api.list +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.async +import kotlinx.coroutines.runBlocking +import okhttp3.logging.HttpLoggingInterceptor +import org.junit.jupiter.api.Test + +class FetchReplyTest { + @Test + fun fetchReply() { + runBlocking { + noLoginBilibiliClient.mainAPI.reply(oid = 44154463).await() + } + } + + @Test + fun fetchChildReply() { + runBlocking { + noLoginBilibiliClient.mainAPI.childReply(oid = 16622855, root = 1405602348).await() + } + } + + //打印一个视频下全部的评论 + @Test + fun printAllReplies() { + val aid = 150998L + val bilibiliClient = BilibiliClient(logLevel = HttpLoggingInterceptor.Level.BASIC) + + printTimeMillis { + var total: Int? = null + var next: Long = 0 + runBlocking { + //pageSize=1 来获得评论总楼层数量 + val reply = bilibiliClient.mainAPI.reply(oid = aid, pageSize = 1).await() + //得到评论总数(根评论+子评论) + total = reply.data.cursor.allCount + //最后一楼 + next = reply.data.cursor.next + } + + //如果没有评论则不做进一步操作 + if (total == null) { + println("<NoReply>") + return@printTimeMillis + } + + val pages = list { + //访问每个页 + //如果根评论数量刚好能被 50 整除, 那么最后一次访问时的 next 为 1, 这会导致 replies 为 null + //因此 downTo 2 + for (i in next + 1 downTo 2 step 50) { + GlobalScope.async { + //一个页下的所有根评论 + val replies = bilibiliClient.mainAPI.reply(oid = aid, next = i, pageSize = 50).await().data.replies + //获取根评论(复数)的子评论 + replies!!.map { + it to if (it.rcount == 0) { + null + } else { + bilibiliClient.mainAPI.childReply(oid = aid, root = it.rpid, size = Int.MAX_VALUE).await().data.root.replies + } + } + }.let { + add(it) + } + } + } + + //join + runBlocking { + pages.forEach { page -> + page.await().forEach { (rootReply, childReplies) -> + //输出这一页的评论 + println("#${rootReply.floor} [${rootReply.member.uname}] ${rootReply.content.message}") + childReplies?.forEach { + println("└──#${it.floor} [${it.member.uname}] ${it.content.message}") + } + } + } + } + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/LiveClientTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/LiveClientTest.kt new file mode 100644 index 0000000..1372972 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/LiveClientTest.kt @@ -0,0 +1,64 @@ +package com.hiczp.bilibili.api.test + +import com.github.salomonbrys.kotson.byString +import com.hiczp.bilibili.api.BilibiliClient +import com.hiczp.bilibili.api.isNotEmpty +import com.hiczp.bilibili.api.live.websocket.DanmakuMessage +import com.hiczp.bilibili.api.live.websocket.liveClient +import io.ktor.http.cio.websocket.CloseReason +import kotlinx.coroutines.delay +import kotlinx.coroutines.runBlocking +import okhttp3.logging.HttpLoggingInterceptor +import org.junit.jupiter.api.Test +import java.nio.file.Paths +import java.time.Instant + +class LiveClientTest { + @Test + fun liveClient() { + val path = Paths.get("record/直播弹幕/").also { + it.toFile().mkdirs() + } + + BilibiliClient(logLevel = HttpLoggingInterceptor.Level.BASIC) + .apply { + loginResponse = bilibiliClient.loginResponse + } + .liveClient(roomId = 3, sendUserOnlineHeart = true) { + onConnect = { + println("Connected ${Instant.now()}") + } + + onPopularityPacket = { _, popularity -> + println("Current popularity: $popularity ${Instant.now()}") + } + + onCommandPacket = { _, jsonObject -> + val json = jsonObject.toString() + val cmd by jsonObject.byString + path.resolve("$cmd.json").toFile().run { + if (!exists()) writeText(json) + } + + println( + if (cmd == "DANMU_MSG") { + with(DanmakuMessage(jsonObject)) { + "${if (fansMedalInfo.isNotEmpty()) "[$fansMedalName $fansMedalLevel] " else ""}[UL$userLevel] $nickname: $message" + } + } else { + json + } + ) + } + + onClose = { liveClient, closeReason -> + println("$closeReason ${Instant.now()}") + if (closeReason?.code != CloseReason.Codes.NORMAL.code) liveClient.launch() + } + }.launch() + + runBlocking { + delay(99999999999999999) + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/LoginTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/LoginTest.kt new file mode 100644 index 0000000..725ff6e --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/LoginTest.kt @@ -0,0 +1,21 @@ +package com.hiczp.bilibili.api.test + +import com.hiczp.bilibili.api.BilibiliClient +import kotlinx.coroutines.delay +import kotlinx.coroutines.runBlocking +import okhttp3.logging.HttpLoggingInterceptor +import org.junit.jupiter.api.Test + +class LoginTest { + @Test + fun loginAndLogout() { + runBlocking { + BilibiliClient(logLevel = HttpLoggingInterceptor.Level.BODY) + .run { + login(Config.username, Config.password) + delay(1000) + logout() + } + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/PlayUrlTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/PlayUrlTest.kt new file mode 100644 index 0000000..cd4d901 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/PlayUrlTest.kt @@ -0,0 +1,27 @@ +package com.hiczp.bilibili.api.test + +import com.google.gson.GsonBuilder +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class PlayUrlTest { + @Test + fun videoPlayUrl() { + runBlocking { + bilibiliClient.playerAPI.run { + videoPlayUrl(aid = 41517911, cid = 72913641).await() + } + } + } + + @Test + fun bangumiPlayUrl() { + runBlocking { + bilibiliClient.playerAPI.run { + bangumiPlayUrl(aid = 42714241, cid = 74921228).await().let { + GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create().toJson(it) + }.let(::println) + } + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/SearchTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/SearchTest.kt new file mode 100644 index 0000000..ad1bd57 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/SearchTest.kt @@ -0,0 +1,41 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class SearchTest { + @Test + fun search() { + runBlocking { + bilibiliClient.appAPI.search(keyword = "鹿乃").await() + } + } + + @Test + fun searchBangumi() { + runBlocking { + bilibiliClient.appAPI.searchBangumi(keyword = "凉宫春日").await() + } + } + + @Test + fun searchUser() { + runBlocking { + bilibiliClient.appAPI.searchUser(keyword = "czp").await() + } + } + + @Test + fun searchMovie() { + runBlocking { + bilibiliClient.appAPI.searchMovie(keyword = "透视人体").await() + } + } + + @Test + fun searchArticle() { + runBlocking { + bilibiliClient.appAPI.searchArticle(keyword = "欧陆风云").await() + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/SeasonTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/SeasonTest.kt new file mode 100644 index 0000000..19bd136 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/SeasonTest.kt @@ -0,0 +1,13 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class SeasonTest { + @Test + fun season() { + runBlocking { + noLoginBilibiliClient.mainAPI.season(episodeId = 250536).await() + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/SendDanmakuTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/SendDanmakuTest.kt new file mode 100644 index 0000000..daa4227 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/SendDanmakuTest.kt @@ -0,0 +1,13 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class SendDanmakuTest { + @Test + fun sendDanmaku() { + runBlocking { + bilibiliClient.mainAPI.sendDanmaku(aid = 40675923, cid = 71438168, progress = 2297, message = "2333").await() + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/SendLiveMessageTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/SendLiveMessageTest.kt new file mode 100644 index 0000000..2b6911d --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/SendLiveMessageTest.kt @@ -0,0 +1,14 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class SendLiveMessageTest { + @Test + fun sendMessage() { + runBlocking { + bilibiliClient.liveAPI + .sendMessage(cid = 29434, mid = 20293030, message = "自动捧场机器人").await() + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/SendReplyTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/SendReplyTest.kt new file mode 100644 index 0000000..935f1b1 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/SendReplyTest.kt @@ -0,0 +1,16 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class SendReplyTest { + @Test + fun sendRootReply() { + runBlocking { + bilibiliClient.mainAPI.sendReply( + oid = 9498716, + message = "这是自动发送的评论 ${System.currentTimeMillis()}" + ).await() + } + } +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/TestExtension.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/TestExtension.kt new file mode 100644 index 0000000..deb0069 --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/TestExtension.kt @@ -0,0 +1,11 @@ +package com.hiczp.bilibili.api.test + +import kotlin.system.measureTimeMillis + +/** + * 输出执行时间 + */ +inline fun printTimeMillis(block: () -> Unit) { + val time = measureTimeMillis(block) + println("Done in $time ms") +} diff --git a/src/test/kotlin/com/hiczp/bilibili/api/test/UserInfoTest.kt b/src/test/kotlin/com/hiczp/bilibili/api/test/UserInfoTest.kt new file mode 100644 index 0000000..cda839f --- /dev/null +++ b/src/test/kotlin/com/hiczp/bilibili/api/test/UserInfoTest.kt @@ -0,0 +1,20 @@ +package com.hiczp.bilibili.api.test + +import kotlinx.coroutines.runBlocking +import org.junit.jupiter.api.Test + +class UserInfoTest { + @Test + fun appInfo() { + runBlocking { + bilibiliClient.appAPI.myInfo().await() + } + } + + @Test + fun oauthInfo() { + runBlocking { + bilibiliClient.passportAPI.info(accessToken = bilibiliClient.token!!).await() + } + } +} diff --git a/src/test/resources/_config.json b/src/test/resources/_config.json new file mode 100644 index 0000000..cd4d587 --- /dev/null +++ b/src/test/resources/_config.json @@ -0,0 +1,64 @@ +{ + "username": "123456789", + "password": "123456", + "roomId": "3", + "loginResponse": { + "ts": 1550629285, + "code": 0, + "data": { + "status": 0, + "token_info": { + "mid": 20293030, + "access_token": "b0b214e97b7bf388769eb727da27f951", + "refresh_token": "54c56bda9bde64cacb44a14e92007d51", + "expires_in": 2592000 + }, + "cookie_info": { + "cookies": [ + { + "name": "bili_jct", + "value": "578b271b308c760cbd281c37afc420c4", + "http_only": 0, + "expires": 1553221285 + }, + { + "name": "DedeUserID", + "value": "20293035", + "http_only": 0, + "expires": 1553221285 + }, + { + "name": "DedeUserID__ckMd5", + "value": "cdff5c8e58b793cd", + "http_only": 0, + "expires": 1553221285 + }, + { + "name": "sid", + "value": "ja724hee", + "http_only": 0, + "expires": 1553221285 + }, + { + "name": "SESSDATA", + "value": "eaa5b420%2C1553221285%2C59590a31", + "http_only": 1, + "expires": 1553221285 + } + ], + "domains": [ + ".bilibili.com", + ".biligame.com", + ".im9.com", + ".bigfunapp.cn" + ] + }, + "sso": [ + "https://passport.bilibili.com/api/v2/sso", + "https://passport.biligame.com/api/v2/sso", + "https://passport.im9.com/api/v2/sso", + "https://passport.bigfunapp.cn/api/v2/sso" + ] + } + } +} diff --git a/src/test/resources/config-template.json b/src/test/resources/config-template.json deleted file mode 100644 index 12086c0..0000000 --- a/src/test/resources/config-template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "username": "xxxxx", - "password": "xxxxx", - "roomId": "1110317" -}