mirror of
https://github.com/czp3009/bilibili-api.git
synced 2025-03-21 21:00:26 +08:00
添加 live 有关 API
AppExchange/silver2coin
This commit is contained in:
parent
66187c427a
commit
abf256876c
@ -1,5 +1,5 @@
|
|||||||
group = 'com.hiczp'
|
group = 'com.hiczp'
|
||||||
version = '0.0.7'
|
version = '0.0.8'
|
||||||
description = 'Bilibili android client API library written in Java'
|
description = 'Bilibili android client API library written in Java'
|
||||||
|
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
@ -38,6 +38,8 @@ public class ServerErrorCode {
|
|||||||
public static final int USER_NO_LOGIN = 3;
|
public static final int USER_NO_LOGIN = 3;
|
||||||
//"请登录"
|
//"请登录"
|
||||||
public static final int PLEASE_LOGIN = 401;
|
public static final int PLEASE_LOGIN = 401;
|
||||||
|
//"每天最多能兑换 1 个"
|
||||||
|
public static final int FORBIDDEN = 403;
|
||||||
//"请登录"
|
//"请登录"
|
||||||
public static final int PLEASE_LOGIN0 = 32205;
|
public static final int PLEASE_LOGIN0 = 32205;
|
||||||
//"请先登录"
|
//"请先登录"
|
||||||
|
@ -214,12 +214,21 @@ public interface LiveService {
|
|||||||
//是的, 你没看错, 是 GET 方式
|
//是的, 你没看错, 是 GET 方式
|
||||||
@GET("AppUser/wearTitle")
|
@GET("AppUser/wearTitle")
|
||||||
Call<WearTitleResponseEntity> wearTitle(@Query("title") String title);
|
Call<WearTitleResponseEntity> wearTitle(@Query("title") String title);
|
||||||
|
//TODO 取消佩戴
|
||||||
|
|
||||||
//TODO 获奖记录
|
//TODO 获奖记录
|
||||||
|
|
||||||
//TODO 瓜子商店
|
//瓜子商店
|
||||||
//侧拉抽屉 -> 直播中心 -> 瓜子商店 -> 银瓜子兑换 -> 硬币银瓜子互换 -> 兑换硬币
|
//侧拉抽屉 -> 直播中心 -> 瓜子商店 -> 银瓜子兑换 -> 硬币银瓜子互换 -> 兑换硬币
|
||||||
//将 700 银瓜子兑换为 1 硬币, 每个用户每天只能换一次
|
//将 700 银瓜子兑换为 1 硬币, 每个用户每天只能换一次
|
||||||
|
//actionKey 是固定值, 为 "appkey"
|
||||||
|
//已经兑换过时返回 403
|
||||||
|
@POST("AppExchange/silver2coin")
|
||||||
|
Call<Silver2CoinResponseEntity> silver2Coin(@Query("actionKey") String actionKey);
|
||||||
|
|
||||||
|
default Call<Silver2CoinResponseEntity> silver2Coin() {
|
||||||
|
return silver2Coin("appkey");
|
||||||
|
}
|
||||||
|
|
||||||
//扭蛋机
|
//扭蛋机
|
||||||
//侧拉抽屉 -> 直播中心 -> 扭蛋机 -> 普通扭蛋
|
//侧拉抽屉 -> 直播中心 -> 扭蛋机 -> 普通扭蛋
|
||||||
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.hiczp.bilibili.api.live.entity;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class Silver2CoinResponseEntity {
|
||||||
|
/**
|
||||||
|
* code : 0
|
||||||
|
* msg : 兑换成功
|
||||||
|
* message : 兑换成功
|
||||||
|
* data : {"silver":"22494","gold":"0","tid":"e32cb3fc6bca9a7dff343469b1ff981f2123","coin":1}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@SerializedName("code")
|
||||||
|
private int code;
|
||||||
|
@SerializedName("msg")
|
||||||
|
private String msg;
|
||||||
|
@SerializedName("message")
|
||||||
|
private String message;
|
||||||
|
@SerializedName("data")
|
||||||
|
private Data data;
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user