79 lines
1.9 KiB
YAML
79 lines
1.9 KiB
YAML
openapi: "3.1.0"
|
|
info:
|
|
title: U2 API
|
|
version: "1.0"
|
|
servers:
|
|
- url: "https://u2.kysdm.com/api"
|
|
description: API
|
|
security: []
|
|
paths:
|
|
/v1/token:
|
|
post:
|
|
operationId: getToken
|
|
summary: 鉴权
|
|
externalDocs:
|
|
url: https://github.com/kysdm/u2_api#鉴权
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [uid]
|
|
properties:
|
|
uid:
|
|
type: integer
|
|
description: u2账户id
|
|
key:
|
|
type: string
|
|
description: 上一步操作返回的 key 值
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
/v1/promotion:
|
|
get:
|
|
operationId: getPromotion
|
|
summary: 魔法
|
|
externalDocs:
|
|
url: https://github.com/kysdm/u2_api#魔法
|
|
parameters:
|
|
- name: uid
|
|
schema:
|
|
type: integer
|
|
in: query
|
|
description: u2账户id
|
|
required: true
|
|
- name: token
|
|
schema:
|
|
type: string
|
|
format: password
|
|
in: query
|
|
description: 鉴权中返回的值
|
|
required: true
|
|
- name: scope
|
|
schema:
|
|
type: string
|
|
enum: [global, public, private, all]
|
|
default: all
|
|
in: query
|
|
description: 魔法类型
|
|
- name: maximum
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 60
|
|
default: 10
|
|
in: query
|
|
description: 返回数据条数
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
|