From bf36f62f2101f8c9d4a3a72ae06cee0071a63f4b Mon Sep 17 00:00:00 2001 From: luke-hagar-sp <98849695+luke-hagar-sp@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:06:26 -0500 Subject: [PATCH] adding Library endpoint --- plex-api-spec-dereferenced.yaml | 44 ++++++++++++++++++++++++++ referenced/paths/library-sections.yaml | 40 +++++++++++++++++++++++ referenced/plex-api-spec.yaml | 5 +++ 3 files changed, 89 insertions(+) create mode 100644 referenced/paths/library-sections.yaml diff --git a/plex-api-spec-dereferenced.yaml b/plex-api-spec-dereferenced.yaml index eeba57d5..e44d7f47 100644 --- a/plex-api-spec-dereferenced.yaml +++ b/plex-api-spec-dereferenced.yaml @@ -545,6 +545,47 @@ paths: description: Source Connection Information '401': description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /library/sections/{sectionId}/{category}: + get: + tags: + - Library + summary: Get Library Items + description: | + This endpoint will return a list of library items filtered by the filter and type provided + operationId: startAButlerTasks + parameters: + - name: sectionId + description: the Id of the library to query + in: path + schema: + type: number + required: true + - name: category + description: the Id of the library to query + in: path + schema: + type: string + enum: + - all + - latest + required: true + - name: type + description: item type + in: query + schema: + type: number + required: false + - name: filter + description: the filter parameter + in: query + schema: + type: string + required: false + responses: + '200': + description: The details of the library + '401': + description: Unauthorized - Returned if the X-Plex-Token is missing from the header or query. tags: - name: Activities description: | @@ -571,3 +612,6 @@ tags: - name: Security description: | API Calls against Security for Plex Media Server + - name: Library + description: | + API Calls interacting with Plex Media Server Libraries diff --git a/referenced/paths/library-sections.yaml b/referenced/paths/library-sections.yaml new file mode 100644 index 00000000..967403e6 --- /dev/null +++ b/referenced/paths/library-sections.yaml @@ -0,0 +1,40 @@ +get: + tags: + - Library + summary: Get Library Items + description: | + This endpoint will return a list of library items filtered by the filter and type provided + operationId: startAButlerTasks + parameters: + - name: sectionId + description: the Id of the library to query + in: path + schema: + type: number + required: true + - name: category + description: the Id of the library to query + in: path + schema: + type: string + enum: + - all + - latest + required: true + - name: type + description: item type + in: query + schema: + type: number + required: false + - name: filter + description: the filter parameter + in: query + schema: + type: string + required: false + responses: + "200": + description: The details of the library + "401": + $ref: "../responses/401.yaml" diff --git a/referenced/plex-api-spec.yaml b/referenced/plex-api-spec.yaml index ce79c0c8..c26b61b9 100644 --- a/referenced/plex-api-spec.yaml +++ b/referenced/plex-api-spec.yaml @@ -61,6 +61,8 @@ paths: $ref: "./paths/security-token.yaml" /security/resources: $ref: "./paths/security-resources.yaml" + /library/sections/{sectionId}/{category}: + $ref: "./paths/library-sections.yaml" tags: - name: Activities @@ -88,3 +90,6 @@ tags: - name: Security description: | API Calls against Security for Plex Media Server + - name: Library + description: | + API Calls interacting with Plex Media Server Libraries