diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eabaf30..65d5744 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5a8dbcbc-e0ee-41f0-9d84-b8b50567d1e9 management: - docChecksum: 7aba498c024534142941d65a7c2e649c + docChecksum: 95d4ac4070b7f9db42126fc81b258e02 docVersion: 0.0.3 speakeasyVersion: internal - generationVersion: 2.237.3 - releaseVersion: 0.1.5 - configChecksum: 112f7d72fae8408e2dd1ef59ee88fb3a + generationVersion: 2.239.1 + releaseVersion: 0.1.6 + configChecksum: 8549aba85bd2407d4a0508d2553b1239 repoURL: https://github.com/LukeHagar/plexcsharp.git repoSubDirectory: . published: true @@ -243,6 +243,12 @@ generatedFiles: - PlexAPI/Models/Requests/RefreshLibraryErrors.cs - PlexAPI/Models/Requests/RefreshLibraryResponseBody.cs - PlexAPI/Models/Requests/RefreshLibraryResponse.cs + - PlexAPI/Models/Requests/Type.cs + - PlexAPI/Models/Requests/SearchLibraryRequest.cs + - PlexAPI/Models/Requests/SearchLibraryMetadata.cs + - PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs + - PlexAPI/Models/Requests/SearchLibraryResponseBody.cs + - PlexAPI/Models/Requests/SearchLibraryResponse.cs - PlexAPI/Models/Requests/GetMetadataRequest.cs - PlexAPI/Models/Requests/GetMetadataErrors.cs - PlexAPI/Models/Requests/GetMetadataLibraryResponseBody.cs @@ -290,7 +296,7 @@ generatedFiles: - PlexAPI/Models/Requests/EnablePaperTrailErrors.cs - PlexAPI/Models/Requests/EnablePaperTrailResponseBody.cs - PlexAPI/Models/Requests/EnablePaperTrailResponse.cs - - PlexAPI/Models/Requests/Type.cs + - PlexAPI/Models/Requests/QueryParamType.cs - PlexAPI/Models/Requests/Smart.cs - PlexAPI/Models/Requests/CreatePlaylistRequest.cs - PlexAPI/Models/Requests/CreatePlaylistErrors.cs @@ -353,7 +359,7 @@ generatedFiles: - PlexAPI/Models/Requests/UploadPlaylistErrors.cs - PlexAPI/Models/Requests/UploadPlaylistResponseBody.cs - PlexAPI/Models/Requests/UploadPlaylistResponse.cs - - PlexAPI/Models/Requests/QueryParamType.cs + - PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs - PlexAPI/Models/Requests/Scope.cs - PlexAPI/Models/Requests/GetTransientTokenRequest.cs - PlexAPI/Models/Requests/GetTransientTokenErrors.cs @@ -615,6 +621,12 @@ generatedFiles: - docs/Models/Requests/RefreshLibraryErrors.md - docs/Models/Requests/RefreshLibraryResponseBody.md - docs/Models/Requests/RefreshLibraryResponse.md + - docs/Models/Requests/Type.md + - docs/Models/Requests/SearchLibraryRequest.md + - docs/Models/Requests/SearchLibraryMetadata.md + - docs/Models/Requests/SearchLibraryMediaContainer.md + - docs/Models/Requests/SearchLibraryResponseBody.md + - docs/Models/Requests/SearchLibraryResponse.md - docs/Models/Requests/GetMetadataRequest.md - docs/Models/Requests/GetMetadataErrors.md - docs/Models/Requests/GetMetadataLibraryResponseBody.md @@ -662,7 +674,7 @@ generatedFiles: - docs/Models/Requests/EnablePaperTrailErrors.md - docs/Models/Requests/EnablePaperTrailResponseBody.md - docs/Models/Requests/EnablePaperTrailResponse.md - - docs/Models/Requests/Type.md + - docs/Models/Requests/QueryParamType.md - docs/Models/Requests/Smart.md - docs/Models/Requests/CreatePlaylistRequest.md - docs/Models/Requests/CreatePlaylistErrors.md @@ -725,7 +737,7 @@ generatedFiles: - docs/Models/Requests/UploadPlaylistErrors.md - docs/Models/Requests/UploadPlaylistResponseBody.md - docs/Models/Requests/UploadPlaylistResponse.md - - docs/Models/Requests/QueryParamType.md + - docs/Models/Requests/GetTransientTokenQueryParamType.md - docs/Models/Requests/Scope.md - docs/Models/Requests/GetTransientTokenRequest.md - docs/Models/Requests/GetTransientTokenErrors.md diff --git a/PlexAPI/Activities.cs b/PlexAPI/Activities.cs index d86f3a2..06fee27 100644 --- a/PlexAPI/Activities.cs +++ b/PlexAPI/Activities.cs @@ -70,10 +70,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Butler.cs b/PlexAPI/Butler.cs index 693dc68..49ee0a4 100644 --- a/PlexAPI/Butler.cs +++ b/PlexAPI/Butler.cs @@ -97,10 +97,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Hubs.cs b/PlexAPI/Hubs.cs index 446ee78..f8329a3 100644 --- a/PlexAPI/Hubs.cs +++ b/PlexAPI/Hubs.cs @@ -59,10 +59,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Library.cs b/PlexAPI/Library.cs index bdde534..07e6f87 100644 --- a/PlexAPI/Library.cs +++ b/PlexAPI/Library.cs @@ -143,7 +143,6 @@ namespace PlexAPI /// - `resolution`: Items categorized by resolution.
/// - `firstCharacter`: Items categorized by the first letter.
/// - `folder`: Items categorized by folder.
- /// - `search?type=1`: Search functionality within the section.
/// /// /// @@ -159,6 +158,33 @@ namespace PlexAPI /// Task RefreshLibraryAsync(double sectionId); + /// + /// Search Library + /// + /// + /// Search for content within a specific section of the library.
+ ///
+ /// ### Types
+ /// Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls:
+ ///
+ /// - **Type Object Attributes**:
+ /// - `type`: Metadata type (if standard Plex type).
+ /// - `title`: Title for this content type (e.g., "Movies").
+ ///
+ /// - **Filter Objects**:
+ /// - Subset of the media query language.
+ /// - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`.
+ ///
+ /// - **Sort Objects**:
+ /// - Description of sort fields.
+ /// - 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.
+ /// + ///
+ ///
+ Task SearchLibraryAsync(long sectionId, Type type); + /// /// Get Items Metadata /// @@ -201,10 +227,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; @@ -543,6 +569,46 @@ namespace PlexAPI } + public async Task SearchLibraryAsync(long sectionId, Type type) + { + var request = new SearchLibraryRequest() + { + SectionId = sectionId, + Type = type, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/search", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + + var client = _securityClient; + + var httpResponse = await client.SendAsync(httpRequest); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + + var response = new SearchLibraryResponse + { + StatusCode = (int)httpResponse.StatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + + if((response.StatusCode == 200)) + { + if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + { + response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + } + + return response; + } + return response; + } + + public async Task GetMetadataAsync(double ratingKey) { var request = new GetMetadataRequest() diff --git a/PlexAPI/Log.cs b/PlexAPI/Log.cs index f3a0e84..3bc57cf 100644 --- a/PlexAPI/Log.cs +++ b/PlexAPI/Log.cs @@ -90,10 +90,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Media.cs b/PlexAPI/Media.cs index d84427c..7144d1e 100644 --- a/PlexAPI/Media.cs +++ b/PlexAPI/Media.cs @@ -68,10 +68,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Models/Requests/CreatePlaylistRequest.cs b/PlexAPI/Models/Requests/CreatePlaylistRequest.cs index 081be8c..ae8a426 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistRequest.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistRequest.cs @@ -25,7 +25,7 @@ namespace PlexAPI.Models.Requests /// type of playlist to create /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] - public Type Type { get; set; } = default!; + public QueryParamType Type { get; set; } = default!; /// /// whether the playlist is smart or not diff --git a/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs b/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs index 774d5a0..c86c8fa 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs @@ -58,6 +58,9 @@ namespace PlexAPI.Models.Requests [JsonProperty("viewMode")] public int? ViewMode { get; set; } + [JsonProperty("mixedParents")] + public bool? MixedParents { get; set; } + [JsonProperty("Metadata")] public List? Metadata { get; set; } } diff --git a/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs b/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs index 9a7ecb5..71c1ce2 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs @@ -83,6 +83,27 @@ namespace PlexAPI.Models.Requests [JsonProperty("ratingImage")] public string? RatingImage { get; set; } + [JsonProperty("grandparentRatingKey")] + public string? GrandparentRatingKey { get; set; } + + [JsonProperty("grandparentGuid")] + public string? GrandparentGuid { get; set; } + + [JsonProperty("grandparentKey")] + public string? GrandparentKey { get; set; } + + [JsonProperty("grandparentTitle")] + public string? GrandparentTitle { get; set; } + + [JsonProperty("grandparentThumb")] + public string? GrandparentThumb { get; set; } + + [JsonProperty("grandparentArt")] + public string? GrandparentArt { get; set; } + + [JsonProperty("grandparentTheme")] + public string? GrandparentTheme { get; set; } + [JsonProperty("Media")] public List? Media { get; set; } @@ -118,5 +139,53 @@ namespace PlexAPI.Models.Requests [JsonProperty("skipCount")] public int? SkipCount { get; set; } + + [JsonProperty("index")] + public int? Index { get; set; } + + [JsonProperty("theme")] + public string? Theme { get; set; } + + [JsonProperty("leafCount")] + public int? LeafCount { get; set; } + + [JsonProperty("viewedLeafCount")] + public int? ViewedLeafCount { get; set; } + + [JsonProperty("childCount")] + public int? ChildCount { get; set; } + + [JsonProperty("hasPremiumExtras")] + public string? HasPremiumExtras { get; set; } + + [JsonProperty("hasPremiumPrimaryExtra")] + public string? HasPremiumPrimaryExtra { get; set; } + + [JsonProperty("parentRatingKey")] + public string? ParentRatingKey { get; set; } + + [JsonProperty("parentGuid")] + public string? ParentGuid { get; set; } + + [JsonProperty("parentStudio")] + public string? ParentStudio { get; set; } + + [JsonProperty("parentKey")] + public string? ParentKey { get; set; } + + [JsonProperty("parentTitle")] + public string? ParentTitle { get; set; } + + [JsonProperty("parentIndex")] + public int? ParentIndex { get; set; } + + [JsonProperty("parentYear")] + public int? ParentYear { get; set; } + + [JsonProperty("parentThumb")] + public string? ParentThumb { get; set; } + + [JsonProperty("parentTheme")] + public string? ParentTheme { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs b/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs new file mode 100644 index 0000000..ee591e3 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs @@ -0,0 +1,58 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using System; + + /// + /// `delegation` - This is the only supported `type` parameter. + /// + public enum GetTransientTokenQueryParamType + { + [JsonProperty("delegation")] + Delegation, + } + + public static class GetTransientTokenQueryParamTypeExtension + { + public static string Value(this GetTransientTokenQueryParamType value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static GetTransientTokenQueryParamType ToEnum(this string value) + { + foreach(var field in typeof(GetTransientTokenQueryParamType).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is GetTransientTokenQueryParamType) + { + return (GetTransientTokenQueryParamType)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum GetTransientTokenQueryParamType"); + } + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTransientTokenRequest.cs b/PlexAPI/Models/Requests/GetTransientTokenRequest.cs index fb55da1..1ec55d6 100644 --- a/PlexAPI/Models/Requests/GetTransientTokenRequest.cs +++ b/PlexAPI/Models/Requests/GetTransientTokenRequest.cs @@ -19,7 +19,7 @@ namespace PlexAPI.Models.Requests /// `delegation` - This is the only supported `type` parameter. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] - public QueryParamType Type { get; set; } = default!; + public GetTransientTokenQueryParamType Type { get; set; } = default!; /// /// `all` - This is the only supported `scope` parameter. diff --git a/PlexAPI/Models/Requests/QueryParamType.cs b/PlexAPI/Models/Requests/QueryParamType.cs index 9fde256..a907686 100644 --- a/PlexAPI/Models/Requests/QueryParamType.cs +++ b/PlexAPI/Models/Requests/QueryParamType.cs @@ -14,12 +14,16 @@ namespace PlexAPI.Models.Requests using System; /// - /// `delegation` - This is the only supported `type` parameter. + /// type of playlist to create /// public enum QueryParamType { - [JsonProperty("delegation")] - Delegation, + [JsonProperty("audio")] + Audio, + [JsonProperty("video")] + Video, + [JsonProperty("photo")] + Photo, } public static class QueryParamTypeExtension diff --git a/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs b/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs new file mode 100644 index 0000000..3e68728 --- /dev/null +++ b/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs @@ -0,0 +1,58 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + public class SearchLibraryMediaContainer + { + + [JsonProperty("size")] + public int? Size { get; set; } + + [JsonProperty("allowSync")] + public bool? AllowSync { get; set; } + + [JsonProperty("art")] + public string? Art { get; set; } + + [JsonProperty("identifier")] + public string? Identifier { get; set; } + + [JsonProperty("mediaTagPrefix")] + public string? MediaTagPrefix { get; set; } + + [JsonProperty("mediaTagVersion")] + public int? MediaTagVersion { get; set; } + + [JsonProperty("nocache")] + public bool? Nocache { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + + [JsonProperty("title1")] + public string? Title1 { get; set; } + + [JsonProperty("title2")] + public string? Title2 { get; set; } + + [JsonProperty("viewGroup")] + public string? ViewGroup { get; set; } + + [JsonProperty("viewMode")] + public int? ViewMode { get; set; } + + [JsonProperty("Metadata")] + public List? Metadata { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryMetadata.cs b/PlexAPI/Models/Requests/SearchLibraryMetadata.cs new file mode 100644 index 0000000..86fdaa4 --- /dev/null +++ b/PlexAPI/Models/Requests/SearchLibraryMetadata.cs @@ -0,0 +1,78 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + + public class SearchLibraryMetadata + { + + [JsonProperty("ratingKey")] + public string? RatingKey { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("parentRatingKey")] + public string? ParentRatingKey { get; set; } + + [JsonProperty("guid")] + public string? Guid { get; set; } + + [JsonProperty("parentGuid")] + public string? ParentGuid { get; set; } + + [JsonProperty("parentStudio")] + public string? ParentStudio { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("parentKey")] + public string? ParentKey { get; set; } + + [JsonProperty("parentTitle")] + public string? ParentTitle { get; set; } + + [JsonProperty("summary")] + public string? Summary { get; set; } + + [JsonProperty("index")] + public int? Index { get; set; } + + [JsonProperty("parentIndex")] + public int? ParentIndex { get; set; } + + [JsonProperty("parentYear")] + public int? ParentYear { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + + [JsonProperty("art")] + public string? Art { get; set; } + + [JsonProperty("parentThumb")] + public string? ParentThumb { get; set; } + + [JsonProperty("parentTheme")] + public string? ParentTheme { get; set; } + + [JsonProperty("addedAt")] + public int? AddedAt { get; set; } + + [JsonProperty("updatedAt")] + public int? UpdatedAt { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryRequest.cs b/PlexAPI/Models/Requests/SearchLibraryRequest.cs new file mode 100644 index 0000000..23f5d14 --- /dev/null +++ b/PlexAPI/Models/Requests/SearchLibraryRequest.cs @@ -0,0 +1,30 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Models.Requests +{ + using PlexAPI.Utils; + + public class SearchLibraryRequest + { + + /// + /// the Id of the library to query + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] + public long SectionId { get; set; } = default!; + + /// + /// Plex content type to search for + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] + public Type Type { get; set; } = default!; + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryResponse.cs b/PlexAPI/Models/Requests/SearchLibraryResponse.cs new file mode 100644 index 0000000..2e45679 --- /dev/null +++ b/PlexAPI/Models/Requests/SearchLibraryResponse.cs @@ -0,0 +1,39 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Models.Requests +{ + using System.Net.Http; + using System; + + public class SearchLibraryResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + /// + /// The contents of the library by section and type + /// + public SearchLibraryResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs b/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs new file mode 100644 index 0000000..d283fbb --- /dev/null +++ b/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs @@ -0,0 +1,24 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Models.Requests +{ + using Newtonsoft.Json; + + /// + /// The contents of the library by section and type + /// + public class SearchLibraryResponseBody + { + + [JsonProperty("MediaContainer")] + public SearchLibraryMediaContainer? MediaContainer { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Tag.cs b/PlexAPI/Models/Requests/Tag.cs index e35f011..1ac384a 100644 --- a/PlexAPI/Models/Requests/Tag.cs +++ b/PlexAPI/Models/Requests/Tag.cs @@ -56,8 +56,6 @@ namespace PlexAPI.Models.Requests FirstCharacter, [JsonProperty("folder")] Folder, - [JsonProperty("search?type=1")] - SearchTypeEqual1, } public static class TagExtension diff --git a/PlexAPI/Models/Requests/Type.cs b/PlexAPI/Models/Requests/Type.cs index 168719e..c6584d6 100644 --- a/PlexAPI/Models/Requests/Type.cs +++ b/PlexAPI/Models/Requests/Type.cs @@ -10,53 +10,16 @@ #nullable enable namespace PlexAPI.Models.Requests { - using Newtonsoft.Json; - using System; /// - /// type of playlist to create + /// Plex content type to search for /// public enum Type { - [JsonProperty("audio")] - Audio, - [JsonProperty("video")] - Video, - [JsonProperty("photo")] - Photo, - } - - public static class TypeExtension - { - public static string Value(this Type value) - { - return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); - } - - public static Type ToEnum(this string value) - { - foreach(var field in typeof(Type).GetFields()) - { - var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); - if (attributes.Length == 0) - { - continue; - } - - var attribute = attributes[0] as JsonPropertyAttribute; - if (attribute != null && attribute.PropertyName == value) - { - var enumVal = field.GetValue(null); - - if (enumVal is Type) - { - return (Type)enumVal; - } - } - } - - throw new Exception($"Unknown value {value} for enum Type"); - } + One = 1, + Two = 2, + Three = 3, + Four = 4, } } \ No newline at end of file diff --git a/PlexAPI/Playlists.cs b/PlexAPI/Playlists.cs index 48ed235..ecda9dc 100644 --- a/PlexAPI/Playlists.cs +++ b/PlexAPI/Playlists.cs @@ -142,10 +142,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/PlexAPI.csproj b/PlexAPI/PlexAPI.csproj index ca7a0e9..74eab61 100644 --- a/PlexAPI/PlexAPI.csproj +++ b/PlexAPI/PlexAPI.csproj @@ -2,7 +2,7 @@ true Plex-API - 0.1.5 + 0.1.6 LukeHagar net5.0 enable diff --git a/PlexAPI/PlexAPISDK.cs b/PlexAPI/PlexAPISDK.cs index 33ebb48..d4f1d2a 100644 --- a/PlexAPI/PlexAPISDK.cs +++ b/PlexAPI/PlexAPISDK.cs @@ -235,10 +235,10 @@ namespace PlexAPI public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Search.cs b/PlexAPI/Search.cs index 9bfd7a9..73e9a13 100644 --- a/PlexAPI/Search.cs +++ b/PlexAPI/Search.cs @@ -83,10 +83,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Security.cs b/PlexAPI/Security.cs index 659da76..6f2a629 100644 --- a/PlexAPI/Security.cs +++ b/PlexAPI/Security.cs @@ -36,7 +36,7 @@ namespace PlexAPI /// /// /// - Task GetTransientTokenAsync(QueryParamType type, Scope scope); + Task GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope); /// /// Get Source Connection Information @@ -61,10 +61,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; @@ -78,7 +78,7 @@ namespace PlexAPI } - public async Task GetTransientTokenAsync(QueryParamType type, Scope scope) + public async Task GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope) { var request = new GetTransientTokenRequest() { diff --git a/PlexAPI/Server.cs b/PlexAPI/Server.cs index 052854a..54519c5 100644 --- a/PlexAPI/Server.cs +++ b/PlexAPI/Server.cs @@ -113,10 +113,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Sessions.cs b/PlexAPI/Sessions.cs index 8cd0760..42acaba 100644 --- a/PlexAPI/Sessions.cs +++ b/PlexAPI/Sessions.cs @@ -76,10 +76,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Updater.cs b/PlexAPI/Updater.cs index 9265140..c3dffd1 100644 --- a/PlexAPI/Updater.cs +++ b/PlexAPI/Updater.cs @@ -70,10 +70,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/PlexAPI/Video.cs b/PlexAPI/Video.cs index 88e8173..d1dcaa1 100644 --- a/PlexAPI/Video.cs +++ b/PlexAPI/Video.cs @@ -58,10 +58,10 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.1.5"; - private const string _sdkGenVersion = "2.237.3"; + private const string _sdkVersion = "0.1.6"; + private const string _sdkGenVersion = "2.239.1"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.1.5 2.237.3 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.1.6 2.239.1 0.0.3 Plex-API"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; private ISpeakeasyHttpClient _securityClient; diff --git a/README.md b/README.md index 32329e7..699b745 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section * [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [RefreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library +* [SearchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library * [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata * [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children * [GetOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck diff --git a/RELEASES.md b/RELEASES.md index 99eaf2c..4280078 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -54,4 +54,12 @@ Based on: - OpenAPI Doc 0.0.3 - Speakeasy CLI 1.148.0 (2.237.3) https://github.com/speakeasy-api/speakeasy ### Generated -- [csharp v0.1.5] . \ No newline at end of file +- [csharp v0.1.5] . + +## 2024-01-25 00:42:33 +### Changes +Based on: +- OpenAPI Doc 0.0.3 +- Speakeasy CLI 1.152.0 (2.239.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.1.6] . \ No newline at end of file diff --git a/docs/Models/Requests/CreatePlaylistRequest.md b/docs/Models/Requests/CreatePlaylistRequest.md index 549ea1b..105958a 100644 --- a/docs/Models/Requests/CreatePlaylistRequest.md +++ b/docs/Models/Requests/CreatePlaylistRequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `Title` | *string* | :heavy_check_mark: | name of the playlist | -| `Type` | [Type](../../Models/Requests/Type.md) | :heavy_check_mark: | type of playlist to create | -| `Smart` | [Smart](../../Models/Requests/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not | -| `Uri` | *string* | :heavy_check_mark: | the content URI for the playlist | -| `PlayQueueID` | *double* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Title` | *string* | :heavy_check_mark: | name of the playlist | +| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | type of playlist to create | +| `Smart` | [Smart](../../Models/Requests/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not | +| `Uri` | *string* | :heavy_check_mark: | the content URI for the playlist | +| `PlayQueueID` | *double* | :heavy_minus_sign: | the play queue to copy to a playlist | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMediaContainer.md b/docs/Models/Requests/GetLibraryItemsMediaContainer.md index ae8cf8a..cf0ab5f 100644 --- a/docs/Models/Requests/GetLibraryItemsMediaContainer.md +++ b/docs/Models/Requests/GetLibraryItemsMediaContainer.md @@ -3,20 +3,21 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Size` | *int* | :heavy_minus_sign: | N/A | 70 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | -| `Title2` | *string* | :heavy_minus_sign: | N/A | Recently Released | -| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | movie | -| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | -| `Metadata` | List<[GetLibraryItemsMetadata](../../Models/Requests/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | [{"Country":[{"tag":"United States of America"}],"Director":[{"tag":"James Cameron"}],"Genre":[{"tag":"Action"},{"tag":"Adventure"}],"Media":[{"Part":[{"container":"mkv","duration":11558112,"file":"/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv","id":119542,"key":"/library/parts/119542/1680457526/file.mkv","size":36158371307,"videoProfile":"main 10"}],"aspectRatio":1.85,"audioChannels":6,"audioCodec":"eac3","bitrate":25025,"container":"mkv","duration":11558112,"height":2072,"id":119534,"videoCodec":"hevc","videoFrameRate":"24p","videoProfile":"main 10","videoResolution":"4k","width":3840}],"Role":[{"tag":"Sam Worthington"},{"tag":"Zoe Saldaña"},{"tag":"Sigourney Weaver"}],"Writer":[{"tag":"Josh Friedman"},{"tag":"James Cameron"}],"addedAt":1680457607,"art":"/library/metadata/58683/art/1703239236","audienceRating":9.2,"audienceRatingImage":"rottentomatoes://image.rating.upright","chapterSource":"media","contentRating":"PG-13","duration":11558112,"guid":"plex://movie/5d7768ba96b655001fdc0408","key":"/library/metadata/58683","lastViewedAt":1682752242,"originalTitle":"映画 ブラッククローバー 魔法帝の剣","originallyAvailableAt":"2022-12-14T00:00:00Z","primaryExtraKey":"/library/metadata/58684","rating":7.6,"ratingImage":"rottentomatoes://image.rating.ripe","ratingKey":"58683","skipCount":1,"studio":"20th Century Studios","summary":"Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.","tagline":"Return to Pandora.","thumb":"/library/metadata/58683/thumb/1703239236","title":"Avatar: The Way of Water","titleSort":"Whale","type":"movie","updatedAt":1703239236,"viewCount":1,"viewOffset":5222500,"year":2022}] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 70 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | +| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | +| `Title2` | *string* | :heavy_minus_sign: | N/A | Recently Released | +| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | movie | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | +| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | true | +| `Metadata` | List<[GetLibraryItemsMetadata](../../Models/Requests/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | [{"Country":[{"tag":"United States of America"}],"Director":[{"tag":"James Cameron"}],"Genre":[{"tag":"Action"},{"tag":"Adventure"}],"Media":[{"Part":[{"container":"mkv","duration":11558112,"file":"/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv","id":119542,"key":"/library/parts/119542/1680457526/file.mkv","size":36158371307,"videoProfile":"main 10"}],"aspectRatio":1.85,"audioChannels":6,"audioCodec":"eac3","bitrate":25025,"container":"mkv","duration":11558112,"height":2072,"id":119534,"videoCodec":"hevc","videoFrameRate":"24p","videoProfile":"main 10","videoResolution":"4k","width":3840}],"Role":[{"tag":"Sam Worthington"},{"tag":"Zoe Saldaña"},{"tag":"Sigourney Weaver"}],"Writer":[{"tag":"Josh Friedman"},{"tag":"James Cameron"}],"addedAt":1680457607,"art":"/library/metadata/58683/art/1703239236","audienceRating":9.2,"audienceRatingImage":"rottentomatoes://image.rating.upright","chapterSource":"media","childCount":1,"contentRating":"PG-13","duration":11558112,"grandparentArt":"/library/metadata/66/art/1705716261","grandparentGuid":"plex://show/5d9c081b170e24001f2a7be4","grandparentKey":"/library/metadata/66","grandparentRatingKey":"66","grandparentTheme":"/library/metadata/66/theme/1705716261","grandparentThumb":"/library/metadata/66/thumb/1705716261","grandparentTitle":"Caprica","guid":"plex://movie/5d7768ba96b655001fdc0408","hasPremiumExtras":"1","hasPremiumPrimaryExtra":"1","index":1,"key":"/library/metadata/58683","lastViewedAt":1682752242,"leafCount":14,"originalTitle":"映画 ブラッククローバー 魔法帝の剣","originallyAvailableAt":"2022-12-14T00:00:00Z","parentGuid":"plex://show/5d9c081b170e24001f2a7be4","parentIndex":1,"parentKey":"/library/metadata/66","parentRatingKey":"66","parentStudio":"UCP","parentTheme":"/library/metadata/66/theme/1705716261","parentThumb":"/library/metadata/66/thumb/1705716261","parentTitle":"Caprica","parentYear":2010,"primaryExtraKey":"/library/metadata/58684","rating":7.6,"ratingImage":"rottentomatoes://image.rating.ripe","ratingKey":"58683","skipCount":1,"studio":"20th Century Studios","summary":"Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.","tagline":"Return to Pandora.","theme":"/library/metadata/1/theme/1705636920","thumb":"/library/metadata/58683/thumb/1703239236","title":"Avatar: The Way of Water","titleSort":"Whale","type":"movie","updatedAt":1703239236,"viewCount":1,"viewOffset":5222500,"viewedLeafCount":0,"year":2022}] | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMetadata.md b/docs/Models/Requests/GetLibraryItemsMetadata.md index 415be2e..4246d4f 100644 --- a/docs/Models/Requests/GetLibraryItemsMetadata.md +++ b/docs/Models/Requests/GetLibraryItemsMetadata.md @@ -27,6 +27,13 @@ | `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | | `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | | `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `GrandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | +| `GrandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `GrandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `GrandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | +| `GrandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `GrandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | +| `GrandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | | `Media` | List<[GetLibraryItemsMedia](../../Models/Requests/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | [{"Part":[{"container":"mkv","duration":11558112,"file":"/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv","id":119542,"key":"/library/parts/119542/1680457526/file.mkv","size":36158371307,"videoProfile":"main 10"}],"aspectRatio":1.85,"audioChannels":6,"audioCodec":"eac3","bitrate":25025,"container":"mkv","duration":11558112,"height":2072,"id":119534,"videoCodec":"hevc","videoFrameRate":"24p","videoProfile":"main 10","videoResolution":"4k","width":3840}] | | `Genre` | List<[GetLibraryItemsGenre](../../Models/Requests/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | [{"tag":"Adventure"}] | | `Country` | List<[GetLibraryItemsCountry](../../Models/Requests/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | [{"tag":"United States of America"}] | @@ -38,4 +45,20 @@ | `LastViewedAt` | *int* | :heavy_minus_sign: | N/A | 1682752242 | | `OriginalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | | `ViewOffset` | *int* | :heavy_minus_sign: | N/A | 5222500 | -| `SkipCount` | *int* | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file +| `SkipCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Index` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | +| `LeafCount` | *int* | :heavy_minus_sign: | N/A | 14 | +| `ViewedLeafCount` | *int* | :heavy_minus_sign: | N/A | 0 | +| `ChildCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | +| `ParentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | +| `ParentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `ParentStudio` | *string* | :heavy_minus_sign: | N/A | UCP | +| `ParentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | +| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2010 | +| `ParentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `ParentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTransientTokenQueryParamType.md b/docs/Models/Requests/GetTransientTokenQueryParamType.md new file mode 100644 index 0000000..ed8d4a4 --- /dev/null +++ b/docs/Models/Requests/GetTransientTokenQueryParamType.md @@ -0,0 +1,10 @@ +# GetTransientTokenQueryParamType + +`delegation` - This is the only supported `type` parameter. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Delegation` | delegation | \ No newline at end of file diff --git a/docs/Models/Requests/GetTransientTokenRequest.md b/docs/Models/Requests/GetTransientTokenRequest.md index 44f2370..8974dbc 100644 --- a/docs/Models/Requests/GetTransientTokenRequest.md +++ b/docs/Models/Requests/GetTransientTokenRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | -| `Scope` | [Scope](../../Models/Requests/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `Type` | [GetTransientTokenQueryParamType](../../Models/Requests/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | +| `Scope` | [Scope](../../Models/Requests/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | \ No newline at end of file diff --git a/docs/Models/Requests/QueryParamType.md b/docs/Models/Requests/QueryParamType.md index 86cdced..549a0c1 100644 --- a/docs/Models/Requests/QueryParamType.md +++ b/docs/Models/Requests/QueryParamType.md @@ -1,10 +1,12 @@ # QueryParamType -`delegation` - This is the only supported `type` parameter. +type of playlist to create ## Values -| Name | Value | -| ------------ | ------------ | -| `Delegation` | delegation | \ No newline at end of file +| Name | Value | +| ------- | ------- | +| `Audio` | audio | +| `Video` | video | +| `Photo` | photo | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryMediaContainer.md b/docs/Models/Requests/SearchLibraryMediaContainer.md new file mode 100644 index 0000000..13bfd22 --- /dev/null +++ b/docs/Models/Requests/SearchLibraryMediaContainer.md @@ -0,0 +1,20 @@ +# SearchLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 2 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | +| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/show-fanart.jpg | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1698860922 | +| `Nocache` | *bool* | :heavy_minus_sign: | N/A | true | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/show.png | +| `Title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `Title2` | *string* | :heavy_minus_sign: | N/A | Search for '' | +| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | season | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65593 | +| `Metadata` | List<[SearchLibraryMetadata](../../Models/Requests/SearchLibraryMetadata.md)> | :heavy_minus_sign: | N/A | [{"addedAt":1705636916,"art":"/library/metadata/1/art/1705636920","guid":"plex://season/602e67e766dfdb002c0a1b5b","index":1,"key":"/library/metadata/2/children","parentGuid":"plex://show/5d9c086c7d06d9001ffd27aa","parentIndex":1,"parentKey":"/library/metadata/1","parentRatingKey":"1","parentStudio":"Mutant Enemy Productions","parentTheme":"/library/metadata/1/theme/1705636920","parentThumb":"/library/metadata/1/thumb/1705636920","parentTitle":"Firefly","parentYear":2002,"ratingKey":"2","summary":"Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.","thumb":"/library/metadata/2/thumb/1705636920","title":"Season 1","type":"season","updatedAt":1705636920}] | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryMetadata.md b/docs/Models/Requests/SearchLibraryMetadata.md new file mode 100644 index 0000000..1641823 --- /dev/null +++ b/docs/Models/Requests/SearchLibraryMetadata.md @@ -0,0 +1,27 @@ +# SearchLibraryMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 2 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/2/children | +| `ParentRatingKey` | *string* | :heavy_minus_sign: | N/A | 1 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://season/602e67e766dfdb002c0a1b5b | +| `ParentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c086c7d06d9001ffd27aa | +| `ParentStudio` | *string* | :heavy_minus_sign: | N/A | Mutant Enemy Productions | +| `Type` | *string* | :heavy_minus_sign: | N/A | season | +| `Title` | *string* | :heavy_minus_sign: | N/A | Season 1 | +| `ParentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1 | +| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Firefly | +| `Summary` | *string* | :heavy_minus_sign: | N/A | Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship "Serenity". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government "The Alliance"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space. | +| `Index` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2002 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/2/thumb/1705636920 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/art/1705636920 | +| `ParentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/thumb/1705636920 | +| `ParentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705636916 | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705636920 | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryRequest.md b/docs/Models/Requests/SearchLibraryRequest.md new file mode 100644 index 0000000..83a6748 --- /dev/null +++ b/docs/Models/Requests/SearchLibraryRequest.md @@ -0,0 +1,9 @@ +# SearchLibraryRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `SectionId` | *long* | :heavy_check_mark: | the Id of the library to query | +| `Type` | [Type](../../Models/Requests/Type.md) | :heavy_check_mark: | Plex content type to search for | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryResponse.md b/docs/Models/Requests/SearchLibraryResponse.md new file mode 100644 index 0000000..c33b660 --- /dev/null +++ b/docs/Models/Requests/SearchLibraryResponse.md @@ -0,0 +1,11 @@ +# SearchLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Object` | [SearchLibraryResponseBody](../../Models/Requests/SearchLibraryResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and type | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryResponseBody.md b/docs/Models/Requests/SearchLibraryResponseBody.md new file mode 100644 index 0000000..557d503 --- /dev/null +++ b/docs/Models/Requests/SearchLibraryResponseBody.md @@ -0,0 +1,10 @@ +# SearchLibraryResponseBody + +The contents of the library by section and type + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `MediaContainer` | [SearchLibraryMediaContainer](../../Models/Requests/SearchLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/Tag.md b/docs/Models/Requests/Tag.md index e5f42b9..99c8927 100644 --- a/docs/Models/Requests/Tag.md +++ b/docs/Models/Requests/Tag.md @@ -5,25 +5,24 @@ A key representing a specific tag within the section. ## Values -| Name | Value | -| ------------------ | ------------------ | -| `All` | all | -| `Unwatched` | unwatched | -| `Newest` | newest | -| `RecentlyAdded` | recentlyAdded | -| `RecentlyViewed` | recentlyViewed | -| `OnDeck` | onDeck | -| `Collection` | collection | -| `Edition` | edition | -| `Genre` | genre | -| `Year` | year | -| `Decade` | decade | -| `Director` | director | -| `Actor` | actor | -| `Country` | country | -| `ContentRating` | contentRating | -| `Rating` | rating | -| `Resolution` | resolution | -| `FirstCharacter` | firstCharacter | -| `Folder` | folder | -| `SearchTypeEqual1` | search?type=1 | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `All` | all | +| `Unwatched` | unwatched | +| `Newest` | newest | +| `RecentlyAdded` | recentlyAdded | +| `RecentlyViewed` | recentlyViewed | +| `OnDeck` | onDeck | +| `Collection` | collection | +| `Edition` | edition | +| `Genre` | genre | +| `Year` | year | +| `Decade` | decade | +| `Director` | director | +| `Actor` | actor | +| `Country` | country | +| `ContentRating` | contentRating | +| `Rating` | rating | +| `Resolution` | resolution | +| `FirstCharacter` | firstCharacter | +| `Folder` | folder | \ No newline at end of file diff --git a/docs/Models/Requests/Type.md b/docs/Models/Requests/Type.md index 0276e44..19bb07c 100644 --- a/docs/Models/Requests/Type.md +++ b/docs/Models/Requests/Type.md @@ -1,12 +1,13 @@ # Type -type of playlist to create +Plex content type to search for ## Values | Name | Value | | ------- | ------- | -| `Audio` | audio | -| `Video` | video | -| `Photo` | photo | \ No newline at end of file +| `One` | 1 | +| `Two` | 2 | +| `Three` | 3 | +| `Four` | 4 | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 03a5ced..5d21654 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -15,6 +15,7 @@ API Calls interacting with Plex Media Server Libraries * [DeleteLibrary](#deletelibrary) - Delete Library Section * [GetLibraryItems](#getlibraryitems) - Get Library Items * [RefreshLibrary](#refreshlibrary) - Refresh Library +* [SearchLibrary](#searchlibrary) - Search Library * [GetMetadata](#getmetadata) - Get Items Metadata * [GetMetadataChildren](#getmetadatachildren) - Get Items Children * [GetOnDeck](#getondeck) - Get On Deck @@ -240,7 +241,6 @@ Fetches details from a specific section of the library identified by a section k - `resolution`: Items categorized by resolution. - `firstCharacter`: Items categorized by the first letter. - `folder`: Items categorized by folder. -- `search?type=1`: Search functionality within the section. ### Example Usage @@ -307,6 +307,58 @@ var res = await sdk.Library.RefreshLibraryAsync(SectionId: 934.16D); **[RefreshLibraryResponse](../../Models/Requests/RefreshLibraryResponse.md)** +## SearchLibrary + +Search for content within a specific section of the library. + +### Types +Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + +- **Type Object Attributes**: + - `type`: Metadata type (if standard Plex type). + - `title`: Title for this content type (e.g., "Movies"). + +- **Filter Objects**: + - Subset of the media query language. + - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + +- **Sort Objects**: + - Description of sort fields. + - 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. + + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK( + security: new Models.Components.Security() { + AccessToken = "", + }); + +var res = await sdk.Library.SearchLibraryAsync(SectionId: 933505, Type: Type.Four); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `SectionId` | *long* | :heavy_check_mark: | the Id of the library to query | +| `Type` | [Type](../../Models/Requests/Type.md) | :heavy_check_mark: | Plex content type to search for | + + +### Response + +**[SearchLibraryResponse](../../Models/Requests/SearchLibraryResponse.md)** + + ## GetMetadata This endpoint will return the metadata of a library item specified with the ratingKey. diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 44745ae..4f529d4 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -42,7 +42,7 @@ var sdk = new PlexAPISDK( CreatePlaylistRequest req = new CreatePlaylistRequest() { Title = "string", - Type = Type.Photo, + Type = QueryParamType.Photo, Smart = Smart.One, Uri = "https://inborn-brochure.biz", }; diff --git a/docs/sdks/security/README.md b/docs/sdks/security/README.md index 5047c3f..d7fe818 100644 --- a/docs/sdks/security/README.md +++ b/docs/sdks/security/README.md @@ -28,17 +28,17 @@ var sdk = new PlexAPISDK( AccessToken = "", }); -var res = await sdk.Security.GetTransientTokenAsync(Type: QueryParamType.Delegation, Scope: Scope.All); +var res = await sdk.Security.GetTransientTokenAsync(Type: GetTransientTokenQueryParamType.Delegation, Scope: Scope.All); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Type` | [QueryParamType](../../Models/Requests/QueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | -| `Scope` | [Scope](../../Models/Requests/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `Type` | [GetTransientTokenQueryParamType](../../Models/Requests/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. | +| `Scope` | [Scope](../../Models/Requests/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. | ### Response diff --git a/gen.yaml b/gen.yaml index d7a268c..d8965dd 100644 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,7 @@ generation: fixes: nameResolutionDec2023: false csharp: - version: 0.1.5 + version: 0.1.6 author: LukeHagar dotnetVersion: net5.0 imports: