mirror of
https://github.com/czp3009/bilibili-api.git
synced 2025-02-19 20:50:28 +08:00
增加 live 有关 API
查看粉丝勋章, 佩戴粉丝勋章, 取消佩戴粉丝勋章 查看头衔, 获得当前佩戴的头衔的信息, 佩戴头衔, 取消佩戴头衔
This commit is contained in:
parent
6e12feb1f1
commit
02c0e11fee
@ -198,16 +198,22 @@ public interface LiveService {
|
||||
@GET("AppUser/history")
|
||||
Call<HistoryEntity> getHistory(@Query("page") long page, @Query("pagesize") long pageSize);
|
||||
|
||||
//TODO 佩戴中心
|
||||
//佩戴中心
|
||||
//侧拉抽屉 -> 直播中心 -> 佩戴中心 -> 粉丝勋章
|
||||
//获得用户拥有的粉丝勋章
|
||||
@GET("AppUser/medal")
|
||||
Call<MyMedalListEntity> getMyMedalList();
|
||||
|
||||
//TODO 佩戴粉丝勋章
|
||||
//TODO 删除粉丝勋章
|
||||
//佩戴粉丝勋章
|
||||
@POST("AppUser/wearMedal")
|
||||
Call<WearMedalResponseEntity> wearMedal(@Query("medal_id") int medalId);
|
||||
|
||||
//侧拉抽屉 -> 直播中心 -> 佩戴中心 -> 我的头衔 -> 佩戴头衔
|
||||
//取消佩戴粉丝勋章(取消佩戴当前佩戴着的粉丝勋章)
|
||||
//URL 上的 canel 不是拼写错误, 它原本就是这样的
|
||||
@GET("AppUser/canelMedal")
|
||||
Call<CancelMedalResponseEntity> cancelMedal();
|
||||
|
||||
//侧拉抽屉 -> 直播中心 -> 佩戴中心 -> 我的头衔
|
||||
//获得用户拥有的头衔
|
||||
@GET("appUser/myTitleList")
|
||||
Call<MyTitleListEntity> getMyTitleList();
|
||||
@ -218,12 +224,16 @@ public interface LiveService {
|
||||
Call<WearTitleEntity> getWearTitle();
|
||||
|
||||
//佩戴头衔
|
||||
//是的, 你没看错, 是 GET 方式
|
||||
@GET("AppUser/wearTitle")
|
||||
@POST("AppUser/wearTitle")
|
||||
Call<WearTitleResponseEntity> wearTitle(@Query("title") String title);
|
||||
//TODO 取消佩戴
|
||||
|
||||
//TODO 获奖记录
|
||||
//取消佩戴头衔(取消佩戴当前佩戴着的头衔)
|
||||
@GET("appUser/cancelTitle")
|
||||
Call<CancelTitleResponseEntity> cancelTitle();
|
||||
|
||||
//TODO 头衔工坊(没有可升级头衔, 暂不明确此 API)
|
||||
|
||||
//TODO 获奖记录(没有获奖记录, 暂不明确返回值)
|
||||
//侧拉抽屉 -> 直播中心 -> 获奖记录
|
||||
@GET("AppUser/awards")
|
||||
Call<AwardsEntity> getAwards();
|
||||
|
@ -0,0 +1,44 @@
|
||||
package com.hiczp.bilibili.api.live.entity;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CancelMedalResponseEntity {
|
||||
/**
|
||||
* code : 0
|
||||
* message : OK
|
||||
* data : []
|
||||
*/
|
||||
|
||||
@SerializedName("code")
|
||||
private int code;
|
||||
@SerializedName("message")
|
||||
private String message;
|
||||
@SerializedName("data")
|
||||
private List<?> data;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public List<?> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<?> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.hiczp.bilibili.api.live.entity;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CancelTitleResponseEntity {
|
||||
/**
|
||||
* code : 0
|
||||
* msg : success
|
||||
* message : success
|
||||
* data : []
|
||||
*/
|
||||
|
||||
@SerializedName("code")
|
||||
private int code;
|
||||
@SerializedName("msg")
|
||||
private String msg;
|
||||
@SerializedName("message")
|
||||
private String message;
|
||||
@SerializedName("data")
|
||||
private List<?> 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 List<?> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<?> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.hiczp.bilibili.api.live.entity;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WearMedalResponseEntity {
|
||||
/**
|
||||
* code : 0
|
||||
* message : OK
|
||||
* data : []
|
||||
*/
|
||||
|
||||
@SerializedName("code")
|
||||
private int code;
|
||||
@SerializedName("message")
|
||||
private String message;
|
||||
@SerializedName("data")
|
||||
private List<?> data;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public List<?> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<?> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -7,12 +7,15 @@ import java.util.List;
|
||||
public class WearTitleResponseEntity {
|
||||
/**
|
||||
* code : 0
|
||||
* message : 佩戴成功
|
||||
* msg : success
|
||||
* message : success
|
||||
* data : []
|
||||
*/
|
||||
|
||||
@SerializedName("code")
|
||||
private int code;
|
||||
@SerializedName("msg")
|
||||
private String msg;
|
||||
@SerializedName("message")
|
||||
private String message;
|
||||
@SerializedName("data")
|
||||
@ -26,6 +29,14 @@ public class WearTitleResponseEntity {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user