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 2 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'
61 changes: 61 additions & 0 deletions openapi/judge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,64 @@ paths:
$ref: '#/components/schemas/JudgeCallback'
'204':
description: 评测尚未完成,还没有任何结果产生

/quotaAvailable:
get:
summary: 查询账户可用计费点
description: 查询当前账户的可用计费点情况
pandadtdyy marked this conversation as resolved.
Show resolved Hide resolved
tags: [ 查询 ]
pandadtdyy marked this conversation as resolved.
Show resolved Hide resolved
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: 可用计费点
createTime:
type: integer
description: 计费点创建时间
format: int64
example: 1620000000
validAfter:
type: integer
description: 计费点生效时间
format: int64
example: 1620000000
expireTime:
type: integer
description: 计费点过期时间
format: int64
example: 1620000000
points:
type: object
description: 计费套餐详情
properties:
max:
type: integer
description: 套餐最大计费点
used:
type: integer
description: 已使用计费点
orgs:
type: object
description: 机构信息
properties:
id:
type: integer
description: 机构 ID
slug:
type: string
description: 机构标识
name:
type: string
description: 机构名称
pandadtdyy marked this conversation as resolved.
Show resolved Hide resolved
Loading