mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-07 20:47:44 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.152.1
This commit is contained in:
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -143,7 +143,6 @@ namespace PlexAPI
|
||||
/// - `resolution`: Items categorized by resolution.<br/>
|
||||
/// - `firstCharacter`: Items categorized by the first letter.<br/>
|
||||
/// - `folder`: Items categorized by folder.<br/>
|
||||
/// - `search?type=1`: Search functionality within the section.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
@@ -159,6 +158,33 @@ namespace PlexAPI
|
||||
/// </summary>
|
||||
Task<RefreshLibraryResponse> RefreshLibraryAsync(double sectionId);
|
||||
|
||||
/// <summary>
|
||||
/// Search Library
|
||||
///
|
||||
/// <remarks>
|
||||
/// Search for content within a specific section of the library.<br/>
|
||||
/// <br/>
|
||||
/// ### Types<br/>
|
||||
/// Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls:<br/>
|
||||
/// <br/>
|
||||
/// - **Type Object Attributes**:<br/>
|
||||
/// - `type`: Metadata type (if standard Plex type). <br/>
|
||||
/// - `title`: Title for this content type (e.g., "Movies").<br/>
|
||||
/// <br/>
|
||||
/// - **Filter Objects**:<br/>
|
||||
/// - Subset of the media query language.<br/>
|
||||
/// - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`.<br/>
|
||||
/// <br/>
|
||||
/// - **Sort Objects**:<br/>
|
||||
/// - Description of sort fields.<br/>
|
||||
/// - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`.<br/>
|
||||
/// <br/>
|
||||
/// > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<SearchLibraryResponse> SearchLibraryAsync(long sectionId, Type type);
|
||||
|
||||
/// <summary>
|
||||
/// 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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
@@ -543,6 +569,46 @@ namespace PlexAPI
|
||||
}
|
||||
|
||||
|
||||
public async Task<SearchLibraryResponse> 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<SearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }});
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
public async Task<GetMetadataResponse> GetMetadataAsync(double ratingKey)
|
||||
{
|
||||
var request = new GetMetadataRequest()
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// type of playlist to create
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||
public Type Type { get; set; } = default!;
|
||||
public QueryParamType Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// whether the playlist is smart or not
|
||||
|
||||
@@ -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<GetLibraryItemsMetadata>? Metadata { get; set; }
|
||||
}
|
||||
|
||||
@@ -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<GetLibraryItemsMedia>? 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; }
|
||||
}
|
||||
}
|
||||
58
PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs
Normal file
58
PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// `delegation` - This is the only supported `type` parameter.
|
||||
/// </summary>
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// `delegation` - This is the only supported `type` parameter.
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||
public QueryParamType Type { get; set; } = default!;
|
||||
public GetTransientTokenQueryParamType Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// `all` - This is the only supported `scope` parameter.
|
||||
|
||||
@@ -14,12 +14,16 @@ namespace PlexAPI.Models.Requests
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// `delegation` - This is the only supported `type` parameter.
|
||||
/// type of playlist to create
|
||||
/// </summary>
|
||||
public enum QueryParamType
|
||||
{
|
||||
[JsonProperty("delegation")]
|
||||
Delegation,
|
||||
[JsonProperty("audio")]
|
||||
Audio,
|
||||
[JsonProperty("video")]
|
||||
Video,
|
||||
[JsonProperty("photo")]
|
||||
Photo,
|
||||
}
|
||||
|
||||
public static class QueryParamTypeExtension
|
||||
|
||||
58
PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs
Normal file
58
PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#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<SearchLibraryMetadata>? Metadata { get; set; }
|
||||
}
|
||||
}
|
||||
78
PlexAPI/Models/Requests/SearchLibraryMetadata.cs
Normal file
78
PlexAPI/Models/Requests/SearchLibraryMetadata.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#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; }
|
||||
}
|
||||
}
|
||||
30
PlexAPI/Models/Requests/SearchLibraryRequest.cs
Normal file
30
PlexAPI/Models/Requests/SearchLibraryRequest.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class SearchLibraryRequest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// the Id of the library to query
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
|
||||
public long SectionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Plex content type to search for
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||
public Type Type { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
39
PlexAPI/Models/Requests/SearchLibraryResponse.cs
Normal file
39
PlexAPI/Models/Requests/SearchLibraryResponse.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
public class SearchLibraryResponse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// HTTP response content type for this operation
|
||||
/// </summary>
|
||||
public string? ContentType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// HTTP response status code for this operation
|
||||
/// </summary>
|
||||
public int StatusCode { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
/// </summary>
|
||||
public HttpResponseMessage RawResponse { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The contents of the library by section and type
|
||||
/// </summary>
|
||||
public SearchLibraryResponseBody? Object { get; set; }
|
||||
}
|
||||
}
|
||||
24
PlexAPI/Models/Requests/SearchLibraryResponseBody.cs
Normal file
24
PlexAPI/Models/Requests/SearchLibraryResponseBody.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
|
||||
/// <summary>
|
||||
/// The contents of the library by section and type
|
||||
/// </summary>
|
||||
public class SearchLibraryResponseBody
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public SearchLibraryMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -56,8 +56,6 @@ namespace PlexAPI.Models.Requests
|
||||
FirstCharacter,
|
||||
[JsonProperty("folder")]
|
||||
Folder,
|
||||
[JsonProperty("search?type=1")]
|
||||
SearchTypeEqual1,
|
||||
}
|
||||
|
||||
public static class TagExtension
|
||||
|
||||
@@ -10,53 +10,16 @@
|
||||
#nullable enable
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// type of playlist to create
|
||||
/// Plex content type to search for
|
||||
/// </summary>
|
||||
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,
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageId>Plex-API</PackageId>
|
||||
<Version>0.1.5</Version>
|
||||
<Version>0.1.6</Version>
|
||||
<Authors>LukeHagar</Authors>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace PlexAPI
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetTransientTokenResponse> GetTransientTokenAsync(QueryParamType type, Scope scope);
|
||||
Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope);
|
||||
|
||||
/// <summary>
|
||||
/// 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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
@@ -78,7 +78,7 @@ namespace PlexAPI
|
||||
}
|
||||
|
||||
|
||||
public async Task<GetTransientTokenResponse> GetTransientTokenAsync(QueryParamType type, Scope scope)
|
||||
public async Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope)
|
||||
{
|
||||
var request = new GetTransientTokenRequest()
|
||||
{
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
@@ -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.4";
|
||||
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.4 0.0.3 Plex-API";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _defaultClient;
|
||||
private ISpeakeasyHttpClient _securityClient;
|
||||
|
||||
Reference in New Issue
Block a user