ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.7

This commit is contained in:
speakeasybot
2024-09-06 00:00:16 +00:00
parent e2d3ad2f38
commit 2b03eae316
225 changed files with 3354 additions and 1125 deletions

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Components
public class Security
{
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=X-Plex-Token")]
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=query,name=X-Plex-Token")]
public string? AccessToken { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetResourcesErrors
public class GetBannerImageErrors
{
[JsonProperty("code")]

View File

@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class SearchLibraryResponseBody : Exception
public class GetBannerImageResponseBody : Exception
{
[JsonProperty("errors")]
public List<SearchLibraryErrors>? Errors { get; set; }
public List<GetBannerImageErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetServerIdentityErrors
public class GetMediaProvidersErrors
{
[JsonProperty("code")]

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetMediaProvidersResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetMediaProvidersErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetaDataByRatingKeyErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetMetaDataByRatingKeyResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetMetaDataByRatingKeyErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
using Newtonsoft.Json;
using PlexAPI.Utils;
public class SearchLibraryErrors
public class GetSearchLibraryErrors
{
[JsonProperty("code")]

View File

@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetResourcesResponseBody : Exception
public class GetSearchLibraryResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetResourcesErrors>? Errors { get; set; }
public List<GetSearchLibraryErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -10,20 +10,22 @@
namespace PlexAPI.Models.Errors
{
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// Request Timeout
/// </summary>
public class GetServerIdentityResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetServerIdentityErrors>? Errors { get; set; }
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
private string? _message { get; set; }
public override string Message { get {return _message ?? "";} }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetServerResourcesErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetServerResourcesResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetServerResourcesErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetWatchlistErrors
public class GetThumbImageErrors
{
[JsonProperty("code")]

View File

@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetMetadataResponseBody : Exception
public class GetThumbImageResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetMetadataErrors>? Errors { get; set; }
public List<GetThumbImageErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -20,5 +20,8 @@ namespace PlexAPI.Models.Errors
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetTokenByPinIdPlexErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Not Found or Expired
/// </summary>
public class GetTokenByPinIdPlexResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetTokenByPinIdPlexErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -17,7 +17,7 @@ namespace PlexAPI.Models.Errors
using System;
/// <summary>
/// Not Found or Expired
/// Bad Request response when the X-Plex-Client-Identifier is missing
/// </summary>
public class GetTokenByPinIdResponseBody : Exception
{

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetTopWatchedContentErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Errors
{
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetTopWatchedContentResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetTopWatchedContentErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetadataErrors
public class GetWatchListErrors
{
[JsonProperty("code")]

View File

@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetWatchlistResponseBody : Exception
public class GetWatchListResponseBody : Exception
{
[JsonProperty("errors")]
public List<GetWatchlistErrors>? Errors { get; set; }
public List<GetWatchListErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -22,7 +22,7 @@ namespace PlexAPI.Models.Requests
public Tonight? Tonight { get; set; }
/// <summary>
/// Indicate that the latest version should be marked as skipped. The &lt;Release&gt; entry for this version will have the `state` set to `skipped`.
/// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=skip")]
public Skip? Skip { get; set; }

View File

@@ -16,24 +16,24 @@ namespace PlexAPI.Models.Requests
{
[JsonProperty("protocol")]
public string? Protocol { get; set; }
public string Protocol { get; set; } = default!;
[JsonProperty("address")]
public string? Address { get; set; }
public string Address { get; set; } = default!;
[JsonProperty("port")]
public double? Port { get; set; }
public double Port { get; set; } = default!;
[JsonProperty("uri")]
public string? Uri { get; set; }
public string Uri { get; set; } = default!;
[JsonProperty("local")]
public bool? Local { get; set; }
public bool Local { get; set; } = default!;
[JsonProperty("relay")]
public bool? Relay { get; set; }
public bool Relay { get; set; } = default!;
[JsonProperty("IPv6")]
public bool? IPv6 { get; set; }
public bool IPv6 { get; set; } = default!;
}
}

View File

@@ -14,28 +14,28 @@ namespace PlexAPI.Models.Requests
using System;
/// <summary>
/// Filter
/// type of playlist to create
/// </summary>
public enum PathParamFilter
public enum CreatePlaylistQueryParamType
{
[JsonProperty("all")]
All,
[JsonProperty("available")]
Available,
[JsonProperty("released")]
Released,
[JsonProperty("audio")]
Audio,
[JsonProperty("video")]
Video,
[JsonProperty("photo")]
Photo,
}
public static class PathParamFilterExtension
public static class CreatePlaylistQueryParamTypeExtension
{
public static string Value(this PathParamFilter value)
public static string Value(this CreatePlaylistQueryParamType value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static PathParamFilter ToEnum(this string value)
public static CreatePlaylistQueryParamType ToEnum(this string value)
{
foreach(var field in typeof(PathParamFilter).GetFields())
foreach(var field in typeof(CreatePlaylistQueryParamType).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -48,14 +48,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is PathParamFilter)
if (enumVal is CreatePlaylistQueryParamType)
{
return (PathParamFilter)enumVal;
return (CreatePlaylistQueryParamType)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum PathParamFilter");
throw new Exception($"Unknown value {value} for enum CreatePlaylistQueryParamType");
}
}

View File

@@ -25,7 +25,7 @@ namespace PlexAPI.Models.Requests
/// type of playlist to create
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
public QueryParamType Type { get; set; } = default!;
public CreatePlaylistQueryParamType Type { get; set; } = default!;
/// <summary>
/// whether the playlist is smart or not

View File

@@ -15,9 +15,14 @@ namespace PlexAPI.Models.Requests
{
/// <summary>
/// The id of the library
/// The unique key of the Plex library. <br/>
///
/// <remarks>
/// Note: This is unique in the context of the Plex server.<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
public double SectionId { get; set; } = default!;
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
public int SectionKey { get; set; } = default!;
}
}

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
public class Feature
{
[JsonProperty("key")]
public string? Key { get; set; }
[JsonProperty("type")]
public string? Type { get; set; }
[JsonProperty("Directory")]
public List<GetMediaProvidersDirectory>? Directory { get; set; }
}
}

View File

@@ -9,17 +9,54 @@
#nullable enable
namespace PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
using System;
/// <summary>
/// Filters content by field and direction/equality<br/>
///
/// <remarks>
/// (Unknown if viewedAt is the only supported column)<br/>
///
/// </remarks>
/// Filter
/// </summary>
public class Filter
public enum Filter
{
[JsonProperty("all")]
All,
[JsonProperty("available")]
Available,
[JsonProperty("released")]
Released,
}
public static class FilterExtension
{
public static string Value(this Filter value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static Filter ToEnum(this string value)
{
foreach(var field in typeof(Filter).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 Filter)
{
return (Filter)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum Filter");
}
}
}

View File

@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 GetBannerImageRequest
{
/// <summary>
/// the id of the library item to return the children of.
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")]
public long RatingKey { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=width")]
public long Width { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=height")]
public long Height { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize")]
public long MinSize { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale")]
public long Upscale { get; set; } = default!;
/// <summary>
/// Plex Authentication Token
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")]
public string XPlexToken { get; set; } = default!;
}
}

View File

@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
using System.Collections.Generic;
using System.Net.Http;
using System;
public class GetBannerImageResponse
{
/// <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>
/// Successful response returning an image
/// </summary>
public byte[]? Bytes { get; set; }
public Dictionary<string, List<string>> Headers { get; set; } = default!;
}
}

View File

@@ -16,10 +16,15 @@ namespace PlexAPI.Models.Requests
{
/// <summary>
/// The id of the library
/// The unique key of the Plex library. <br/>
///
/// <remarks>
/// Note: This is unique in the context of the Plex server.<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
public double SectionId { get; set; } = default!;
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
public int SectionKey { get; set; } = default!;
/// <summary>
/// Whether or not to include details for a section (types, filters, and sorts). <br/>

View File

@@ -16,10 +16,15 @@ namespace PlexAPI.Models.Requests
{
/// <summary>
/// the Id of the library to query
/// The unique key of the Plex library. <br/>
///
/// <remarks>
/// Note: This is unique in the context of the Plex server.<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
public object SectionId { get; set; } = default!;
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
public int SectionKey { get; set; } = default!;
/// <summary>
/// A key representing a specific tag within the section.
@@ -27,6 +32,21 @@ namespace PlexAPI.Models.Requests
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tag")]
public Tag Tag { get; set; } = default!;
/// <summary>
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
public Models.Requests.Type Type { get; set; } = default!;
/// <summary>
/// Adds the Guids object to the response<br/>
///
@@ -35,6 +55,40 @@ namespace PlexAPI.Models.Requests
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")]
public long? IncludeGuids { get; set; }
public IncludeGuids? IncludeGuids { get; set; }
/// <summary>
/// Adds the Meta object to the response<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")]
public IncludeMeta? IncludeMeta { get; set; }
/// <summary>
/// The index of the first item to return. If not specified, the first item will be returned.<br/>
///
/// <remarks>
/// If the number of items exceeds the limit, the response will be paginated.<br/>
/// By default this is 0<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")]
public int? XPlexContainerStart { get; set; } = 0;
/// <summary>
/// The number of items to return. If not specified, all items will be returned.<br/>
///
/// <remarks>
/// If the number of items exceeds the limit, the response will be paginated.<br/>
/// By default this is 50<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")]
public int? XPlexContainerSize { get; set; } = 50;
}
}

View File

@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
public class GetMediaProvidersDirectory
{
[JsonProperty("hubKey")]
public string? HubKey { get; set; }
[JsonProperty("title")]
public string? Title { get; set; }
[JsonProperty("agent")]
public string? Agent { get; set; }
[JsonProperty("language")]
public string? Language { get; set; }
[JsonProperty("refreshing")]
public bool? Refreshing { get; set; }
[JsonProperty("scanner")]
public string? Scanner { get; set; }
[JsonProperty("uuid")]
public string? Uuid { get; set; }
[JsonProperty("id")]
public string? Id { get; set; }
[JsonProperty("key")]
public string? Key { get; set; }
[JsonProperty("type")]
public string? Type { get; set; }
[JsonProperty("subtype")]
public string? Subtype { get; set; }
[JsonProperty("updatedAt")]
public long? UpdatedAt { get; set; }
[JsonProperty("scannedAt")]
public long? ScannedAt { get; set; }
[JsonProperty("Pivot")]
public List<Pivot>? Pivot { get; set; }
}
}

View File

@@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
public class GetMediaProvidersMediaContainer
{
[JsonProperty("size")]
public long? Size { get; set; }
[JsonProperty("allowCameraUpload")]
public bool? AllowCameraUpload { get; set; }
[JsonProperty("allowChannelAccess")]
public bool? AllowChannelAccess { get; set; }
[JsonProperty("allowSharing")]
public bool? AllowSharing { get; set; }
[JsonProperty("allowSync")]
public bool? AllowSync { get; set; }
[JsonProperty("allowTuners")]
public bool? AllowTuners { get; set; }
[JsonProperty("backgroundProcessing")]
public bool? BackgroundProcessing { get; set; }
[JsonProperty("certificate")]
public bool? Certificate { get; set; }
[JsonProperty("companionProxy")]
public bool? CompanionProxy { get; set; }
[JsonProperty("countryCode")]
public string? CountryCode { get; set; }
[JsonProperty("diagnostics")]
public string? Diagnostics { get; set; }
[JsonProperty("eventStream")]
public bool? EventStream { get; set; }
[JsonProperty("friendlyName")]
public string? FriendlyName { get; set; }
[JsonProperty("livetv")]
public long? Livetv { get; set; }
[JsonProperty("machineIdentifier")]
public string? MachineIdentifier { get; set; }
[JsonProperty("musicAnalysis")]
public long? MusicAnalysis { get; set; }
[JsonProperty("myPlex")]
public bool? MyPlex { get; set; }
[JsonProperty("myPlexMappingState")]
public string? MyPlexMappingState { get; set; }
[JsonProperty("myPlexSigninState")]
public string? MyPlexSigninState { get; set; }
[JsonProperty("myPlexSubscription")]
public bool? MyPlexSubscription { get; set; }
[JsonProperty("myPlexUsername")]
public string? MyPlexUsername { get; set; }
[JsonProperty("offlineTranscode")]
public long? OfflineTranscode { get; set; }
[JsonProperty("ownerFeatures")]
public string? OwnerFeatures { get; set; }
[JsonProperty("platform")]
public string? Platform { get; set; }
[JsonProperty("platformVersion")]
public string? PlatformVersion { get; set; }
[JsonProperty("pluginHost")]
public bool? PluginHost { get; set; }
[JsonProperty("pushNotifications")]
public bool? PushNotifications { get; set; }
[JsonProperty("readOnlyLibraries")]
public bool? ReadOnlyLibraries { get; set; }
[JsonProperty("streamingBrainABRVersion")]
public long? StreamingBrainABRVersion { get; set; }
[JsonProperty("streamingBrainVersion")]
public long? StreamingBrainVersion { get; set; }
[JsonProperty("sync")]
public bool? Sync { get; set; }
[JsonProperty("transcoderActiveVideoSessions")]
public long? TranscoderActiveVideoSessions { get; set; }
[JsonProperty("transcoderAudio")]
public bool? TranscoderAudio { get; set; }
[JsonProperty("transcoderLyrics")]
public bool? TranscoderLyrics { get; set; }
[JsonProperty("transcoderSubtitles")]
public bool? TranscoderSubtitles { get; set; }
[JsonProperty("transcoderVideo")]
public bool? TranscoderVideo { get; set; }
[JsonProperty("transcoderVideoBitrates")]
public string? TranscoderVideoBitrates { get; set; }
[JsonProperty("transcoderVideoQualities")]
public string? TranscoderVideoQualities { get; set; }
[JsonProperty("transcoderVideoResolutions")]
public string? TranscoderVideoResolutions { get; set; }
[JsonProperty("updatedAt")]
public long? UpdatedAt { get; set; }
[JsonProperty("updater")]
public bool? Updater { get; set; }
[JsonProperty("version")]
public string? Version { get; set; }
[JsonProperty("voiceSearch")]
public bool? VoiceSearch { get; set; }
[JsonProperty("MediaProvider")]
public List<MediaProvider>? MediaProvider { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 GetMediaProvidersRequest
{
/// <summary>
/// Plex Authentication Token
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")]
public string XPlexToken { get; set; } = default!;
}
}

View File

@@ -0,0 +1,40 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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.Models.Requests;
using PlexAPI.Utils;
using System.Net.Http;
using System;
public class GetMediaProvidersResponse
{
/// <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>
/// Media providers and their features
/// </summary>
public Models.Requests.GetMediaProvidersResponseBody? Object { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 PlexAPI.Models.Requests;
using PlexAPI.Utils;
/// <summary>
/// Media providers and their features
/// </summary>
public class GetMediaProvidersResponseBody
{
[JsonProperty("MediaContainer")]
public GetMediaProvidersMediaContainer? MediaContainer { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetadataCountry
public class GetMetaDataByRatingKeyCountry
{
[JsonProperty("id")]

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetadataDirector
public class GetMetaDataByRatingKeyDirector
{
[JsonProperty("id")]

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetadataGenre
public class GetMetaDataByRatingKeyGenre
{
[JsonProperty("id")]

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System.Collections.Generic;
public class GetMetadataMedia
public class GetMetaDataByRatingKeyMedia
{
[JsonProperty("id")]
@@ -66,6 +66,6 @@ namespace PlexAPI.Models.Requests
public string? VideoProfile { get; set; }
[JsonProperty("Part")]
public List<GetMetadataPart>? Part { get; set; }
public List<GetMetaDataByRatingKeyPart>? Part { get; set; }
}
}

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System.Collections.Generic;
public class GetMetadataMediaContainer
public class GetMetaDataByRatingKeyMediaContainer
{
[JsonProperty("size")]
@@ -42,6 +42,6 @@ namespace PlexAPI.Models.Requests
public int? MediaTagVersion { get; set; }
[JsonProperty("Metadata")]
public List<GetMetadataMetadata>? Metadata { get; set; }
public List<GetMetaDataByRatingKeyMetadata>? Metadata { get; set; }
}
}

View File

@@ -15,7 +15,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System.Collections.Generic;
public class GetMetadataMetadata
public class GetMetaDataByRatingKeyMetadata
{
[JsonProperty("ratingKey")]
@@ -91,13 +91,13 @@ namespace PlexAPI.Models.Requests
public string? RatingImage { get; set; }
[JsonProperty("Media")]
public List<GetMetadataMedia>? Media { get; set; }
public List<GetMetaDataByRatingKeyMedia>? Media { get; set; }
[JsonProperty("Genre")]
public List<GetMetadataGenre>? Genre { get; set; }
public List<GetMetaDataByRatingKeyGenre>? Genre { get; set; }
[JsonProperty("Country")]
public List<GetMetadataCountry>? Country { get; set; }
public List<GetMetaDataByRatingKeyCountry>? Country { get; set; }
[JsonProperty("Guid")]
public List<Guids>? Guids { get; set; }
@@ -106,13 +106,13 @@ namespace PlexAPI.Models.Requests
public List<Ratings>? Ratings { get; set; }
[JsonProperty("Director")]
public List<GetMetadataDirector>? Director { get; set; }
public List<GetMetaDataByRatingKeyDirector>? Director { get; set; }
[JsonProperty("Writer")]
public List<GetMetadataWriter>? Writer { get; set; }
public List<GetMetaDataByRatingKeyWriter>? Writer { get; set; }
[JsonProperty("Role")]
public List<GetMetadataRole>? Role { get; set; }
public List<GetMetaDataByRatingKeyRole>? Role { get; set; }
[JsonProperty("Producer")]
public List<Producer>? Producer { get; set; }

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System.Collections.Generic;
public class GetMetadataPart
public class GetMetaDataByRatingKeyPart
{
[JsonProperty("id")]

View File

@@ -11,13 +11,13 @@ namespace PlexAPI.Models.Requests
{
using PlexAPI.Utils;
public class GetMetadataRequest
public class GetMetaDataByRatingKeyRequest
{
/// <summary>
/// the id of the library item to return the children of.
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")]
public double RatingKey { get; set; } = default!;
public long RatingKey { get; set; } = default!;
}
}

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using System.Net.Http;
using System;
public class GetMetadataResponse
public class GetMetaDataByRatingKeyResponse
{
/// <summary>
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The metadata of the library item.
/// </summary>
public Models.Requests.GetMetadataResponseBody? Object { get; set; }
public Models.Requests.GetMetaDataByRatingKeyResponseBody? Object { get; set; }
}
}

View File

@@ -16,10 +16,10 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The metadata of the library item.
/// </summary>
public class GetMetadataResponseBody
public class GetMetaDataByRatingKeyResponseBody
{
[JsonProperty("MediaContainer")]
public GetMetadataMediaContainer? MediaContainer { get; set; }
public GetMetaDataByRatingKeyMediaContainer? MediaContainer { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetadataRole
public class GetMetaDataByRatingKeyRole
{
[JsonProperty("id")]

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetMetadataWriter
public class GetMetaDataByRatingKeyWriter
{
[JsonProperty("id")]

View File

@@ -14,16 +14,6 @@ namespace PlexAPI.Models.Requests
public class GetPinRequest
{
/// <summary>
/// Product name of the application shown in the list of devices<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product")]
public string XPlexProduct { get; set; } = default!;
/// <summary>
/// Determines the kind of code returned by the API call<br/>
///
@@ -45,7 +35,10 @@ namespace PlexAPI.Models.Requests
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")]
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? XPlexClientIdentifier { get; set; }
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")]
public string? XPlexProduct { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
/// <summary>
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
public enum GetPlaylistContentsQueryParamType
{
One = 1,
Two = 2,
Three = 3,
Four = 4,
}
}

View File

@@ -9,6 +9,7 @@
#nullable enable
namespace PlexAPI.Models.Requests
{
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class GetPlaylistContentsRequest
@@ -21,9 +22,18 @@ namespace PlexAPI.Models.Requests
public double PlaylistID { get; set; } = default!;
/// <summary>
/// the metadata type of the item to return
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
public double Type { get; set; } = default!;
public GetPlaylistContentsQueryParamType Type { get; set; } = default!;
}
}

View File

@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 GetRecentlyAddedRequest
{
/// <summary>
/// The index of the first item to return. If not specified, the first item will be returned.<br/>
///
/// <remarks>
/// If the number of items exceeds the limit, the response will be paginated.<br/>
/// By default this is 0<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")]
public int? XPlexContainerStart { get; set; } = 0;
/// <summary>
/// The number of items to return. If not specified, all items will be returned.<br/>
///
/// <remarks>
/// If the number of items exceeds the limit, the response will be paginated.<br/>
/// By default this is 50<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")]
public int? XPlexContainerSize { get; set; } = 50;
}
}

View File

@@ -16,10 +16,15 @@ namespace PlexAPI.Models.Requests
{
/// <summary>
/// The id of the library
/// The unique key of the Plex library. <br/>
///
/// <remarks>
/// Note: This is unique in the context of the Plex server.<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
public double SectionId { get; set; } = default!;
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
public int SectionKey { get; set; } = default!;
/// <summary>
/// Force the refresh even if the library is already being refreshed.

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
using System.Collections.Generic;
public class SearchLibraryMediaContainer
public class GetSearchLibraryMediaContainer
{
[JsonProperty("size")]
@@ -54,6 +54,6 @@ namespace PlexAPI.Models.Requests
public int? ViewMode { get; set; }
[JsonProperty("Metadata")]
public List<SearchLibraryMetadata>? Metadata { get; set; }
public List<GetSearchLibraryMetadata>? Metadata { get; set; }
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using Newtonsoft.Json;
using PlexAPI.Utils;
public class SearchLibraryMetadata
public class GetSearchLibraryMetadata
{
[JsonProperty("ratingKey")]

View File

@@ -12,19 +12,33 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class SearchLibraryRequest
public class GetSearchLibraryRequest
{
/// <summary>
/// the Id of the library to query
/// The unique key of the Plex library. <br/>
///
/// <remarks>
/// Note: This is unique in the context of the Plex server.<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
public long SectionId { get; set; } = default!;
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
public int SectionKey { get; set; } = default!;
/// <summary>
/// Plex content type to search for
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
public Models.Requests.Type Type { get; set; } = default!;
public QueryParamType Type { get; set; } = default!;
}
}

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using System.Net.Http;
using System;
public class SearchLibraryResponse
public class GetSearchLibraryResponse
{
/// <summary>
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The contents of the library by section and type
/// </summary>
public Models.Requests.SearchLibraryResponseBody? Object { get; set; }
public Models.Requests.GetSearchLibraryResponseBody? Object { get; set; }
}
}

View File

@@ -16,10 +16,10 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The contents of the library by section and type
/// </summary>
public class SearchLibraryResponseBody
public class GetSearchLibraryResponseBody
{
[JsonProperty("MediaContainer")]
public SearchLibraryMediaContainer? MediaContainer { get; set; }
public GetSearchLibraryMediaContainer? MediaContainer { get; set; }
}
}

View File

@@ -12,9 +12,15 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class GetResourcesRequest
public class GetServerResourcesRequest
{
/// <summary>
/// Plex Authentication Token
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")]
public string XPlexToken { get; set; } = default!;
/// <summary>
/// The unique identifier for the client application<br/>
///
@@ -24,25 +30,30 @@ namespace PlexAPI.Models.Requests
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")]
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? XPlexClientIdentifier { get; set; }
/// <summary>
/// Include Https entries in the results
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeHttps")]
public IncludeHttps? IncludeHttps { get; set; }
public IncludeHttps? IncludeHttps { get; set; } = PlexAPI.Models.Requests.IncludeHttps.Zero;
/// <summary>
/// Include Relay addresses in the results
/// Include Relay addresses in the results <br/>
///
/// <remarks>
/// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeRelay")]
public IncludeRelay? IncludeRelay { get; set; }
public IncludeRelay? IncludeRelay { get; set; } = PlexAPI.Models.Requests.IncludeRelay.Zero;
/// <summary>
/// Include IPv6 entries in the results
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeIPv6")]
public IncludeIPv6? IncludeIPv6 { get; set; }
public IncludeIPv6? IncludeIPv6 { get; set; } = PlexAPI.Models.Requests.IncludeIPv6.Zero;
}
}

View File

@@ -15,7 +15,7 @@ namespace PlexAPI.Models.Requests
using System.Net.Http;
using System;
public class GetResourcesResponse
public class GetServerResourcesResponse
{
/// <summary>

View File

@@ -44,7 +44,7 @@ namespace PlexAPI.Models.Requests
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter")]
public Filter? Filter { get; set; }
public QueryParamFilter? Filter { get; set; }
/// <summary>
/// Filters the results based on the id of a valid library section<br/>

View File

@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 GetThumbImageRequest
{
/// <summary>
/// the id of the library item to return the children of.
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")]
public long RatingKey { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=width")]
public long Width { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=height")]
public long Height { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize")]
public long MinSize { get; set; } = default!;
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale")]
public long Upscale { get; set; } = default!;
/// <summary>
/// Plex Authentication Token
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")]
public string XPlexToken { get; set; } = default!;
}
}

View File

@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
using System.Collections.Generic;
using System.Net.Http;
using System;
public class GetThumbImageResponse
{
/// <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>
/// Successful response returning an image
/// </summary>
public byte[]? Bytes { get; set; }
public Dictionary<string, List<string>> Headers { get; set; } = default!;
}
}

View File

@@ -29,7 +29,7 @@ namespace PlexAPI.Models.Requests
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")]
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? XPlexClientIdentifier { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
/// <summary>
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
public enum GetTopWatchedContentQueryParamType
{
One = 1,
Two = 2,
Three = 3,
Four = 4,
}
}

View File

@@ -9,16 +9,26 @@
#nullable enable
namespace PlexAPI.Models.Requests
{
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class GetTopWatchedContentRequest
{
/// <summary>
/// the library type (1 - movies, 2 - shows, 3 - music)
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
public long Type { get; set; } = default!;
public GetTopWatchedContentQueryParamType Type { get; set; } = default!;
/// <summary>
/// Adds the Guids object to the response<br/>

View File

@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// The metadata of the library item.
/// </summary>
public GetTopWatchedContentResponseBody? Object { get; set; }
public Models.Requests.GetTopWatchedContentResponseBody? Object { get; set; }
}
}

View File

@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// String representation of subscriptionActive
/// </summary>
public enum GetUserDetailsPlexStatus
public enum GetUserDetailsAuthenticationResponseStatus
{
[JsonProperty("Inactive")]
Inactive,
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
Active,
}
public static class GetUserDetailsPlexStatusExtension
public static class GetUserDetailsAuthenticationResponseStatusExtension
{
public static string Value(this GetUserDetailsPlexStatus value)
public static string Value(this GetUserDetailsAuthenticationResponseStatus value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static GetUserDetailsPlexStatus ToEnum(this string value)
public static GetUserDetailsAuthenticationResponseStatus ToEnum(this string value)
{
foreach(var field in typeof(GetUserDetailsPlexStatus).GetFields())
foreach(var field in typeof(GetUserDetailsAuthenticationResponseStatus).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is GetUserDetailsPlexStatus)
if (enumVal is GetUserDetailsAuthenticationResponseStatus)
{
return (GetUserDetailsPlexStatus)enumVal;
return (GetUserDetailsAuthenticationResponseStatus)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum GetUserDetailsPlexStatus");
throw new Exception($"Unknown value {value} for enum GetUserDetailsAuthenticationResponseStatus");
}
}

View File

@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// String representation of subscriptionActive
/// </summary>
public enum GetUserDetailsPlexResponseStatus
public enum GetUserDetailsAuthenticationStatus
{
[JsonProperty("Inactive")]
Inactive,
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
Active,
}
public static class GetUserDetailsPlexResponseStatusExtension
public static class GetUserDetailsAuthenticationStatusExtension
{
public static string Value(this GetUserDetailsPlexResponseStatus value)
public static string Value(this GetUserDetailsAuthenticationStatus value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static GetUserDetailsPlexResponseStatus ToEnum(this string value)
public static GetUserDetailsAuthenticationStatus ToEnum(this string value)
{
foreach(var field in typeof(GetUserDetailsPlexResponseStatus).GetFields())
foreach(var field in typeof(GetUserDetailsAuthenticationStatus).GetFields())
{
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
if (attributes.Length == 0)
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
{
var enumVal = field.GetValue(null);
if (enumVal is GetUserDetailsPlexResponseStatus)
if (enumVal is GetUserDetailsAuthenticationStatus)
{
return (GetUserDetailsPlexResponseStatus)enumVal;
return (GetUserDetailsAuthenticationStatus)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum GetUserDetailsPlexResponseStatus");
throw new Exception($"Unknown value {value} for enum GetUserDetailsAuthenticationStatus");
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 GetUserDetailsRequest
{
/// <summary>
/// Plex Authentication Token
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")]
public string XPlexToken { get; set; } = default!;
}
}

View File

@@ -39,7 +39,7 @@ namespace PlexAPI.Models.Requests
/// String representation of subscriptionActive
/// </summary>
[JsonProperty("status")]
public GetUserDetailsPlexResponseStatus? Status { get; set; }
public GetUserDetailsAuthenticationResponseStatus? Status { get; set; }
/// <summary>
/// Payment service used for your Plex Pass subscription

View File

@@ -12,17 +12,17 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Models.Requests;
using PlexAPI.Utils;
public class GetWatchlistRequest
public class GetWatchListRequest
{
/// <summary>
/// Filter
/// </summary>
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=filter")]
public PathParamFilter Filter { get; set; } = default!;
public Filter Filter { get; set; } = default!;
/// <summary>
/// User Token
/// Plex Authentication Token
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")]
public string XPlexToken { get; set; } = default!;
@@ -85,21 +85,23 @@ namespace PlexAPI.Models.Requests
///
/// <remarks>
/// If the number of items exceeds the limit, the response will be paginated.<br/>
/// By default this is 0<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")]
public int? XPlexContainerStart { get; set; }
public int? XPlexContainerStart { get; set; } = 0;
/// <summary>
/// The number of items to return. If not specified, all items will be returned.<br/>
///
/// <remarks>
/// If the number of items exceeds the limit, the response will be paginated.<br/>
/// By default this is 50<br/>
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")]
public int? XPlexContainerSize { get; set; }
public int? XPlexContainerSize { get; set; } = 50;
}
}

View File

@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
using System.Net.Http;
using System;
public class GetWatchlistResponse
public class GetWatchListResponse
{
/// <summary>
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// Watchlist Data
/// </summary>
public Models.Requests.GetWatchlistResponseBody? Object { get; set; }
public Models.Requests.GetWatchListResponseBody? Object { get; set; }
}
}

View File

@@ -17,7 +17,7 @@ namespace PlexAPI.Models.Requests
/// <summary>
/// Watchlist Data
/// </summary>
public class GetWatchlistResponseBody
public class GetWatchListResponseBody
{
[JsonProperty("librarySectionID")]

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
/// <summary>
/// Adds the Guids object to the response<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
public enum IncludeGuids
{
Zero = 0,
One = 1,
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
/// <summary>
/// Adds the Meta object to the response<br/>
///
/// <remarks>
///
/// </remarks>
/// </summary>
public enum IncludeMeta
{
Zero = 0,
One = 1,
}
}

View File

@@ -12,7 +12,12 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
/// <summary>
/// Include Relay addresses in the results
/// Include Relay addresses in the results <br/>
///
/// <remarks>
/// E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/>
///
/// </remarks>
/// </summary>
public enum IncludeRelay
{

View File

@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 PlexAPI.Models.Requests;
using PlexAPI.Utils;
using System.Collections.Generic;
public class MediaProvider
{
[JsonProperty("identifier")]
public string? Identifier { get; set; }
[JsonProperty("title")]
public string? Title { get; set; }
[JsonProperty("types")]
public string? Types { get; set; }
[JsonProperty("protocols")]
public string? Protocols { get; set; }
[JsonProperty("Feature")]
public List<Feature>? Feature { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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 PlexAPI.Utils;
public class Pivot
{
[JsonProperty("id")]
public string? Id { get; set; }
[JsonProperty("key")]
public string? Key { get; set; }
[JsonProperty("type")]
public string? Type { get; set; }
[JsonProperty("title")]
public string? Title { get; set; }
[JsonProperty("context")]
public string? Context { get; set; }
[JsonProperty("symbol")]
public string? Symbol { get; set; }
}
}

View File

@@ -27,14 +27,14 @@ namespace PlexAPI.Models.Requests
[JsonProperty("productVersion")]
public string ProductVersion { get; set; } = default!;
[JsonProperty("platform")]
public string Platform { get; set; } = default!;
[JsonProperty("platform", NullValueHandling = NullValueHandling.Include)]
public string? Platform { get; set; }
[JsonProperty("platformVersion")]
public string PlatformVersion { get; set; } = default!;
[JsonProperty("platformVersion", NullValueHandling = NullValueHandling.Include)]
public string? PlatformVersion { get; set; }
[JsonProperty("device")]
public string Device { get; set; } = default!;
[JsonProperty("device", NullValueHandling = NullValueHandling.Include)]
public string? Device { get; set; }
[JsonProperty("clientIdentifier")]
public string ClientIdentifier { get; set; } = default!;
@@ -48,46 +48,49 @@ namespace PlexAPI.Models.Requests
[JsonProperty("provides")]
public string Provides { get; set; } = default!;
[JsonProperty("ownerId")]
public string? OwnerId { get; set; }
/// <summary>
/// ownerId is null when the device is owned by the token used to send the request
/// </summary>
[JsonProperty("ownerId", NullValueHandling = NullValueHandling.Include)]
public long? OwnerId { get; set; }
[JsonProperty("sourceTitle")]
[JsonProperty("sourceTitle", NullValueHandling = NullValueHandling.Include)]
public string? SourceTitle { get; set; }
[JsonProperty("publicAddress")]
public string? PublicAddress { get; set; }
public string PublicAddress { get; set; } = default!;
[JsonProperty("accessToken")]
public string? AccessToken { get; set; }
public string AccessToken { get; set; } = default!;
[JsonProperty("owned")]
public bool? Owned { get; set; }
public bool Owned { get; set; } = default!;
[JsonProperty("home")]
public bool? Home { get; set; }
public bool Home { get; set; } = default!;
[JsonProperty("synced")]
public bool? Synced { get; set; }
public bool Synced { get; set; } = default!;
[JsonProperty("relay")]
public bool? Relay { get; set; }
public bool Relay { get; set; } = default!;
[JsonProperty("presence")]
public bool? Presence { get; set; }
public bool Presence { get; set; } = default!;
[JsonProperty("httpsRequired")]
public bool? HttpsRequired { get; set; }
public bool HttpsRequired { get; set; } = default!;
[JsonProperty("publicAddressMatches")]
public bool? PublicAddressMatches { get; set; }
public bool PublicAddressMatches { get; set; } = default!;
[JsonProperty("dnsRebindingProtection")]
public bool? DnsRebindingProtection { get; set; }
public bool DnsRebindingProtection { get; set; } = default!;
[JsonProperty("natLoopbackSupported")]
public bool? NatLoopbackSupported { get; set; }
public bool NatLoopbackSupported { get; set; } = default!;
[JsonProperty("connections")]
public List<Connections>? Connections { get; set; }
public List<Connections> Connections { get; set; } = default!;
}
}

View File

@@ -24,7 +24,7 @@ namespace PlexAPI.Models.Requests
///
/// </remarks>
/// </summary>
[SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")]
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")]
public string? XPlexClientIdentifier { get; set; }
/// <summary>

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). 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;
/// <summary>
/// Filters content by field and direction/equality<br/>
///
/// <remarks>
/// (Unknown if viewedAt is the only supported column)<br/>
///
/// </remarks>
/// </summary>
public class QueryParamFilter
{
}
}

View File

@@ -9,54 +9,26 @@
#nullable enable
namespace PlexAPI.Models.Requests
{
using Newtonsoft.Json;
using PlexAPI.Utils;
using System;
/// <summary>
/// type of playlist to create
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
public enum QueryParamType
{
[JsonProperty("audio")]
Audio,
[JsonProperty("video")]
Video,
[JsonProperty("photo")]
Photo,
}
public static class QueryParamTypeExtension
{
public static string Value(this QueryParamType value)
{
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
}
public static QueryParamType ToEnum(this string value)
{
foreach(var field in typeof(QueryParamType).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 QueryParamType)
{
return (QueryParamType)enumVal;
}
}
}
throw new Exception($"Unknown value {value} for enum QueryParamType");
}
One = 1,
Two = 2,
Three = 3,
Four = 4,
}
}

View File

@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
/// <summary>
/// Indicate that the latest version should be marked as skipped. The &lt;Release&gt; entry for this version will have the `state` set to `skipped`.
/// Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
/// </summary>
public enum Skip
{

View File

@@ -42,7 +42,7 @@ namespace PlexAPI.Models.Requests
/// String representation of subscriptionActive
/// </summary>
[JsonProperty("status")]
public GetUserDetailsPlexStatus? Status { get; set; }
public GetUserDetailsAuthenticationStatus? Status { get; set; }
/// <summary>
/// Payment service used for your Plex Pass subscription

View File

@@ -12,7 +12,16 @@ namespace PlexAPI.Models.Requests
using PlexAPI.Utils;
/// <summary>
/// Plex content type to search for
/// The type of media to retrieve.<br/>
///
/// <remarks>
/// 1 = movie<br/>
/// 2 = show<br/>
/// 3 = season<br/>
/// 4 = episode<br/>
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
///
/// </remarks>
/// </summary>
public enum Type
{