Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openapi: add quotaAvailable #8

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
pandadtdyy marked this conversation as resolved.
Show resolved Hide resolved
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
Loading