Skip to content

Commit

Permalink
openapi: add quotaAvailable (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
pandadtdyy authored Jul 3, 2024
1 parent 0533079 commit 83885d7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openapi/_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,13 @@ components:
tags:
- name: 评测
description: 提交代码以使用洛谷题库评测
- name: 查询
description: 查询开放平台账户状态

paths:
/judge/problem:
$ref: './judge.yaml#/paths/~1problem'
/judge/result:
$ref: './judge.yaml#/paths/~1result'
/judge/quotaAvailable:
$ref: './judge.yaml#/paths/~1quotaAvailable'
51 changes: 51 additions & 0 deletions openapi/judge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,54 @@ paths:
$ref: '#/components/schemas/JudgeCallback'
'204':
description: 评测尚未完成,还没有任何结果产生

/quotaAvailable:
get:
summary: 查询账户评测可用计费点
description: 查询当前账户的评测可用计费点情况
tags: [ 查询, 评测 ]
responses:
'200':
description: 查询成功
content:
application/json:
schema:
type: object
properties:
quotas:
type: array
description: 可用计费点列表
items:
type: object
properties:
availablePoints:
type: integer
description: 可用计费点
example: 30000
createTime:
type: integer
description: 计费点创建时间
format: int64
example: 1697620471
validAfter:
type: integer
description: 计费点生效时间
format: int64
example: 1713542400
expireTime:
type: integer
description: 计费点过期时间
format: int64
example: 1721491199
points:
type: object
description: 计费套餐详情
properties:
max:
type: integer
description: 套餐最大计费点
example: 30000
used:
type: integer
description: 已使用计费点
example: 0

0 comments on commit 83885d7

Please sign in to comment.