[关闭]
@Wishes 2020-02-04T08:34:07.000000Z 字数 1093 阅读 543

api 接口

所有的 response 的结构如下:

  1. {
  2. "data" : {},
  3. "message" : "",
  4. "resultCode" : 1,
  5. "result" : true
  6. }

其中 data 字段包含具体数据,可能字典类型,也可能是整数,布尔类型,message 表示返回的消息,resultCode 留着备用, result 为true,表示接口正常返回,false 表示接口异常返回。

1. 设备绑定Licence code

http path: /bind/licence
http method: GET

http paramter:

参数名称 参数类型 是否必传 描述
licenceCode string licence code
deviceCode string 设备码

http response:

  1. {
  2. "data" : true,
  3. "message" : "",
  4. "resultCode" : 1,
  5. "result" : true
  6. }

2. 清除用户所有的Licence code,重新生成,并发送邮件给用户

http path: /clean/licence
http method: GET

http paramter:

参数名称 参数类型 是否必传 描述
userMail string 用户ID

http response:

  1. {
  2. "data" : null,
  3. "message" : "",
  4. "resultCode" : 1,
  5. "result" : true
  6. }

3. 检查用户的Licence code是否有效

http path: /check/licence
http method: GET

http paramter:

参数名称 参数类型 是否必传 描述
licenceCode string licence code
deviceCode string 设备码

http response:

  1. {
  2. "data" : true/false,
  3. "message" : "",
  4. "resultCode" : 1,
  5. "result" : true
  6. }

4. 创建用户的Licence code,并发送邮件给用户

http path: /create/licence
http method: GET

http paramter:

参数名称 参数类型 是否必传 描述
userMail string 邮箱
codeCount string 生成的licence code数量

http response:

  1. {
  2. "data" : null,
  3. "message" : "",
  4. "resultCode" : 1,
  5. "result" : true
  6. }

5. 统计用户数量

http path: /count
http method: GET

http paramter:

http response:

  1. {
  2. "data" : 1000,
  3. "message" : "",
  4. "resultCode" : 1,
  5. "result" : true
  6. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注