添加修改空间布局和隐私设置的两个api,并修改格式
This commit is contained in:
parent
8812c09bcd
commit
3a14612eca
29
README.md
29
README.md
@ -126,3 +126,32 @@ B站专栏同步推出[《B站api研究记》](https://www.bilibili.com/read/rea
|
||||
不了解http的请移步,[传送门](https://www.cnblogs.com/an-wen/p/11180076.html)
|
||||
|
||||
不了解json的请移步,[传送门](https://www.sojson.com/json/json_index.html)
|
||||
|
||||
|
||||
|
||||
**相关项目**:
|
||||
|
||||
https://github.com/zyzsdy/biliroku
|
||||
|
||||
https://github.com/bilibili-helper/bilibili-helper-o
|
||||
|
||||
https://github.com/apachecn/BiliDriveEx
|
||||
|
||||
https://github.com/apachecn/CDNDrive
|
||||
|
||||
https://github.com/Hsury/BiliDrive
|
||||
|
||||
https://github.com/Tsuk1ko/bilibili-live-chat
|
||||
|
||||
https://github.com/SocialSisterYi/bv2av_convert
|
||||
|
||||
https://github.com/fython/BilibiliAPIDocs
|
||||
|
||||
https://github.com/czp3009/bilibili-api
|
||||
|
||||
https://github.com/Vespa314/bilibili-api
|
||||
|
||||
https://github.com/Hsury/Geetest3-Crack
|
||||
|
||||
https://github.com/Hsury/Bilibili-Toolkit
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
上传了一张图片`test.png`类型为`日常`
|
||||
|
||||
curl -b SESSDATA=xxx -F "file_up=@test.png" -F "category=daily" "http://api.vc.bilibili.com/api/v1/drawImage/upload"
|
||||
curl -b "SESSDATA=xxx" -F "file_up=@test.png" -F "category=daily" "http://api.vc.bilibili.com/api/v1/drawImage/upload"
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
~~(自己冲自己QAQ)~~
|
||||
|
||||
curl -b SESSDATA=xxx -d "elec_num=20&u
|
||||
curl -b "SESSDATA=xxx" -d "elec_num=20&u
|
||||
p_mid=293793435&otype=up&oid=293793435&csrf=xxx" "http://api.bilibili.com/x/ugcpay/trade/elec/pay/quick"
|
||||
|
||||
```json
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
成功为交易编号为`BPRG5CEC3VUPOOANA540`的充电操作,添加了内容为`支持一下大佬`的留言
|
||||
|
||||
curl -b SESSDATA=xxx -d "csrf=xxx&order_id=BPRG
|
||||
curl -b "SESSDATA=xxx" -d "csrf=xxx&order_id=BPRG
|
||||
5CEC3VUPOOANA540&message=%e6%94%af%e6%8c%81%e4%b8%80%e4%b8%8b%e5%a4%a7%e4%bd%ac" "http://api.bilibili.com/x/ugcpay/trade/elec/message"
|
||||
|
||||
```json
|
||||
|
||||
@ -367,7 +367,7 @@ http://api.bilibili.com/x/relation/followings?vmid=293793435&ps=2&pn=1
|
||||
|
||||
关注`UID=14082`的用户
|
||||
|
||||
curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" http://api.bilibili.com/x/relation/modify
|
||||
curl -b SESSDATA=xxx -d "fid=14082&act=1&re_src=11&csrf=xxx" "http://api.bilibili.com/x/relation/modify"
|
||||
|
||||
```json
|
||||
{
|
||||
@ -830,7 +830,7 @@ http://api.bilibili.com/x/relation/tag/user?fid=319214221
|
||||
|
||||
创建了名为`vUP`的分组,得到ID为`216677`
|
||||
|
||||
curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" http://api.bilibili.com/x/relation/tag/create
|
||||
curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" "http://api.bilibili.com/x/relation/tag/create"
|
||||
|
||||
```json
|
||||
{
|
||||
@ -875,7 +875,7 @@ curl -b SESSDATA=xxx -d "tag=vUP&csrf=xxx" http://api.bilibili.com/x/relation/ta
|
||||
|
||||
把ID为`194112`的分组更名为`膜法师`
|
||||
|
||||
curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx" http://api.bilibili.com/x/relation/tag/update
|
||||
curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx" "http://api.bilibili.com/x/relation/tag/update"
|
||||
|
||||
```json
|
||||
{
|
||||
@ -918,7 +918,7 @@ curl -b SESSDATA=xxx -d "tagid=194112&name=%e8%86%9c%e6%b3%95%e5%b8%88&csrf=xxx"
|
||||
|
||||
删除分组ID为`216699`的分组
|
||||
|
||||
curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" http://api.bilibili.com/x/relation/tag/del
|
||||
curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" "http://api.bilibili.com/x/relation/tag/del"
|
||||
|
||||
```json
|
||||
{
|
||||
@ -962,7 +962,7 @@ curl -b SESSDATA=xxx -d "tagid=216699&csrf=xxx" http://api.bilibili.com/x/relati
|
||||
|
||||
把关注用户`UID=205631797`同时添加分组关系到ID为`-10`和`207542`的分组中
|
||||
|
||||
curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" http://api.bilibili.com/x/relation/tags/addUsers
|
||||
curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" "http://api.bilibili.com/x/relation/tags/addUsers"
|
||||
|
||||
```json
|
||||
{
|
||||
@ -1004,7 +1004,7 @@ curl -b SESSDATA=xxx -d "fids=205631797&tagids=-10%2C207542&csrf=xxx" http://api
|
||||
|
||||
把关注用户`UID=4856007`和`UID=326499679`同时复制到ID为`231305`的分组中
|
||||
|
||||
curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" http://api.bilibili.com/x/relation/tags/copyUsers
|
||||
curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" "http://api.bilibili.com/x/relation/tags/copyUsers"
|
||||
|
||||
```json
|
||||
{
|
||||
@ -1049,7 +1049,7 @@ curl -b SESSDATA=xxx -d "fids=4856007%2C326499679&tagids=231305&csrf=xxx" http:/
|
||||
69`和`UID=327086920`同时从ID为`207542`的分组移动到ID为`231305`的分组中
|
||||
|
||||
curl -b SESSDATA=xxx -d "beforeTagids=207542&afterTagids=231305&fids=3211734
|
||||
69%2C327086920&csrf=xxx" http://api.bilibili.com/x/relation/tags/moveUsers
|
||||
69%2C327086920&csrf=xxx" "http://api.bilibili.com/x/relation/tags/moveUsers"
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
117
user/space.md
117
user/space.md
@ -1650,6 +1650,123 @@ curl -b "sessdata=xxx" -d "csrf=xxx¬ice=%E9%B8%BD%E5%AD%90" "http://api.bilib
|
||||
|
||||
|
||||
|
||||
### 修改空间隐私权限
|
||||
|
||||
> http://space.bilibili.com/ajax/settings/setPrivacy
|
||||
|
||||
*方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
需要验证`DedeUserID`及`DedeUserID__ckMd5`存在且不为0
|
||||
|
||||
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
|
||||
|
||||
**参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ----------- | ---- | ------------------- | ------ | ------------------------------ |
|
||||
| fav_video | data | 收藏视频 | 非必要 | 0:隐藏<br />1:公开<br />下同 |
|
||||
| bangumi | data | 追番及追剧 | 非必要 | |
|
||||
| tags | data | 关注的TAG | 非必要 | |
|
||||
| coins_video | data | 投币的视频 | 非必要 | |
|
||||
| user_info | data | 个人信息 | 非必要 | |
|
||||
| played_game | data | 玩过的游戏 | 非必要 | |
|
||||
| csrf | data | cookies中的bili_jct | 必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------ | ---- | -------- | ----------------------------------- |
|
||||
| ststus | bool | 操作结果 | true:操作成功<br />false:操作失败 |
|
||||
| data | str | 错误信息 | 正确时无此项 |
|
||||
|
||||
**示例:**
|
||||
|
||||
设置`关注的TAG`为隐藏
|
||||
|
||||
curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;" -d "csrf=xxx&tags=0" "http://space.bilibili.com/ajax/settings/setPrivacy"
|
||||
|
||||
```json
|
||||
{
|
||||
"status": true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 调整空间板块布局
|
||||
|
||||
> http://space.bilibili.com/ajax/settings/setIndexOrder
|
||||
|
||||
*方式:POST*
|
||||
|
||||
需要登录(SESSDATA)
|
||||
|
||||
需要验证`DedeUserID`及`DedeUserID__ckMd5`存在且不为0
|
||||
|
||||
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
|
||||
|
||||
**参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ----------- | ---- | ------------------- | ------ | ------------------------------------------------------------ |
|
||||
| index_order | data | 布局列表 | 必要 | 每个值之间用","(%2C)分隔<br />先左侧布局再右侧布局<br />值的意义见下表 |
|
||||
| csrf | data | cookies中的bili_jct | 必要 | |
|
||||
|
||||
布局参数`index_order`:
|
||||
|
||||
| 值 | 含义 |
|
||||
| ---- | ---------------------- |
|
||||
| 1 | (左侧)我的稿件 |
|
||||
| 2 | (左侧)我的收藏夹 |
|
||||
| 3 | (左侧)订阅番剧 |
|
||||
| 4 | (左侧)订阅标签 |
|
||||
| 5 | (左侧)最近投币的视频 |
|
||||
| 6 | **作用尚不明确** |
|
||||
| 7 | (左侧)我的频道 |
|
||||
| 8 | (左侧)我的专栏 |
|
||||
| 9 | (左侧)我的相簿 |
|
||||
| 21 | (右侧)公告 |
|
||||
| 22 | (右侧)直播间 |
|
||||
| 23 | (右侧)个人资料 |
|
||||
| 24 | (右侧)官方活动 |
|
||||
| 25 | (右侧)最近玩的游戏 |
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------ | ---- | -------- | ----------------------------------- |
|
||||
| ststus | bool | 操作结果 | true:操作成功<br />false:操作失败 |
|
||||
| data | str | 错误信息 | 正确时无此项 |
|
||||
|
||||
**示例:**
|
||||
|
||||
调整空间布局为:
|
||||
|
||||
>我的稿件 直播间
|
||||
>我的专栏 个人资料
|
||||
>订阅番剧 公告
|
||||
>我的收藏夹 官方活动
|
||||
>我的相簿 最近玩的游戏
|
||||
>最近投币的视频
|
||||
>订阅标签
|
||||
>我的频道
|
||||
|
||||
curl --referer "http://www.bilibili.com" -b "SESSDATA=xxx;DedeUserID=1;DedeUserID__ckMd5=1;" -d "csrf=xxx&index_order=1%2C8%2C3%2C2%2C9%2C5%2C4%2C7%2C22%2C23%2C21%2C24%2C25%2C6" "http://space.bilibili.com/ajax/settings/setIndexOrder"
|
||||
|
||||
```json
|
||||
{
|
||||
"status": true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 修改个人TAG
|
||||
|
||||
> http://api.bilibili.com/x/space/acc/tags/set
|
||||
|
||||
@ -113,7 +113,7 @@ curl -b "SESSDATA=xxx" -d "aid=90671873&select_like=1&multiply=2&csrf=xxx" "http
|
||||
|
||||
*方式:POST*
|
||||
|
||||
需要验证referer为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
|
||||
需要验证`referer`为 `http://www.bilibili.com`或`https://www.bilibili.com`域名下
|
||||
|
||||
**参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user