diff --git a/paths/library/[sectionId]/get-library.yaml b/paths/library/[sectionId]/get-library-details.yaml similarity index 99% rename from paths/library/[sectionId]/get-library.yaml rename to paths/library/[sectionId]/get-library-details.yaml index 178ba988..a18baaba 100644 --- a/paths/library/[sectionId]/get-library.yaml +++ b/paths/library/[sectionId]/get-library-details.yaml @@ -43,7 +43,7 @@ get: > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - operationId: getLibrary + operationId: get-library-details parameters: - name: sectionId description: the Id of the library to query diff --git a/paths/library/libraries.yaml b/paths/library/get-all-libraries.yaml similarity index 99% rename from paths/library/libraries.yaml rename to paths/library/get-all-libraries.yaml index 1728b19b..a23f7bbb 100644 --- a/paths/library/libraries.yaml +++ b/paths/library/get-all-libraries.yaml @@ -2,7 +2,7 @@ get: tags: - Library summary: Get All Libraries - operationId: getLibraries + operationId: get-all-libraries description: | A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. diff --git a/plex-media-server-spec-dereferenced.yaml b/plex-media-server-spec-dereferenced.yaml index 38a1659b..e166f0cc 100644 --- a/plex-media-server-spec-dereferenced.yaml +++ b/plex-media-server-spec-dereferenced.yaml @@ -2408,7 +2408,7 @@ paths: tags: - Library summary: Get All Libraries - operationId: getLibraries + operationId: get-all-libraries description: | A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. @@ -2597,7 +2597,7 @@ paths: - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - operationId: getLibrary + operationId: get-library-details parameters: - name: sectionId description: the Id of the library to query diff --git a/pms-spec.yaml b/pms-spec.yaml index 6df299e9..517856c5 100644 --- a/pms-spec.yaml +++ b/pms-spec.yaml @@ -118,10 +118,10 @@ paths: /library/recentlyAdded: $ref: "./paths/library/recentlyadded.yaml" /library/sections: - $ref: "./paths/library/libraries.yaml" + $ref: "./paths/library/get-all-libraries.yaml" /library/sections/{sectionId}: get: - $ref: "./paths/library/[sectionId]/get-library.yaml#/get" + $ref: "./paths/library/[sectionId]/get-library-details.yaml#/get" delete: $ref: "./paths/library/[sectionId]/delete-library.yaml#/delete" diff --git a/tests/paths/library/[sectionId]/get-library-details.spec.ts b/tests/paths/library/[sectionId]/get-library-details.spec.ts new file mode 100644 index 00000000..f715d66f --- /dev/null +++ b/tests/paths/library/[sectionId]/get-library-details.spec.ts @@ -0,0 +1,667 @@ +import {validateResponseSpec} from "../../../utils"; +import {describe, it} from 'vitest' + +describe('GET /library/sections', () => { + it('should validate the 200 response without includeDetails queryParam when the API spec is valid', () => { + const response = { + "MediaContainer": { + "size": 20, + "allowSync": false, + "art": "/:/resources/movie-fanart.jpg", + "content": "secondary", + "identifier": "com.plexapp.plugins.library", + "librarySectionID": 1, + "mediaTagPrefix": "/system/bundle/media/flags/", + "mediaTagVersion": 1724161316, + "thumb": "/:/resources/movie.png", + "title1": "Movies", + "viewGroup": "secondary", + "Directory": [{ + "key": "all", "title": "All Movies" + }, { + "key": "unwatched", "title": "Unwatched" + }, { + "key": "newest", "title": "Recently Released" + }, { + "key": "recentlyAdded", "title": "Recently Added" + }, { + "key": "recentlyViewed", "title": "Recently Viewed" + }, { + "key": "onDeck", "title": "Continue Watching" + }, { + "secondary": true, "key": "collection", "title": "By Collection" + }, { + "secondary": true, "key": "edition", "title": "By Edition" + }, { + "secondary": true, "key": "genre", "title": "By Genre" + }, { + "secondary": true, "key": "year", "title": "By Year" + }, { + "secondary": true, "key": "decade", "title": "By Decade" + }, { + "secondary": true, "key": "director", "title": "By Director" + }, { + "secondary": true, "key": "actor", "title": "By Starring Actor" + }, { + "secondary": true, "key": "country", "title": "By Country" + }, { + "secondary": true, "key": "contentRating", "title": "By Content Rating" + }, { + "secondary": true, "key": "rating", "title": "By Rating" + }, { + "secondary": true, "key": "resolution", "title": "By Resolution" + }, { + "secondary": true, "key": "firstCharacter", "title": "By First Letter" + }, { + "key": "folder", "title": "By Folder" + }, { + "prompt": "Search Movies", "search": true, "key": "search?type=1", "title": "Search..." + }] + } + }; + + validateResponseSpec("/library/sections/{sectionId}", "get", 200, response) + }); + + it('should validate the 200 response with includeDetails queryParam when the API spec is valid', () => { + const response = { + "MediaContainer": { + "size": 29, + "allowSync": false, + "art": "/:/resources/movie-fanart.jpg", + "content": "secondary", + "identifier": "com.plexapp.plugins.library", + "librarySectionID": 1, + "mediaTagPrefix": "/system/bundle/media/flags/", + "mediaTagVersion": 1724161316, + "thumb": "/:/resources/movie.png", + "title1": "Movies", + "viewGroup": "secondary", + "Directory": [ + { + "key": "all", + "title": "All Movies" + }, + { + "key": "unwatched", + "title": "Unwatched" + }, + { + "key": "newest", + "title": "Recently Released" + }, + { + "key": "recentlyAdded", + "title": "Recently Added" + }, + { + "key": "recentlyViewed", + "title": "Recently Viewed" + }, + { + "key": "onDeck", + "title": "Continue Watching" + }, + { + "secondary": true, + "key": "collection", + "title": "By Collection" + }, + { + "secondary": true, + "key": "edition", + "title": "By Edition" + }, + { + "secondary": true, + "key": "genre", + "title": "By Genre" + }, + { + "secondary": true, + "key": "year", + "title": "By Year" + }, + { + "secondary": true, + "key": "decade", + "title": "By Decade" + }, + { + "secondary": true, + "key": "director", + "title": "By Director" + }, + { + "secondary": true, + "key": "actor", + "title": "By Starring Actor" + }, + { + "secondary": true, + "key": "country", + "title": "By Country" + }, + { + "secondary": true, + "key": "contentRating", + "title": "By Content Rating" + }, + { + "secondary": true, + "key": "rating", + "title": "By Rating" + }, + { + "secondary": true, + "key": "resolution", + "title": "By Resolution" + }, + { + "secondary": true, + "key": "firstCharacter", + "title": "By First Letter" + }, + { + "key": "folder", + "title": "By Folder" + }, + { + "prompt": "Search Movies", + "search": true, + "key": "search?type=1", + "title": "Search..." + } + ], + "Type": [ + { + "key": "/library/sections/1/all?type=1", + "type": "movie", + "title": "Movies", + "active": false, + "Filter": [ + { + "filter": "genre", + "filterType": "string", + "key": "/library/sections/1/genre", + "title": "Genre", + "type": "filter" + }, + { + "filter": "year", + "filterType": "integer", + "key": "/library/sections/1/year", + "title": "Year", + "type": "filter" + }, + { + "filter": "decade", + "filterType": "integer", + "key": "/library/sections/1/decade", + "title": "Decade", + "type": "filter" + }, + { + "filter": "contentRating", + "filterType": "string", + "key": "/library/sections/1/contentRating", + "title": "Content Rating", + "type": "filter" + }, + { + "filter": "collection", + "filterType": "string", + "key": "/library/sections/1/collection", + "title": "Collection", + "type": "filter" + }, + { + "filter": "director", + "filterType": "string", + "key": "/library/sections/1/director", + "title": "Director", + "type": "filter" + }, + { + "filter": "actor", + "filterType": "string", + "key": "/library/sections/1/actor", + "title": "Actor", + "type": "filter" + }, + { + "filter": "writer", + "filterType": "string", + "key": "/library/sections/1/writer", + "title": "Writer", + "type": "filter" + }, + { + "filter": "producer", + "filterType": "string", + "key": "/library/sections/1/producer", + "title": "Producer", + "type": "filter" + }, + { + "filter": "country", + "filterType": "string", + "key": "/library/sections/1/country", + "title": "Country", + "type": "filter" + }, + { + "filter": "studio", + "filterType": "string", + "key": "/library/sections/1/studio", + "title": "Studio", + "type": "filter" + }, + { + "filter": "resolution", + "filterType": "string", + "key": "/library/sections/1/resolution", + "title": "Resolution", + "type": "filter" + }, + { + "filter": "hdr", + "filterType": "boolean", + "key": "/library/sections/1/hdr", + "title": "HDR", + "type": "filter" + }, + { + "filter": "unwatched", + "filterType": "boolean", + "key": "/library/sections/1/unwatched", + "title": "Unwatched", + "type": "filter" + }, + { + "filter": "inProgress", + "filterType": "boolean", + "key": "/library/sections/1/inProgress", + "title": "In Progress", + "type": "filter" + }, + { + "filter": "unmatched", + "filterType": "boolean", + "key": "/library/sections/1/unmatched", + "title": "Unmatched", + "type": "filter" + }, + { + "filter": "audioLanguage", + "filterType": "string", + "key": "/library/sections/1/audioLanguage", + "title": "Audio Language", + "type": "filter" + }, + { + "filter": "subtitleLanguage", + "filterType": "string", + "key": "/library/sections/1/subtitleLanguage", + "title": "Subtitle Language", + "type": "filter" + }, + { + "filter": "label", + "filterType": "string", + "key": "/library/sections/1/label", + "title": "Labels", + "type": "filter" + } + ], + "Sort": [ + { + "default": "asc", + "defaultDirection": "asc", + "descKey": "titleSort:desc", + "firstCharacterKey": "/library/sections/1/firstCharacter", + "key": "titleSort", + "title": "Title" + }, + { + "defaultDirection": "desc", + "descKey": "originallyAvailableAt:desc", + "key": "originallyAvailableAt", + "title": "Release Date" + }, + { + "defaultDirection": "desc", + "descKey": "rating:desc", + "key": "rating", + "title": "Critic Rating" + }, + { + "defaultDirection": "desc", + "descKey": "audienceRating:desc", + "key": "audienceRating", + "title": "Audience Rating" + }, + { + "defaultDirection": "desc", + "descKey": "duration:desc", + "key": "duration", + "title": "Duration" + }, + { + "defaultDirection": "desc", + "descKey": "addedAt:desc", + "key": "addedAt", + "title": "Date Added" + }, + { + "defaultDirection": "desc", + "descKey": "lastViewedAt:desc", + "key": "lastViewedAt", + "title": "Date Viewed" + }, + { + "defaultDirection": "asc", + "descKey": "mediaHeight:desc", + "key": "mediaHeight", + "title": "Resolution" + }, + { + "defaultDirection": "desc", + "descKey": "random:desc", + "key": "random", + "title": "Randomly" + } + ], + "Field": [ + { + "key": "title", + "title": "Title", + "type": "string" + }, + { + "key": "studio", + "title": "Studio", + "type": "string" + }, + { + "key": "userRating", + "subType": "rating", + "title": "Rating", + "type": "integer" + }, + { + "key": "contentRating", + "title": "Content Rating", + "type": "tag" + }, + { + "key": "year", + "subType": "year", + "title": "Year", + "type": "integer" + }, + { + "key": "decade", + "subType": "decade", + "title": "Decade", + "type": "integer" + }, + { + "key": "originallyAvailableAt", + "title": "Release Date", + "type": "date" + }, + { + "key": "duration", + "subType": "duration", + "title": "Duration", + "type": "integer" + }, + { + "key": "unmatched", + "title": "Unmatched", + "type": "boolean" + }, + { + "key": "duplicate", + "title": "Duplicate", + "type": "boolean" + }, + { + "key": "genre", + "title": "Genre", + "type": "tag" + }, + { + "key": "collection", + "title": "Collection", + "type": "tag" + }, + { + "key": "director", + "title": "Director", + "type": "tag" + }, + { + "key": "writer", + "title": "Writer", + "type": "tag" + }, + { + "key": "producer", + "title": "Producer", + "type": "tag" + }, + { + "key": "actor", + "title": "Actor", + "type": "tag" + }, + { + "key": "country", + "title": "Country", + "type": "tag" + }, + { + "key": "addedAt", + "title": "Date Added", + "type": "date" + }, + { + "key": "viewCount", + "title": "Plays", + "type": "integer" + }, + { + "key": "lastViewedAt", + "title": "Last Watched", + "type": "date" + }, + { + "key": "unwatched", + "title": "Unwatched", + "type": "boolean" + }, + { + "key": "resolution", + "title": "Resolution", + "type": "resolution" + }, + { + "key": "hdr", + "subType": "hdr", + "title": "HDR", + "type": "boolean" + }, + { + "key": "mediaSize", + "subType": "fileSize", + "title": "File Size", + "type": "integer" + }, + { + "key": "mediaBitrate", + "subType": "bitrate", + "title": "Bitrate", + "type": "integer" + }, + { + "key": "subtitleLanguage", + "title": "Subtitle Language", + "type": "subtitleLanguage" + }, + { + "key": "audioLanguage", + "title": "Audio Language", + "type": "audioLanguage" + }, + { + "key": "inProgress", + "title": "In Progress", + "type": "boolean" + }, + { + "key": "trash", + "title": "Trash", + "type": "boolean" + }, + { + "key": "label", + "title": "Label", + "type": "tag" + } + ] + } + ], + "FieldType": [ + { + "type": "tag", + "Operator": [ + { + "key": "=", + "title": "is" + }, + { + "key": "!=", + "title": "is not" + } + ] + }, + { + "type": "integer", + "Operator": [ + { + "key": "=", + "title": "is" + }, + { + "key": "!=", + "title": "is not" + }, + { + "key": ">>=", + "title": "is greater than" + }, + { + "key": "<<=", + "title": "is less than" + } + ] + }, + { + "type": "string", + "Operator": [ + { + "key": "=", + "title": "contains" + }, + { + "key": "!=", + "title": "does not contain" + }, + { + "key": "==", + "title": "is" + }, + { + "key": "!==", + "title": "is not" + }, + { + "key": "<=", + "title": "begins with" + }, + { + "key": ">=", + "title": "ends with" + } + ] + }, + { + "type": "boolean", + "Operator": [ + { + "key": "=", + "title": "is true" + }, + { + "key": "!=", + "title": "is false" + } + ] + }, + { + "type": "date", + "Operator": [ + { + "key": "<<=", + "title": "is before" + }, + { + "key": ">>=", + "title": "is after" + } + ] + }, + { + "type": "subtitleLanguage", + "Operator": [ + { + "key": "=", + "title": "is" + }, + { + "key": "!=", + "title": "is not" + } + ] + }, + { + "type": "audioLanguage", + "Operator": [ + { + "key": "=", + "title": "is" + }, + { + "key": "!=", + "title": "is not" + } + ] + }, + { + "type": "resolution", + "Operator": [ + { + "key": "=", + "title": "is" + } + ] + } + ] + } + }; + + validateResponseSpec("/library/sections/{sectionId}", "get", 200, response) + }); +}) diff --git a/tests/paths/library/get-all-libraries.spec.ts b/tests/paths/library/get-all-libraries.spec.ts new file mode 100644 index 00000000..6fc93281 --- /dev/null +++ b/tests/paths/library/get-all-libraries.spec.ts @@ -0,0 +1,414 @@ +import {validateResponseSpec} from "../../utils/"; +import {describe, it} from 'vitest' + +describe('GET /library/sections', () => { + it('should validate the 200 response when the API spec is valid', () => { + const response = { + "MediaContainer": { + "size": 14, + "allowSync": false, + "title1": "Plex Library", + "Directory": [ + { + "allowSync": true, + "art": "/:/resources/movie-fanart.jpg", + "composite": "/library/sections/7/composite/1893047123", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/movie.png", + "keady": "7", + "type": "movie", + "title": "Kids Movies", + "agent": "tv.plex.agents.movie", + "scanner": "Plex Movie", + "language": "en-US", + "uuid": "a1b2c3d4e5f67890", + "updatedAt": 1728394001, + "createdAt": 1598476504, + "scannedAt": 1893047123, + "content": true, + "directory": true, + "contentChangedAt": 4738921, + "hidden": 0, + "Location": [ + { + "id": 25, + "path": "/KidsMovies" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/movie-fanart.jpg", + "composite": "/library/sections/13/composite/1893047124", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/movie.png", + "key": "13", + "type": "movie", + "title": "Kids Movies NL", + "agent": "tv.plex.agents.movie", + "scanner": "Plex Movie", + "language": "nl-NL", + "uuid": "b2c3d4e5f67890a1", + "updatedAt": 1680007500, + "createdAt": 1680007500, + "scannedAt": 1893047124, + "content": true, + "directory": true, + "contentChangedAt": 5283714, + "hidden": 0, + "Location": [ + { + "id": 23, + "path": "/KidsMoviesNL" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/movie-fanart.jpg", + "composite": "/library/sections/1/composite/1893047130", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/movie.png", + "key": "1", + "type": "movie", + "title": "Movies", + "agent": "tv.plex.agents.movie", + "scanner": "Plex Movie", + "language": "en-US", + "uuid": "c3d4e5f67890a1b2", + "updatedAt": 1728394005, + "createdAt": 1598476200, + "scannedAt": 1893047130, + "content": true, + "directory": true, + "contentChangedAt": 6379184, + "hidden": 0, + "Location": [ + { + "id": 18, + "path": "/Movies" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/movie-fanart.jpg", + "composite": "/library/sections/6/composite/1893047135", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/movie.png", + "key": "6", + "type": "movie", + "title": "Movies (Documentaries)", + "agent": "tv.plex.agents.movie", + "scanner": "Plex Movie", + "language": "en-US", + "uuid": "d4e5f67890a1b2c3", + "updatedAt": 1728394010, + "createdAt": 1598476302, + "scannedAt": 1893047135, + "content": true, + "directory": true, + "contentChangedAt": 5293874, + "hidden": 0, + "Location": [ + { + "id": 29, + "path": "/Movies (Documentaries)" + }, + { + "id": 15, + "path": "/Plex Library/Documentaries" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/movie-fanart.jpg", + "composite": "/library/sections/15/composite/1893047145", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/movie.png", + "key": "15", + "type": "movie", + "title": "Test Media Movies", + "agent": "tv.plex.agents.movie", + "scanner": "Plex Movie", + "language": "en-US", + "uuid": "e5f67890a1b2c3d4", + "updatedAt": 1689075000, + "createdAt": 1689075000, + "scannedAt": 1893047145, + "content": true, + "directory": true, + "contentChangedAt": 5182738, + "hidden": 0, + "Location": [ + { + "id": 27, + "path": "/TestMedia/Movies" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/3/composite/1893047110", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "3", + "type": "show", + "title": "Anime", + "agent": "com.plexapp.agents.hama", + "scanner": "Plex Series Scanner", + "language": "en", + "uuid": "f67890a1b2c3d4e5", + "updatedAt": 1684970001, + "createdAt": 1598476000, + "scannedAt": 1893047110, + "content": true, + "directory": true, + "contentChangedAt": 8379201, + "hidden": 0, + "Location": [ + { + "id": 17, + "path": "/Anime" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/12/composite/1893047125", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "12", + "type": "show", + "title": "Kids Tv Shows NL", + "agent": "tv.plex.agents.series", + "scanner": "Plex TV Series", + "language": "nl-NL", + "uuid": "67890a1b2c3d4e5f", + "updatedAt": 1728394002, + "createdAt": 1680007400, + "scannedAt": 1893047125, + "content": true, + "directory": true, + "contentChangedAt": 5948203, + "hidden": 0, + "Location": [ + { + "id": 22, + "path": "/KidsTvShowsNL" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/14/composite/1893047145", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "14", + "type": "show", + "title": "Reality TV (NL)", + "agent": "tv.plex.agents.series", + "scanner": "Plex TV Series", + "language": "nl-NL", + "uuid": "890a1b2c3d4e5f67", + "updatedAt": 1728394007, + "createdAt": 1601860600, + "scannedAt": 1893047145, + "content": true, + "directory": true, + "contentChangedAt": 6283720, + "hidden": 0, + "Location": [ + { + "id": 26, + "path": "/Reality TV NL" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/2/composite/1893047150", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "2", + "type": "show", + "title": "TV Series ", + "agent": "tv.plex.agents.series", + "scanner": "Plex TV Series", + "language": "en-US", + "uuid": "a1b2c3d4e5f67890", + "updatedAt": 1728394003, + "createdAt": 1598476100, + "scannedAt": 1893047150, + "content": true, + "directory": true, + "contentChangedAt": 6472184, + "hidden": 0, + "Location": [ + { + "id": 32, + "path": "/TV Shows" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/16/composite/1893047155", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "16", + "type": "show", + "title": "TV Shows (Documentaries)", + "agent": "tv.plex.agents.series", + "scanner": "Plex TV Series", + "language": "en-US", + "uuid": "b2c3d4e5f67890a1", + "updatedAt": 1689076000, + "createdAt": 1689076000, + "scannedAt": 1893047155, + "content": true, + "directory": true, + "contentChangedAt": 4920835, + "hidden": 0, + "Location": [ + { + "id": 28, + "path": "/TV Shows (Documentaries)" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/17/composite/1893047155", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "17", + "type": "show", + "title": "TV Shows (Kids)", + "agent": "tv.plex.agents.series", + "scanner": "Plex TV Series", + "language": "en-US", + "uuid": "c3d4e5f67890a1b2", + "updatedAt": 1689077000, + "createdAt": 1689077000, + "scannedAt": 1893047155, + "content": true, + "directory": true, + "contentChangedAt": 5309283, + "hidden": 0, + "Location": [ + { + "id": 31, + "path": "/TV Shows (Kids)" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/show-fanart.jpg", + "composite": "/library/sections/10/composite/1893047170", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/show.png", + "key": "10", + "type": "show", + "title": "TV Shows (Reality)", + "agent": "tv.plex.agents.series", + "scanner": "Plex TV Series", + "language": "en-US", + "uuid": "d4e5f67890a1b2c3", + "updatedAt": 1689078000, + "createdAt": 1626704821, + "scannedAt": 1893047170, + "content": true, + "directory": true, + "contentChangedAt": 7291885, + "hidden": 0, + "Location": [ + { + "id": 30, + "path": "/TV Shows (Reality)" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/artist-fanart.jpg", + "composite": "/library/sections/9/composite/1893047140", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/artist.png", + "key": "9", + "type": "artist", + "title": "Music", + "agent": "tv.plex.agents.music", + "scanner": "Plex Music", + "language": "en-US", + "uuid": "e5f67890a1b2c3d4", + "updatedAt": 1684974922, + "createdAt": 1598476740, + "scannedAt": 1893047140, + "content": true, + "directory": true, + "contentChangedAt": 7204063, + "hidden": 0, + "Location": [ + { + "id": 24, + "path": "/Music" + } + ] + }, + { + "allowSync": true, + "art": "/:/resources/movie-fanart.jpg", + "composite": "/library/sections/5/composite/1893047123", + "filters": true, + "refreshing": false, + "thumb": "/:/resources/video.png", + "key": "5", + "type": "movie", + "title": "Graduation", + "agent": "com.plexapp.agents.none", + "scanner": "Plex Video Files Scanner", + "language": "xn", + "uuid": "f67890a1b2c3d4e5", + "updatedAt": 1684974733, + "createdAt": 1598475949, + "scannedAt": 1893047123, + "content": true, + "directory": true, + "contentChangedAt": 3828909, + "hidden": 0, + "Location": [ + { + "id": 14, + "path": "/Plex Library/Conspiracy" + } + ] + } + ] + } + }; + + validateResponseSpec("/library/sections", "get", 200, response) + }); +})