| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-progress.yaml
- get:
- summary: 列出章节翻译进度
- tags:
- - progress
- operationId: get_api_v3_progress
- description: |-
- 按 channel 查询各章节的翻译完成度。分页与 meta 全由框架算。
- 原来有个 `view` 参数,但它只有 `channel` 一个合法值、传别的直接 422——
- 那不是业务路径开关而是噪音,已去掉(硬规范第 1 条)。
- 实现:`V3\ProgressController@index`
- parameters:
- -
- name: channels
- in: query
- schema:
- type: string
- description: 'channel uid 列表,**下划线分隔**(不是逗号)'
- required: true
- -
- name: level
- in: query
- schema:
- type: integer
- description: '只返回该层级及以上的章节,需联查 pali_texts'
- -
- name: lang
- in: query
- schema:
- type: string
- description: 按译文语言过滤
- example: zh-Hans
- -
- name: book
- in: query
- schema:
- type: integer
- description: '按典籍 id 过滤'
- -
- name: order
- in: query
- schema:
- type: string
- enum:
- - book
- - para
- - lang
- - progress
- - title
- - last_chapter_completed_at
- - completed_at
- - updated_at
- default: completed_at
- description: 排序字段,白名单内
- -
- name: dir
- in: query
- schema:
- type: string
- enum:
- - asc
- - desc
- default: desc
- description: 排序方向
- -
- name: page
- in: query
- schema:
- type: integer
- default: 1
- description: 页码
- -
- name: per_page
- in: query
- schema:
- type: integer
- default: 10
- description: '每页数量,最大 200'
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- book:
- type: integer
- para:
- type: integer
- lang:
- type: string
- progress:
- type: number
- channel_id:
- type: string
- title:
- type: string
- nullable: true
- last_chapter_completed_at:
- type: string
- nullable: true
- completed_at:
- type: string
- nullable: true
- updated_at:
- type: string
- meta:
- $ref: '../../main.yaml#/components/schemas/PaginationMeta'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|