ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.152.1

This commit is contained in:
speakeasybot
2024-01-28 00:41:37 +00:00
parent 6812a51128
commit 3387febe27
48 changed files with 747 additions and 171 deletions

View File

@@ -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., &quot;Movies&quot;).<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/>
/// &gt; **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()