MCPcopy Create free account
hub / github.com/OreosLab/bili / getRoomInfoOld

Method getRoomInfoOld

src/main/java/top/misec/task/GiveGift.java:117–125  ·  view source on GitHub ↗

根据 uid 获取其 roomid @param mid 即 uid. @return String 返回一个直播间id. @author srcrs. @since 2020-11-20.

(String mid)

Source from the content-addressed store, hash-verified

115 * @since 2020-11-20.
116 */
117 public String getRoomInfoOld(String mid) {
118 JsonObject pJson = new JsonObject();
119 pJson.addProperty("mid", Integer.parseInt(mid));
120 String urlPram = "?mid=" + mid;
121 return HttpUtils.doGet("https://api.bilibili.com/x/space/acc/info" + urlPram)
122 .get("data").getAsJsonObject()
123 .get("live_room").getAsJsonObject()
124 .get("roomid").getAsString();
125 }
126
127 /**
128 * B站直播获取背包礼物.

Callers 1

getuidAndRidMethod · 0.95

Calls 1

doGetMethod · 0.95

Tested by

no test coverage detected