mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-08 04:20:54 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2
This commit is contained in:
93
src/main/java/dev/plexapi/sdk/AsyncVideo.java
Normal file
93
src/main/java/dev/plexapi/sdk/AsyncVideo.java
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import static dev.plexapi.sdk.operations.Operations.AsyncRequestOperation;
|
||||
|
||||
import dev.plexapi.sdk.models.operations.GetTimelineRequest;
|
||||
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest;
|
||||
import dev.plexapi.sdk.models.operations.async.GetTimelineRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.async.GetTimelineResponse;
|
||||
import dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.async.StartUniversalTranscodeResponse;
|
||||
import dev.plexapi.sdk.operations.GetTimeline;
|
||||
import dev.plexapi.sdk.operations.StartUniversalTranscode;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* API Calls that perform operations with Plex Media Server Videos
|
||||
*/
|
||||
public class AsyncVideo {
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
private final Video syncSDK;
|
||||
|
||||
AsyncVideo(Video syncSDK, SDKConfiguration sdkConfiguration) {
|
||||
this.sdkConfiguration = sdkConfiguration;
|
||||
this.syncSDK = syncSDK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches to the sync SDK.
|
||||
*
|
||||
* @return The sync SDK
|
||||
*/
|
||||
public Video sync() {
|
||||
return syncSDK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the timeline for a media item
|
||||
*
|
||||
* <p>Get the timeline for a media item
|
||||
*
|
||||
* @return The async call builder
|
||||
*/
|
||||
public GetTimelineRequestBuilder getTimeline() {
|
||||
return new GetTimelineRequestBuilder(sdkConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the timeline for a media item
|
||||
*
|
||||
* <p>Get the timeline for a media item
|
||||
*
|
||||
* @param request The request object containing all the parameters for the API call.
|
||||
* @return CompletableFuture<GetTimelineResponse> - The async response
|
||||
*/
|
||||
public CompletableFuture<GetTimelineResponse> getTimeline(GetTimelineRequest request) {
|
||||
AsyncRequestOperation<GetTimelineRequest, GetTimelineResponse> operation
|
||||
= new GetTimeline.Async(sdkConfiguration);
|
||||
return operation.doRequest(request)
|
||||
.thenCompose(operation::handleResponse);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Start Universal Transcode
|
||||
*
|
||||
* <p>Begin a Universal Transcode Session
|
||||
*
|
||||
* @return The async call builder
|
||||
*/
|
||||
public StartUniversalTranscodeRequestBuilder startUniversalTranscode() {
|
||||
return new StartUniversalTranscodeRequestBuilder(sdkConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start Universal Transcode
|
||||
*
|
||||
* <p>Begin a Universal Transcode Session
|
||||
*
|
||||
* @param request The request object containing all the parameters for the API call.
|
||||
* @return CompletableFuture<StartUniversalTranscodeResponse> - The async response
|
||||
*/
|
||||
public CompletableFuture<StartUniversalTranscodeResponse> startUniversalTranscode(StartUniversalTranscodeRequest request) {
|
||||
AsyncRequestOperation<StartUniversalTranscodeRequest, StartUniversalTranscodeResponse> operation
|
||||
= new StartUniversalTranscode.Async(sdkConfiguration);
|
||||
return operation.doRequest(request)
|
||||
.thenCompose(operation::handleResponse);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user