diff --git a/README.md b/README.md index 57a850f..99453f7 100644 --- a/README.md +++ b/README.md @@ -1,483 +1,8 @@ -# 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) - -# 使用 -## RESTFul API -由于B站 API 设计清奇, 一些显然不需要登录的 API 也需要登录, 所以所有 API 尽可能登陆后访问以免失败. - -### 登录 -使用账户名和密码作为登录参数 - - String username = "yourUsername"; - String password = "yourPassword"; - BilibiliAPI bilibiliAPI = new BilibiliAPI(); - LoginResponseEntity loginResponseEntity = bilibiliAPI.login(String username, String password); - -IOException 在网络故障时抛出 - -LoginException 在用户名密码不匹配时抛出 - -CaptchaMismatchException 在验证码不正确时抛出, 见下文 [验证码问题](#验证码问题) 一节 - -login 方法的返回值为 LoginResponseEntity 类型, 使用 - - 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 - ); - } - -验证码是通过访问 https://passport.bilibili.com/captcha 这个地址获得的. - -访问这个地址需要带有一个 cookie, cookie 里面要有 "sid=xxx", 然后服务端会记录下对应关系, 也就是 sid xxx 对应验证码 yyy, 然后就可以验证了. - -我们会发现, 访问任何 passport.bilibili.com 下面的地址, 都会被分发一个 cookie, 里面带有 sid 的值. 我们访问 /captcha 也会被分发一个 cookie, 但是这个通过访问 captcha 而被分发得到的 cookie 和访问得到的验证码图片, 没有对应关系. 推测是因为 cookie 的发放在请求进入甚至模块运行完毕后才进行. - -所以我们如果不带 cookie 去访问 /captcha, 我们这样拿到的由 /captcha 返回的 cookie 和 验证码, 是不匹配的. - -所以我们要先从其他地方获取一个 cookie. - -我们可以用 /api/oauth2/getKey(获取加密密码用的 hash 和公钥) 来获取一个 cookie - - 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()); - } - } - -如果持续 40 秒(心跳包为 30 秒)没有收到任何消息, 将视为掉线, 会跟服务器主动断开连接一样(这通常是发送了服务器无法读取的数据包)触发一次 ConnectionCloseEvent. - - liveClient.closeChannel(); - -即可阻塞关闭连接. - - liveClient.closeChannelAsync(); - -即可异步关闭连接. - - eventLoopGroup.shutdownGracefully(); - -即可关闭事件循环, 结束 Nio 工作线程(所有使用这个 EventLoopGroup 的 LiveClient 也将在此时被关闭). - -如果需要在直播间发送弹幕可以直接使用如下代码(需要先登录) - - String message = "这是一条弹幕"; - liveClient.sendBulletScreen(message); - -所有的事件(有些数据包我也不知道它里面的一些值是什么含义, /record 目录下面有抓取到的 Json, 可以用来查看): - -| 事件 | 抛出条件 | 含义 | -| :--- | :--- | :--- | -| 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 数据包 | 许愿瓶 | - -事件里面可以取到解析好的 POJO, 然后可以从里面取数据, 见上面的监听器示例. - -# 特别说明 -## DANMU_MSG 中的各个字段含义 -在直播间实时弹幕推送流中, 存在一种类型为 DANMU_MSG 的数据包, 它里面存储的 JSON, 全部都是 JsonArray, 并且每个元素类型不一样, 含义不一样. - -简单地说, 这个 JSON 完全无法自描述而且很多字段猜不到是什么含义, 它的示例见 /record 文件夹(还有一份带备注的版本, 里面记录了已经猜出的字段含义). - -已经猜出的字段, 可以直接从 DanMuMsgEntity 里面用对应的方法取得, 对于没有猜出的字段, 需要类似这样来获取: - - int something = danMuMsgEntity.getInfo().get(0).getAsJsonArray().get(2).getAsInt(); - -如果你可以明确其中的字段含义, 欢迎提交 issue. - -## 直播间 ID 问题 -一个直播间, 我们用浏览器去访问它, 他可能是这样的 - - http://live.bilibili.com/3 - -我们可能会以为后面的 3 就是这个直播间的 room_id, 其实并不是. - -我们能直接看到的这个号码, 其实是 show_room_id. - -所有直播间号码小于 1000 的直播间, show_room_id 和 room_id 是不相等的(room_id 在不少 API 里又叫 cid). - -一些 API 能提供自动跳转功能, 也就是用这个 show_room_id 作为参数, 返回的信息是跳转到对应的 room_id 之后的返回信息. - -简单地说, 一些 API 用 show_room_id 作为参数可以正常工作, 而另一些不能. 所以尽可能使用 room_id 作为参数来调用 API. - -room_id 的获取要通过 - - http://api.live.bilibili.com/AppRoom/index?room_id=3&platform=android - -其中, response.data.room_id 就是其真实的 room_id, 例子中的这个直播间的真实 room_id 为 23058 - -在代码中我们这样做 - - long showRoomId = 3; - long roomId = bilibiliAPI.getLiveService() - .getRoomInfo(showRoomId) - .execute() - .body() - .getData() - .getRoomId(); - -由此, 我们获得了直播间的真实 room_id, 用它访问其他 API 就不会出错了. - -## 服务器返回非 0 返回值时 -当服务器返回的 JSON 中的 code 字段非 0 时(有错误发生), 该 JSON 可能是由服务端过滤器统一返回的, 因此其 JSON 格式(字段类型)将和实体类不一样, 此时会导致 JsonParseErrorException. - -为了让调用代码不需要写很多 try catch, 因此当服务器返回的 code 非 0 时, 封装好的 OkHttpClientInterceptor 将把 data 字段变为 null(发生错误时, data 字段没有实际有效的数据). - -因此只需要判断 code 是否是 0 即可知道 API 是否成功执行, 不需要异常捕获. - -(B站所有 API 无论是否执行成功, HttpStatus 都是 200, 判断 HTTP 状态码是无用的, 必须通过 JSON 中的 code 字段来知道 API 是否执行成功). - -# 测试 -测试前需要先设置用户名和密码, 在 src/test/resources 目录下, 找到 config-template.json, 将其复制一份到同目录下并命名为 config.json 然后填写其中的字段即可. - -本项目使用 JUnit 作为单元测试框架. 命令行只需要执行 - - gradle test - -如果要在 IDEA 上进行测试, 需要运行 test 目录中的 RuleSuite 类(在 IDEA 中打开这个类, 点击行号上的重叠的两个向右箭头图标). - -# 继续开发 -如果您想加入到开发中, 欢迎提交 Merge Request. - -本项目的 Http 请求全部使用 Retrofit 完成, 因此请求的地址和参数需要放在接口中统一管理, 如果您对 Retrofit 不是很熟悉, 可以看[这篇文章](http://square.github.io/retrofit/). - -服务器返回值将被 Gson 转换为 Java POJO(Entity), 通过[这篇文章](https://github.com/google/gson/blob/master/UserGuide.md)来了解 Gson. - -POJO 使用 IDEA 插件 [GsonFormat](https://plugins.jetbrains.com/plugin/7654-gsonformat) 自动化生成, 而非手动编写, 并且尽可能避免对自动生成的结果进行修改以免导致可能出现混淆或含义不明确的情况. - -(插件必须开启 "use SerializedName" 选项从而保证字段名符合小驼峰命名法) - -由于 B站 一些 JSON 是瞎鸡巴来的, 比如可能出现以下这种情况 - - "list": [ - { - "name": "value", - }, - ... - ] - -此时自动生成的类型将是 - - List lists - -因此必须要为内层元素指定一个具有语义的名称, 例如 Name, 此时类型变为 - - List names - -API 尽可能按照 UI 位置来排序, 例如 - - 侧拉抽屉 -> 直播中心 -> 我的关注 - -这是 "直播中心" 页面的第一个可点击控件, 那么下一个 API 或 API 组就应该是第二个可点击组件 "观看历史". - -和 UI 不对应的 API, 按照执行顺序排序, 例如进入直播间会按顺序访问一系列 API, 这些 API 就按照时间顺序排序. - -对于不知道怎么排的 API, 瞎鸡巴排就好了. +# 重构 +使用 Kotlin 重构中... # License GPL V3 diff --git a/build.gradle b/build.gradle index 8dc3c69..c3b96e0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,109 +1,35 @@ +buildscript { + ext { + kotlin_version = '1.3.21' + jvm_target = JavaVersion.VERSION_1_10 + } + + 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: 'signing' - -sourceCompatibility = 1.8 +apply plugin: 'kotlin' repositories { mavenCentral() } +//kotlin dependencies { - // https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit - compile group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.4.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' - // 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' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' } - -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' +compileKotlin { + kotlinOptions.jvmTarget = jvm_target } - -task sourcesJar(type: Jar, dependsOn: classes) { - description 'Package source code to jar,' - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - description 'Package javadoc to jar,' - classifier = 'javadoc' - from javadoc -} - -artifacts { - archives sourcesJar - archives javadocJar -} - -signing { - required { gradle.taskGraph.hasTask(uploadArchives) } - sign configurations.archives -} - -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> - signing.signPom(deployment) - } - - 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) - } - - 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' - } - - licenses { - license { - 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/' - } - } - } - } - } +compileTestKotlin { + kotlinOptions.jvmTarget = jvm_target } 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..2ec6aea 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.2-all.zip 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/BilibiliClient.kt b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClient.kt new file mode 100644 index 0000000..1eccdac --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClient.kt @@ -0,0 +1,34 @@ +package com.hiczp.bilibili.api + +import java.time.Instant + +/** + * 此类表示一个模拟的 Bilibili 客户端(Android), 所有调用由此开始. + * 多个 BilibiliClient 实例之间不共享登陆状态. + * 不能严格保证线程安全. + * + * @param billingClientProperties 客户端的固有属性, 是一种常量 + */ +class BilibiliClient( + @Suppress("MemberVisibilityCanBePrivate") + var billingClientProperties: BilibiliClientProperties = BilibiliClientProperties() +) { + /** + * 客户端被打开的时间(BilibiliClient 被实例化的时间) + */ + val clientInitTime = Instant.now().epochSecond + + /** + * 登陆 + */ + fun login(username: String, password: String) { + TODO() + } + + /** + * 登出 + */ + fun logout() { + TODO() + } +} 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..1cee0b3 --- /dev/null +++ b/src/main/kotlin/com/hiczp/bilibili/api/BilibiliClientProperties.kt @@ -0,0 +1,50 @@ +package com.hiczp.bilibili.api + +/** + * 客户端固有属性. 包括版本号, 密钥以及硬件编码. + */ +class BilibiliClientProperties { + /** + * Android 平台的 appKey + */ + var appKey = "1d8b6e7d45233436" + + /** + * 由反编译 so 文件得到的 appSecret, 与 appKey 必须匹配 + */ + @Suppress("SpellCheckingInspection") + var appSecret = "560c52ccd288fed045859ed18bffd973" + + /** + * 硬件 ID, 尚不明确生成算法. 在每台手机上固定 + */ + @Suppress("SpellCheckingInspection") + var hardwareId = "JxdyESFAJkcjEicQbBBsCTlbal5uX2Y" + + /** + * 屏幕尺寸, 大屏手机(已经没有小屏手机了)统一为 xxhdpi + */ + var scale = "xxhdpi" + + /** + * 构建版本号 + * 默认值对应 5.37.0(release-b220051) 版本 + */ + var build = "5370000" + + /** + * 构建版本 ID, 可能是某种 Hash + */ + var buildVersionId = "XXD9E43D7A1EBB6669597650E3EE417D9E7F5" + + /** + * 客户端类型(似乎只有 H5 一种类型) + * 此属性在旧版客户端不存在 + */ + var channel = "html5_app_bili" + + /** + * 客户端平台 + */ + var platform = "android" +} 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/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" -}