From 5e63efd8108f5085d8d3809b489328bb214facb5 Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Tue, 30 Jul 2024 17:44:26 +0200 Subject: [PATCH] Added two endpoints --- docs/controllers/MeController.yaml | 62 +++++++++++++++++++++++++++++ docs/openapi.json | Bin 317168 -> 322500 bytes docs/root.yaml | 4 ++ 3 files changed, 66 insertions(+) diff --git a/docs/controllers/MeController.yaml b/docs/controllers/MeController.yaml index 166312f78..e8165b322 100644 --- a/docs/controllers/MeController.yaml +++ b/docs/controllers/MeController.yaml @@ -13,3 +13,65 @@ paths: application/json: schema: $ref: '../objects/entities/User.yaml#/components/schemas/user' + /api/me/progress/{libraryItemId}/{episodeId}: + parameters: + - name: libraryItemId + in: path + description: The ID of the library item. + required: true + schema: + $ref: '../objects/LibraryItem.yaml#/components/schemas/libraryItemId' + - name: episodeId + in: path + description: The ID of the episode to get progress for. + required: false + schema: + $ref: '../objects/mediaTypes/Podcast.yaml#/components/schemas/podcastId' + get: + operationId: getProgress + summary: Get the user's progress for a library item. + description: Get the user's progress for a library item. + tags: + - Me + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../objects/Media.yaml#/components/schemas/mediaProgress' + '404': + description: Not Found + content: + html/text: + schema: + type: string + example: Not Found + /api/me/progress/{mediaId}: + parameters: + - name: mediaId + in: path + description: The ID of the media progress. + required: true + schema: + $ref: '../objects/Media.yaml#/components/schemas/mediaProgressId' + get: + operationId: getProgressById + summary: Get the user's progress for a media item. + description: Get the user's progress for a media item. + tags: + - Me + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../objects/Media.yaml#/components/schemas/mediaProgress' + '404': + description: Not Found + content: + html/text: + schema: + type: string + example: Not Found diff --git a/docs/openapi.json b/docs/openapi.json index 25cdf1964c9d8090aa18d3d6a9e777a0c87cb78e..d72acb3e6c09550a6ce5feff97d145f55ca83ea1 100644 GIT binary patch delta 549 zcmeycR`|$u;f5B*Elg@=lLJbmBy$;38T1(n7>XG38Pb7dDnl_4>N8YN7vyDP2BGrgL8;hf9#Z$2yn)8A}mR+_$G8KczX z2U0wfFT`3+7O2Ua?qJBoGyPdEV+3~wLkUAJLk`e`CDUum7>y@SxV2!qg(1@md8~l| zRGZ3>!jQ?3IK5GtsdjSB3ob^_$&C|xr+@HbF`Ing1>58RTdTEoqnYSC5 Iu^dJ_k;c92`W&&d7?JV9b2NnPT*=-Ba diff --git a/docs/root.yaml b/docs/root.yaml index a706e4041..ff2c6f21f 100644 --- a/docs/root.yaml +++ b/docs/root.yaml @@ -87,6 +87,10 @@ paths: $ref: './controllers/LibraryItemController.yaml#/paths/~1api~1items~1{id}~1play~1{episodeId}' /api/me: $ref: './controllers/MeController.yaml#/paths/~1api~1me' + /api/me/progress/{libraryItemId}/{episodeId}: + $ref: './controllers/MeController.yaml#/paths/~1api~1me~1progress~1{libraryItemId}~1{episodeId}' + /api/me/progress/{mediaId}: + $ref: './controllers/MeController.yaml#/paths/~1api~1me~1progress~1{mediaId}' tags: - name: Authors description: Author endpoints