mirror of
https://github.com/czp3009/bilibili-api.git
synced 2025-02-19 20:50:28 +08:00
投币的 API
This commit is contained in:
parent
afc560d540
commit
1930a704a2
@ -143,4 +143,25 @@ interface AppAPI {
|
||||
@Field("dislike") dislike: Int = 0,
|
||||
@Field("from") from: Int? = null
|
||||
): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 投币
|
||||
* 一个视频能投几个硬币是怎么获得的未知
|
||||
*
|
||||
* @param multiply 投币数量
|
||||
* @param selectLike 为 1 表示投币的同时为视频点赞, 对番剧投币时, 该值总为 0
|
||||
* @param upId 该值似乎总为 0
|
||||
*/
|
||||
@Suppress("SpellCheckingInspection")
|
||||
@POST("/x/v2/view/coin/add")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun addCoin(
|
||||
@Field("aid") aid: Long,
|
||||
@Field("avtype") avType: Int = 1,
|
||||
@Field("from") from: Int? = null,
|
||||
@Field("multiply") multiply: Int,
|
||||
@Field("select_like") selectLike: Int = 0,
|
||||
@Field("upid") upId: Long? = 0
|
||||
): Deferred<AddCoinResponse>
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.hiczp.bilibili.api.app.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class AddCoinResponse(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("like")
|
||||
var like: Boolean, // false
|
||||
@SerializedName("prompt")
|
||||
var prompt: Boolean? // true
|
||||
)
|
||||
}
|
@ -200,4 +200,68 @@ interface MainAPI {
|
||||
@Field("rpid") replyId: Long,
|
||||
@Field("type") type: Int = 1
|
||||
): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 查看视频的删除日志
|
||||
* 这个 API 看起来有翻页, 其实没有页
|
||||
* 视频 -> 评论 -> 右上角三个点 ->查看删除日志
|
||||
*
|
||||
* @return 有$replyCount条评论因$reportCount次举报已被管理员移除
|
||||
*/
|
||||
@GET("/x/v2/reply/log")
|
||||
fun deleteLog(
|
||||
@Query("oid") oid: Long,
|
||||
@Query("pn") pn: Int = 1,
|
||||
@Query("ps") pageSize: Int = 20,
|
||||
@Query("type") type: Int = 1
|
||||
): Deferred<DeleteLog>
|
||||
|
||||
/**
|
||||
* 改变与某用户的关系(关注, 取消关注)
|
||||
*
|
||||
* @param action 动作类型(1: 关注;2: 取消关注)
|
||||
* @param followId 操作对象的 ID(例如欲关注的那个用户的 ID)
|
||||
* @param reSrc 不明确
|
||||
*/
|
||||
@POST("/x/relation/modify")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun modifyRelation(
|
||||
@Field("act") action: Int,
|
||||
@Field("fid") followId: Long,
|
||||
@Field("re_src") reSrc: Int? = 32
|
||||
): Deferred<CommonResponse>
|
||||
|
||||
/**
|
||||
* 关注的分组
|
||||
* 默认分组永远是 0
|
||||
*/
|
||||
@GET("/x/relation/tag/m/tags")
|
||||
fun relationTags(): Deferred<RelationTags>
|
||||
|
||||
/**
|
||||
* 创建关注分组
|
||||
*
|
||||
* @param tag 不能包含绝大部分符号
|
||||
*/
|
||||
@POST("/x/relation/tag/create")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun createRelationTag(@Field("tag") tag: String): Deferred<CreateRelationTagResponse>
|
||||
|
||||
/**
|
||||
* 设置分组(对某个用户的关注的分组)
|
||||
* 用户 -> 关注 -> 设置分组
|
||||
*
|
||||
* @param followIds 关注的人(不明确能不能有多个)
|
||||
* @param tagIds 分组 id. 可以有多个, 用逗号隔开, 例如 "-10,110641"
|
||||
*/
|
||||
@Suppress("SpellCheckingInspection")
|
||||
@POST("/x/relation/tags/addUsers")
|
||||
@FormUrlEncoded
|
||||
@Headers(Header.FORCE_FORM_BODY)
|
||||
fun relationAddUsers(
|
||||
@Field("fids") followIds: String,
|
||||
@Field("tagids") tagIds: String
|
||||
): Deferred<CommonResponse>
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.hiczp.bilibili.api.main.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class CreateRelationTagResponse(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
@Suppress("SpellCheckingInspection")
|
||||
data class Data(
|
||||
@SerializedName("tagid")
|
||||
var tagid: Int // 110641
|
||||
)
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.hiczp.bilibili.api.main.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class DeleteLog(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
@SerializedName("logs")
|
||||
var logs: Any?, // null
|
||||
@SerializedName("page")
|
||||
var page: Page,
|
||||
@SerializedName("reply_count")
|
||||
var replyCount: Int, // 11
|
||||
@SerializedName("report_count")
|
||||
var reportCount: Int // 28
|
||||
) {
|
||||
data class Page(
|
||||
@SerializedName("num")
|
||||
var num: Int, // 1
|
||||
@SerializedName("pages")
|
||||
var pages: Int, // 0
|
||||
@SerializedName("size")
|
||||
var size: Int, // 20
|
||||
@SerializedName("total")
|
||||
var total: Int // 0
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.hiczp.bilibili.api.main.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class RelationTags(
|
||||
@SerializedName("code")
|
||||
var code: Int, // 0
|
||||
@SerializedName("data")
|
||||
var `data`: Data,
|
||||
@SerializedName("message")
|
||||
var message: String, // 0
|
||||
@SerializedName("ttl")
|
||||
var ttl: Int // 1
|
||||
) {
|
||||
data class Data(
|
||||
/**
|
||||
* all 不是指全部, 而是指 公开关注
|
||||
*/
|
||||
@SerializedName("all")
|
||||
var all: List<Tag>,
|
||||
@SerializedName("default")
|
||||
var default: List<Tag>,
|
||||
@SerializedName("list")
|
||||
var list: List<Tag>,
|
||||
@SerializedName("special")
|
||||
var special: List<Tag>
|
||||
) {
|
||||
@Suppress("SpellCheckingInspection")
|
||||
data class Tag(
|
||||
@SerializedName("count")
|
||||
var count: Int, // 28
|
||||
@SerializedName("name")
|
||||
var name: String, // 公开关注
|
||||
@SerializedName("tagid")
|
||||
var tagid: Int // -1
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user