diff --git a/openapi/_api.yaml b/openapi/_api.yaml index 306b8f9..b282260 100644 --- a/openapi/_api.yaml +++ b/openapi/_api.yaml @@ -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' diff --git a/openapi/judge.yaml b/openapi/judge.yaml index 8edba12..0a3b2e6 100644 --- a/openapi/judge.yaml +++ b/openapi/judge.yaml @@ -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