type 1大会员B币券 2 大会员福利.
(int type)
| 37 | * type 1大会员B币券 2 大会员福利. |
| 38 | */ |
| 39 | public static void getVipPrivilege(int type) { |
| 40 | String requestBody = "type=" + type |
| 41 | + "&csrf=" + ConfigLoader.helperConfig.getBiliVerify().getBiliJct(); |
| 42 | JsonObject jsonObject = HttpUtils.doPost(ApiList.VIP_PRIVILEGE_RECEIVE, requestBody); |
| 43 | int responseCode = jsonObject.get("code").getAsInt(); |
| 44 | if (responseCode == 0) { |
| 45 | if (type == 1) { |
| 46 | log.info("领取年度大会员每月赠送的B币券成功"); |
| 47 | } else if (type == 2) { |
| 48 | log.info("领取大会员福利/权益成功"); |
| 49 | } |
| 50 | } else { |
| 51 | log.warn("领取年度大会员每月赠送的B币券/大会员福利失败,原因: {}", jsonObject.get("message").getAsString()); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * 请求视频title,未获取到时返回bvid. |
no test coverage detected