From 2227237f685cdd46f52407b1956a7911026194d9 Mon Sep 17 00:00:00 2001 From: czp Date: Sun, 4 Feb 2018 03:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=BA=E7=9C=81=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hiczp/bilibili/api/live/LiveService.java | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/hiczp/bilibili/api/live/LiveService.java b/src/main/java/com/hiczp/bilibili/api/live/LiveService.java index 0a907d7..8886737 100644 --- a/src/main/java/com/hiczp/bilibili/api/live/LiveService.java +++ b/src/main/java/com/hiczp/bilibili/api/live/LiveService.java @@ -45,30 +45,22 @@ public interface LiveService { Call getUserInfo(); //这里的 cid 必须用实际的 room_id, 不能使用 show_room_id, 否则得不到 playUrl. 实际 room_id 要首先通过 getRoomInfo() 获取 - //outputType 为固定值 "json", 否则返回的内容是 XML, 如下所示(本 API 无法解析, 将直接抛出 JsonParseException) - // + //outputType 为固定值 "json", 否则返回的内容是 XML(本 API 无法解析, 将直接抛出 JsonParseException) @GET("api/playurl") Call getPlayUrl(@Query("cid") long cid, @Query("otype") String outputType); + default Call getPlayUrl(long cid) { + return getPlayUrl(cid, "json"); + } + @POST("mobile/userOnlineHeart") @FormUrlEncoded Call sendOnlineHeart(@Field("room_id") long roomId, @Field("scale") String scale); + default Call sendOnlineHeart(long roomId) { + return sendOnlineHeart(roomId, "xxhdpi"); + } + @POST("api/sendmsg") @FormUrlEncoded Call sendBulletScreen(@Field("cid") long cid,