Skip to content

Latest commit

 

History

History
80 lines (54 loc) · 1.1 KB

API.md

File metadata and controls

80 lines (54 loc) · 1.1 KB

闪箭侠2.0接口文档

  • BaseUrl www.anxyser.xyz/server10006

  • 通信模式

    • http/https 实现常规的业务请求
    • ws/wss
      1. 配合分配房间
      2. 实现游戏同步
      3. 配合B端实现RTC连接

HTTP

  • Content-Type:application/json;charset=utf8

  • Request Body:Record<string, any>

  • Response Body: {
    code:number
    message:string
    data?:any
    }

/code

  • /email 获取登录用邮箱验证码

request

  • email:string

/user

登录后返回的User信息中会多一个token字段,将其设置为之后的request headers的token字段,作为用户验证手段

  • /login/email 邮箱验证码登录

request

  • email:string
  • code:string
  • uname?:string

response User

  • /login/token 根据token登录

response User

/rank

  • /list

request

  • from?:number
  • to?:number

response
[

  • id:number
  • uname:string
  • score:number
  • rank:number
    ]

/home

  • /list

request

  • from?:number
  • to?:number

response
[

  • id:number
  • users:[ //TODO]
  • type:number
  • card:number
    ]