# Content (*Content*) ## Overview The actual content of the media provider ### Available Operations * [GetCollectionItems](#getcollectionitems) - Get items in a collection * [GetMetadataItem](#getmetadataitem) - Get a metadata item * [GetAlbums](#getalbums) - Set section albums * [ListContent](#listcontent) - Get items in the section * [GetAllLeaves](#getallleaves) - Set section leaves * [GetArts](#getarts) - Set section artwork * [GetCategories](#getcategories) - Set section categories * [GetCluster](#getcluster) - Set section clusters * [GetSonicPath](#getsonicpath) - Similar tracks to transition from one to another * [GetFolders](#getfolders) - Get all folder locations * [ListMoments](#listmoments) - Set section moments * [GetSonicallySimilar](#getsonicallysimilar) - The nearest audio tracks * [GetCollectionImage](#getcollectionimage) - Get a collection's image ## GetCollectionItems Get items in a collection. Note if this collection contains more than 100 items, paging must be used. ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetCollectionItemsRequest req = new GetCollectionItemsRequest() { CollectionId = 314585, }; var res = await sdk.Content.GetCollectionItemsAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `request` | [GetCollectionItemsRequest](../../Models/Requests/GetCollectionItemsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetCollectionItemsResponse](../../Models/Requests/GetCollectionItemsResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetMetadataItem Get one or more metadata items. ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; using System.Collections.Generic; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetMetadataItemRequest req = new GetMetadataItemRequest() { Ids = new List() {}, AsyncCheckFiles = BoolInt.One, AsyncRefreshLocalMediaAgent = BoolInt.One, AsyncRefreshAnalysis = BoolInt.One, CheckFiles = BoolInt.One, SkipRefresh = BoolInt.One, CheckFileAvailability = BoolInt.One, AsyncAugmentMetadata = BoolInt.One, AugmentCount = BoolInt.One, }; var res = await sdk.Content.GetMetadataItemAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `request` | [GetMetadataItemRequest](../../Models/Requests/GetMetadataItemRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetMetadataItemResponse](../../Models/Requests/GetMetadataItemResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetAlbums Get all albums in a music section ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetAlbumsRequest req = new GetAlbumsRequest() { SectionId = 817133, }; var res = await sdk.Content.GetAlbumsAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | | `request` | [GetAlbumsRequest](../../Models/Requests/GetAlbumsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetAlbumsResponse](../../Models/Requests/GetAlbumsResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## ListContent Get the items in a section, potentially filtering them ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); ListContentRequest req = new ListContentRequest() { SectionId = "", }; var res = await sdk.Content.ListContentAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | | `request` | [ListContentRequest](../../Models/Requests/ListContentRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[ListContentResponse](../../Models/Requests/ListContentResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetAllLeaves Get all leaves in a section (such as episodes in a show section) ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetAllLeavesRequest req = new GetAllLeavesRequest() { SectionId = 633197, }; var res = await sdk.Content.GetAllLeavesAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `request` | [GetAllLeavesRequest](../../Models/Requests/GetAllLeavesRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetAllLeavesResponse](../../Models/Requests/GetAllLeavesResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetArts Get artwork for a library section ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetArtsRequest req = new GetArtsRequest() { SectionId = 859200, }; var res = await sdk.Content.GetArtsAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | | `request` | [GetArtsRequest](../../Models/Requests/GetArtsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetArtsResponse](../../Models/Requests/GetArtsResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetCategories Get categories in a library section ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetCategoriesRequest req = new GetCategoriesRequest() { SectionId = 21841, }; var res = await sdk.Content.GetCategoriesAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | | `request` | [GetCategoriesRequest](../../Models/Requests/GetCategoriesRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetCategoriesResponse](../../Models/Requests/GetCategoriesResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetCluster Get clusters in a library section (typically for photos) ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetClusterRequest req = new GetClusterRequest() { SectionId = 138560, }; var res = await sdk.Content.GetClusterAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | | `request` | [GetClusterRequest](../../Models/Requests/GetClusterRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetClusterResponse](../../Models/Requests/GetClusterResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetSonicPath Get a list of audio tracks starting at one and ending at another which are similar across the path ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetSonicPathRequest req = new GetSonicPathRequest() { SectionId = 914549, StartID = 629990, EndID = 687740, }; var res = await sdk.Content.GetSonicPathAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `request` | [GetSonicPathRequest](../../Models/Requests/GetSonicPathRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetSonicPathResponse](../../Models/Requests/GetSonicPathResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetFolders Get all folder locations of the media in a section ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetFoldersRequest req = new GetFoldersRequest() { SectionId = 892532, }; var res = await sdk.Content.GetFoldersAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | | `request` | [GetFoldersRequest](../../Models/Requests/GetFoldersRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetFoldersResponse](../../Models/Requests/GetFoldersResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## ListMoments Get moments in a library section (typically for photos) ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); ListMomentsRequest req = new ListMomentsRequest() { SectionId = 403239, }; var res = await sdk.Content.ListMomentsAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | | `request` | [ListMomentsRequest](../../Models/Requests/ListMomentsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[ListMomentsResponse](../../Models/Requests/ListMomentsResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetSonicallySimilar Get the nearest audio tracks to a particular analysis ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; using System.Collections.Generic; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetSonicallySimilarRequest req = new GetSonicallySimilarRequest() { SectionId = 525956, Values = new List() {}, }; var res = await sdk.Content.GetSonicallySimilarAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `request` | [GetSonicallySimilarRequest](../../Models/Requests/GetSonicallySimilarRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetSonicallySimilarResponse](../../Models/Requests/GetSonicallySimilarResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | ## GetCollectionImage Get an image for the collection based on the items within ### Example Usage ```csharp using LukeHagar.PlexAPI.SDK; using LukeHagar.PlexAPI.SDK.Models.Components; using LukeHagar.PlexAPI.SDK.Models.Requests; var sdk = new PlexAPI( accepts: LukeHagar.PlexAPI.SDK.Models.Components.Accepts.ApplicationXml, clientIdentifier: "abc123", product: "Plex for Roku", version: "2.4.1", platform: "Roku", platformVersion: "4.3 build 1057", device: "Roku 3", model: "4200X", deviceVendor: "Roku", deviceName: "Living Room TV", marketplace: "googlePlay", token: "" ); GetCollectionImageRequest req = new GetCollectionImageRequest() { CollectionId = 474227, UpdatedAt = 759379, }; var res = await sdk.Content.GetCollectionImageAsync(req); // handle response ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `request` | [GetCollectionImageRequest](../../Models/Requests/GetCollectionImageRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response **[GetCollectionImageResponse](../../Models/Requests/GetCollectionImageResponse.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* |