External Danmaku
Search and import danmaku from third-party sources (Bilibili, etc.) and cache or persist the results
Fetches comments from the specified source/video/part and caches them for 24 hours under the episode id. Returns the comments inline. The cached entry can later be persisted via PATCH /imported/{episodeId}/save.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/danmaku/external/import" \ -H "Content-Type: application/json" \ -d '{ "source": "string", "videoId": "string", "episodeId": "string" }'{ "source": "string", "count": 0, "saved": true, "comments": [ { "text": "string", "time": 0.1, "mode": "string", "color": "string" } ]}Combines saved (DB) and cached (temporary) entries across all sources, deduped by source.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/danmaku/external/imported/string"[ { "source": "string", "count": 0, "saved": true, "comments": [ { "text": "string", "time": 0.1, "mode": "string", "color": "string" } ] }]Deletes both DB and cache entries. Pass source to remove a single source; omit to clear every source.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Query Parameters
Source identifier; omit to clear all sources for the episode
Response Body
curl -X DELETE "https://example.com/api/v1/danmaku/external/imported/string"When save=true, promotes the cached entry for source into the DB. When save=false, demotes the DB entry back to cache and removes the persisted row.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/api/v1/danmaku/external/imported/string/save" \ -H "Content-Type: application/json" \ -d '{ "source": "string", "save": true }'{ "saved": true}Multi-part videos (e.g. Bilibili 分P) return one VideoPart per part. Single-part videos return a slice of length 1.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Query Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/danmaku/external/parts?source=string&videoId=string"[ { "index": 0, "title": "string", "duration": 0 }]Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Query Parameters
Source identifier returned by /danmaku/external/sources
Search keyword
1 <= value1Response Body
application/json
curl -X GET "https://example.com/api/v1/danmaku/external/search?source=string&q=string"[ { "videoId": "string", "title": "string", "danmakuCount": 0, "duration": "string", "thumbnail": "http://example.com" }]Returns the registered source identifiers (e.g. bilibili) plus a display label.
Authorization
bearerAuth Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.
In: header
Response Body
application/json
curl -X GET "https://example.com/api/v1/danmaku/external/sources"[ { "name": "string", "label": "string" }]