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

Class LiveChecking

src/main/java/top/misec/task/LiveChecking.java:16–35  ·  view source on GitHub ↗

直播签到. @author @JunzhouLiu @Kurenai @since 2020-11-22 5:42

Source from the content-addressed store, hash-verified

14 * @since 2020-11-22 5:42
15 */
16@Slf4j
17public class LiveChecking implements Task {
18 @Override
19 public void run() {
20 JsonObject liveCheckInResponse = HttpUtils.doGet(ApiList.LIVE_CHECKING);
21 int code = liveCheckInResponse.get(STATUS_CODE_STR).getAsInt();
22 if (code == 0) {
23 JsonObject data = liveCheckInResponse.get("data").getAsJsonObject();
24 log.info("直播签到成功,本次签到获得{},{}", data.get("text").getAsString(), data.get("specialText").getAsString());
25 } else {
26 String message = liveCheckInResponse.get("message").getAsString();
27 log.warn("直播签到失败: {}", message);
28 }
29 }
30
31 @Override
32 public String getName() {
33 return "直播签到";
34 }
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…