GuessWhoIAmS/docs/tsapi.md
2023-09-11 12:14:17 +08:00

1.5 KiB

TSRPC API 接口文档

通用说明

  • 所有请求方法均为 POST
  • 所有请求均需加入以下 Header :
    • Content-Type: application/json

目录


account

Login

路径

  • POST /account/Login

请求

interface ReqLogin {
    name: string
}

响应

type ResLogin = number

room

ChangeState

路径

  • POST /room/ChangeState

请求

interface ReqChangeState {
    state: number
}

响应

type ResChangeState = number

Create

路径

  • POST /room/Create

请求

interface ReqCreate {
    null: string
}

响应

type ResCreate = number

Exit

路径

  • POST /room/Exit

请求

interface ReqExit {
    null: string
}

响应

type ResExit = number

Join

路径

  • POST /room/Join

请求

interface ReqJoin {
    roomId: number
}

响应

type ResJoin = number

List

路径

  • POST /room/List

请求

interface ReqList {
    null: string
}

响应

type ResList = any[]