| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-channels.yaml
- get:
- summary: '公开 channel 目录'
- tags:
- - channels
- operationId: get_api_v3_channels
- description: |-
- 只列全网公开的。`system=true` 只要系统 channel——系统 channel 是全站共用的原文、术语等,
- 不论 status 都列(巴利原文 `_System_Pali_VRI_` 就是 status 10)。带 `book` + `para` 时每条多返回该章的完成度
- `progress`,并可按它排序。
- 实现:`V3\ChannelController@index`
- security:
- - { }
- -
- bearerAuth: []
- parameters:
- -
- name: system
- in: query
- schema:
- type: boolean
- description: '只列系统 channel'
- -
- name: per_page
- in: query
- schema:
- type: integer
- default: 20
- description: '每页数量,最大 200'
- -
- name: search
- in: query
- schema:
- type: string
- description: 按名字模糊匹配
- -
- name: type
- in: query
- schema:
- type: string
- enum:
- - translation
- - nissaya
- - original
- - wbw
- - commentary
- - similar
- description: 'channel 类型'
- -
- name: lang
- in: query
- schema:
- type: string
- description: 语言
- -
- name: book
- in: query
- schema:
- type: integer
- description: '章节所在的书(与 para 同时给)'
- -
- name: para
- in: query
- schema:
- type: integer
- description: '章节起始段(与 book 同时给)'
- -
- name: order
- in: query
- schema:
- type: string
- enum:
- - updated_at
- - created_at
- - name
- - progress
- default: updated_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: 页码
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- summary:
- type: string
- nullable: true
- type:
- type: string
- lang:
- type: string
- status:
- type: integer
- is_system:
- type: boolean
- source_type:
- type: string
- source_id:
- type: string
- nullable: true
- owner:
- type: object
- properties: { kind: { type: string }, id: { type: string }, nickName: { type: string }, realName: { type: string }, avatar: { type: string, nullable: true } }
- abilities:
- type: object
- properties: { read: { type: boolean }, write: { type: boolean }, update: { type: boolean }, delete: { type: boolean } }
- progress:
- type: number
- nullable: true
- description: 仅在部分查询口径下返回。
- created_at:
- type: string
- updated_at:
- type: string
- meta:
- $ref: '../../main.yaml#/components/schemas/PaginationMeta'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|