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 → JStoMedia
 
Object:
inputURL →
[Step]
toObject (toMedia / toEpisode / toPlayer) (最後一步,可省略書寫)
 

如何設計 Step ?

Step Types:
 
  1. Rules - MediaRule(5 args)
  1. Rules - EpisodeRule(3 args)
  1. Rules - PlayerRule (1 arg)
  1. callFunction
  1. http-get / http-post
  1. play(only for player)
  1. toResult - toMedia(5 args)
  1. toResult - toEpisode(3 args)
  1. toResult - toPlayer(1 arg)
 
 
 

需要提供一些 JS 的內置 function

  • showMessage / showError
  • fetch ?
 

特殊規則

如果 callFunction → toMedia
則要求此 callFunction 必須輸出一個 json(mediaObject)
 
 
 

其他內容