Alpha v2 設計書
Alpha v2
base Info:
name, url …
Objects:
Object | args | 默認輸入 |
Page | // [Media] (Medias) | config.json |
Media | id / title / cover / description / URL(detailURL) | pageURL |
Episode | id / title / URL(playPageURL) | mediaObject |
Player | URL(readPlayURL) | EpisodeObject |
可能出現的條件:
Pink: [Step]
PageURL → http-post → API JSON → JS Fcuntion Parser → toMedia
PageURL → MeidaRule → toMedia
[ ? ] PageURL → MeidaRule → JS → toMedia
Object:
inputURL →
[Step] →
toObject (toMedia / toEpisode / toPlayer) (最後一步,可省略書寫)
如何設計 Step ?
Step Types:
- Rules - MediaRule(5 args)
- Rules - EpisodeRule(3 args)
- Rules - PlayerRule (1 arg)
callFunction
http-get / http-post
play(only for player)
- toResult - toMedia(5 args)
- toResult - toEpisode(3 args)
- toResult - toPlayer(1 arg)
需要提供一些 JS 的內置 function
- showMessage / showError
- fetch ?
特殊規則
如果 callFunction → toMedia
則要求此 callFunction 必須輸出一個 json(mediaObject)
其他內容
Last update: 2023-9-9