红包中奖列表
This commit is contained in:
@@ -788,4 +788,13 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketSuperPrizeReceive(
|
||||
@Query("super_jackpot_id") String superJackpotId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.endRedPacket")
|
||||
Observable<ResponseModel<Object>> endRedPacket(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1692,6 +1692,28 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void endRedPacket(String liveUid,String redPacketId, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.endRedPacket(liveUid, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess("");
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user