522 lines
14 KiB
YAML
522 lines
14 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
title: RaptDrama 接口调试
|
||
version: "1.0.0"
|
||
description: |
|
||
独立调试台,不经过抓取脚本。
|
||
|
||
页面上的请求会发到本机 `/proxy`,再由调试台转发到 `https://apis.raptdrama.com`。
|
||
设备头和 User-Agent 由调试台补上,这里只要填业务参数。
|
||
|
||
用法:先调用「游客登录」,从返回的 `data.token` 复制出来,点右上角 Authorize,填进 `apasstk`。
|
||
之后需要登录态的接口会自动带上这个头。邮箱登录不需要先有 token。
|
||
servers:
|
||
- url: http://127.0.0.1:8787/proxy
|
||
description: 本机转发
|
||
tags:
|
||
- name: 登录
|
||
- name: 首页和分类
|
||
- name: 剧集
|
||
- name: 其他已核对
|
||
components:
|
||
securitySchemes:
|
||
apasstk:
|
||
type: apiKey
|
||
in: header
|
||
name: apasstk
|
||
description: 登录接口返回的 data.token。游客登录本身不需要它。
|
||
schemas:
|
||
EmptyObject:
|
||
type: object
|
||
additionalProperties: false
|
||
example: {}
|
||
EmailLogin:
|
||
type: object
|
||
required: [email, password]
|
||
properties:
|
||
email:
|
||
type: string
|
||
example: user@example.com
|
||
password:
|
||
type: string
|
||
format: password
|
||
ClassifyVideo:
|
||
type: object
|
||
required: [page, limit, type]
|
||
properties:
|
||
page:
|
||
type: integer
|
||
example: 1
|
||
description: 从 1 开始。空页表示结束。
|
||
limit:
|
||
type: integer
|
||
example: 10
|
||
description: 服务端每页最多约 10 条。
|
||
type:
|
||
type: integer
|
||
example: 20
|
||
description: 18 Comedy,20 Passion,21 Newest,22 Western,23 Comic drama。不要用 tstype。
|
||
PageQuery:
|
||
type: object
|
||
properties:
|
||
page:
|
||
type: integer
|
||
example: 1
|
||
limit:
|
||
type: integer
|
||
example: 10
|
||
SearchQuery:
|
||
type: object
|
||
required: [keyword]
|
||
properties:
|
||
keyword:
|
||
type: string
|
||
example: love
|
||
page:
|
||
type: integer
|
||
example: 1
|
||
limit:
|
||
type: integer
|
||
example: 10
|
||
DramaId:
|
||
type: object
|
||
required: [vid]
|
||
properties:
|
||
vid:
|
||
type: integer
|
||
example: 1942
|
||
description: 剧 id,不是集 id。
|
||
PlaylistQuery:
|
||
type: object
|
||
required: [vid, page, before]
|
||
properties:
|
||
vid:
|
||
type: integer
|
||
example: 1942
|
||
page:
|
||
type: integer
|
||
example: 1
|
||
before:
|
||
type: integer
|
||
example: 1
|
||
description: playlistv2 第一页为 1,后面的页为 0。playlist 一次返回全部,这个字段仍可带上。
|
||
ReadLog:
|
||
type: object
|
||
required: [vid, cid]
|
||
properties:
|
||
vid:
|
||
type: integer
|
||
example: 1942
|
||
cid:
|
||
type: integer
|
||
example: 1
|
||
description: 集 id。
|
||
del:
|
||
type: integer
|
||
example: 0
|
||
Envelope:
|
||
type: object
|
||
properties:
|
||
code:
|
||
type: integer
|
||
description: 200 成功,299 未登录,500 参数错误。HTTP 状态经常仍是 200。
|
||
msg:
|
||
type: string
|
||
data: {}
|
||
paths:
|
||
/app/open/autologin:
|
||
post:
|
||
tags: [登录]
|
||
summary: 游客登录
|
||
description: 每次调用都新建一个游客。把 data.token 填到 Authorize。
|
||
security: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 含 id、nickname、token、score、vipday、badge
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/emailLogin:
|
||
post:
|
||
tags: [登录]
|
||
summary: 邮箱登录
|
||
description: 同一邮箱重复登录是同一个用户。字段名必须是 email 和 password。
|
||
security: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmailLogin"
|
||
responses:
|
||
"200":
|
||
description: 成功时 msg 为 Login success,data.token 可作 apasstk
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/user/getUserInfo:
|
||
post:
|
||
tags: [登录]
|
||
summary: 当前用户信息
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data.id 是数字。游客 token 也可以调用。
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/classifyv2:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: 分类列表
|
||
description: 多一个 label_origin。id 22 的名称是 Western。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 为分类数组,字段 id、label、label_origin、image
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/classify:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: 分类列表(无 v2)
|
||
description: 条数和 id 与 classifyv2 相同,没有 label_origin。id 22 的名称是 Occident。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 为分类数组
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/classify_video:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: 分类下的剧
|
||
description: 顶栏五个分类都用这个接口,只改 type。每页约 10 条,空页结束。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/ClassifyVideo"
|
||
responses:
|
||
"200":
|
||
description: data 为剧目数组
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/orgin:
|
||
get:
|
||
tags: [首页和分类]
|
||
summary: New Releases
|
||
description: 一次约 10 部,较新的在前。没有单独分页。这不是 Trending Now。
|
||
security:
|
||
- apasstk: []
|
||
responses:
|
||
"200":
|
||
description: data 为剧目数组
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/recommend:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: Recommend 分页
|
||
description: page 从 1 开始。start 无效。空页或整页重复才是结尾。曾翻到约 332 部。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/PageQuery"
|
||
responses:
|
||
"200":
|
||
description: data 为剧目数组,每页约 10 条
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/search:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: 搜索
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/SearchQuery"
|
||
responses:
|
||
"200":
|
||
description: data 为剧目数组,多一个 totalvideo
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/bank:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: 片库或观看记录
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 含 vid、cid 和嵌套的 video
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/extra_broadcast:
|
||
post:
|
||
tags: [首页和分类]
|
||
summary: Extra broadcast
|
||
description: 历史页列表,不是首页 Trending Now。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 为剧目数组
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/video/getchapters:
|
||
get:
|
||
tags: [剧集]
|
||
summary: 分集列表
|
||
security:
|
||
- apasstk: []
|
||
parameters:
|
||
- name: vid
|
||
in: query
|
||
required: true
|
||
schema:
|
||
type: integer
|
||
example: 1942
|
||
- name: start
|
||
in: query
|
||
schema:
|
||
type: integer
|
||
example: 0
|
||
- name: limit
|
||
in: query
|
||
schema:
|
||
type: integer
|
||
example: 200
|
||
responses:
|
||
"200":
|
||
description: data.list 含 id、title、idx、isvip。isvip 是字符串 0 或 1。
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/video/playlist:
|
||
post:
|
||
tags: [剧集]
|
||
summary: 一次取全部分集地址
|
||
description: 字段与 playlistv2 相同,但一次返回该剧全部集。免费集 src 为 m3u8,锁定集 src 为空字符串。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/PlaylistQuery"
|
||
responses:
|
||
"200":
|
||
description: data.count 为总集数,data.list 为全部集
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/video/playlistv2:
|
||
post:
|
||
tags: [剧集]
|
||
summary: 分页取分集地址
|
||
description: 每页约 10 集。第一页 before 为 1,之后为 0。vid 是剧 id。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/PlaylistQuery"
|
||
responses:
|
||
"200":
|
||
description: data.list 每页约 10 条,字段与 playlist 相同
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/video/videoinfo:
|
||
post:
|
||
tags: [剧集]
|
||
summary: 剧详情
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/DramaId"
|
||
responses:
|
||
"200":
|
||
description: data.video 为剧信息,data.moshi 为整数。登录态下还可能有 history。
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/video/addreadlog:
|
||
post:
|
||
tags: [剧集]
|
||
summary: 上报观看
|
||
description: App 播放时发出。返回格式未逐字段核对。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/ReadLog"
|
||
responses:
|
||
"200":
|
||
description: 业务包装
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/open/contact:
|
||
post:
|
||
tags: [其他已核对]
|
||
summary: 联系邮箱
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data.techniacl_email 与 data.business_email。字段名就是 techniacl_email。
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/appopen/getAuthConfig:
|
||
post:
|
||
tags: [其他已核对]
|
||
summary: 第三方登录配置
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data.google 与 data.apple 的开关和客户端 id
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/user/paylistv2:
|
||
post:
|
||
tags: [其他已核对]
|
||
summary: 商品列表 v2
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 含 bindinfo、coins、need、redemption、score、subscribed_products、vips
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|
||
/app/user/paylist:
|
||
post:
|
||
tags: [其他已核对]
|
||
summary: 商品列表(无 v2)
|
||
description: 商品和 v2 相同,vips 与 coins 包在 plays 里。
|
||
security:
|
||
- apasstk: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/EmptyObject"
|
||
responses:
|
||
"200":
|
||
description: data 含 bindinfo、need、plays、score、subscribed_products
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/Envelope"
|