2020-07-07 15:20:19 +08:00
|
|
|
|
# 电磁力相关
|
|
|
|
|
|
2020-11-20 20:13:12 +08:00
|
|
|
|
- [获取电磁力等级(web端)](#获取电磁力等级(web端))
|
|
|
|
|
- [获取电磁力详细数值(双端)](#获取电磁力详细数值(双端))
|
|
|
|
|
- [获取电磁力数值历史变化(双端)](#获取电磁力数值历史变化(双端))
|
|
|
|
|
|
|
|
|
|
---
|
2020-07-07 15:20:19 +08:00
|
|
|
|
|
|
|
|
|
电磁力每周日下午刷新
|
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
## 获取电磁力等级(web端)
|
2020-07-07 15:20:19 +08:00
|
|
|
|
|
2020-07-07 23:29:15 +08:00
|
|
|
|
> http://member.bilibili.com/x/web/elec/user
|
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
认证方式:仅可Cookie(SESSDATA)
|
2020-07-18 23:56:10 +08:00
|
|
|
|
|
2020-07-07 23:29:15 +08:00
|
|
|
|
**json回复:**
|
|
|
|
|
|
|
|
|
|
根对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | ----------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-101:账号未登录 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-07-07 23:29:15 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
|
|
|
|
|
|
|
|
|
`data`对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------ | ---- | ----------- | ---------------- |
|
2021-07-12 21:31:27 +08:00
|
|
|
|
| mid | num | 当前用户mid | |
|
2020-07-07 23:29:15 +08:00
|
|
|
|
| state | num | 电磁力等级 | |
|
|
|
|
|
| reason | str | 空 | **作用尚不明确** |
|
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl 'http://member.bilibili.com/x/web/elec/user' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-07-07 23:29:15 +08:00
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
|
|
|
|
"mid": 293793435,
|
|
|
|
|
"state": 2,
|
|
|
|
|
"reason": ""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
## 获取电磁力详细数值(双端)
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
|
|
|
|
> http://api.bilibili.com/studio/up-rating/rating/summary
|
2020-07-07 15:20:19 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-07-07 15:20:19 +08:00
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
认证方式:Cookie(SESSDATA)或APP
|
|
|
|
|
|
|
|
|
|
**url参数:**
|
|
|
|
|
|
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ---------- | ---- | ------------ | ----------- | ---- |
|
|
|
|
|
| access_key | str | APP登录Token | APP方式必要 | |
|
2020-07-18 23:56:10 +08:00
|
|
|
|
|
2020-07-07 15:20:19 +08:00
|
|
|
|
**json回复:**
|
|
|
|
|
|
|
|
|
|
根对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | ------- | ----------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-101:账号未登录 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-07-07 15:20:19 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
|
|
|
|
|
|
|
|
|
`data`对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ----------------- | ---- | -------------- | ---- |
|
2020-07-07 23:29:15 +08:00
|
|
|
|
| date | str | 数据刷新时间 | YYYY-MM-DD |
|
2020-07-07 15:20:19 +08:00
|
|
|
|
| level | obj | 电磁力等级 | |
|
|
|
|
|
| creative | obj | 创作力 | |
|
|
|
|
|
| influence | obj | 影响力 | |
|
|
|
|
|
| credit | obj | 信用分 | |
|
|
|
|
|
|
|
|
|
|
`data`中的`level` `creative` `influence` `credit`对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| -------- | ---- | -------- | ---- |
|
|
|
|
|
| data | num | 数值 | |
|
2020-07-07 23:29:15 +08:00
|
|
|
|
| prev | num | ??? | **作用尚不明确** |
|
|
|
|
|
| desc | str | 描述 | |
|
|
|
|
|
| date | num | 刷新时间 | 时间戳 |
|
2020-07-07 15:20:19 +08:00
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
Cookie方式:
|
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl 'http://api.bilibili.com/studio/up-rating/rating/summary' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
APP方式:
|
|
|
|
|
|
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl -G 'http://api.bilibili.com/studio/up-rating/rating/summary' \
|
2020-07-21 17:38:44 +08:00
|
|
|
|
--data-urlencode 'access_key=xxx'
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-07-07 15:20:19 +08:00
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
|
|
|
|
"date": "2020-07-05",
|
|
|
|
|
"level": {
|
|
|
|
|
"data": 1,
|
|
|
|
|
"prev": 0,
|
|
|
|
|
"desc": "正式开启创作之路,希望未来的路上我们携手相伴,创作更多优质内容~",
|
|
|
|
|
"date": 1593878400
|
|
|
|
|
},
|
|
|
|
|
"creative": {
|
|
|
|
|
"data": 39,
|
|
|
|
|
"prev": 39,
|
|
|
|
|
"desc": "考察近一年来的创作行为,良好的原创投稿行为和互动数据有助于提升创作力。",
|
|
|
|
|
"date": 1593878400
|
|
|
|
|
},
|
|
|
|
|
"influence": {
|
|
|
|
|
"data": 54,
|
|
|
|
|
"prev": 54,
|
|
|
|
|
"desc": "根据近一年活跃粉丝数据进行评估,良好的粉丝活跃度是影响力的基础。",
|
|
|
|
|
"date": 1593878400
|
|
|
|
|
},
|
|
|
|
|
"credit": {
|
|
|
|
|
"data": 100,
|
|
|
|
|
"prev": 100,
|
|
|
|
|
"desc": "良好的投稿记录将维持较高的信用分,违反投稿公约的行为将扣除信用分。",
|
|
|
|
|
"date": 1594106147
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
## 获取电磁力数值历史变化(双端)
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
|
|
|
|
> http://api.bilibili.com/studio/up-rating/rating/history
|
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
认证方式:Cookie(SESSDATA)或APP
|
2020-07-18 23:56:10 +08:00
|
|
|
|
|
2020-07-07 23:29:15 +08:00
|
|
|
|
**url参数:**
|
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ---------- | ---- | ------------ | ----------- | -------------- |
|
|
|
|
|
| access_key | str | APP登录Token | APP方式必要 | |
|
|
|
|
|
| type | num | 目标数据类型 | 必要 | 类型代码见下表 |
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
|
|
|
|
类型代码`type`:
|
|
|
|
|
|
|
|
|
|
| 代码 | 含义 |
|
|
|
|
|
| ---- | ------ |
|
|
|
|
|
| 1 | 创作力 |
|
|
|
|
|
| 2 | 影响力 |
|
|
|
|
|
| 3 | 信用分 |
|
|
|
|
|
|
|
|
|
|
**json回复:**
|
|
|
|
|
|
|
|
|
|
根对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | ------------------------------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-101:账号未登录<br />-400:请求错误 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-07-07 23:29:15 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
|
|
|
|
|
|
|
|
|
`data`对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ----- | ----- | ------------ | -------- |
|
|
|
|
|
| date | array | 数据记录时间 | 每周更新 |
|
|
|
|
|
| score | array | 电磁力等级 | 每周更新 |
|
|
|
|
|
|
|
|
|
|
`data`中的`date`数组:
|
|
|
|
|
|
|
|
|
|
| 项 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ---- | ---- | ----------------- | -------------- |
|
|
|
|
|
| 0 | str | 1周前的日期 | MM-DD |
|
|
|
|
|
| n | str | (n+1)周前的日期 | 与数值一一对应 |
|
|
|
|
|
| …… | str | …… | …… |
|
|
|
|
|
| 7 | str | 8周前的日期 | 最后一条 |
|
|
|
|
|
|
|
|
|
|
`data`中的`score`数组:
|
|
|
|
|
|
|
|
|
|
| 项 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ---- | ---- | ----------------- | -------------- |
|
|
|
|
|
| 0 | num | 1周前的数值 | |
|
|
|
|
|
| n | num | (n+1)周前的数值 | 与日期一一对应 |
|
|
|
|
|
| …… | num | …… | …… |
|
|
|
|
|
| 7 | num | 8周前的数值 | 最后一条 |
|
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
|
|
|
|
查询创作力的历史变化
|
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
Cookie方式:
|
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl -G 'http://api.bilibili.com/studio/up-rating/rating/history' \
|
|
|
|
|
--data-urlencode 'type=1' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
2020-07-07 23:29:15 +08:00
|
|
|
|
|
2020-07-21 17:38:44 +08:00
|
|
|
|
APP方式:
|
|
|
|
|
|
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl -G 'http://api.bilibili.com/studio/up-rating/rating/history' \
|
|
|
|
|
--data-urlencode 'type=1' \
|
2020-07-21 17:38:44 +08:00
|
|
|
|
--data-urlencode 'access_key=xxx'
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-07-07 23:29:15 +08:00
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
|
|
|
|
"date": [
|
|
|
|
|
"05-17",
|
|
|
|
|
"05-24",
|
|
|
|
|
"05-31",
|
|
|
|
|
"06-07",
|
|
|
|
|
"06-14",
|
|
|
|
|
"06-21",
|
|
|
|
|
"06-28",
|
|
|
|
|
"07-05"
|
|
|
|
|
],
|
|
|
|
|
"score": [
|
|
|
|
|
48,
|
|
|
|
|
48,
|
|
|
|
|
49,
|
|
|
|
|
49,
|
|
|
|
|
49,
|
|
|
|
|
49,
|
|
|
|
|
49,
|
|
|
|
|
49
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|