v3-me-reading-time.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-me-reading-time.yaml
  2. post:
  3. summary: 上报一段读经时长
  4. tags:
  5. - reading-time
  6. operationId: post_api_v3_me_reading_time
  7. description: |-
  8. 客户端在阅读器前台、且最近有滚动或翻页时计时,每 5 分钟或切后台时上报一次。
  9. 服务端按墙钟时间核减(当天计入的不超过距上次上报经过的时间),单日不超过 24 小时;
  10. 断网补报可带 `day`,最多 2 天前。返回这一天累计计入的秒数。
  11. 实现:`V3\MeReadingTimeController@store`
  12. security:
  13. -
  14. bearerAuth: []
  15. requestBody:
  16. required: true
  17. content:
  18. application/json:
  19. schema:
  20. type: object
  21. properties:
  22. seconds:
  23. type: integer
  24. description: 这段的读经秒数,1–900
  25. day:
  26. type: string
  27. description: '归属的 UTC 日(Y-m-d),缺省为今天。断网补报用'
  28. required:
  29. - seconds
  30. responses:
  31. 200:
  32. description: 成功
  33. content:
  34. application/json:
  35. schema:
  36. type: object
  37. properties:
  38. data:
  39. type: object
  40. properties:
  41. day:
  42. type: string
  43. seconds:
  44. type: integer
  45. updated_at:
  46. type: string
  47. 401:
  48. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  49. 422:
  50. $ref: '../../main.yaml#/components/responses/ProblemValidation'