mirror of
https://github.com/jellyfin/jellyfin-sdk-csharp.git
synced 2024-11-23 05:39:51 +00:00
Migrate to Kiota (#19)
* initial kiota migration * remove old folder * move sample * update build scripts
This commit is contained in:
parent
8630385c12
commit
99e1ec336f
18
.config/dotnet-tools.json
Normal file
18
.config/dotnet-tools.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"microsoft.openapi.kiota": {
|
||||
"version": "1.11.1",
|
||||
"commands": [
|
||||
"kiota"
|
||||
]
|
||||
},
|
||||
"nuke.globaltool": {
|
||||
"version": "8.0.0",
|
||||
"commands": [
|
||||
"nuke"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
21
.github/dependabot.yml
vendored
21
.github/dependabot.yml
vendored
@ -1,21 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: '/stable'
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '00:00'
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: '/unstable'
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '00:00'
|
||||
open-pull-requests-limit: 10
|
0
renovate.json → .github/renovate.json
vendored
0
renovate.json → .github/renovate.json
vendored
25
.github/workflows/sdk-publish-unstable.yaml
vendored
25
.github/workflows/sdk-publish-unstable.yaml
vendored
@ -26,29 +26,38 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
|
||||
- name: Install dotnet-setversion
|
||||
run: dotnet tool install -g dotnet-setversion
|
||||
run: |
|
||||
dotnet tool install -g dotnet-setversion
|
||||
|
||||
- name: Restore packages
|
||||
run: dotnet restore
|
||||
run: |
|
||||
dotnet restore
|
||||
dotnet tool restore
|
||||
|
||||
- name: Create new version string
|
||||
id: version
|
||||
run: echo "number=$(echo $(date +'%Y.%m.%d')-unstable.$(date +'%Y%m%d%H%M'))" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "number=$(echo $(date +'%Y.%m.%d')-unstable.$(date +'%Y%m%d%H%M'))" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set project version
|
||||
run: setversion ${{ steps.version.outputs.number }}
|
||||
run: |
|
||||
setversion ${{ steps.version.outputs.number }}
|
||||
|
||||
- name: Generate sdk
|
||||
run: dotnet msbuild -target:GenerateSdk-Unstable
|
||||
run: |
|
||||
dotnet nuke --configuration unstable
|
||||
|
||||
- name: Build packages
|
||||
run: dotnet build -c Release
|
||||
run: |
|
||||
dotnet build -c Release
|
||||
|
||||
- name: Publish to nuget
|
||||
run: dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
run: |
|
||||
dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
|
||||
- name: Commit new changes to the repo
|
||||
run: |
|
||||
|
25
.github/workflows/sdk-publish.yaml
vendored
25
.github/workflows/sdk-publish.yaml
vendored
@ -23,29 +23,38 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
|
||||
- name: Install dotnet-setversion
|
||||
run: dotnet tool install -g dotnet-setversion
|
||||
run: |
|
||||
dotnet tool install -g dotnet-setversion
|
||||
|
||||
- name: Restore packages
|
||||
run: dotnet restore
|
||||
run: |
|
||||
dotnet restore
|
||||
dotnet tool restore
|
||||
|
||||
- name: Get Version
|
||||
id: version
|
||||
run: echo "number=$( echo ${{ github.event.release.tag_name }} | tr -d v )" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "number=$( echo ${{ github.event.release.tag_name }} | tr -d v )" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set project version
|
||||
run: setversion ${{steps.version.outputs.number}}
|
||||
run: |
|
||||
setversion ${{steps.version.outputs.number}}
|
||||
|
||||
- name: Generate sdk
|
||||
run: dotnet msbuild -target:GenerateSdk
|
||||
run: |
|
||||
dotnet nuke --configuration stable
|
||||
|
||||
- name: Build packages
|
||||
run: dotnet build -c Release
|
||||
run: |
|
||||
dotnet build -c Release Jellyfin.Sdk
|
||||
|
||||
- name: Publish to nuget
|
||||
run: dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
run: |
|
||||
dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
|
||||
- name: Commit new changes to the repo
|
||||
run: |
|
||||
|
110
.nuke/build.schema.json
Normal file
110
.nuke/build.schema.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$ref": "#/definitions/build",
|
||||
"title": "Build Schema",
|
||||
"definitions": {
|
||||
"build": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Configuration": {
|
||||
"type": "string",
|
||||
"description": "Configuration to build - 'Stable' (default) or 'Unstable'",
|
||||
"enum": [
|
||||
"Stable",
|
||||
"Unstable"
|
||||
]
|
||||
},
|
||||
"Continue": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates to continue a previously failed build attempt"
|
||||
},
|
||||
"Help": {
|
||||
"type": "boolean",
|
||||
"description": "Shows the help text for this build assembly"
|
||||
},
|
||||
"Host": {
|
||||
"type": "string",
|
||||
"description": "Host for execution. Default is 'automatic'",
|
||||
"enum": [
|
||||
"AppVeyor",
|
||||
"AzurePipelines",
|
||||
"Bamboo",
|
||||
"Bitbucket",
|
||||
"Bitrise",
|
||||
"GitHubActions",
|
||||
"GitLab",
|
||||
"Jenkins",
|
||||
"Rider",
|
||||
"SpaceAutomation",
|
||||
"TeamCity",
|
||||
"Terminal",
|
||||
"TravisCI",
|
||||
"VisualStudio",
|
||||
"VSCode"
|
||||
]
|
||||
},
|
||||
"NoLogo": {
|
||||
"type": "boolean",
|
||||
"description": "Disables displaying the NUKE logo"
|
||||
},
|
||||
"Partition": {
|
||||
"type": "string",
|
||||
"description": "Partition to use on CI"
|
||||
},
|
||||
"Plan": {
|
||||
"type": "boolean",
|
||||
"description": "Shows the execution plan (HTML)"
|
||||
},
|
||||
"Profile": {
|
||||
"type": "array",
|
||||
"description": "Defines the profiles to load",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"Root": {
|
||||
"type": "string",
|
||||
"description": "Root directory during build execution"
|
||||
},
|
||||
"Skip": {
|
||||
"type": "array",
|
||||
"description": "List of targets to be skipped. Empty list skips all dependencies",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"CopyConfig",
|
||||
"RestoreTools",
|
||||
"Run"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Solution": {
|
||||
"type": "string",
|
||||
"description": "Path to a solution file that is automatically loaded"
|
||||
},
|
||||
"Target": {
|
||||
"type": "array",
|
||||
"description": "List of targets to be invoked. Default is '{default_target}'",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"CopyConfig",
|
||||
"RestoreTools",
|
||||
"Run"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Verbosity": {
|
||||
"type": "string",
|
||||
"description": "Logging verbosity during build execution. Default is 'Normal'",
|
||||
"enum": [
|
||||
"Minimal",
|
||||
"Normal",
|
||||
"Quiet",
|
||||
"Verbose"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
4
.nuke/parameters.json
Normal file
4
.nuke/parameters.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "./build.schema.json",
|
||||
"Solution": "src/Jellyfin.Sdk.sln"
|
||||
}
|
303
.nuke/temp/execution-plan.html
Normal file
303
.nuke/temp/execution-plan.html
Normal file
File diff suppressed because one or more lines are too long
26
.vscode/launch.json
vendored
26
.vscode/launch.json
vendored
@ -1,26 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||
// Use hover for the description of the existing attributes
|
||||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
||||
"name": ".NET Core Launch (console)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/samples/Simple/bin/Debug/net5.0/Simple.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/samples/Simple",
|
||||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
42
.vscode/tasks.json
vendored
42
.vscode/tasks.json
vendored
@ -1,42 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/samples/Simple/Simple.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/samples/Simple/Simple.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/samples/Simple/Simple.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple", "samples\Simple\Simple.csproj", "{4E19B614-3073-4DA3-961B-37F86247C2B1}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9D00A7A3-03CE-4723-8B55-18549C02F1ED}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Sdk", "src\Jellyfin.Sdk.csproj", "{573621BF-B374-49C2-81F5-B735801DE38E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4E19B614-3073-4DA3-961B-37F86247C2B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E19B614-3073-4DA3-961B-37F86247C2B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E19B614-3073-4DA3-961B-37F86247C2B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4E19B614-3073-4DA3-961B-37F86247C2B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{573621BF-B374-49C2-81F5-B735801DE38E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{573621BF-B374-49C2-81F5-B735801DE38E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{573621BF-B374-49C2-81F5-B735801DE38E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{573621BF-B374-49C2-81F5-B735801DE38E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{4E19B614-3073-4DA3-961B-37F86247C2B1} = {9D00A7A3-03CE-4723-8B55-18549C02F1ED}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -24,7 +24,6 @@
|
||||
</a>
|
||||
</p>
|
||||
|
||||
- Uses https://github.com/RicoSuter/NSwag for generation.
|
||||
- Default templates with [patch](nswag.patch) to also generate url functions.
|
||||
- Uses [Kiota](https://github.com/microsoft/kiota) for generation.
|
||||
|
||||
Documentation WIP.
|
||||
|
7
build.cmd
Normal file
7
build.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
:; set -eo pipefail
|
||||
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
||||
:; ${SCRIPT_DIR}/build.sh "$@"
|
||||
:; exit $?
|
||||
|
||||
@ECHO OFF
|
||||
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
|
74
build.ps1
Normal file
74
build.ps1
Normal file
@ -0,0 +1,74 @@
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||
[string[]]$BuildArguments
|
||||
)
|
||||
|
||||
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
|
||||
|
||||
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
|
||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||
|
||||
###########################################################################
|
||||
# CONFIGURATION
|
||||
###########################################################################
|
||||
|
||||
$BuildProjectFile = "$PSScriptRoot\nuke\_nuke.csproj"
|
||||
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
|
||||
|
||||
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
|
||||
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
|
||||
$DotNetChannel = "STS"
|
||||
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
|
||||
$env:DOTNET_NOLOGO = 1
|
||||
|
||||
###########################################################################
|
||||
# EXECUTION
|
||||
###########################################################################
|
||||
|
||||
function ExecSafe([scriptblock] $cmd) {
|
||||
& $cmd
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
# If dotnet CLI is installed globally and it matches requested version, use for execution
|
||||
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
|
||||
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
|
||||
$env:DOTNET_EXE = (Get-Command "dotnet").Path
|
||||
}
|
||||
else {
|
||||
# Download install script
|
||||
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
|
||||
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)
|
||||
|
||||
# If global.json exists, load expected version
|
||||
if (Test-Path $DotNetGlobalFile) {
|
||||
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
|
||||
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
|
||||
$DotNetVersion = $DotNetGlobal.sdk.version
|
||||
}
|
||||
}
|
||||
|
||||
# Install by channel or version
|
||||
$DotNetDirectory = "$TempDirectory\dotnet-win"
|
||||
if (!(Test-Path variable:DotNetVersion)) {
|
||||
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
|
||||
} else {
|
||||
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
|
||||
}
|
||||
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
|
||||
$env:PATH = "$DotNetDirectory;$env:PATH"
|
||||
}
|
||||
|
||||
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
|
||||
|
||||
if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
|
||||
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
|
||||
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
|
||||
}
|
||||
|
||||
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
|
||||
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
|
67
build.sh
Normal file
67
build.sh
Normal file
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
bash --version 2>&1 | head -n 1
|
||||
|
||||
set -eo pipefail
|
||||
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
||||
|
||||
###########################################################################
|
||||
# CONFIGURATION
|
||||
###########################################################################
|
||||
|
||||
BUILD_PROJECT_FILE="$SCRIPT_DIR/nuke/_nuke.csproj"
|
||||
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
|
||||
|
||||
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
|
||||
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
|
||||
DOTNET_CHANNEL="STS"
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_NOLOGO=1
|
||||
|
||||
###########################################################################
|
||||
# EXECUTION
|
||||
###########################################################################
|
||||
|
||||
function FirstJsonValue {
|
||||
perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
|
||||
}
|
||||
|
||||
# If dotnet CLI is installed globally and it matches requested version, use for execution
|
||||
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
|
||||
export DOTNET_EXE="$(command -v dotnet)"
|
||||
else
|
||||
# Download install script
|
||||
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
|
||||
mkdir -p "$TEMP_DIRECTORY"
|
||||
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL"
|
||||
chmod +x "$DOTNET_INSTALL_FILE"
|
||||
|
||||
# If global.json exists, load expected version
|
||||
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
|
||||
DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")")
|
||||
if [[ "$DOTNET_VERSION" == "" ]]; then
|
||||
unset DOTNET_VERSION
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install by channel or version
|
||||
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
|
||||
if [[ -z ${DOTNET_VERSION+x} ]]; then
|
||||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
|
||||
else
|
||||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
|
||||
fi
|
||||
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
|
||||
export PATH="$DOTNET_DIRECTORY:$PATH"
|
||||
fi
|
||||
|
||||
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
|
||||
|
||||
if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
|
||||
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
|
||||
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
|
||||
fi
|
||||
|
||||
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
|
||||
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
|
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="Rules for Jellyfin" Description="Code analysis rules for Jellyfin" ToolsVersion="14.0">
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
|
||||
<!-- disable warning SA1202: 'public' members must come before 'private' members -->
|
||||
<Rule Id="SA1202" Action="Info" />
|
||||
<!-- disable warning SA1204: Static members must appear before non-static members -->
|
||||
<Rule Id="SA1204" Action="Info" />
|
||||
<!-- disable warning SA1404: Code analysis suppression should have justification -->
|
||||
<Rule Id="SA1404" Action="Info" />
|
||||
|
||||
<!-- disable warning SA1009: Closing parenthesis should be followed by a space. -->
|
||||
<Rule Id="SA1009" Action="None" />
|
||||
<!-- disable warning SA1011: Closing square bracket should be followed by a space. -->
|
||||
<Rule Id="SA1011" Action="None" />
|
||||
<!-- disable warning SA1101: Prefix local calls with 'this.' -->
|
||||
<Rule Id="SA1101" Action="None" />
|
||||
<!-- disable warning SA1108: Block statements should not contain embedded comments -->
|
||||
<Rule Id="SA1108" Action="None" />
|
||||
<!-- disable warning SA1128:: Put constructor initializers on their own line -->
|
||||
<Rule Id="SA1128" Action="None" />
|
||||
<!-- disable warning SA1130: Use lambda syntax -->
|
||||
<Rule Id="SA1130" Action="None" />
|
||||
<!-- disable warning SA1200: 'using' directive must appear within a namespace declaration -->
|
||||
<Rule Id="SA1200" Action="None" />
|
||||
<!-- disable warning SA1309: Fields must not begin with an underscore -->
|
||||
<Rule Id="SA1309" Action="None" />
|
||||
<!-- disable warning SA1413: Use trailing comma in multi-line initializers -->
|
||||
<Rule Id="SA1413" Action="None" />
|
||||
<!-- disable warning SA1512: Single-line comments must not be followed by blank line -->
|
||||
<Rule Id="SA1512" Action="None" />
|
||||
<!-- disable warning SA1515: Single-line comment should be preceded by blank line -->
|
||||
<Rule Id="SA1515" Action="None" />
|
||||
<!-- disable warning SA1600: Elements should be documented -->
|
||||
<Rule Id="SA1600" Action="None" />
|
||||
<!-- disable warning SA1602: Enumeration items should be documented -->
|
||||
<Rule Id="SA1602" Action="None" />
|
||||
<!-- disable warning SA1633: The file header is missing or not located at the top of the file -->
|
||||
<Rule Id="SA1633" Action="None" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="Microsoft.CodeAnalysis.NetAnalyzers" RuleNamespace="Microsoft.Design">
|
||||
<!-- error on CA2016: Forward the CancellationToken parameter to methods that take one
|
||||
or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token -->
|
||||
<Rule Id="CA2016" Action="Error" />
|
||||
|
||||
<!-- disable warning CA1031: Do not catch general exception types -->
|
||||
<Rule Id="CA1031" Action="Info" />
|
||||
<!-- disable warning CA1032: Implement standard exception constructors -->
|
||||
<Rule Id="CA1032" Action="Info" />
|
||||
<!-- disable warning CA1062: Validate arguments of public methods -->
|
||||
<Rule Id="CA1062" Action="Info" />
|
||||
<!-- disable warning CA1716: Identifiers should not match keywords -->
|
||||
<Rule Id="CA1716" Action="Info" />
|
||||
<!-- disable warning CA1720: Identifiers should not contain type names -->
|
||||
<Rule Id="CA1720" Action="Info" />
|
||||
<!-- disable warning CA1805: Do not initialize unnecessarily -->
|
||||
<Rule Id="CA1805" Action="Info" />
|
||||
<!-- disable warning CA1812: internal class that is apparently never instantiated.
|
||||
If so, remove the code from the assembly.
|
||||
If this class is intended to contain only static members, make it static -->
|
||||
<Rule Id="CA1812" Action="Info" />
|
||||
<!-- disable warning CA1822: Member does not access instance data and can be marked as static -->
|
||||
<Rule Id="CA1822" Action="Info" />
|
||||
<!-- disable warning CA2000: Dispose objects before losing scope -->
|
||||
<Rule Id="CA2000" Action="Info" />
|
||||
<!-- disable warning CA5394: Do not use insecure randomness -->
|
||||
<Rule Id="CA5394" Action="Info" />
|
||||
|
||||
<!-- disable warning CA1014: Mark assemblies with CLSCompliantAttribute -->
|
||||
<Rule Id="CA1014" Action="Info" />
|
||||
<!-- disable warning CA1054: Change the type of parameter url from string to System.Uri -->
|
||||
<Rule Id="CA1054" Action="None" />
|
||||
<!-- disable warning CA1055: URI return values should not be strings -->
|
||||
<Rule Id="CA1055" Action="None" />
|
||||
<!-- disable warning CA1056: URI properties should not be strings -->
|
||||
<Rule Id="CA1056" Action="None" />
|
||||
<!-- disable warning CA1303: Do not pass literals as localized parameters -->
|
||||
<Rule Id="CA1303" Action="None" />
|
||||
<!-- disable warning CA1308: Normalize strings to uppercase -->
|
||||
<Rule Id="CA1308" Action="None" />
|
||||
</Rules>
|
||||
</RuleSet>
|
147
nswag.patch
147
nswag.patch
@ -1,147 +0,0 @@
|
||||
Index: src/templates/Client.Interface.liquid
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
diff --git a/src/templates/Client.Interface.liquid b/src/templates/Client.Interface.liquid
|
||||
--- a/src/templates/Client.Interface.liquid (revision 7102fdde0c974045ad7e8039c96bd2be6bbc2ead)
|
||||
+++ b/src/templates/Client.Interface.liquid (date 1708475638619)
|
||||
@@ -4,6 +4,7 @@
|
||||
{
|
||||
{% template Client.Interface.Body %}
|
||||
{% for operation in InterfaceOperations -%}
|
||||
+{%- assign http_method = operation.HttpMethodUpper | upcase -%}
|
||||
{% if GenerateOptionalParameters == false -%}
|
||||
{% template Client.Method.Documentation %}
|
||||
{% template Client.Method.Annotations %}
|
||||
@@ -15,6 +16,12 @@
|
||||
{% template Client.Method.Annotations %}
|
||||
{{ operation.SyncResultType }} {{ operation.ActualOperationName }}({% for parameter in operation.Parameters %}{{ parameter.Type }} {{ parameter.VariableName }}{% if GenerateOptionalParameters and parameter.IsOptional %} = null{% endif %}{% if parameter.IsLast == false %}, {% endif %}{% endfor %});
|
||||
|
||||
+{%- endif %}
|
||||
+{% if http_method == 'GET' and operation.SyncResultType == 'FileResponse' -%}
|
||||
+ {% template Client.Method.Documentation %}
|
||||
+ {% template Client.Method.Annotations %}
|
||||
+ string {{ operation.ActualOperationName }}Url({% for parameter in operation.Parameters %}{{ parameter.Type }} {{ parameter.VariableName }}{% if GenerateOptionalParameters and parameter.IsOptional %} = null{% endif %}, {% endfor %}System.Threading.CancellationToken cancellationToken{% if GenerateOptionalParameters %} = default(System.Threading.CancellationToken){% endif %});
|
||||
+
|
||||
{%- endif %}
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
{% template Client.Method.Documentation %}
|
||||
Index: src/templates/Client.Class.liquid
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
diff --git a/src/templates/Client.Class.liquid b/src/templates/Client.Class.liquid
|
||||
--- a/src/templates/Client.Class.liquid (revision 7102fdde0c974045ad7e8039c96bd2be6bbc2ead)
|
||||
+++ b/src/templates/Client.Class.liquid (date 1708475624916)
|
||||
@@ -122,6 +122,7 @@
|
||||
partial void ProcessResponse({{ HttpClientType }} client, System.Net.Http.HttpResponseMessage response);
|
||||
{% endif -%}
|
||||
{% for operation in Operations %}
|
||||
+{% assign http_method = operation.HttpMethodUpper | upcase %}
|
||||
{% if GenerateOptionalParameters == false -%}
|
||||
{% template Client.Method.Documentation %}
|
||||
{% template Client.Method.Annotations %}
|
||||
@@ -140,6 +141,101 @@
|
||||
}
|
||||
|
||||
{% endif -%}
|
||||
+{%- if http_method == 'GET' and operation.SyncResultType == 'FileResponse' -%}
|
||||
+ {% template Client.Method.Documentation %}
|
||||
+ {% template Client.Method.Annotations %}
|
||||
+ {{ operation.MethodAccessModifier }} virtual string {{ operation.ActualOperationName }}Url({% for parameter in operation.Parameters %}{{ parameter.Type }} {{ parameter.VariableName }}{% if GenerateOptionalParameters and parameter.IsOptional %} = null{% endif %}, {% endfor %}System.Threading.CancellationToken cancellationToken{% if GenerateOptionalParameters %} = default(System.Threading.CancellationToken){% endif %})
|
||||
+ {
|
||||
+{% for parameter in operation.PathParameters -%}
|
||||
+{% if parameter.IsNullable == false and parameter.IsRequired -%}
|
||||
+ if ({{ parameter.VariableName }} == null)
|
||||
+ throw new System.ArgumentNullException("{{ parameter.VariableName }}");
|
||||
+
|
||||
+{% endif -%}
|
||||
+{% endfor -%}
|
||||
+{% for parameter in operation.QueryParameters -%}
|
||||
+{% if parameter.IsNullable == false and parameter.IsRequired -%}
|
||||
+ if ({{ parameter.VariableName }} == null)
|
||||
+ throw new System.ArgumentNullException("{{ parameter.VariableName }}");
|
||||
+
|
||||
+{% endif -%}
|
||||
+{% endfor -%}
|
||||
+{% for parameter in operation.HeaderParameters %}
|
||||
+{% if parameter.IsRequired -%}
|
||||
+ if ({{ parameter.VariableName }} == null)
|
||||
+ throw new System.ArgumentNullException("{{ parameter.VariableName }}");
|
||||
+ {% template Client.Class.HeaderParameter %}
|
||||
+
|
||||
+{% else -%}
|
||||
+ if ({{ parameter.VariableName }} != null)
|
||||
+ {% template Client.Class.HeaderParameter %}
|
||||
+
|
||||
+{% endif -%}
|
||||
+{% endfor -%}
|
||||
+ var urlBuilder_ = new System.Text.StringBuilder();
|
||||
+ {% if UseBaseUrl %}if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl);{% endif %}
|
||||
+ // Operation Path: "{{ operation.Path }}"
|
||||
+{% if operation.Path contains "{" -%}
|
||||
+{% assign pathParts = operation.Path | split: "{" -%}
|
||||
+{% for pathPart in pathParts -%}
|
||||
+{% if pathPart contains "}" -%}
|
||||
+{% assign pathParameterParts = pathPart | split: "}" -%}
|
||||
+{% assign pathParameterFound = true -%}
|
||||
+{% for parameter in operation.PathParameters -%}
|
||||
+{% if parameter.Name == pathParameterParts[0] -%}
|
||||
+{% if parameter.IsOptional -%}
|
||||
+{% assign pathParameterFound = false -%}
|
||||
+ if ({{ parameter.VariableName }} != null)
|
||||
+ {
|
||||
+ {% template Client.Class.PathParameter %}
|
||||
+ }
|
||||
+ else
|
||||
+ if (urlBuilder_.Length > 0) urlBuilder_.Length--;
|
||||
+{% else -%}
|
||||
+ {% template Client.Class.PathParameter %}
|
||||
+{% endif -%}
|
||||
+{% endif -%}
|
||||
+{% endfor -%}
|
||||
+{% comment -%} >>> just in case {% endcomment -%}
|
||||
+{% unless pathParameterFound -%}
|
||||
+ urlBuilder_.Append("{{ '{' }}{{ pathParameterParts[0] }}{{ '}' }}");
|
||||
+{% endunless -%}
|
||||
+{% comment -%} <<< just in case {% endcomment -%}
|
||||
+{% assign nonParameterPartLengh = pathParameterParts[1] | size -%}
|
||||
+{% if nonParameterPartLengh == 1 -%}
|
||||
+ urlBuilder_.Append('{{ pathParameterParts[1] }}');
|
||||
+{% elsif nonParameterPartLengh > 0 -%}
|
||||
+ urlBuilder_.Append("{{ pathParameterParts[1] }}");
|
||||
+{% endif -%}
|
||||
+{% else -%}
|
||||
+{% unless pathPart == "" -%}
|
||||
+ urlBuilder_.Append("{{ pathPart }}");
|
||||
+{% endunless -%}
|
||||
+{% endif -%}
|
||||
+{% endfor -%}
|
||||
+{% else -%}
|
||||
+{% unless operation.Path == "" -%}
|
||||
+ urlBuilder_.Append("{{ operation.Path }}");
|
||||
+{% endunless -%}
|
||||
+{% endif -%}
|
||||
+{% if operation.HasQueryParameters -%}
|
||||
+ urlBuilder_.Append('?');
|
||||
+{% for parameter in operation.QueryParameters -%}
|
||||
+{% if parameter.IsOptional -%}
|
||||
+ if ({{ parameter.VariableName }} != null)
|
||||
+ {
|
||||
+ {% template Client.Class.QueryParameter %}
|
||||
+ }
|
||||
+{% else -%}
|
||||
+ {% template Client.Class.QueryParameter %}
|
||||
+{% endif -%}
|
||||
+{% endfor -%}
|
||||
+ urlBuilder_.Length--;
|
||||
+{% endif -%}
|
||||
+ return urlBuilder_.ToString();
|
||||
+ }
|
||||
+
|
||||
+{% endif -%}
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
{% template Client.Method.Documentation %}
|
||||
{% template Client.Method.Annotations %}
|
11
nuke/.editorconfig
Normal file
11
nuke/.editorconfig
Normal file
@ -0,0 +1,11 @@
|
||||
[*.cs]
|
||||
dotnet_style_qualification_for_field = false:warning
|
||||
dotnet_style_qualification_for_property = false:warning
|
||||
dotnet_style_qualification_for_method = false:warning
|
||||
dotnet_style_qualification_for_event = false:warning
|
||||
dotnet_style_require_accessibility_modifiers = never:warning
|
||||
|
||||
csharp_style_expression_bodied_methods = true:silent
|
||||
csharp_style_expression_bodied_properties = true:warning
|
||||
csharp_style_expression_bodied_indexers = true:warning
|
||||
csharp_style_expression_bodied_accessors = true:warning
|
14
nuke/Configuration.cs
Normal file
14
nuke/Configuration.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System.ComponentModel;
|
||||
using Nuke.Common.Tooling;
|
||||
|
||||
[TypeConverter(typeof(TypeConverter<Configuration>))]
|
||||
public class Configuration : Enumeration
|
||||
{
|
||||
public static Configuration Stable = new() { Value = nameof(Stable) };
|
||||
public static Configuration Unstable = new() { Value = nameof(Unstable) };
|
||||
|
||||
public static implicit operator string(Configuration configuration)
|
||||
{
|
||||
return configuration.Value;
|
||||
}
|
||||
}
|
8
nuke/Directory.Build.props
Normal file
8
nuke/Directory.Build.props
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!-- This file prevents unintended imports of unrelated MSBuild files -->
|
||||
<!-- Uncomment to include parent Directory.Build.props file -->
|
||||
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />-->
|
||||
|
||||
</Project>
|
8
nuke/Directory.Build.targets
Normal file
8
nuke/Directory.Build.targets
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!-- This file prevents unintended imports of unrelated MSBuild files -->
|
||||
<!-- Uncomment to include parent Directory.Build.targets file -->
|
||||
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />-->
|
||||
|
||||
</Project>
|
57
nuke/Generate.cs
Normal file
57
nuke/Generate.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using System.IO;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.ProjectModel;
|
||||
using Nuke.Common.Tools.DotNet;
|
||||
using Serilog;
|
||||
|
||||
public class Generate : NukeBuild
|
||||
{
|
||||
public static int Main () => Execute<Generate>(x => x.Run);
|
||||
|
||||
[Parameter("Configuration to build - 'Stable' (default) or 'Unstable'")]
|
||||
readonly Configuration Configuration = Configuration.Stable;
|
||||
|
||||
[Solution(GenerateProjects = true)]
|
||||
readonly Solution Solution;
|
||||
|
||||
Target RestoreTools => g => g.Executes(() => DotNetTasks.DotNetToolRestore());
|
||||
|
||||
Target CopyConfig => g => g
|
||||
.DependsOn(RestoreTools)
|
||||
.Executes(() =>
|
||||
{
|
||||
var sourceFile = Configuration == Configuration.Stable
|
||||
? "kiota-lock-stable.json"
|
||||
: "kiota-lock-unstable.json";
|
||||
var sourcePath = Path.Combine(Solution.Jellyfin_Sdk.Directory, "Generated", sourceFile);
|
||||
var destinationPath = Path.Combine(Solution.Jellyfin_Sdk.Directory, "Generated", "kiota-lock.json");
|
||||
|
||||
Log.Debug("Copying {0} to {1}", sourcePath, destinationPath);
|
||||
File.Copy(sourcePath, destinationPath, overwrite: true);
|
||||
});
|
||||
|
||||
Target Run => g => g
|
||||
.DependsOn(CopyConfig)
|
||||
.Executes(() =>
|
||||
{
|
||||
DotNetTasks.DotNet(
|
||||
arguments: "kiota update --output Generated",
|
||||
workingDirectory: Solution.Jellyfin_Sdk.Directory);
|
||||
|
||||
// TODO remove when Kiota 1.1.2 is released.
|
||||
var outputPath = Path.Combine(Solution.Jellyfin_Sdk.Directory, "Generated");
|
||||
foreach (var file in Directory.EnumerateFiles(outputPath, "*.cs", SearchOption.AllDirectories))
|
||||
{
|
||||
var contents = File.ReadAllText(file);
|
||||
contents = contents
|
||||
.Replace(
|
||||
"application/json;profile=\"CamelCase\"",
|
||||
"application/json;profile=\\\"CamelCase\\\"")
|
||||
.Replace(
|
||||
"application/json;profile=\"PascalCase\"",
|
||||
"application/json;profile=\\\"PascalCase\\\"");
|
||||
|
||||
File.WriteAllText(file, contents);
|
||||
}
|
||||
});
|
||||
}
|
18
nuke/_nuke.csproj
Normal file
18
nuke/_nuke.csproj
Normal file
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace></RootNamespace>
|
||||
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006</NoWarn>
|
||||
<NukeRootDirectory>..</NukeRootDirectory>
|
||||
<NukeScriptDirectory>..</NukeScriptDirectory>
|
||||
<NukeTelemetryVersion>1</NukeTelemetryVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nuke.Common" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
28
nuke/_nuke.csproj.DotSettings
Normal file
28
nuke/_nuke.csproj.DotSettings
Normal file
@ -0,0 +1,28 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EDelegateAllocation/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableHidesOuterVariable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeMadeStatic_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InterpolatedStringExpressionIsNotIFormattable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Implicit</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Implicit</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/METHOD_OR_OPERATOR_BODY/@EntryValue">ExpressionBody</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/ThisQualifier/INSTANCE_MEMBERS_QUALIFY_MEMBERS/@EntryValue">0</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_USER_LINEBREAKS/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_AFTER_INVOCATION_LPAR/@EntryValue">False</s:Boolean>
|
||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/MAX_ATTRIBUTE_LENGTH_FOR_SAME_LINE/@EntryValue">120</s:Int64>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">IF_OWNER_IS_SINGLE_LINE</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_ARGUMENTS_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Sdk;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using Microsoft.Kiota.Abstractions.Authentication;
|
||||
|
||||
namespace Simple;
|
||||
|
||||
@ -17,31 +16,24 @@ internal static class Program
|
||||
var serviceProvider = ConfigureServices();
|
||||
|
||||
// Initialize the sdk client settings. This only needs to happen once on startup.
|
||||
var sdkClientSettings = serviceProvider.GetRequiredService<SdkClientSettings>();
|
||||
sdkClientSettings.InitializeClientSettings(
|
||||
var sdkClientSettings = serviceProvider.GetRequiredService<JellyfinSdkSettings>();
|
||||
sdkClientSettings.Initialize(
|
||||
"My-Jellyfin-Client",
|
||||
"0.0.1",
|
||||
"Sample Device",
|
||||
$"this-is-my-device-id-{Guid.NewGuid():N}");
|
||||
|
||||
var sampleService = serviceProvider.GetRequiredService<SampleService>();
|
||||
var sampleService = serviceProvider.GetRequiredService<SimpleService>();
|
||||
await sampleService.RunAsync()
|
||||
.ConfigureAwait(false);
|
||||
|
||||
Console.WriteLine("Sample complete");
|
||||
Console.WriteLine("Simple sample complete");
|
||||
}
|
||||
|
||||
private static ServiceProvider ConfigureServices()
|
||||
{
|
||||
var serviceCollection = new ServiceCollection();
|
||||
|
||||
static HttpMessageHandler DefaultHttpClientHandlerDelegate(IServiceProvider service)
|
||||
=> new SocketsHttpHandler
|
||||
{
|
||||
AutomaticDecompression = DecompressionMethods.All,
|
||||
RequestHeaderEncodingSelector = (_, _) => Encoding.UTF8
|
||||
};
|
||||
|
||||
// Add Http Client
|
||||
serviceCollection.AddHttpClient("Default", c =>
|
||||
{
|
||||
@ -55,26 +47,23 @@ internal static class Program
|
||||
c.DefaultRequestHeaders.Accept.Add(
|
||||
new MediaTypeWithQualityHeaderValue("*/*", 0.8));
|
||||
})
|
||||
.ConfigurePrimaryHttpMessageHandler(DefaultHttpClientHandlerDelegate);
|
||||
.ConfigurePrimaryHttpMessageHandler(_ => new SocketsHttpHandler
|
||||
{
|
||||
AutomaticDecompression = DecompressionMethods.All,
|
||||
RequestHeaderEncodingSelector = (_, _) => Encoding.UTF8
|
||||
});
|
||||
|
||||
// Add Jellyfin SDK services.
|
||||
serviceCollection
|
||||
.AddSingleton<SdkClientSettings>();
|
||||
serviceCollection
|
||||
.AddHttpClient<ISystemClient, SystemClient>()
|
||||
.ConfigurePrimaryHttpMessageHandler(DefaultHttpClientHandlerDelegate);
|
||||
serviceCollection
|
||||
.AddHttpClient<IUserClient, UserClient>()
|
||||
.ConfigurePrimaryHttpMessageHandler(DefaultHttpClientHandlerDelegate);
|
||||
serviceCollection
|
||||
.AddHttpClient<IUserViewsClient, UserViewsClient>()
|
||||
.ConfigurePrimaryHttpMessageHandler(DefaultHttpClientHandlerDelegate);
|
||||
serviceCollection
|
||||
.AddHttpClient<IUserLibraryClient, UserLibraryClient>()
|
||||
.ConfigurePrimaryHttpMessageHandler(DefaultHttpClientHandlerDelegate);
|
||||
serviceCollection.AddSingleton<JellyfinSdkSettings>();
|
||||
serviceCollection.AddSingleton<IAuthenticationProvider, JellyfinAuthenticationProvider>();
|
||||
serviceCollection.AddScoped<IRequestAdapter, JellyfinRequestAdapter>(s => new JellyfinRequestAdapter(
|
||||
s.GetRequiredService<IAuthenticationProvider>(),
|
||||
s.GetRequiredService<JellyfinSdkSettings>(),
|
||||
s.GetRequiredService<IHttpClientFactory>().CreateClient("Default")));
|
||||
serviceCollection.AddScoped<JellyfinApiClient>();
|
||||
|
||||
// Add sample service
|
||||
serviceCollection.AddSingleton<SampleService>();
|
||||
serviceCollection.AddSingleton<SimpleService>();
|
||||
|
||||
return serviceCollection.BuildServiceProvider();
|
||||
}
|
||||
|
@ -1,14 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
|
||||
<CodeAnalysisRuleSet>..\..\jellyfin.ruleset</CodeAnalysisRuleSet>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -17,13 +13,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" />
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Jellyfin.Sdk.csproj" />
|
||||
<ProjectReference Include="..\..\src\Jellyfin.Sdk\Jellyfin.Sdk.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,37 +1,27 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Sdk;
|
||||
using SystemException = Jellyfin.Sdk.SystemException;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
|
||||
namespace Simple;
|
||||
|
||||
/// <summary>
|
||||
/// Sample Jellyfin service.
|
||||
/// </summary>
|
||||
public class SampleService
|
||||
public class SimpleService
|
||||
{
|
||||
private readonly SdkClientSettings _sdkClientSettings;
|
||||
private readonly ISystemClient _systemClient;
|
||||
private readonly IUserClient _userClient;
|
||||
private readonly IUserViewsClient _userViewsClient;
|
||||
private readonly JellyfinSdkSettings _sdkClientSettings;
|
||||
private readonly JellyfinApiClient _jellyfinApiClient;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SampleService"/> class.
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sdkClientSettings">Instance of the <see cref="_sdkClientSettings"/>.</param>
|
||||
/// <param name="systemClient">Instance of the <see cref="ISystemClient"/> interface.</param>
|
||||
/// <param name="userClient">Instance of the <see cref="IUserClient"/> interface.</param>
|
||||
/// <param name="userViewsClient">Instance of the <see cref="IUserViewsClient"/> interface.</param>
|
||||
public SampleService(
|
||||
SdkClientSettings sdkClientSettings,
|
||||
ISystemClient systemClient,
|
||||
IUserClient userClient,
|
||||
IUserViewsClient userViewsClient)
|
||||
/// <param name="sdkClientSettings"></param>
|
||||
/// <param name="jellyfinApiClient"></param>
|
||||
public SimpleService(
|
||||
JellyfinSdkSettings sdkClientSettings,
|
||||
JellyfinApiClient jellyfinApiClient)
|
||||
{
|
||||
_sdkClientSettings = sdkClientSettings;
|
||||
_systemClient = systemClient;
|
||||
_userClient = userClient;
|
||||
_userViewsClient = userViewsClient;
|
||||
_jellyfinApiClient = jellyfinApiClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -49,11 +39,13 @@ public class SampleService
|
||||
Console.Write("Server Url: ");
|
||||
var host = Console.ReadLine();
|
||||
|
||||
_sdkClientSettings.BaseUrl = host;
|
||||
_sdkClientSettings.SetServerUrl(host);
|
||||
_jellyfinApiClient.Update();
|
||||
|
||||
try
|
||||
{
|
||||
// Get public system info to verify that the url points to a Jellyfin server.
|
||||
var systemInfo = await _systemClient.GetPublicSystemInfoAsync()
|
||||
var systemInfo = await _jellyfinApiClient.System.Info.Public.GetAsync()
|
||||
.ConfigureAwait(false);
|
||||
validServer = true;
|
||||
Console.WriteLine($"Connected to {host}");
|
||||
@ -86,23 +78,23 @@ public class SampleService
|
||||
Console.Write("Password: ");
|
||||
var password = Console.ReadLine();
|
||||
|
||||
Console.WriteLine($"Logging into {_sdkClientSettings.BaseUrl}");
|
||||
Console.WriteLine($"Logging into {_sdkClientSettings.ServerUrl}");
|
||||
|
||||
// Authenticate user.
|
||||
var authenticationResult = await _userClient.AuthenticateUserByNameAsync(new AuthenticateUserByName
|
||||
var authenticationResult = await _jellyfinApiClient.Users.AuthenticateByName.PostAsync(new AuthenticateUserByName
|
||||
{
|
||||
Username = username,
|
||||
Pw = password
|
||||
})
|
||||
.ConfigureAwait(false);
|
||||
|
||||
_sdkClientSettings.AccessToken = authenticationResult.AccessToken;
|
||||
_sdkClientSettings.SetAccessToken(authenticationResult.AccessToken);
|
||||
userDto = authenticationResult.User;
|
||||
Console.WriteLine("Authentication success.");
|
||||
Console.WriteLine($"Welcome to Jellyfin - {userDto.Name}");
|
||||
validUser = true;
|
||||
}
|
||||
catch (UserException ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
await Console.Error.WriteLineAsync("Error authenticating.").ConfigureAwait(false);
|
||||
await Console.Error.WriteLineAsync(ex.Message).ConfigureAwait(false);
|
||||
@ -110,7 +102,7 @@ public class SampleService
|
||||
}
|
||||
while (!validUser);
|
||||
|
||||
await PrintViews(userDto.Id)
|
||||
await PrintViews(userDto.Id.Value)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@ -118,7 +110,7 @@ public class SampleService
|
||||
{
|
||||
try
|
||||
{
|
||||
var views = await _userViewsClient.GetUserViewsAsync(userId)
|
||||
var views = await _jellyfinApiClient.Users[userId].Views.GetAsync()
|
||||
.ConfigureAwait(false);
|
||||
Console.WriteLine("Printing Views:");
|
||||
foreach (var view in views.Items)
|
||||
@ -126,7 +118,7 @@ public class SampleService
|
||||
Console.WriteLine($"{view.Id} - {view.Name}");
|
||||
}
|
||||
}
|
||||
catch (UserViewsException ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
await Console.Error.WriteLineAsync("Error getting user views").ConfigureAwait(false);
|
||||
await Console.Error.WriteLineAsync(ex.Message).ConfigureAwait(false);
|
194
src/.editorconfig
Normal file
194
src/.editorconfig
Normal file
@ -0,0 +1,194 @@
|
||||
# With more recent updates Visual Studio 2017 supports EditorConfig files out of the box
|
||||
# Visual Studio Code needs an extension: https://github.com/editorconfig/editorconfig-vscode
|
||||
# For emacs, vim, np++ and other editors, see here: https://github.com/editorconfig
|
||||
###############################
|
||||
# Core EditorConfig Options #
|
||||
###############################
|
||||
root = true
|
||||
# All files
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
max_line_length = off
|
||||
|
||||
# YAML indentation
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
# XML indentation
|
||||
[*.{csproj,xml}]
|
||||
indent_size = 2
|
||||
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
###############################
|
||||
[*.{cs,vb}]
|
||||
# Organize usings
|
||||
dotnet_sort_system_directives_first = true
|
||||
# this. preferences
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
|
||||
###############################
|
||||
# Naming Conventions #
|
||||
###############################
|
||||
# Style Definitions (From Roslyn)
|
||||
|
||||
# Non-private static fields are PascalCase
|
||||
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
|
||||
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
|
||||
|
||||
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
|
||||
|
||||
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
|
||||
|
||||
# Constants are PascalCase
|
||||
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
|
||||
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
|
||||
|
||||
dotnet_naming_symbols.constants.applicable_kinds = field, local
|
||||
dotnet_naming_symbols.constants.required_modifiers = const
|
||||
|
||||
dotnet_naming_style.constant_style.capitalization = pascal_case
|
||||
|
||||
# Static fields are camelCase and start with s_
|
||||
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
|
||||
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
|
||||
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
|
||||
|
||||
dotnet_naming_symbols.static_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.static_fields.required_modifiers = static
|
||||
|
||||
dotnet_naming_style.static_field_style.capitalization = camel_case
|
||||
dotnet_naming_style.static_field_style.required_prefix = _
|
||||
|
||||
# Instance fields are camelCase and start with _
|
||||
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
|
||||
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
|
||||
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
|
||||
|
||||
dotnet_naming_symbols.instance_fields.applicable_kinds = field
|
||||
|
||||
dotnet_naming_style.instance_field_style.capitalization = camel_case
|
||||
dotnet_naming_style.instance_field_style.required_prefix = _
|
||||
|
||||
# Locals and parameters are camelCase
|
||||
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
|
||||
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
|
||||
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
|
||||
|
||||
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
|
||||
|
||||
dotnet_naming_style.camel_case_style.capitalization = camel_case
|
||||
|
||||
# Local functions are PascalCase
|
||||
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
|
||||
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
|
||||
|
||||
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
|
||||
|
||||
dotnet_naming_style.local_function_style.capitalization = pascal_case
|
||||
|
||||
# By default, name items with PascalCase
|
||||
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
|
||||
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
|
||||
|
||||
dotnet_naming_symbols.all_members.applicable_kinds = *
|
||||
|
||||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
||||
|
||||
###############################
|
||||
# C# Coding Conventions #
|
||||
###############################
|
||||
[*.cs]
|
||||
# var preferences
|
||||
csharp_style_var_for_built_in_types = true:silent
|
||||
csharp_style_var_when_type_is_apparent = true:silent
|
||||
csharp_style_var_elsewhere = true:silent
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
# Null-checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
||||
# Expression-level preferences
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
|
||||
###############################
|
||||
# C# Formatting Rules #
|
||||
###############################
|
||||
# New line preferences
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
# Indentation preferences
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = flush_left
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
@ -1,104 +0,0 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jellyfin.Sdk;
|
||||
|
||||
/// <summary>
|
||||
/// The base client.
|
||||
/// </summary>
|
||||
public class BaseClient
|
||||
{
|
||||
private readonly SdkClientSettings _clientState;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseClient"/> class.
|
||||
/// </summary>
|
||||
/// <param name="clientState">The sdk client state.</param>
|
||||
public BaseClient(SdkClientSettings clientState)
|
||||
{
|
||||
_clientState = clientState;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepare the request.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Required for generated clients.
|
||||
/// </remarks>
|
||||
/// <param name="client">The http client.</param>
|
||||
/// <param name="request">The http request message.</param>
|
||||
/// <param name="url">The request url.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>The Task.</returns>
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "client")]
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "cancellationToken")]
|
||||
protected Task PrepareRequestAsync(HttpClient client, HttpRequestMessage request, StringBuilder url, CancellationToken cancellationToken)
|
||||
{
|
||||
// Insert baseurl into full url.
|
||||
if (!string.IsNullOrEmpty(_clientState.BaseUrl))
|
||||
{
|
||||
url.Insert(0, _clientState.BaseUrl.TrimEnd('/') + '/');
|
||||
}
|
||||
|
||||
request.Headers.Authorization = new AuthenticationHeaderValue("MediaBrowser", _clientState.GetAuthorizationHeader());
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepare the request.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Required for generated clients.
|
||||
/// </remarks>
|
||||
/// <param name="client">The http client.</param>
|
||||
/// <param name="request">The http request message.</param>
|
||||
/// <param name="url">The request url.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>The Task.</returns>
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "client")]
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "request")]
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "url")]
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "cancellationToken")]
|
||||
protected Task PrepareRequestAsync(HttpClient client, HttpRequestMessage request, string url, CancellationToken cancellationToken)
|
||||
{
|
||||
// Required for generated api.
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process response message.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Required for generated clients.
|
||||
/// </remarks>
|
||||
/// <param name="client">The http client.</param>
|
||||
/// <param name="response">The http response message.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>The Task.</returns>
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "client")]
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "response")]
|
||||
[SuppressMessage("Usage", "CA1801", Justification = "Required for generated code", Scope = "cancellationToken")]
|
||||
protected Task ProcessResponseAsync(HttpClient client, HttpResponseMessage response, CancellationToken cancellationToken)
|
||||
{
|
||||
// Required for generated api.
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepare the request url by inserting the base url.
|
||||
/// </summary>
|
||||
/// <param name="url">The url path.</param>
|
||||
protected void PrepareRequestUrl(StringBuilder url)
|
||||
{
|
||||
// Insert baseurl into full url.
|
||||
if (!string.IsNullOrEmpty(_clientState.BaseUrl))
|
||||
{
|
||||
url.Insert(0, _clientState.BaseUrl.TrimEnd('/') + '/');
|
||||
}
|
||||
}
|
||||
}
|
27
src/Jellyfin.Sdk.sln
Normal file
27
src/Jellyfin.Sdk.sln
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Sdk", "Jellyfin.Sdk\Jellyfin.Sdk.csproj", "{E7A14136-D713-4C16-B457-9D34F0BD538A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{78BAA928-CCBC-41B2-A404-143B1C8376A9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple", "..\samples\Simple\Simple.csproj", "{7BBC005F-06BE-4CDB-9E64-C4AA54CAE667}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E7A14136-D713-4C16-B457-9D34F0BD538A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E7A14136-D713-4C16-B457-9D34F0BD538A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E7A14136-D713-4C16-B457-9D34F0BD538A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E7A14136-D713-4C16-B457-9D34F0BD538A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7BBC005F-06BE-4CDB-9E64-C4AA54CAE667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7BBC005F-06BE-4CDB-9E64-C4AA54CAE667}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7BBC005F-06BE-4CDB-9E64-C4AA54CAE667}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7BBC005F-06BE-4CDB-9E64-C4AA54CAE667}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{7BBC005F-06BE-4CDB-9E64-C4AA54CAE667} = {78BAA928-CCBC-41B2-A404-143B1C8376A9}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
2
src/Jellyfin.Sdk/Generated/.editorconfig
Normal file
2
src/Jellyfin.Sdk/Generated/.editorconfig
Normal file
@ -0,0 +1,2 @@
|
||||
[*.cs]
|
||||
dotnet_diagnostic.CS1591.severity = none
|
44
src/Jellyfin.Sdk/Generated/Albums/AlbumsRequestBuilder.cs
Normal file
44
src/Jellyfin.Sdk/Generated/Albums/AlbumsRequestBuilder.cs
Normal file
@ -0,0 +1,44 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Albums.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Albums {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Albums
|
||||
/// </summary>
|
||||
public class AlbumsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Albums.item collection</summary>
|
||||
/// <param name="position">The item id.</param>
|
||||
public AlbumsItemRequestBuilder this[Guid position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("Albums%2Did", position);
|
||||
return new AlbumsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Albums.item collection</summary>
|
||||
/// <param name="position">The item id.</param>
|
||||
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||
public AlbumsItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("Albums%2Did", position);
|
||||
return new AlbumsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new AlbumsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AlbumsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AlbumsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AlbumsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Albums.Item.InstantMix;
|
||||
using Jellyfin.Sdk.Generated.Albums.Item.Similar;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Albums.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Albums\{Albums-id}
|
||||
/// </summary>
|
||||
public class AlbumsItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The InstantMix property</summary>
|
||||
public InstantMixRequestBuilder InstantMix { get =>
|
||||
new InstantMixRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Similar property</summary>
|
||||
public SimilarRequestBuilder Similar { get =>
|
||||
new SimilarRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AlbumsItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AlbumsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums/{Albums%2Did}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AlbumsItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AlbumsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums/{Albums%2Did}", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Albums.Item.InstantMix {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Albums\{Albums-id}\InstantMix
|
||||
/// </summary>
|
||||
public class InstantMixRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new InstantMixRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InstantMixRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums/{Albums%2Did}/InstantMix{?enableImages*,enableImageTypes*,enableUserData*,fields*,imageTypeLimit*,limit*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new InstantMixRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InstantMixRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums/{Albums%2Did}/InstantMix{?enableImages*,enableImageTypes*,enableUserData*,fields*,imageTypeLimit*,limit*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given album.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given album.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public InstantMixRequestBuilder WithUrl(string rawUrl) {
|
||||
return new InstantMixRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given album.
|
||||
/// </summary>
|
||||
public class InstantMixRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Include image information in output.</summary>
|
||||
[QueryParameter("enableImages")]
|
||||
public bool? EnableImages { get; set; }
|
||||
/// <summary>Optional. The image types to include in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[]? EnableImageTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[] EnableImageTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Include user data.</summary>
|
||||
[QueryParameter("enableUserData")]
|
||||
public bool? EnableUserData { get; set; }
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The max number of images to return, per image type.</summary>
|
||||
[QueryParameter("imageTypeLimit")]
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. Filter by user id, and attach user data.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class InstantMixRequestBuilderGetRequestConfiguration : RequestConfiguration<InstantMixRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Albums.Item.Similar {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Albums\{Albums-id}\Similar
|
||||
/// </summary>
|
||||
public class SimilarRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new SimilarRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public SimilarRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums/{Albums%2Did}/Similar{?excludeArtistIds*,fields*,limit*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new SimilarRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public SimilarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Albums/{Albums%2Did}/Similar{?excludeArtistIds*,fields*,limit*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets similar items.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets similar items.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public SimilarRequestBuilder WithUrl(string rawUrl) {
|
||||
return new SimilarRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets similar items.
|
||||
/// </summary>
|
||||
public class SimilarRequestBuilderGetQueryParameters {
|
||||
/// <summary>Exclude artist ids.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("excludeArtistIds")]
|
||||
public Guid?[]? ExcludeArtistIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("excludeArtistIds")]
|
||||
public Guid?[] ExcludeArtistIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. Filter by user id, and attach user data.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class SimilarRequestBuilderGetRequestConfiguration : RequestConfiguration<SimilarRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,330 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.AlbumArtists {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\AlbumArtists
|
||||
/// </summary>
|
||||
public class AlbumArtistsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new AlbumArtistsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AlbumArtistsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/AlbumArtists{?enableImages*,enableImageTypes*,enableTotalRecordCount*,enableUserData*,excludeItemTypes*,fields*,filters*,genreIds*,genres*,imageTypeLimit*,includeItemTypes*,isFavorite*,limit*,mediaTypes*,minCommunityRating*,nameLessThan*,nameStartsWith*,nameStartsWithOrGreater*,officialRatings*,parentId*,person*,personIds*,personTypes*,searchTerm*,sortBy*,sortOrder*,startIndex*,studioIds*,studios*,tags*,userId*,years*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AlbumArtistsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AlbumArtistsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/AlbumArtists{?enableImages*,enableImageTypes*,enableTotalRecordCount*,enableUserData*,excludeItemTypes*,fields*,filters*,genreIds*,genres*,imageTypeLimit*,includeItemTypes*,isFavorite*,limit*,mediaTypes*,minCommunityRating*,nameLessThan*,nameStartsWith*,nameStartsWithOrGreater*,officialRatings*,parentId*,person*,personIds*,personTypes*,searchTerm*,sortBy*,sortOrder*,startIndex*,studioIds*,studios*,tags*,userId*,years*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets all album artists from a given item, folder, or the entire library.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<AlbumArtistsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<AlbumArtistsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets all album artists from a given item, folder, or the entire library.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AlbumArtistsRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AlbumArtistsRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public AlbumArtistsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new AlbumArtistsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets all album artists from a given item, folder, or the entire library.
|
||||
/// </summary>
|
||||
public class AlbumArtistsRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional, include image information in output.</summary>
|
||||
[QueryParameter("enableImages")]
|
||||
public bool? EnableImages { get; set; }
|
||||
/// <summary>Optional. The image types to include in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[]? EnableImageTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[] EnableImageTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Total record count.</summary>
|
||||
[QueryParameter("enableTotalRecordCount")]
|
||||
public bool? EnableTotalRecordCount { get; set; }
|
||||
/// <summary>Optional, include user data.</summary>
|
||||
[QueryParameter("enableUserData")]
|
||||
public bool? EnableUserData { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("excludeItemTypes")]
|
||||
public string[]? ExcludeItemTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("excludeItemTypes")]
|
||||
public string[] ExcludeItemTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional filters to apply.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("filters")]
|
||||
public string[]? Filters { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("filters")]
|
||||
public string[] Filters { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("genreIds")]
|
||||
public Guid?[]? GenreIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("genreIds")]
|
||||
public Guid?[] GenreIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("genres")]
|
||||
public string[]? Genres { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("genres")]
|
||||
public string[] Genres { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional, the max number of images to return, per image type.</summary>
|
||||
[QueryParameter("imageTypeLimit")]
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("includeItemTypes")]
|
||||
public string[]? IncludeItemTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("includeItemTypes")]
|
||||
public string[] IncludeItemTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by items that are marked as favorite, or not.</summary>
|
||||
[QueryParameter("isFavorite")]
|
||||
public bool? IsFavorite { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional filter by MediaType. Allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaTypes")]
|
||||
public string[]? MediaTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaTypes")]
|
||||
public string[] MediaTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by minimum community rating.</summary>
|
||||
[QueryParameter("minCommunityRating")]
|
||||
public double? MinCommunityRating { get; set; }
|
||||
/// <summary>Optional filter by items whose name is equally or lesser than a given input string.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("nameLessThan")]
|
||||
public string? NameLessThan { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("nameLessThan")]
|
||||
public string NameLessThan { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by items whose name is sorted equally than a given input string.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("nameStartsWith")]
|
||||
public string? NameStartsWith { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("nameStartsWith")]
|
||||
public string NameStartsWith { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by items whose name is sorted equally or greater than a given input string.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("nameStartsWithOrGreater")]
|
||||
public string? NameStartsWithOrGreater { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("nameStartsWithOrGreater")]
|
||||
public string NameStartsWithOrGreater { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("officialRatings")]
|
||||
public string[]? OfficialRatings { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("officialRatings")]
|
||||
public string[] OfficialRatings { get; set; }
|
||||
#endif
|
||||
/// <summary>Specify this to localize the search to a specific item or folder. Omit to use the root.</summary>
|
||||
[QueryParameter("parentId")]
|
||||
public Guid? ParentId { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered to include only those containing the specified person.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("person")]
|
||||
public string? Person { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("person")]
|
||||
public string Person { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered to include only those containing the specified person ids.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("personIds")]
|
||||
public Guid?[]? PersonIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("personIds")]
|
||||
public Guid?[] PersonIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("personTypes")]
|
||||
public string[]? PersonTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("personTypes")]
|
||||
public string[] PersonTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Search term.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("searchTerm")]
|
||||
public string? SearchTerm { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("searchTerm")]
|
||||
public string SearchTerm { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify one or more sort orders, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("sortBy")]
|
||||
public string[]? SortBy { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("sortBy")]
|
||||
public string[] SortBy { get; set; }
|
||||
#endif
|
||||
/// <summary>Sort Order - Ascending,Descending.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("sortOrder")]
|
||||
public string[]? SortOrder { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("sortOrder")]
|
||||
public string[] SortOrder { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The record index to start at. All items with a lower index will be dropped from the results.</summary>
|
||||
[QueryParameter("startIndex")]
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("studioIds")]
|
||||
public Guid?[]? StudioIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("studioIds")]
|
||||
public Guid?[] StudioIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("studios")]
|
||||
public string[]? Studios { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("studios")]
|
||||
public string[] Studios { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tags")]
|
||||
public string[]? Tags { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tags")]
|
||||
public string[] Tags { get; set; }
|
||||
#endif
|
||||
/// <summary>User id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("years")]
|
||||
public int?[]? Years { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("years")]
|
||||
public int?[] Years { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class AlbumArtistsRequestBuilderGetRequestConfiguration : RequestConfiguration<AlbumArtistsRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
348
src/Jellyfin.Sdk/Generated/Artists/ArtistsRequestBuilder.cs
Normal file
348
src/Jellyfin.Sdk/Generated/Artists/ArtistsRequestBuilder.cs
Normal file
@ -0,0 +1,348 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Artists.AlbumArtists;
|
||||
using Jellyfin.Sdk.Generated.Artists.InstantMix;
|
||||
using Jellyfin.Sdk.Generated.Artists.Item;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists
|
||||
/// </summary>
|
||||
public class ArtistsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The AlbumArtists property</summary>
|
||||
public AlbumArtistsRequestBuilder AlbumArtists { get =>
|
||||
new AlbumArtistsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The InstantMix property</summary>
|
||||
public InstantMixRequestBuilder InstantMix { get =>
|
||||
new InstantMixRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Artists.item collection</summary>
|
||||
/// <param name="position">Studio name.</param>
|
||||
public ArtistsItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("Artists%2Did", position);
|
||||
return new ArtistsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new ArtistsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ArtistsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists{?enableImages*,enableImageTypes*,enableTotalRecordCount*,enableUserData*,excludeItemTypes*,fields*,filters*,genreIds*,genres*,imageTypeLimit*,includeItemTypes*,isFavorite*,limit*,mediaTypes*,minCommunityRating*,nameLessThan*,nameStartsWith*,nameStartsWithOrGreater*,officialRatings*,parentId*,person*,personIds*,personTypes*,searchTerm*,sortBy*,sortOrder*,startIndex*,studioIds*,studios*,tags*,userId*,years*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ArtistsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ArtistsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists{?enableImages*,enableImageTypes*,enableTotalRecordCount*,enableUserData*,excludeItemTypes*,fields*,filters*,genreIds*,genres*,imageTypeLimit*,includeItemTypes*,isFavorite*,limit*,mediaTypes*,minCommunityRating*,nameLessThan*,nameStartsWith*,nameStartsWithOrGreater*,officialRatings*,parentId*,person*,personIds*,personTypes*,searchTerm*,sortBy*,sortOrder*,startIndex*,studioIds*,studios*,tags*,userId*,years*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets all artists from a given item, folder, or the entire library.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<ArtistsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<ArtistsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets all artists from a given item, folder, or the entire library.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ArtistsRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ArtistsRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ArtistsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ArtistsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets all artists from a given item, folder, or the entire library.
|
||||
/// </summary>
|
||||
public class ArtistsRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional, include image information in output.</summary>
|
||||
[QueryParameter("enableImages")]
|
||||
public bool? EnableImages { get; set; }
|
||||
/// <summary>Optional. The image types to include in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[]? EnableImageTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[] EnableImageTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Total record count.</summary>
|
||||
[QueryParameter("enableTotalRecordCount")]
|
||||
public bool? EnableTotalRecordCount { get; set; }
|
||||
/// <summary>Optional, include user data.</summary>
|
||||
[QueryParameter("enableUserData")]
|
||||
public bool? EnableUserData { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("excludeItemTypes")]
|
||||
public string[]? ExcludeItemTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("excludeItemTypes")]
|
||||
public string[] ExcludeItemTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional filters to apply.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("filters")]
|
||||
public string[]? Filters { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("filters")]
|
||||
public string[] Filters { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("genreIds")]
|
||||
public Guid?[]? GenreIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("genreIds")]
|
||||
public Guid?[] GenreIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("genres")]
|
||||
public string[]? Genres { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("genres")]
|
||||
public string[] Genres { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional, the max number of images to return, per image type.</summary>
|
||||
[QueryParameter("imageTypeLimit")]
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("includeItemTypes")]
|
||||
public string[]? IncludeItemTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("includeItemTypes")]
|
||||
public string[] IncludeItemTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by items that are marked as favorite, or not.</summary>
|
||||
[QueryParameter("isFavorite")]
|
||||
public bool? IsFavorite { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional filter by MediaType. Allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaTypes")]
|
||||
public string[]? MediaTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaTypes")]
|
||||
public string[] MediaTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by minimum community rating.</summary>
|
||||
[QueryParameter("minCommunityRating")]
|
||||
public double? MinCommunityRating { get; set; }
|
||||
/// <summary>Optional filter by items whose name is equally or lesser than a given input string.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("nameLessThan")]
|
||||
public string? NameLessThan { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("nameLessThan")]
|
||||
public string NameLessThan { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by items whose name is sorted equally than a given input string.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("nameStartsWith")]
|
||||
public string? NameStartsWith { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("nameStartsWith")]
|
||||
public string NameStartsWith { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional filter by items whose name is sorted equally or greater than a given input string.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("nameStartsWithOrGreater")]
|
||||
public string? NameStartsWithOrGreater { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("nameStartsWithOrGreater")]
|
||||
public string NameStartsWithOrGreater { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("officialRatings")]
|
||||
public string[]? OfficialRatings { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("officialRatings")]
|
||||
public string[] OfficialRatings { get; set; }
|
||||
#endif
|
||||
/// <summary>Specify this to localize the search to a specific item or folder. Omit to use the root.</summary>
|
||||
[QueryParameter("parentId")]
|
||||
public Guid? ParentId { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered to include only those containing the specified person.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("person")]
|
||||
public string? Person { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("person")]
|
||||
public string Person { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered to include only those containing the specified person ids.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("personIds")]
|
||||
public Guid?[]? PersonIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("personIds")]
|
||||
public Guid?[] PersonIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("personTypes")]
|
||||
public string[]? PersonTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("personTypes")]
|
||||
public string[] PersonTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Search term.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("searchTerm")]
|
||||
public string? SearchTerm { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("searchTerm")]
|
||||
public string SearchTerm { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify one or more sort orders, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("sortBy")]
|
||||
public string[]? SortBy { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("sortBy")]
|
||||
public string[] SortBy { get; set; }
|
||||
#endif
|
||||
/// <summary>Sort Order - Ascending,Descending.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("sortOrder")]
|
||||
public string[]? SortOrder { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("sortOrder")]
|
||||
public string[] SortOrder { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The record index to start at. All items with a lower index will be dropped from the results.</summary>
|
||||
[QueryParameter("startIndex")]
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("studioIds")]
|
||||
public Guid?[]? StudioIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("studioIds")]
|
||||
public Guid?[] StudioIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("studios")]
|
||||
public string[]? Studios { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("studios")]
|
||||
public string[] Studios { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tags")]
|
||||
public string[]? Tags { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tags")]
|
||||
public string[] Tags { get; set; }
|
||||
#endif
|
||||
/// <summary>User id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
/// <summary>Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("years")]
|
||||
public int?[]? Years { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("years")]
|
||||
public int?[] Years { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ArtistsRequestBuilderGetRequestConfiguration : RequestConfiguration<ArtistsRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.InstantMix {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\InstantMix
|
||||
/// </summary>
|
||||
public class InstantMixRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new InstantMixRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InstantMixRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/InstantMix?id={id}{&enableImages*,enableImageTypes*,enableUserData*,fields*,imageTypeLimit*,limit*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new InstantMixRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InstantMixRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/InstantMix?id={id}{&enableImages*,enableImageTypes*,enableUserData*,fields*,imageTypeLimit*,limit*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given artist.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
[Obsolete("")]
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given artist.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
[Obsolete("")]
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
[Obsolete("")]
|
||||
public InstantMixRequestBuilder WithUrl(string rawUrl) {
|
||||
return new InstantMixRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given artist.
|
||||
/// </summary>
|
||||
public class InstantMixRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Include image information in output.</summary>
|
||||
[QueryParameter("enableImages")]
|
||||
public bool? EnableImages { get; set; }
|
||||
/// <summary>Optional. The image types to include in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[]? EnableImageTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[] EnableImageTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Include user data.</summary>
|
||||
[QueryParameter("enableUserData")]
|
||||
public bool? EnableUserData { get; set; }
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>The item id.</summary>
|
||||
[QueryParameter("id")]
|
||||
public Guid? Id { get; set; }
|
||||
/// <summary>Optional. The max number of images to return, per image type.</summary>
|
||||
[QueryParameter("imageTypeLimit")]
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. Filter by user id, and attach user data.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class InstantMixRequestBuilderGetRequestConfiguration : RequestConfiguration<InstantMixRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Artists.Item.Images;
|
||||
using Jellyfin.Sdk.Generated.Artists.Item.InstantMix;
|
||||
using Jellyfin.Sdk.Generated.Artists.Item.Similar;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\{Artists-id}
|
||||
/// </summary>
|
||||
public class ArtistsItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Images property</summary>
|
||||
public ImagesRequestBuilder Images { get =>
|
||||
new ImagesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The InstantMix property</summary>
|
||||
public InstantMixRequestBuilder InstantMix { get =>
|
||||
new InstantMixRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Similar property</summary>
|
||||
public SimilarRequestBuilder Similar { get =>
|
||||
new SimilarRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ArtistsItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ArtistsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}{?userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ArtistsItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ArtistsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}{?userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an artist by name.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDto?> GetAsync(Action<RequestConfiguration<ArtistsItemRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDto> GetAsync(Action<RequestConfiguration<ArtistsItemRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDto>(requestInfo, BaseItemDto.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an artist by name.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ArtistsItemRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ArtistsItemRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ArtistsItemRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ArtistsItemRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an artist by name.
|
||||
/// </summary>
|
||||
public class ArtistsItemRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Filter by user id, and attach user data.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ArtistsItemRequestBuilderGetRequestConfiguration : RequestConfiguration<ArtistsItemRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Artists.Item.Images.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.Item.Images {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\{Artists-id}\Images
|
||||
/// </summary>
|
||||
public class ImagesRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Artists.item.Images.item collection</summary>
|
||||
/// <param name="position">Image type.</param>
|
||||
public WithImageTypeItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("imageType", position);
|
||||
return new WithImageTypeItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new ImagesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ImagesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}/Images", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ImagesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ImagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}/Images", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,282 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.Item.Images.Item.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\{name}\Images\{imageType}\{imageIndex}
|
||||
/// </summary>
|
||||
public class WithImageIndexItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new WithImageIndexItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithImageIndexItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{name}/Images/{imageType}/{imageIndex}{?addPlayedIndicator*,backgroundColor*,blur*,cropWhitespace*,fillHeight*,fillWidth*,foregroundLayer*,format*,height*,maxHeight*,maxWidth*,percentPlayed*,quality*,tag*,unplayedCount*,width*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithImageIndexItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithImageIndexItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{name}/Images/{imageType}/{imageIndex}{?addPlayedIndicator*,backgroundColor*,blur*,cropWhitespace*,fillHeight*,fillWidth*,foregroundLayer*,format*,height*,maxHeight*,maxWidth*,percentPlayed*,quality*,tag*,unplayedCount*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get artist image by name.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<WithImageIndexItemRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<WithImageIndexItemRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"404", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get artist image by name.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> HeadAsync(Action<RequestConfiguration<WithImageIndexItemRequestBuilderHeadQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> HeadAsync(Action<RequestConfiguration<WithImageIndexItemRequestBuilderHeadQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToHeadRequestInformation(requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"404", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get artist image by name.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<WithImageIndexItemRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<WithImageIndexItemRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "image/*, application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Get artist image by name.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<WithImageIndexItemRequestBuilderHeadQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<WithImageIndexItemRequestBuilderHeadQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "image/*, application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public WithImageIndexItemRequestBuilder WithUrl(string rawUrl) {
|
||||
return new WithImageIndexItemRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get artist image by name.
|
||||
/// </summary>
|
||||
public class WithImageIndexItemRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Add a played indicator.</summary>
|
||||
[QueryParameter("addPlayedIndicator")]
|
||||
public bool? AddPlayedIndicator { get; set; }
|
||||
/// <summary>Optional. Apply a background color for transparent images.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("backgroundColor")]
|
||||
public string? BackgroundColor { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("backgroundColor")]
|
||||
public string BackgroundColor { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Blur image.</summary>
|
||||
[QueryParameter("blur")]
|
||||
public int? Blur { get; set; }
|
||||
/// <summary>Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</summary>
|
||||
[Obsolete("")]
|
||||
[QueryParameter("cropWhitespace")]
|
||||
public bool? CropWhitespace { get; set; }
|
||||
/// <summary>Height of box to fill.</summary>
|
||||
[QueryParameter("fillHeight")]
|
||||
public int? FillHeight { get; set; }
|
||||
/// <summary>Width of box to fill.</summary>
|
||||
[QueryParameter("fillWidth")]
|
||||
public int? FillWidth { get; set; }
|
||||
/// <summary>Optional. Apply a foreground layer on top of the image.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("foregroundLayer")]
|
||||
public string? ForegroundLayer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("foregroundLayer")]
|
||||
public string ForegroundLayer { get; set; }
|
||||
#endif
|
||||
/// <summary>Determines the output format of the image - original,gif,jpg,png.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("format")]
|
||||
public string? Format { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("format")]
|
||||
public string Format { get; set; }
|
||||
#endif
|
||||
/// <summary>The fixed image height to return.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>The maximum image height to return.</summary>
|
||||
[QueryParameter("maxHeight")]
|
||||
public int? MaxHeight { get; set; }
|
||||
/// <summary>The maximum image width to return.</summary>
|
||||
[QueryParameter("maxWidth")]
|
||||
public int? MaxWidth { get; set; }
|
||||
/// <summary>Optional. Percent to render for the percent played overlay.</summary>
|
||||
[QueryParameter("percentPlayed")]
|
||||
public double? PercentPlayed { get; set; }
|
||||
/// <summary>Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.</summary>
|
||||
[QueryParameter("quality")]
|
||||
public int? Quality { get; set; }
|
||||
/// <summary>Optional. Supply the cache tag from the item object to receive strong caching headers.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Unplayed count overlay to render.</summary>
|
||||
[QueryParameter("unplayedCount")]
|
||||
public int? UnplayedCount { get; set; }
|
||||
/// <summary>The fixed image width to return.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithImageIndexItemRequestBuilderGetRequestConfiguration : RequestConfiguration<WithImageIndexItemRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get artist image by name.
|
||||
/// </summary>
|
||||
public class WithImageIndexItemRequestBuilderHeadQueryParameters {
|
||||
/// <summary>Optional. Add a played indicator.</summary>
|
||||
[QueryParameter("addPlayedIndicator")]
|
||||
public bool? AddPlayedIndicator { get; set; }
|
||||
/// <summary>Optional. Apply a background color for transparent images.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("backgroundColor")]
|
||||
public string? BackgroundColor { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("backgroundColor")]
|
||||
public string BackgroundColor { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Blur image.</summary>
|
||||
[QueryParameter("blur")]
|
||||
public int? Blur { get; set; }
|
||||
/// <summary>Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</summary>
|
||||
[Obsolete("")]
|
||||
[QueryParameter("cropWhitespace")]
|
||||
public bool? CropWhitespace { get; set; }
|
||||
/// <summary>Height of box to fill.</summary>
|
||||
[QueryParameter("fillHeight")]
|
||||
public int? FillHeight { get; set; }
|
||||
/// <summary>Width of box to fill.</summary>
|
||||
[QueryParameter("fillWidth")]
|
||||
public int? FillWidth { get; set; }
|
||||
/// <summary>Optional. Apply a foreground layer on top of the image.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("foregroundLayer")]
|
||||
public string? ForegroundLayer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("foregroundLayer")]
|
||||
public string ForegroundLayer { get; set; }
|
||||
#endif
|
||||
/// <summary>Determines the output format of the image - original,gif,jpg,png.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("format")]
|
||||
public string? Format { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("format")]
|
||||
public string Format { get; set; }
|
||||
#endif
|
||||
/// <summary>The fixed image height to return.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>The maximum image height to return.</summary>
|
||||
[QueryParameter("maxHeight")]
|
||||
public int? MaxHeight { get; set; }
|
||||
/// <summary>The maximum image width to return.</summary>
|
||||
[QueryParameter("maxWidth")]
|
||||
public int? MaxWidth { get; set; }
|
||||
/// <summary>Optional. Percent to render for the percent played overlay.</summary>
|
||||
[QueryParameter("percentPlayed")]
|
||||
public double? PercentPlayed { get; set; }
|
||||
/// <summary>Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.</summary>
|
||||
[QueryParameter("quality")]
|
||||
public int? Quality { get; set; }
|
||||
/// <summary>Optional. Supply the cache tag from the item object to receive strong caching headers.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Unplayed count overlay to render.</summary>
|
||||
[QueryParameter("unplayedCount")]
|
||||
public int? UnplayedCount { get; set; }
|
||||
/// <summary>The fixed image width to return.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithImageIndexItemRequestBuilderHeadRequestConfiguration : RequestConfiguration<WithImageIndexItemRequestBuilderHeadQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Artists.Item.Images.Item.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.Item.Images.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\{name}\Images\{imageType}
|
||||
/// </summary>
|
||||
public class WithImageTypeItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Artists.item.Images.item.item collection</summary>
|
||||
/// <param name="position">Image index.</param>
|
||||
public WithImageIndexItemRequestBuilder this[int position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("imageIndex", position);
|
||||
return new WithImageIndexItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Artists.item.Images.item.item collection</summary>
|
||||
/// <param name="position">Image index.</param>
|
||||
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||
public WithImageIndexItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("imageIndex", position);
|
||||
return new WithImageIndexItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new WithImageTypeItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithImageTypeItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{name}/Images/{imageType}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithImageTypeItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithImageTypeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{name}/Images/{imageType}", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.Item.InstantMix {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\{Artists-id}\InstantMix
|
||||
/// </summary>
|
||||
public class InstantMixRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new InstantMixRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InstantMixRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}/InstantMix{?enableImages*,enableImageTypes*,enableUserData*,fields*,imageTypeLimit*,limit*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new InstantMixRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InstantMixRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}/InstantMix{?enableImages*,enableImageTypes*,enableUserData*,fields*,imageTypeLimit*,limit*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given artist.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given artist.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InstantMixRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public InstantMixRequestBuilder WithUrl(string rawUrl) {
|
||||
return new InstantMixRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates an instant playlist based on a given artist.
|
||||
/// </summary>
|
||||
public class InstantMixRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Include image information in output.</summary>
|
||||
[QueryParameter("enableImages")]
|
||||
public bool? EnableImages { get; set; }
|
||||
/// <summary>Optional. The image types to include in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[]? EnableImageTypes { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("enableImageTypes")]
|
||||
public string[] EnableImageTypes { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Include user data.</summary>
|
||||
[QueryParameter("enableUserData")]
|
||||
public bool? EnableUserData { get; set; }
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The max number of images to return, per image type.</summary>
|
||||
[QueryParameter("imageTypeLimit")]
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. Filter by user id, and attach user data.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class InstantMixRequestBuilderGetRequestConfiguration : RequestConfiguration<InstantMixRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Artists.Item.Similar {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Artists\{Artists-id}\Similar
|
||||
/// </summary>
|
||||
public class SimilarRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new SimilarRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public SimilarRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}/Similar{?excludeArtistIds*,fields*,limit*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new SimilarRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public SimilarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Artists/{Artists%2Did}/Similar{?excludeArtistIds*,fields*,limit*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets similar items.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets similar items.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<SimilarRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public SimilarRequestBuilder WithUrl(string rawUrl) {
|
||||
return new SimilarRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets similar items.
|
||||
/// </summary>
|
||||
public class SimilarRequestBuilderGetQueryParameters {
|
||||
/// <summary>Exclude artist ids.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("excludeArtistIds")]
|
||||
public Guid?[]? ExcludeArtistIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("excludeArtistIds")]
|
||||
public Guid?[] ExcludeArtistIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. Filter by user id, and attach user data.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class SimilarRequestBuilderGetRequestConfiguration : RequestConfiguration<SimilarRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
44
src/Jellyfin.Sdk/Generated/Audio/AudioRequestBuilder.cs
Normal file
44
src/Jellyfin.Sdk/Generated/Audio/AudioRequestBuilder.cs
Normal file
@ -0,0 +1,44 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Audio.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio
|
||||
/// </summary>
|
||||
public class AudioRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Audio.item collection</summary>
|
||||
/// <param name="position">The item id.</param>
|
||||
public WithItemItemRequestBuilder this[Guid position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("itemId", position);
|
||||
return new WithItemItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Audio.item collection</summary>
|
||||
/// <param name="position">The item id.</param>
|
||||
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||
public WithItemItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("itemId", position);
|
||||
return new WithItemItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new AudioRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AudioRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AudioRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AudioRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls
|
||||
/// </summary>
|
||||
public class HlsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Audio.item.hls.item collection</summary>
|
||||
/// <param name="position">The segment id.</param>
|
||||
public WithSegmentItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("segmentId", position);
|
||||
return new WithSegmentItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new HlsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public HlsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new HlsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public HlsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls.Item.StreamAac {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls\{segmentId}\stream.aac
|
||||
/// </summary>
|
||||
public class StreamAacRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamAacRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamAacRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls/{segmentId}/stream.aac", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamAacRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamAacRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls/{segmentId}/stream.aac", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the specified audio segment for an audio item.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the specified audio segment for an audio item.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public StreamAacRequestBuilder WithUrl(string rawUrl) {
|
||||
return new StreamAacRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class StreamAacRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls.Item.StreamMp3 {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls\{segmentId}\stream.mp3
|
||||
/// </summary>
|
||||
public class StreamMp3RequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamMp3RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamMp3RequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls/{segmentId}/stream.mp3", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamMp3RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamMp3RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls/{segmentId}/stream.mp3", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the specified audio segment for an audio item.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the specified audio segment for an audio item.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public StreamMp3RequestBuilder WithUrl(string rawUrl) {
|
||||
return new StreamMp3RequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class StreamMp3RequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls.Item.StreamAac;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls.Item.StreamMp3;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls\{segmentId}
|
||||
/// </summary>
|
||||
public class WithSegmentItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The streamAac property</summary>
|
||||
public StreamAacRequestBuilder StreamAac { get =>
|
||||
new StreamAacRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The streamMp3 property</summary>
|
||||
public StreamMp3RequestBuilder StreamMp3 { get =>
|
||||
new StreamMp3RequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithSegmentItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithSegmentItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls/{segmentId}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithSegmentItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithSegmentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls/{segmentId}", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls1.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls1 {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls1
|
||||
/// </summary>
|
||||
public class Hls1RequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Audio.item.hls1.item collection</summary>
|
||||
/// <param name="position">The playlist id.</param>
|
||||
public WithPlaylistItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("playlistId", position);
|
||||
return new WithPlaylistItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new Hls1RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public Hls1RequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls1", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new Hls1RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public Hls1RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls1", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls1.Item.WithSegmentIdWithContainer;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls1.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls1\{playlistId}
|
||||
/// </summary>
|
||||
public class WithPlaylistItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new WithPlaylistItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithPlaylistItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls1/{playlistId}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithPlaylistItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithPlaylistItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls1/{playlistId}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls1\{playlistId}\{segmentId}.{container}
|
||||
/// </summary>
|
||||
/// <param name="container">The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.</param>
|
||||
/// <param name="segmentId">The segment id.</param>
|
||||
public WithSegmentIdWithContainerRequestBuilder WithSegmentIdWithContainer(string container, int? segmentId) {
|
||||
if(string.IsNullOrEmpty(container)) throw new ArgumentNullException(nameof(container));
|
||||
_ = segmentId ?? throw new ArgumentNullException(nameof(segmentId));
|
||||
return new WithSegmentIdWithContainerRequestBuilder(PathParameters, RequestAdapter, container, segmentId);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,352 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Hls1.Item.WithSegmentIdWithContainer {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\hls1\{playlistId}\{segmentId}.{container}
|
||||
/// </summary>
|
||||
public class WithSegmentIdWithContainerRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new WithSegmentIdWithContainerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="container">The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.</param>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
/// <param name="segmentId">The segment id.</param>
|
||||
public WithSegmentIdWithContainerRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter, string container = "", int? segmentId = default) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls1/{playlistId}/{segmentId}.{container}?actualSegmentLengthTicks={actualSegmentLengthTicks}&runtimeTicks={runtimeTicks}{&allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxStreamingBitrate*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", pathParameters) {
|
||||
if (!string.IsNullOrWhiteSpace(container)) PathParameters.Add("container", container);
|
||||
if (segmentId != null) PathParameters.Add("segmentId", segmentId);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithSegmentIdWithContainerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithSegmentIdWithContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/hls1/{playlistId}/{segmentId}.{container}?actualSegmentLengthTicks={actualSegmentLengthTicks}&runtimeTicks={runtimeTicks}{&allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxStreamingBitrate*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets a video stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<WithSegmentIdWithContainerRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<WithSegmentIdWithContainerRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets a video stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<WithSegmentIdWithContainerRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<WithSegmentIdWithContainerRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public WithSegmentIdWithContainerRequestBuilder WithUrl(string rawUrl) {
|
||||
return new WithSegmentIdWithContainerRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets a video stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
public class WithSegmentIdWithContainerRequestBuilderGetQueryParameters {
|
||||
/// <summary>The length of the requested segment in ticks.</summary>
|
||||
[QueryParameter("actualSegmentLengthTicks")]
|
||||
public long? ActualSegmentLengthTicks { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum streaming bitrate.</summary>
|
||||
[QueryParameter("maxStreamingBitrate")]
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamorphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The position of the requested segment in ticks.</summary>
|
||||
[QueryParameter("runtimeTicks")]
|
||||
public long? RuntimeTicks { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment length.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithSegmentIdWithContainerRequestBuilderGetRequestConfiguration : RequestConfiguration<WithSegmentIdWithContainerRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,342 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.MainM3u8 {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\main.m3u8
|
||||
/// </summary>
|
||||
public class MainM3u8RequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new MainM3u8RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public MainM3u8RequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/main.m3u8{?allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxStreamingBitrate*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new MainM3u8RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public MainM3u8RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/main.m3u8{?allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxStreamingBitrate*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<MainM3u8RequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<MainM3u8RequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<MainM3u8RequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<MainM3u8RequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/x-mpegURL");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public MainM3u8RequestBuilder WithUrl(string rawUrl) {
|
||||
return new MainM3u8RequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
public class MainM3u8RequestBuilderGetQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum streaming bitrate.</summary>
|
||||
[QueryParameter("maxStreamingBitrate")]
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamorphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment length.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class MainM3u8RequestBuilderGetRequestConfiguration : RequestConfiguration<MainM3u8RequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,653 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.MasterM3u8 {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\master.m3u8
|
||||
/// </summary>
|
||||
public class MasterM3u8RequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new MasterM3u8RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public MasterM3u8RequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/master.m3u8?mediaSourceId={mediaSourceId}{&allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAdaptiveBitrateStreaming*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxStreamingBitrate*,maxVideoBitDepth*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new MasterM3u8RequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public MasterM3u8RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/master.m3u8?mediaSourceId={mediaSourceId}{&allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAdaptiveBitrateStreaming*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxStreamingBitrate*,maxVideoBitDepth*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio hls playlist stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<MasterM3u8RequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<MasterM3u8RequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio hls playlist stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> HeadAsync(Action<RequestConfiguration<MasterM3u8RequestBuilderHeadQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> HeadAsync(Action<RequestConfiguration<MasterM3u8RequestBuilderHeadQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToHeadRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio hls playlist stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<MasterM3u8RequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<MasterM3u8RequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/x-mpegURL");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio hls playlist stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<MasterM3u8RequestBuilderHeadQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<MasterM3u8RequestBuilderHeadQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/x-mpegURL");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public MasterM3u8RequestBuilder WithUrl(string rawUrl) {
|
||||
return new MasterM3u8RequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio hls playlist stream.
|
||||
/// </summary>
|
||||
public class MasterM3u8RequestBuilderGetQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Enable adaptive bitrate streaming.</summary>
|
||||
[QueryParameter("enableAdaptiveBitrateStreaming")]
|
||||
public bool? EnableAdaptiveBitrateStreaming { get; set; }
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum streaming bitrate.</summary>
|
||||
[QueryParameter("maxStreamingBitrate")]
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamorphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment length.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class MasterM3u8RequestBuilderGetRequestConfiguration : RequestConfiguration<MasterM3u8RequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio hls playlist stream.
|
||||
/// </summary>
|
||||
public class MasterM3u8RequestBuilderHeadQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Enable adaptive bitrate streaming.</summary>
|
||||
[QueryParameter("enableAdaptiveBitrateStreaming")]
|
||||
public bool? EnableAdaptiveBitrateStreaming { get; set; }
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum streaming bitrate.</summary>
|
||||
[QueryParameter("maxStreamingBitrate")]
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamorphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment length.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class MasterM3u8RequestBuilderHeadRequestConfiguration : RequestConfiguration<MasterM3u8RequestBuilderHeadQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,661 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.StreamNamespace {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\stream
|
||||
/// </summary>
|
||||
public class StreamRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/stream{?allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,container*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/stream{?allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,container*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<StreamRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<StreamRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> HeadAsync(Action<RequestConfiguration<StreamRequestBuilderHeadQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> HeadAsync(Action<RequestConfiguration<StreamRequestBuilderHeadQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToHeadRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<StreamRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<StreamRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<StreamRequestBuilderHeadQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<StreamRequestBuilderHeadQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public StreamRequestBuilder WithUrl(string rawUrl) {
|
||||
return new StreamRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
public class StreamRequestBuilderGetQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>The audio container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("container")]
|
||||
public string? Container { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("container")]
|
||||
public string Container { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamorphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment length.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class StreamRequestBuilderGetRequestConfiguration : RequestConfiguration<StreamRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
public class StreamRequestBuilderHeadQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>The audio container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("container")]
|
||||
public string? Container { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("container")]
|
||||
public string Container { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamorphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment length.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class StreamRequestBuilderHeadRequestConfiguration : RequestConfiguration<StreamRequestBuilderHeadQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,643 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.StreamWithContainer {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\stream.{container}
|
||||
/// </summary>
|
||||
public class StreamWithContainerRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamWithContainerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="container">The audio container.</param>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamWithContainerRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter, string container = "") : base(requestAdapter, "{+baseurl}/Audio/{itemId}/stream.{container}{?allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", pathParameters) {
|
||||
if (!string.IsNullOrWhiteSpace(container)) PathParameters.Add("container", container);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new StreamWithContainerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public StreamWithContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/stream.{container}{?allowAudioStreamCopy*,allowVideoStreamCopy*,audioBitRate*,audioChannels*,audioCodec*,audioSampleRate*,audioStreamIndex*,breakOnNonKeyFrames*,context*,copyTimestamps*,cpuCoreLimit*,deInterlace*,deviceId*,deviceProfileId*,enableAutoStreamCopy*,enableMpegtsM2TsMode*,framerate*,height*,level*,liveStreamId*,maxAudioBitDepth*,maxAudioChannels*,maxFramerate*,maxRefFrames*,maxVideoBitDepth*,mediaSourceId*,minSegments*,params*,playSessionId*,profile*,requireAvc*,requireNonAnamorphic*,segmentContainer*,segmentLength*,startTimeTicks*,static*,streamOptions*,subtitleCodec*,subtitleMethod*,subtitleStreamIndex*,tag*,transcodeReasons*,transcodingMaxAudioChannels*,videoBitRate*,videoCodec*,videoStreamIndex*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<StreamWithContainerRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<StreamWithContainerRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> HeadAsync(Action<RequestConfiguration<StreamWithContainerRequestBuilderHeadQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> HeadAsync(Action<RequestConfiguration<StreamWithContainerRequestBuilderHeadQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToHeadRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<StreamWithContainerRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<StreamWithContainerRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<StreamWithContainerRequestBuilderHeadQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<StreamWithContainerRequestBuilderHeadQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public StreamWithContainerRequestBuilder WithUrl(string rawUrl) {
|
||||
return new StreamWithContainerRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
public class StreamWithContainerRequestBuilderGetQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamporphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment lenght.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class StreamWithContainerRequestBuilderGetRequestConfiguration : RequestConfiguration<StreamWithContainerRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
public class StreamWithContainerRequestBuilderHeadQueryParameters {
|
||||
/// <summary>Whether or not to allow copying of the audio stream url.</summary>
|
||||
[QueryParameter("allowAudioStreamCopy")]
|
||||
public bool? AllowAudioStreamCopy { get; set; }
|
||||
/// <summary>Whether or not to allow copying of the video stream url.</summary>
|
||||
[QueryParameter("allowVideoStreamCopy")]
|
||||
public bool? AllowVideoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a specific number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific audio sample rate, e.g. 44100.</summary>
|
||||
[QueryParameter("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The index of the audio stream to use. If omitted the first audio stream will be used.</summary>
|
||||
[QueryParameter("audioStreamIndex")]
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The MediaBrowser.Model.Dlna.EncodingContext.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("context")]
|
||||
public string? Context { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("context")]
|
||||
public string Context { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to copy timestamps when transcoding with an offset. Defaults to false.</summary>
|
||||
[QueryParameter("copyTimestamps")]
|
||||
public bool? CopyTimestamps { get; set; }
|
||||
/// <summary>Optional. The limit of how many cpu cores to use.</summary>
|
||||
[QueryParameter("cpuCoreLimit")]
|
||||
public int? CpuCoreLimit { get; set; }
|
||||
/// <summary>Optional. Whether to deinterlace the video.</summary>
|
||||
[QueryParameter("deInterlace")]
|
||||
public bool? DeInterlace { get; set; }
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The dlna device profile id to utilize.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string? DeviceProfileId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceProfileId")]
|
||||
public string DeviceProfileId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.</summary>
|
||||
[QueryParameter("enableAutoStreamCopy")]
|
||||
public bool? EnableAutoStreamCopy { get; set; }
|
||||
/// <summary>Optional. Whether to enable the MpegtsM2Ts mode.</summary>
|
||||
[QueryParameter("enableMpegtsM2TsMode")]
|
||||
public bool? EnableMpegtsM2TsMode { get; set; }
|
||||
/// <summary>Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("framerate")]
|
||||
public float? Framerate { get; set; }
|
||||
/// <summary>Optional. The fixed vertical resolution of the encoded video.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("level")]
|
||||
public string? Level { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("level")]
|
||||
public string Level { get; set; }
|
||||
#endif
|
||||
/// <summary>The live stream id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string? LiveStreamId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("liveStreamId")]
|
||||
public string LiveStreamId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. Specify a maximum number of audio channels to encode to, e.g. 2.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.</summary>
|
||||
[QueryParameter("maxFramerate")]
|
||||
public float? MaxFramerate { get; set; }
|
||||
/// <summary>Optional.</summary>
|
||||
[QueryParameter("maxRefFrames")]
|
||||
public int? MaxRefFrames { get; set; }
|
||||
/// <summary>Optional. The maximum video bit depth.</summary>
|
||||
[QueryParameter("maxVideoBitDepth")]
|
||||
public int? MaxVideoBitDepth { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>The minimum number of segments.</summary>
|
||||
[QueryParameter("minSegments")]
|
||||
public int? MinSegments { get; set; }
|
||||
/// <summary>The streaming parameters.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("params")]
|
||||
public string? Params { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("params")]
|
||||
public string Params { get; set; }
|
||||
#endif
|
||||
/// <summary>The play session id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("playSessionId")]
|
||||
public string? PlaySessionId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("playSessionId")]
|
||||
public string PlaySessionId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("profile")]
|
||||
public string? Profile { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("profile")]
|
||||
public string Profile { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to require avc.</summary>
|
||||
[QueryParameter("requireAvc")]
|
||||
public bool? RequireAvc { get; set; }
|
||||
/// <summary>Optional. Whether to require a non anamporphic stream.</summary>
|
||||
[QueryParameter("requireNonAnamorphic")]
|
||||
public bool? RequireNonAnamorphic { get; set; }
|
||||
/// <summary>The segment container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string? SegmentContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("segmentContainer")]
|
||||
public string SegmentContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>The segment lenght.</summary>
|
||||
[QueryParameter("segmentLength")]
|
||||
public int? SegmentLength { get; set; }
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.</summary>
|
||||
[QueryParameter("static")]
|
||||
public bool? Static { get; set; }
|
||||
/// <summary>Optional. The streaming options.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("streamOptions")]
|
||||
public string? StreamOptions { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("streamOptions")]
|
||||
public string StreamOptions { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a subtitle codec to encode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string? SubtitleCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleCodec")]
|
||||
public string SubtitleCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify the subtitle delivery method.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string? SubtitleMethod { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("subtitleMethod")]
|
||||
public string SubtitleMethod { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.</summary>
|
||||
[QueryParameter("subtitleStreamIndex")]
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
/// <summary>The tag.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding reason.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string? TranscodeReasons { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodeReasons")]
|
||||
public string TranscodeReasons { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of audio channels to transcode.</summary>
|
||||
[QueryParameter("transcodingMaxAudioChannels")]
|
||||
public int? TranscodingMaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("videoBitRate")]
|
||||
public int? VideoBitRate { get; set; }
|
||||
/// <summary>Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("videoCodec")]
|
||||
public string VideoCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The index of the video stream to use. If omitted the first video stream will be used.</summary>
|
||||
[QueryParameter("videoStreamIndex")]
|
||||
public int? VideoStreamIndex { get; set; }
|
||||
/// <summary>Optional. The fixed horizontal resolution of the encoded video.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class StreamWithContainerRequestBuilderHeadRequestConfiguration : RequestConfiguration<StreamWithContainerRequestBuilderHeadQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,307 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item.Universal {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\universal
|
||||
/// </summary>
|
||||
public class UniversalRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new UniversalRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public UniversalRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/universal{?audioBitRate*,audioCodec*,breakOnNonKeyFrames*,container*,deviceId*,enableRedirection*,enableRemoteMedia*,maxAudioBitDepth*,maxAudioChannels*,maxAudioSampleRate*,maxStreamingBitrate*,mediaSourceId*,startTimeTicks*,transcodingAudioChannels*,transcodingContainer*,transcodingProtocol*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new UniversalRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public UniversalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}/universal{?audioBitRate*,audioCodec*,breakOnNonKeyFrames*,container*,deviceId*,enableRedirection*,enableRemoteMedia*,maxAudioBitDepth*,maxAudioChannels*,maxAudioSampleRate*,maxStreamingBitrate*,mediaSourceId*,startTimeTicks*,transcodingAudioChannels*,transcodingContainer*,transcodingProtocol*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<UniversalRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<UniversalRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> HeadAsync(Action<RequestConfiguration<UniversalRequestBuilderHeadQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> HeadAsync(Action<RequestConfiguration<UniversalRequestBuilderHeadQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToHeadRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<UniversalRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<UniversalRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<UniversalRequestBuilderHeadQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToHeadRequestInformation(Action<RequestConfiguration<UniversalRequestBuilderHeadQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "audio/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public UniversalRequestBuilder WithUrl(string rawUrl) {
|
||||
return new UniversalRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
public class UniversalRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. The audio codec to transcode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The audio container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("container")]
|
||||
public string[]? Container { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("container")]
|
||||
public string[] Container { get; set; }
|
||||
#endif
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether to enable redirection. Defaults to true.</summary>
|
||||
[QueryParameter("enableRedirection")]
|
||||
public bool? EnableRedirection { get; set; }
|
||||
/// <summary>Optional. Whether to enable remote media.</summary>
|
||||
[QueryParameter("enableRemoteMedia")]
|
||||
public bool? EnableRemoteMedia { get; set; }
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. The maximum number of audio channels.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. The maximum audio sample rate.</summary>
|
||||
[QueryParameter("maxAudioSampleRate")]
|
||||
public int? MaxAudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The maximum streaming bitrate.</summary>
|
||||
[QueryParameter("maxStreamingBitrate")]
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. The number of how many audio channels to transcode to.</summary>
|
||||
[QueryParameter("transcodingAudioChannels")]
|
||||
public int? TranscodingAudioChannels { get; set; }
|
||||
/// <summary>Optional. The container to transcode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodingContainer")]
|
||||
public string? TranscodingContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodingContainer")]
|
||||
public string TranscodingContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding protocol.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodingProtocol")]
|
||||
public string? TranscodingProtocol { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodingProtocol")]
|
||||
public string TranscodingProtocol { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The user id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class UniversalRequestBuilderGetRequestConfiguration : RequestConfiguration<UniversalRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets an audio stream.
|
||||
/// </summary>
|
||||
public class UniversalRequestBuilderHeadQueryParameters {
|
||||
/// <summary>Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.</summary>
|
||||
[QueryParameter("audioBitRate")]
|
||||
public int? AudioBitRate { get; set; }
|
||||
/// <summary>Optional. The audio codec to transcode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("audioCodec")]
|
||||
public string AudioCodec { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Whether to break on non key frames.</summary>
|
||||
[QueryParameter("breakOnNonKeyFrames")]
|
||||
public bool? BreakOnNonKeyFrames { get; set; }
|
||||
/// <summary>Optional. The audio container.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("container")]
|
||||
public string[]? Container { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("container")]
|
||||
public string[] Container { get; set; }
|
||||
#endif
|
||||
/// <summary>The device id of the client requesting. Used to stop encoding processes when needed.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("deviceId")]
|
||||
public string? DeviceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("deviceId")]
|
||||
public string DeviceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether to enable redirection. Defaults to true.</summary>
|
||||
[QueryParameter("enableRedirection")]
|
||||
public bool? EnableRedirection { get; set; }
|
||||
/// <summary>Optional. Whether to enable remote media.</summary>
|
||||
[QueryParameter("enableRemoteMedia")]
|
||||
public bool? EnableRemoteMedia { get; set; }
|
||||
/// <summary>Optional. The maximum audio bit depth.</summary>
|
||||
[QueryParameter("maxAudioBitDepth")]
|
||||
public int? MaxAudioBitDepth { get; set; }
|
||||
/// <summary>Optional. The maximum number of audio channels.</summary>
|
||||
[QueryParameter("maxAudioChannels")]
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
/// <summary>Optional. The maximum audio sample rate.</summary>
|
||||
[QueryParameter("maxAudioSampleRate")]
|
||||
public int? MaxAudioSampleRate { get; set; }
|
||||
/// <summary>Optional. The maximum streaming bitrate.</summary>
|
||||
[QueryParameter("maxStreamingBitrate")]
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
/// <summary>The media version id, if playing an alternate version.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string? MediaSourceId { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("mediaSourceId")]
|
||||
public string MediaSourceId { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.</summary>
|
||||
[QueryParameter("startTimeTicks")]
|
||||
public long? StartTimeTicks { get; set; }
|
||||
/// <summary>Optional. The number of how many audio channels to transcode to.</summary>
|
||||
[QueryParameter("transcodingAudioChannels")]
|
||||
public int? TranscodingAudioChannels { get; set; }
|
||||
/// <summary>Optional. The container to transcode to.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodingContainer")]
|
||||
public string? TranscodingContainer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodingContainer")]
|
||||
public string TranscodingContainer { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The transcoding protocol.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("transcodingProtocol")]
|
||||
public string? TranscodingProtocol { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("transcodingProtocol")]
|
||||
public string TranscodingProtocol { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The user id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class UniversalRequestBuilderHeadRequestConfiguration : RequestConfiguration<UniversalRequestBuilderHeadQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls1;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Hls;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.MainM3u8;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.MasterM3u8;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.StreamNamespace;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.StreamWithContainer;
|
||||
using Jellyfin.Sdk.Generated.Audio.Item.Universal;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Audio.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}
|
||||
/// </summary>
|
||||
public class WithItemItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The hls property</summary>
|
||||
public HlsRequestBuilder Hls { get =>
|
||||
new HlsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The hls1 property</summary>
|
||||
public Hls1RequestBuilder Hls1 { get =>
|
||||
new Hls1RequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The mainM3u8 property</summary>
|
||||
public MainM3u8RequestBuilder MainM3u8 { get =>
|
||||
new MainM3u8RequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The masterM3u8 property</summary>
|
||||
public MasterM3u8RequestBuilder MasterM3u8 { get =>
|
||||
new MasterM3u8RequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The stream property</summary>
|
||||
public StreamRequestBuilder Stream { get =>
|
||||
new StreamRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The universal property</summary>
|
||||
public UniversalRequestBuilder Universal { get =>
|
||||
new UniversalRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithItemItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithItemItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithItemItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithItemItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Audio/{itemId}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Audio\{itemId}\stream.{container}
|
||||
/// </summary>
|
||||
/// <param name="container">The audio container.</param>
|
||||
public StreamWithContainerRequestBuilder StreamWithContainer(string container) {
|
||||
if(string.IsNullOrEmpty(container)) throw new ArgumentNullException(nameof(container));
|
||||
return new StreamWithContainerRequestBuilder(PathParameters, RequestAdapter, container);
|
||||
}
|
||||
}
|
||||
}
|
43
src/Jellyfin.Sdk/Generated/Auth/AuthRequestBuilder.cs
Normal file
43
src/Jellyfin.Sdk/Generated/Auth/AuthRequestBuilder.cs
Normal file
@ -0,0 +1,43 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Auth.Keys;
|
||||
using Jellyfin.Sdk.Generated.Auth.PasswordResetProviders;
|
||||
using Jellyfin.Sdk.Generated.Auth.Providers;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Auth {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Auth
|
||||
/// </summary>
|
||||
public class AuthRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Keys property</summary>
|
||||
public KeysRequestBuilder Keys { get =>
|
||||
new KeysRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The PasswordResetProviders property</summary>
|
||||
public PasswordResetProvidersRequestBuilder PasswordResetProviders { get =>
|
||||
new PasswordResetProvidersRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Providers property</summary>
|
||||
public ProvidersRequestBuilder Providers { get =>
|
||||
new ProvidersRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AuthRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AuthRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new AuthRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public AuthRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Auth.Keys.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Auth\Keys\{key}
|
||||
/// </summary>
|
||||
public class WithKeyItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new WithKeyItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithKeyItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/Keys/{key}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithKeyItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithKeyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/Keys/{key}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Remove an api key.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Remove an api key.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public WithKeyItemRequestBuilder WithUrl(string rawUrl) {
|
||||
return new WithKeyItemRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithKeyItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
134
src/Jellyfin.Sdk/Generated/Auth/Keys/KeysRequestBuilder.cs
Normal file
134
src/Jellyfin.Sdk/Generated/Auth/Keys/KeysRequestBuilder.cs
Normal file
@ -0,0 +1,134 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Auth.Keys.Item;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Auth.Keys {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Auth\Keys
|
||||
/// </summary>
|
||||
public class KeysRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Auth.Keys.item collection</summary>
|
||||
/// <param name="position">The access token to delete.</param>
|
||||
public WithKeyItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("key", position);
|
||||
return new WithKeyItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new KeysRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public KeysRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/Keys?app={app}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new KeysRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public KeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/Keys?app={app}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all keys.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<AuthenticationInfoQueryResult?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<AuthenticationInfoQueryResult> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<AuthenticationInfoQueryResult>(requestInfo, AuthenticationInfoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Create a new api key.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task PostAsync(Action<RequestConfiguration<KeysRequestBuilderPostQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task PostAsync(Action<RequestConfiguration<KeysRequestBuilderPostQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToPostRequestInformation(requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all keys.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Create a new api key.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<KeysRequestBuilderPostQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<KeysRequestBuilderPostQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public KeysRequestBuilder WithUrl(string rawUrl) {
|
||||
return new KeysRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class KeysRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Create a new api key.
|
||||
/// </summary>
|
||||
public class KeysRequestBuilderPostQueryParameters {
|
||||
/// <summary>Name of the app using the authentication key.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("app")]
|
||||
public string? App { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("app")]
|
||||
public string App { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class KeysRequestBuilderPostRequestConfiguration : RequestConfiguration<KeysRequestBuilderPostQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Auth.PasswordResetProviders {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Auth\PasswordResetProviders
|
||||
/// </summary>
|
||||
public class PasswordResetProvidersRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new PasswordResetProvidersRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public PasswordResetProvidersRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/PasswordResetProviders", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new PasswordResetProvidersRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public PasswordResetProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/PasswordResetProviders", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all password reset providers.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<List<NameIdPair>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<List<NameIdPair>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var collectionResult = await RequestAdapter.SendCollectionAsync<NameIdPair>(requestInfo, NameIdPair.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
return collectionResult?.ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all password reset providers.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public PasswordResetProvidersRequestBuilder WithUrl(string rawUrl) {
|
||||
return new PasswordResetProvidersRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class PasswordResetProvidersRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Auth.Providers {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Auth\Providers
|
||||
/// </summary>
|
||||
public class ProvidersRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ProvidersRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ProvidersRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/Providers", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ProvidersRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Auth/Providers", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all auth providers.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<List<NameIdPair>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<List<NameIdPair>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var collectionResult = await RequestAdapter.SendCollectionAsync<NameIdPair>(requestInfo, NameIdPair.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
return collectionResult?.ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all auth providers.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ProvidersRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ProvidersRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ProvidersRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
277
src/Jellyfin.Sdk/Generated/BaseJellyfinApiClient.cs
Normal file
277
src/Jellyfin.Sdk/Generated/BaseJellyfinApiClient.cs
Normal file
@ -0,0 +1,277 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Albums;
|
||||
using Jellyfin.Sdk.Generated.Artists;
|
||||
using Jellyfin.Sdk.Generated.Audio;
|
||||
using Jellyfin.Sdk.Generated.Auth;
|
||||
using Jellyfin.Sdk.Generated.Branding;
|
||||
using Jellyfin.Sdk.Generated.Channels;
|
||||
using Jellyfin.Sdk.Generated.ClientLog;
|
||||
using Jellyfin.Sdk.Generated.Collections;
|
||||
using Jellyfin.Sdk.Generated.Devices;
|
||||
using Jellyfin.Sdk.Generated.DisplayPreferences;
|
||||
using Jellyfin.Sdk.Generated.Dlna;
|
||||
using Jellyfin.Sdk.Generated.EnvironmentNamespace;
|
||||
using Jellyfin.Sdk.Generated.FallbackFont;
|
||||
using Jellyfin.Sdk.Generated.Genres;
|
||||
using Jellyfin.Sdk.Generated.GetUtcTime;
|
||||
using Jellyfin.Sdk.Generated.Images;
|
||||
using Jellyfin.Sdk.Generated.Items;
|
||||
using Jellyfin.Sdk.Generated.Libraries;
|
||||
using Jellyfin.Sdk.Generated.Library;
|
||||
using Jellyfin.Sdk.Generated.LiveStreams;
|
||||
using Jellyfin.Sdk.Generated.LiveTv;
|
||||
using Jellyfin.Sdk.Generated.Localization;
|
||||
using Jellyfin.Sdk.Generated.Movies;
|
||||
using Jellyfin.Sdk.Generated.MusicGenres;
|
||||
using Jellyfin.Sdk.Generated.Notifications;
|
||||
using Jellyfin.Sdk.Generated.Packages;
|
||||
using Jellyfin.Sdk.Generated.Persons;
|
||||
using Jellyfin.Sdk.Generated.Playback;
|
||||
using Jellyfin.Sdk.Generated.Playlists;
|
||||
using Jellyfin.Sdk.Generated.Plugins;
|
||||
using Jellyfin.Sdk.Generated.Providers;
|
||||
using Jellyfin.Sdk.Generated.QuickConnect;
|
||||
using Jellyfin.Sdk.Generated.Repositories;
|
||||
using Jellyfin.Sdk.Generated.ScheduledTasks;
|
||||
using Jellyfin.Sdk.Generated.Search;
|
||||
using Jellyfin.Sdk.Generated.Sessions;
|
||||
using Jellyfin.Sdk.Generated.Shows;
|
||||
using Jellyfin.Sdk.Generated.Songs;
|
||||
using Jellyfin.Sdk.Generated.Startup;
|
||||
using Jellyfin.Sdk.Generated.Studios;
|
||||
using Jellyfin.Sdk.Generated.SyncPlay;
|
||||
using Jellyfin.Sdk.Generated.System;
|
||||
using Jellyfin.Sdk.Generated.Tmdb;
|
||||
using Jellyfin.Sdk.Generated.Trailers;
|
||||
using Jellyfin.Sdk.Generated.Users;
|
||||
using Jellyfin.Sdk.Generated.Videos;
|
||||
using Jellyfin.Sdk.Generated.Web;
|
||||
using Jellyfin.Sdk.Generated.Years;
|
||||
using Jellyfin.Sdk.Internal;
|
||||
using Microsoft.Kiota.Abstractions.Extensions;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using Microsoft.Kiota.Serialization.Form;
|
||||
using Microsoft.Kiota.Serialization.Json;
|
||||
using Microsoft.Kiota.Serialization.Multipart;
|
||||
using Microsoft.Kiota.Serialization.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated {
|
||||
/// <summary>
|
||||
/// The main entry point of the SDK, exposes the configuration and the fluent API.
|
||||
/// </summary>
|
||||
public class BaseJellyfinApiClient : BaseRequestBuilder {
|
||||
/// <summary>The Albums property</summary>
|
||||
public AlbumsRequestBuilder Albums { get =>
|
||||
new AlbumsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Artists property</summary>
|
||||
public ArtistsRequestBuilder Artists { get =>
|
||||
new ArtistsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Audio property</summary>
|
||||
public AudioRequestBuilder Audio { get =>
|
||||
new AudioRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Auth property</summary>
|
||||
public AuthRequestBuilder Auth { get =>
|
||||
new AuthRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Branding property</summary>
|
||||
public BrandingRequestBuilder Branding { get =>
|
||||
new BrandingRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Channels property</summary>
|
||||
public ChannelsRequestBuilder Channels { get =>
|
||||
new ChannelsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The ClientLog property</summary>
|
||||
public ClientLogRequestBuilder ClientLog { get =>
|
||||
new ClientLogRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Collections property</summary>
|
||||
public CollectionsRequestBuilder Collections { get =>
|
||||
new CollectionsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Devices property</summary>
|
||||
public DevicesRequestBuilder Devices { get =>
|
||||
new DevicesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The DisplayPreferences property</summary>
|
||||
public DisplayPreferencesRequestBuilder DisplayPreferences { get =>
|
||||
new DisplayPreferencesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Dlna property</summary>
|
||||
public DlnaRequestBuilder Dlna { get =>
|
||||
new DlnaRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Environment property</summary>
|
||||
public EnvironmentRequestBuilder Environment { get =>
|
||||
new EnvironmentRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The FallbackFont property</summary>
|
||||
public FallbackFontRequestBuilder FallbackFont { get =>
|
||||
new FallbackFontRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Genres property</summary>
|
||||
public GenresRequestBuilder Genres { get =>
|
||||
new GenresRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The GetUtcTime property</summary>
|
||||
public GetUtcTimeRequestBuilder GetUtcTime { get =>
|
||||
new GetUtcTimeRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Images property</summary>
|
||||
public ImagesRequestBuilder Images { get =>
|
||||
new ImagesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Items property</summary>
|
||||
public ItemsRequestBuilder Items { get =>
|
||||
new ItemsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Libraries property</summary>
|
||||
public LibrariesRequestBuilder Libraries { get =>
|
||||
new LibrariesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Library property</summary>
|
||||
public LibraryRequestBuilder Library { get =>
|
||||
new LibraryRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The LiveStreams property</summary>
|
||||
public LiveStreamsRequestBuilder LiveStreams { get =>
|
||||
new LiveStreamsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The LiveTv property</summary>
|
||||
public LiveTvRequestBuilder LiveTv { get =>
|
||||
new LiveTvRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Localization property</summary>
|
||||
public LocalizationRequestBuilder Localization { get =>
|
||||
new LocalizationRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Movies property</summary>
|
||||
public MoviesRequestBuilder Movies { get =>
|
||||
new MoviesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The MusicGenres property</summary>
|
||||
public MusicGenresRequestBuilder MusicGenres { get =>
|
||||
new MusicGenresRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Notifications property</summary>
|
||||
public NotificationsRequestBuilder Notifications { get =>
|
||||
new NotificationsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Packages property</summary>
|
||||
public PackagesRequestBuilder Packages { get =>
|
||||
new PackagesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Persons property</summary>
|
||||
public PersonsRequestBuilder Persons { get =>
|
||||
new PersonsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Playback property</summary>
|
||||
public PlaybackRequestBuilder Playback { get =>
|
||||
new PlaybackRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Playlists property</summary>
|
||||
public PlaylistsRequestBuilder Playlists { get =>
|
||||
new PlaylistsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Plugins property</summary>
|
||||
public PluginsRequestBuilder Plugins { get =>
|
||||
new PluginsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Providers property</summary>
|
||||
public ProvidersRequestBuilder Providers { get =>
|
||||
new ProvidersRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The QuickConnect property</summary>
|
||||
public QuickConnectRequestBuilder QuickConnect { get =>
|
||||
new QuickConnectRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Repositories property</summary>
|
||||
public RepositoriesRequestBuilder Repositories { get =>
|
||||
new RepositoriesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The ScheduledTasks property</summary>
|
||||
public ScheduledTasksRequestBuilder ScheduledTasks { get =>
|
||||
new ScheduledTasksRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Search property</summary>
|
||||
public SearchRequestBuilder Search { get =>
|
||||
new SearchRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Sessions property</summary>
|
||||
public SessionsRequestBuilder Sessions { get =>
|
||||
new SessionsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Shows property</summary>
|
||||
public ShowsRequestBuilder Shows { get =>
|
||||
new ShowsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Songs property</summary>
|
||||
public SongsRequestBuilder Songs { get =>
|
||||
new SongsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Startup property</summary>
|
||||
public StartupRequestBuilder Startup { get =>
|
||||
new StartupRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Studios property</summary>
|
||||
public StudiosRequestBuilder Studios { get =>
|
||||
new StudiosRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The SyncPlay property</summary>
|
||||
public SyncPlayRequestBuilder SyncPlay { get =>
|
||||
new SyncPlayRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The System property</summary>
|
||||
public SystemRequestBuilder System { get =>
|
||||
new SystemRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Tmdb property</summary>
|
||||
public TmdbRequestBuilder Tmdb { get =>
|
||||
new TmdbRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Trailers property</summary>
|
||||
public TrailersRequestBuilder Trailers { get =>
|
||||
new TrailersRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Users property</summary>
|
||||
public UsersRequestBuilder Users { get =>
|
||||
new UsersRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Videos property</summary>
|
||||
public VideosRequestBuilder Videos { get =>
|
||||
new VideosRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The web property</summary>
|
||||
public WebRequestBuilder Web { get =>
|
||||
new WebRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Years property</summary>
|
||||
public YearsRequestBuilder Years { get =>
|
||||
new YearsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new BaseJellyfinApiClient and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public BaseJellyfinApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>()) {
|
||||
ApiClientBuilder.RegisterDefaultSerializer<JsonSerializationWriterFactory>();
|
||||
ApiClientBuilder.RegisterDefaultSerializer<TextSerializationWriterFactory>();
|
||||
ApiClientBuilder.RegisterDefaultSerializer<FormSerializationWriterFactory>();
|
||||
ApiClientBuilder.RegisterDefaultSerializer<MultipartSerializationWriterFactory>();
|
||||
ApiClientBuilder.RegisterDefaultDeserializer<JellyfinParseNodeFactory>();
|
||||
ApiClientBuilder.RegisterDefaultDeserializer<TextParseNodeFactory>();
|
||||
ApiClientBuilder.RegisterDefaultDeserializer<FormParseNodeFactory>();
|
||||
if (string.IsNullOrEmpty(RequestAdapter.BaseUrl)) {
|
||||
RequestAdapter.BaseUrl = "http://localhost";
|
||||
}
|
||||
PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Branding.Configuration;
|
||||
using Jellyfin.Sdk.Generated.Branding.Css;
|
||||
using Jellyfin.Sdk.Generated.Branding.CssCss;
|
||||
using Jellyfin.Sdk.Generated.Branding.Splashscreen;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Branding {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Branding
|
||||
/// </summary>
|
||||
public class BrandingRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Configuration property</summary>
|
||||
public ConfigurationRequestBuilder Configuration { get =>
|
||||
new ConfigurationRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Css property</summary>
|
||||
public CssRequestBuilder Css { get =>
|
||||
new CssRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The CssCss property</summary>
|
||||
public CssCssRequestBuilder CssCss { get =>
|
||||
new CssCssRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Splashscreen property</summary>
|
||||
public SplashscreenRequestBuilder Splashscreen { get =>
|
||||
new SplashscreenRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new BrandingRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public BrandingRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new BrandingRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public BrandingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Branding.Configuration {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Branding\Configuration
|
||||
/// </summary>
|
||||
public class ConfigurationRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ConfigurationRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConfigurationRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Configuration", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ConfigurationRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConfigurationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Configuration", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets branding configuration.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BrandingOptions?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BrandingOptions> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BrandingOptions>(requestInfo, BrandingOptions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets branding configuration.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ConfigurationRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ConfigurationRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ConfigurationRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
74
src/Jellyfin.Sdk/Generated/Branding/Css/CssRequestBuilder.cs
Normal file
74
src/Jellyfin.Sdk/Generated/Branding/Css/CssRequestBuilder.cs
Normal file
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Branding.Css {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Branding\Css
|
||||
/// </summary>
|
||||
public class CssRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new CssRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public CssRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Css", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new CssRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public CssRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Css", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets branding css.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<string?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<string> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets branding css.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public CssRequestBuilder WithUrl(string rawUrl) {
|
||||
return new CssRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class CssRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Branding.CssCss {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Branding\Css.css
|
||||
/// </summary>
|
||||
public class CssCssRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new CssCssRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public CssCssRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Css.css", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new CssCssRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public CssCssRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Css.css", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets branding css.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<string?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<string> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets branding css.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public CssCssRequestBuilder WithUrl(string rawUrl) {
|
||||
return new CssCssRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class CssCssRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,226 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Branding.Splashscreen {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Branding\Splashscreen
|
||||
/// </summary>
|
||||
public class SplashscreenRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new SplashscreenRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public SplashscreenRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Splashscreen{?backgroundColor*,blur*,fillHeight*,fillWidth*,foregroundLayer*,format*,height*,maxHeight*,maxWidth*,quality*,tag*,width*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new SplashscreenRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public SplashscreenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Branding/Splashscreen{?backgroundColor*,blur*,fillHeight*,fillWidth*,foregroundLayer*,format*,height*,maxHeight*,maxWidth*,quality*,tag*,width*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Delete a custom splashscreen.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Generates or gets the splashscreen.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<SplashscreenRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<SplashscreenRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Uploads a custom splashscreen.The body is expected to the image contents base64 encoded.
|
||||
/// </summary>
|
||||
/// <param name="body">Binary request body</param>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task PostAsync(Stream body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task PostAsync(Stream body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
_ = body ?? throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"400", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
{"403", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Delete a custom splashscreen.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Generates or gets the splashscreen.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<SplashscreenRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<SplashscreenRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "image/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Uploads a custom splashscreen.The body is expected to the image contents base64 encoded.
|
||||
/// </summary>
|
||||
/// <param name="body">Binary request body</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(Stream body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(Stream body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
_ = body ?? throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
requestInfo.SetStreamContent(body, "image/*");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public SplashscreenRequestBuilder WithUrl(string rawUrl) {
|
||||
return new SplashscreenRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class SplashscreenRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Generates or gets the splashscreen.
|
||||
/// </summary>
|
||||
public class SplashscreenRequestBuilderGetQueryParameters {
|
||||
/// <summary>Apply a background color for transparent images.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("backgroundColor")]
|
||||
public string? BackgroundColor { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("backgroundColor")]
|
||||
public string BackgroundColor { get; set; }
|
||||
#endif
|
||||
/// <summary>Blur image.</summary>
|
||||
[QueryParameter("blur")]
|
||||
public int? Blur { get; set; }
|
||||
/// <summary>Height of box to fill.</summary>
|
||||
[QueryParameter("fillHeight")]
|
||||
public int? FillHeight { get; set; }
|
||||
/// <summary>Width of box to fill.</summary>
|
||||
[QueryParameter("fillWidth")]
|
||||
public int? FillWidth { get; set; }
|
||||
/// <summary>Apply a foreground layer on top of the image.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("foregroundLayer")]
|
||||
public string? ForegroundLayer { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("foregroundLayer")]
|
||||
public string ForegroundLayer { get; set; }
|
||||
#endif
|
||||
/// <summary>Determines the output format of the image - original,gif,jpg,png.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("format")]
|
||||
public string? Format { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("format")]
|
||||
public string Format { get; set; }
|
||||
#endif
|
||||
/// <summary>The fixed image height to return.</summary>
|
||||
[QueryParameter("height")]
|
||||
public int? Height { get; set; }
|
||||
/// <summary>The maximum image height to return.</summary>
|
||||
[QueryParameter("maxHeight")]
|
||||
public int? MaxHeight { get; set; }
|
||||
/// <summary>The maximum image width to return.</summary>
|
||||
[QueryParameter("maxWidth")]
|
||||
public int? MaxWidth { get; set; }
|
||||
/// <summary>Quality setting, from 0-100.</summary>
|
||||
[QueryParameter("quality")]
|
||||
public int? Quality { get; set; }
|
||||
/// <summary>Supply the cache tag from the item object to receive strong caching headers.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("tag")]
|
||||
public string? Tag { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("tag")]
|
||||
public string Tag { get; set; }
|
||||
#endif
|
||||
/// <summary>The fixed image width to return.</summary>
|
||||
[QueryParameter("width")]
|
||||
public int? Width { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class SplashscreenRequestBuilderGetRequestConfiguration : RequestConfiguration<SplashscreenRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class SplashscreenRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
124
src/Jellyfin.Sdk/Generated/Channels/ChannelsRequestBuilder.cs
Normal file
124
src/Jellyfin.Sdk/Generated/Channels/ChannelsRequestBuilder.cs
Normal file
@ -0,0 +1,124 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Channels.Features;
|
||||
using Jellyfin.Sdk.Generated.Channels.Item;
|
||||
using Jellyfin.Sdk.Generated.Channels.Items;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels
|
||||
/// </summary>
|
||||
public class ChannelsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Features property</summary>
|
||||
public FeaturesRequestBuilder Features { get =>
|
||||
new FeaturesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Items property</summary>
|
||||
public ItemsRequestBuilder Items { get =>
|
||||
new ItemsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Channels.item collection</summary>
|
||||
/// <param name="position">Channel id.</param>
|
||||
public WithChannelItemRequestBuilder this[Guid position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("channelId", position);
|
||||
return new WithChannelItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Channels.item collection</summary>
|
||||
/// <param name="position">Channel id.</param>
|
||||
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||
public WithChannelItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("channelId", position);
|
||||
return new WithChannelItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new ChannelsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ChannelsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels{?isFavorite*,limit*,startIndex*,supportsLatestItems*,supportsMediaDeletion*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ChannelsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels{?isFavorite*,limit*,startIndex*,supportsLatestItems*,supportsMediaDeletion*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets available channels.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<ChannelsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<ChannelsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets available channels.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ChannelsRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ChannelsRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ChannelsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ChannelsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets available channels.
|
||||
/// </summary>
|
||||
public class ChannelsRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Filter by channels that are favorite.</summary>
|
||||
[QueryParameter("isFavorite")]
|
||||
public bool? IsFavorite { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. The record index to start at. All items with a lower index will be dropped from the results.</summary>
|
||||
[QueryParameter("startIndex")]
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>Optional. Filter by channels that support getting latest items.</summary>
|
||||
[QueryParameter("supportsLatestItems")]
|
||||
public bool? SupportsLatestItems { get; set; }
|
||||
/// <summary>Optional. Filter by channels that support media deletion.</summary>
|
||||
[QueryParameter("supportsMediaDeletion")]
|
||||
public bool? SupportsMediaDeletion { get; set; }
|
||||
/// <summary>User Id to filter by. Use System.Guid.Empty to not filter by user.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ChannelsRequestBuilderGetRequestConfiguration : RequestConfiguration<ChannelsRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels.Features {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels\Features
|
||||
/// </summary>
|
||||
public class FeaturesRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new FeaturesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public FeaturesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/Features", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new FeaturesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public FeaturesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/Features", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all channel features.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<List<ChannelFeatures>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<List<ChannelFeatures>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var collectionResult = await RequestAdapter.SendCollectionAsync<ChannelFeatures>(requestInfo, ChannelFeatures.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
return collectionResult?.ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all channel features.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public FeaturesRequestBuilder WithUrl(string rawUrl) {
|
||||
return new FeaturesRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class FeaturesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels.Item.Features {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels\{channelId}\Features
|
||||
/// </summary>
|
||||
public class FeaturesRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new FeaturesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public FeaturesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/{channelId}/Features", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new FeaturesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public FeaturesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/{channelId}/Features", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get channel features.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<ChannelFeatures?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<ChannelFeatures> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<ChannelFeatures>(requestInfo, ChannelFeatures.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get channel features.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public FeaturesRequestBuilder WithUrl(string rawUrl) {
|
||||
return new FeaturesRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class FeaturesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels.Item.Items {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels\{channelId}\Items
|
||||
/// </summary>
|
||||
public class ItemsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ItemsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ItemsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/{channelId}/Items{?fields*,filters*,folderId*,limit*,sortBy*,sortOrder*,startIndex*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ItemsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/{channelId}/Items{?fields*,filters*,folderId*,limit*,sortBy*,sortOrder*,startIndex*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get channel items.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<ItemsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<ItemsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get channel items.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ItemsRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<ItemsRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ItemsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ItemsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get channel items.
|
||||
/// </summary>
|
||||
public class ItemsRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional filters to apply.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("filters")]
|
||||
public string[]? Filters { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("filters")]
|
||||
public string[] Filters { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Folder Id.</summary>
|
||||
[QueryParameter("folderId")]
|
||||
public Guid? FolderId { get; set; }
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("sortBy")]
|
||||
public string[]? SortBy { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("sortBy")]
|
||||
public string[] SortBy { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Sort Order - Ascending,Descending.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("sortOrder")]
|
||||
public string[]? SortOrder { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("sortOrder")]
|
||||
public string[] SortOrder { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The record index to start at. All items with a lower index will be dropped from the results.</summary>
|
||||
[QueryParameter("startIndex")]
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>Optional. User Id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ItemsRequestBuilderGetRequestConfiguration : RequestConfiguration<ItemsRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Channels.Item.Features;
|
||||
using Jellyfin.Sdk.Generated.Channels.Item.Items;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels\{channelId}
|
||||
/// </summary>
|
||||
public class WithChannelItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Features property</summary>
|
||||
public FeaturesRequestBuilder Features { get =>
|
||||
new FeaturesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Items property</summary>
|
||||
public ItemsRequestBuilder Items { get =>
|
||||
new ItemsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithChannelItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithChannelItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/{channelId}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithChannelItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithChannelItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/{channelId}", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Channels.Items.Latest;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels.Items {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels\Items
|
||||
/// </summary>
|
||||
public class ItemsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Latest property</summary>
|
||||
public LatestRequestBuilder Latest { get =>
|
||||
new LatestRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ItemsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ItemsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/Items", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ItemsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/Items", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Channels.Items.Latest {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Channels\Items\Latest
|
||||
/// </summary>
|
||||
public class LatestRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new LatestRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public LatestRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/Items/Latest{?channelIds*,fields*,filters*,limit*,startIndex*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new LatestRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public LatestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Channels/Items/Latest{?channelIds*,fields*,filters*,limit*,startIndex*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets latest channel items.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<BaseItemDtoQueryResult?> GetAsync(Action<RequestConfiguration<LatestRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<BaseItemDtoQueryResult> GetAsync(Action<RequestConfiguration<LatestRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<BaseItemDtoQueryResult>(requestInfo, BaseItemDtoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets latest channel items.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<LatestRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<LatestRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public LatestRequestBuilder WithUrl(string rawUrl) {
|
||||
return new LatestRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets latest channel items.
|
||||
/// </summary>
|
||||
public class LatestRequestBuilderGetQueryParameters {
|
||||
/// <summary>Optional. Specify one or more channel id's, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("channelIds")]
|
||||
public Guid?[]? ChannelIds { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("channelIds")]
|
||||
public Guid?[] ChannelIds { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional fields of information to return in the output.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("fields")]
|
||||
public string[]? Fields { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("fields")]
|
||||
public string[] Fields { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Specify additional filters to apply.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("filters")]
|
||||
public string[]? Filters { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("filters")]
|
||||
public string[] Filters { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. The maximum number of records to return.</summary>
|
||||
[QueryParameter("limit")]
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>Optional. The record index to start at. All items with a lower index will be dropped from the results.</summary>
|
||||
[QueryParameter("startIndex")]
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>Optional. User Id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class LatestRequestBuilderGetRequestConfiguration : RequestConfiguration<LatestRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.ClientLog.Document;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.ClientLog {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \ClientLog
|
||||
/// </summary>
|
||||
public class ClientLogRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Document property</summary>
|
||||
public DocumentRequestBuilder Document { get =>
|
||||
new DocumentRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ClientLogRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ClientLogRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ClientLog", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ClientLogRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ClientLogRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ClientLog", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.ClientLog.Document {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \ClientLog\Document
|
||||
/// </summary>
|
||||
public class DocumentRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new DocumentRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DocumentRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ClientLog/Document", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DocumentRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DocumentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/ClientLog/Document", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Upload a document.
|
||||
/// </summary>
|
||||
/// <param name="body">The request body</param>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<ClientLogDocumentResponseDto?> PostAsync(string body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<ClientLogDocumentResponseDto> PostAsync(string body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"403", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
{"413", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
return await RequestAdapter.SendAsync<ClientLogDocumentResponseDto>(requestInfo, ClientLogDocumentResponseDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Upload a document.
|
||||
/// </summary>
|
||||
/// <param name="body">The request body</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(string body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(string body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
requestInfo.SetContentFromScalar(RequestAdapter, "text/plain", body);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public DocumentRequestBuilder WithUrl(string rawUrl) {
|
||||
return new DocumentRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class DocumentRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Collections.Item;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Collections {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Collections
|
||||
/// </summary>
|
||||
public class CollectionsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Collections.item collection</summary>
|
||||
/// <param name="position">The collection id.</param>
|
||||
public WithCollectionItemRequestBuilder this[Guid position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("collectionId", position);
|
||||
return new WithCollectionItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Collections.item collection</summary>
|
||||
/// <param name="position">The collection id.</param>
|
||||
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||
public WithCollectionItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("collectionId", position);
|
||||
return new WithCollectionItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new CollectionsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public CollectionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Collections{?ids*,isLocked*,name*,parentId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new CollectionsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public CollectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Collections{?ids*,isLocked*,name*,parentId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates a new collection.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<CollectionCreationResult?> PostAsync(Action<RequestConfiguration<CollectionsRequestBuilderPostQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<CollectionCreationResult> PostAsync(Action<RequestConfiguration<CollectionsRequestBuilderPostQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToPostRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<CollectionCreationResult>(requestInfo, CollectionCreationResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates a new collection.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<CollectionsRequestBuilderPostQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<CollectionsRequestBuilderPostQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public CollectionsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new CollectionsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates a new collection.
|
||||
/// </summary>
|
||||
public class CollectionsRequestBuilderPostQueryParameters {
|
||||
/// <summary>Item Ids to add to the collection.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("ids")]
|
||||
public string[]? Ids { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("ids")]
|
||||
public string[] Ids { get; set; }
|
||||
#endif
|
||||
/// <summary>Whether or not to lock the new collection.</summary>
|
||||
[QueryParameter("isLocked")]
|
||||
public bool? IsLocked { get; set; }
|
||||
/// <summary>The name of the collection.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("name")]
|
||||
public string? Name { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("name")]
|
||||
public string Name { get; set; }
|
||||
#endif
|
||||
/// <summary>Optional. Create the collection within a specific folder.</summary>
|
||||
[QueryParameter("parentId")]
|
||||
public Guid? ParentId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class CollectionsRequestBuilderPostRequestConfiguration : RequestConfiguration<CollectionsRequestBuilderPostQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Collections.Item.Items {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Collections\{collectionId}\Items
|
||||
/// </summary>
|
||||
public class ItemsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ItemsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ItemsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Collections/{collectionId}/Items?ids={ids}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ItemsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Collections/{collectionId}/Items?ids={ids}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Removes items from a collection.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<ItemsRequestBuilderDeleteQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<ItemsRequestBuilderDeleteQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Adds items to a collection.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task PostAsync(Action<RequestConfiguration<ItemsRequestBuilderPostQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task PostAsync(Action<RequestConfiguration<ItemsRequestBuilderPostQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToPostRequestInformation(requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Removes items from a collection.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<ItemsRequestBuilderDeleteQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<ItemsRequestBuilderDeleteQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Adds items to a collection.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<ItemsRequestBuilderPostQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<ItemsRequestBuilderPostQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ItemsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ItemsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Removes items from a collection.
|
||||
/// </summary>
|
||||
public class ItemsRequestBuilderDeleteQueryParameters {
|
||||
/// <summary>Item ids, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("ids")]
|
||||
public Guid?[]? Ids { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("ids")]
|
||||
public Guid?[] Ids { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ItemsRequestBuilderDeleteRequestConfiguration : RequestConfiguration<ItemsRequestBuilderDeleteQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Adds items to a collection.
|
||||
/// </summary>
|
||||
public class ItemsRequestBuilderPostQueryParameters {
|
||||
/// <summary>Item ids, comma delimited.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("ids")]
|
||||
public Guid?[]? Ids { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("ids")]
|
||||
public Guid?[] Ids { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ItemsRequestBuilderPostRequestConfiguration : RequestConfiguration<ItemsRequestBuilderPostQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Collections.Item.Items;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Collections.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Collections\{collectionId}
|
||||
/// </summary>
|
||||
public class WithCollectionItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Items property</summary>
|
||||
public ItemsRequestBuilder Items { get =>
|
||||
new ItemsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithCollectionItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithCollectionItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Collections/{collectionId}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithCollectionItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithCollectionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Collections/{collectionId}", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
151
src/Jellyfin.Sdk/Generated/Devices/DevicesRequestBuilder.cs
Normal file
151
src/Jellyfin.Sdk/Generated/Devices/DevicesRequestBuilder.cs
Normal file
@ -0,0 +1,151 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Devices.Info;
|
||||
using Jellyfin.Sdk.Generated.Devices.Options;
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Devices {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Devices
|
||||
/// </summary>
|
||||
public class DevicesRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The Info property</summary>
|
||||
public InfoRequestBuilder Info { get =>
|
||||
new InfoRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The OptionsPath property</summary>
|
||||
public OptionsRequestBuilder OptionsPath { get =>
|
||||
new OptionsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DevicesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DevicesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Devices?id={id}{&supportsSync*,userId*}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DevicesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Devices?id={id}{&supportsSync*,userId*}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Deletes a device.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<DevicesRequestBuilderDeleteQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task DeleteAsync(Action<RequestConfiguration<DevicesRequestBuilderDeleteQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"404", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Devices.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<DeviceInfoQueryResult?> GetAsync(Action<RequestConfiguration<DevicesRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<DeviceInfoQueryResult> GetAsync(Action<RequestConfiguration<DevicesRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<DeviceInfoQueryResult>(requestInfo, DeviceInfoQueryResult.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Deletes a device.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DevicesRequestBuilderDeleteQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DevicesRequestBuilderDeleteQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Devices.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DevicesRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DevicesRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public DevicesRequestBuilder WithUrl(string rawUrl) {
|
||||
return new DevicesRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Deletes a device.
|
||||
/// </summary>
|
||||
public class DevicesRequestBuilderDeleteQueryParameters {
|
||||
/// <summary>Device Id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("id")]
|
||||
public string? Id { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("id")]
|
||||
public string Id { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class DevicesRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DevicesRequestBuilderDeleteQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Devices.
|
||||
/// </summary>
|
||||
public class DevicesRequestBuilderGetQueryParameters {
|
||||
/// <summary>Gets or sets a value indicating whether [supports synchronize].</summary>
|
||||
[QueryParameter("supportsSync")]
|
||||
public bool? SupportsSync { get; set; }
|
||||
/// <summary>Gets or sets the user identifier.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class DevicesRequestBuilderGetRequestConfiguration : RequestConfiguration<DevicesRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Devices.Info {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Devices\Info
|
||||
/// </summary>
|
||||
public class InfoRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new InfoRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InfoRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Devices/Info?id={id}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new InfoRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public InfoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Devices/Info?id={id}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get info for a device.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<DeviceInfo?> GetAsync(Action<RequestConfiguration<InfoRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<DeviceInfo> GetAsync(Action<RequestConfiguration<InfoRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"404", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
return await RequestAdapter.SendAsync<DeviceInfo>(requestInfo, DeviceInfo.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get info for a device.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InfoRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<InfoRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public InfoRequestBuilder WithUrl(string rawUrl) {
|
||||
return new InfoRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get info for a device.
|
||||
/// </summary>
|
||||
public class InfoRequestBuilderGetQueryParameters {
|
||||
/// <summary>Device Id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("id")]
|
||||
public string? Id { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("id")]
|
||||
public string Id { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class InfoRequestBuilderGetRequestConfiguration : RequestConfiguration<InfoRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Devices.Options {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Devices\Options
|
||||
/// </summary>
|
||||
public class OptionsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new OptionsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public OptionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Devices/Options?id={id}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new OptionsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public OptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Devices/Options?id={id}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get options for a device.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<DeviceOptions?> GetAsync(Action<RequestConfiguration<OptionsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<DeviceOptions> GetAsync(Action<RequestConfiguration<OptionsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"404", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
return await RequestAdapter.SendAsync<DeviceOptions>(requestInfo, DeviceOptions.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Update device options.
|
||||
/// </summary>
|
||||
/// <param name="body">A dto representing custom options for a device.</param>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task PostAsync(DeviceOptionsDto body, Action<RequestConfiguration<OptionsRequestBuilderPostQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task PostAsync(DeviceOptionsDto body, Action<RequestConfiguration<OptionsRequestBuilderPostQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
_ = body ?? throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get options for a device.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<OptionsRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<OptionsRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update device options.
|
||||
/// </summary>
|
||||
/// <param name="body">A dto representing custom options for a device.</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(DeviceOptionsDto body, Action<RequestConfiguration<OptionsRequestBuilderPostQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(DeviceOptionsDto body, Action<RequestConfiguration<OptionsRequestBuilderPostQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
_ = body ?? throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public OptionsRequestBuilder WithUrl(string rawUrl) {
|
||||
return new OptionsRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get options for a device.
|
||||
/// </summary>
|
||||
public class OptionsRequestBuilderGetQueryParameters {
|
||||
/// <summary>Device Id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("id")]
|
||||
public string? Id { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("id")]
|
||||
public string Id { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class OptionsRequestBuilderGetRequestConfiguration : RequestConfiguration<OptionsRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Update device options.
|
||||
/// </summary>
|
||||
public class OptionsRequestBuilderPostQueryParameters {
|
||||
/// <summary>Device Id.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("id")]
|
||||
public string? Id { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("id")]
|
||||
public string Id { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class OptionsRequestBuilderPostRequestConfiguration : RequestConfiguration<OptionsRequestBuilderPostQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.DisplayPreferences.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.DisplayPreferences {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \DisplayPreferences
|
||||
/// </summary>
|
||||
public class DisplayPreferencesRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.DisplayPreferences.item collection</summary>
|
||||
/// <param name="position">Display preferences id.</param>
|
||||
public WithDisplayPreferencesItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("displayPreferencesId", position);
|
||||
return new WithDisplayPreferencesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new DisplayPreferencesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DisplayPreferencesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/DisplayPreferences", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DisplayPreferencesRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DisplayPreferencesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/DisplayPreferences", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.DisplayPreferences.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \DisplayPreferences\{displayPreferencesId}
|
||||
/// </summary>
|
||||
public class WithDisplayPreferencesItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new WithDisplayPreferencesItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithDisplayPreferencesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/DisplayPreferences/{displayPreferencesId}?client={client}&userId={userId}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithDisplayPreferencesItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithDisplayPreferencesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/DisplayPreferences/{displayPreferencesId}?client={client}&userId={userId}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Display Preferences.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<DisplayPreferencesDto?> GetAsync(Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<DisplayPreferencesDto> GetAsync(Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendAsync<DisplayPreferencesDto>(requestInfo, DisplayPreferencesDto.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Update Display Preferences.
|
||||
/// </summary>
|
||||
/// <param name="body">Defines the display preferences for any item that supports them (usually Folders).</param>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task PostAsync(DisplayPreferencesDto body, Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderPostQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task PostAsync(DisplayPreferencesDto body, Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderPostQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
_ = body ?? throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||
await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Display Preferences.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderGetQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderGetQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update Display Preferences.
|
||||
/// </summary>
|
||||
/// <param name="body">Defines the display preferences for any item that supports them (usually Folders).</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(DisplayPreferencesDto body, Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderPostQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(DisplayPreferencesDto body, Action<RequestConfiguration<WithDisplayPreferencesItemRequestBuilderPostQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
_ = body ?? throw new ArgumentNullException(nameof(body));
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public WithDisplayPreferencesItemRequestBuilder WithUrl(string rawUrl) {
|
||||
return new WithDisplayPreferencesItemRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Display Preferences.
|
||||
/// </summary>
|
||||
public class WithDisplayPreferencesItemRequestBuilderGetQueryParameters {
|
||||
/// <summary>Client.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("client")]
|
||||
public string? Client { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("client")]
|
||||
public string Client { get; set; }
|
||||
#endif
|
||||
/// <summary>User id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithDisplayPreferencesItemRequestBuilderGetRequestConfiguration : RequestConfiguration<WithDisplayPreferencesItemRequestBuilderGetQueryParameters> {
|
||||
}
|
||||
/// <summary>
|
||||
/// Update Display Preferences.
|
||||
/// </summary>
|
||||
public class WithDisplayPreferencesItemRequestBuilderPostQueryParameters {
|
||||
/// <summary>Client.</summary>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
[QueryParameter("client")]
|
||||
public string? Client { get; set; }
|
||||
#nullable restore
|
||||
#else
|
||||
[QueryParameter("client")]
|
||||
public string Client { get; set; }
|
||||
#endif
|
||||
/// <summary>User Id.</summary>
|
||||
[QueryParameter("userId")]
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithDisplayPreferencesItemRequestBuilderPostRequestConfiguration : RequestConfiguration<WithDisplayPreferencesItemRequestBuilderPostQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
51
src/Jellyfin.Sdk/Generated/Dlna/DlnaRequestBuilder.cs
Normal file
51
src/Jellyfin.Sdk/Generated/Dlna/DlnaRequestBuilder.cs
Normal file
@ -0,0 +1,51 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Dlna.Icons;
|
||||
using Jellyfin.Sdk.Generated.Dlna.Item;
|
||||
using Jellyfin.Sdk.Generated.Dlna.ProfileInfos;
|
||||
using Jellyfin.Sdk.Generated.Dlna.Profiles;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna
|
||||
/// </summary>
|
||||
public class DlnaRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The icons property</summary>
|
||||
public IconsRequestBuilder Icons { get =>
|
||||
new IconsRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The ProfileInfos property</summary>
|
||||
public ProfileInfosRequestBuilder ProfileInfos { get =>
|
||||
new ProfileInfosRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Profiles property</summary>
|
||||
public ProfilesRequestBuilder Profiles { get =>
|
||||
new ProfilesRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Dlna.item collection</summary>
|
||||
/// <param name="position">Server UUID.</param>
|
||||
public WithServerItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("serverId", position);
|
||||
return new WithServerItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new DlnaRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DlnaRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DlnaRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DlnaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
36
src/Jellyfin.Sdk/Generated/Dlna/Icons/IconsRequestBuilder.cs
Normal file
36
src/Jellyfin.Sdk/Generated/Dlna/Icons/IconsRequestBuilder.cs
Normal file
@ -0,0 +1,36 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Dlna.Icons.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Icons {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\icons
|
||||
/// </summary>
|
||||
public class IconsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Dlna.icons.item collection</summary>
|
||||
/// <param name="position">The icon filename.</param>
|
||||
public WithFileNameItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("fileName", position);
|
||||
return new WithFileNameItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new IconsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public IconsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/icons", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new IconsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public IconsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/icons", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Models;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Icons.Item {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\icons\{fileName}
|
||||
/// </summary>
|
||||
public class WithFileNameItemRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new WithFileNameItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithFileNameItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/icons/{fileName}", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new WithFileNameItemRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public WithFileNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/icons/{fileName}", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets a server icon.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
|
||||
{"404", ProblemDetails.CreateFromDiscriminatorValue},
|
||||
};
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets a server icon.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "image/*, application/json, application/json;profile=\"CamelCase\", application/json;profile=\"PascalCase\"");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public WithFileNameItemRequestBuilder WithUrl(string rawUrl) {
|
||||
return new WithFileNameItemRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class WithFileNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ConnectionManager.ConnectionManager {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ConnectionManager\ConnectionManager
|
||||
/// </summary>
|
||||
public class ConnectionManagerRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ConnectionManagerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConnectionManagerRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager/ConnectionManager", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ConnectionManagerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConnectionManagerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager/ConnectionManager", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna media receiver registrar xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna media receiver registrar xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ConnectionManagerRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ConnectionManagerRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ConnectionManagerRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Dlna.Item.ConnectionManager.ConnectionManagerXml;
|
||||
using Jellyfin.Sdk.Generated.Dlna.Item.ConnectionManager.Control;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ConnectionManager {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ConnectionManager
|
||||
/// </summary>
|
||||
public class ConnectionManagerRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The ConnectionManager property</summary>
|
||||
public ConnectionManagerRequestBuilder ConnectionManager { get =>
|
||||
new ConnectionManagerRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The ConnectionManagerXml property</summary>
|
||||
public ConnectionManagerXmlRequestBuilder ConnectionManagerXml { get =>
|
||||
new ConnectionManagerXmlRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Control property</summary>
|
||||
public ControlRequestBuilder Control { get =>
|
||||
new ControlRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ConnectionManagerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConnectionManagerRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ConnectionManagerRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConnectionManagerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna media receiver registrar xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna media receiver registrar xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ConnectionManagerRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ConnectionManagerRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ConnectionManagerRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ConnectionManager.ConnectionManagerXml {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ConnectionManager\ConnectionManager.xml
|
||||
/// </summary>
|
||||
public class ConnectionManagerXmlRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ConnectionManagerXmlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConnectionManagerXmlRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager/ConnectionManager.xml", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ConnectionManagerXmlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ConnectionManagerXmlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager/ConnectionManager.xml", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna media receiver registrar xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna media receiver registrar xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ConnectionManagerXmlRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ConnectionManagerXmlRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ConnectionManagerXmlRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ConnectionManager.Control {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ConnectionManager\Control
|
||||
/// </summary>
|
||||
public class ControlRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ControlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ControlRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager/Control", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ControlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ControlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ConnectionManager/Control", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Process a connection manager control request.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> PostAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> PostAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToPostRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Process a connection manager control request.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ControlRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ControlRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ControlRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ContentDirectory.ContentDirectory {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ContentDirectory\ContentDirectory
|
||||
/// </summary>
|
||||
public class ContentDirectoryRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ContentDirectoryRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ContentDirectoryRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory/ContentDirectory", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ContentDirectoryRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ContentDirectoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory/ContentDirectory", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna content directory xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna content directory xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ContentDirectoryRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ContentDirectoryRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ContentDirectoryRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Dlna.Item.ContentDirectory.ContentDirectoryXml;
|
||||
using Jellyfin.Sdk.Generated.Dlna.Item.ContentDirectory.Control;
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ContentDirectory {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ContentDirectory
|
||||
/// </summary>
|
||||
public class ContentDirectoryRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>The ContentDirectory property</summary>
|
||||
public ContentDirectoryRequestBuilder ContentDirectory { get =>
|
||||
new ContentDirectoryRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The ContentDirectoryXml property</summary>
|
||||
public ContentDirectoryXmlRequestBuilder ContentDirectoryXml { get =>
|
||||
new ContentDirectoryXmlRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>The Control property</summary>
|
||||
public ControlRequestBuilder Control { get =>
|
||||
new ControlRequestBuilder(PathParameters, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ContentDirectoryRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ContentDirectoryRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ContentDirectoryRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ContentDirectoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna content directory xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna content directory xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ContentDirectoryRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ContentDirectoryRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ContentDirectoryRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ContentDirectory.ContentDirectoryXml {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ContentDirectory\ContentDirectory.xml
|
||||
/// </summary>
|
||||
public class ContentDirectoryXmlRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ContentDirectoryXmlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ContentDirectoryXmlRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory/ContentDirectory.xml", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ContentDirectoryXmlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ContentDirectoryXmlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory/ContentDirectory.xml", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna content directory xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets Dlna content directory xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ContentDirectoryXmlRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ContentDirectoryXmlRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ContentDirectoryXmlRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.ContentDirectory.Control {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\ContentDirectory\Control
|
||||
/// </summary>
|
||||
public class ControlRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new ControlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ControlRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory/Control", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new ControlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public ControlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/ContentDirectory/Control", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Process a content directory control request.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> PostAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> PostAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToPostRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Process a content directory control request.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToPostRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public ControlRequestBuilder WithUrl(string rawUrl) {
|
||||
return new ControlRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class ControlRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.Description {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\description
|
||||
/// </summary>
|
||||
public class DescriptionRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new DescriptionRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DescriptionRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/description", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DescriptionRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DescriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/description", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Description Xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Description Xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public DescriptionRequestBuilder WithUrl(string rawUrl) {
|
||||
return new DescriptionRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class DescriptionRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// <auto-generated/>
|
||||
using Microsoft.Kiota.Abstractions.Serialization;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.DescriptionXml {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\description.xml
|
||||
/// </summary>
|
||||
public class DescriptionXmlRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>
|
||||
/// Instantiates a new DescriptionXmlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DescriptionXmlRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/description.xml", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new DescriptionXmlRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public DescriptionXmlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/description.xml", rawUrl) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Description Xml.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public async Task<Stream?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public async Task<Stream> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default) {
|
||||
#endif
|
||||
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||
return await RequestAdapter.SendPrimitiveAsync<Stream>(requestInfo, default, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// Get Description Xml.
|
||||
/// </summary>
|
||||
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
#nullable enable
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default) {
|
||||
#nullable restore
|
||||
#else
|
||||
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default) {
|
||||
#endif
|
||||
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||
requestInfo.Configure(requestConfiguration);
|
||||
requestInfo.Headers.TryAdd("Accept", "text/xml");
|
||||
return requestInfo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
public DescriptionXmlRequestBuilder WithUrl(string rawUrl) {
|
||||
return new DescriptionXmlRequestBuilder(rawUrl, RequestAdapter);
|
||||
}
|
||||
/// <summary>
|
||||
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||
/// </summary>
|
||||
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||
public class DescriptionXmlRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters> {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// <auto-generated/>
|
||||
using Jellyfin.Sdk.Generated.Dlna.Item.Icons.Item;
|
||||
using Microsoft.Kiota.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
namespace Jellyfin.Sdk.Generated.Dlna.Item.Icons {
|
||||
/// <summary>
|
||||
/// Builds and executes requests for operations under \Dlna\{serverId}\icons
|
||||
/// </summary>
|
||||
public class IconsRequestBuilder : BaseRequestBuilder {
|
||||
/// <summary>Gets an item from the Jellyfin.Sdk.Generated.Dlna.item.icons.item collection</summary>
|
||||
/// <param name="position">The icon filename.</param>
|
||||
public WithFileNameItemRequestBuilder this[string position] { get {
|
||||
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||
urlTplParams.Add("fileName", position);
|
||||
return new WithFileNameItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||
} }
|
||||
/// <summary>
|
||||
/// Instantiates a new IconsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="pathParameters">Path parameters for the request</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public IconsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/icons", pathParameters) {
|
||||
}
|
||||
/// <summary>
|
||||
/// Instantiates a new IconsRequestBuilder and sets the default values.
|
||||
/// </summary>
|
||||
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||
public IconsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/Dlna/{serverId}/icons", rawUrl) {
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user