mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 12:37:47 +00:00
92 lines
3.0 KiB
Java
92 lines
3.0 KiB
Java
/*
|
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
*/
|
|
package dev.plexapi.sdk;
|
|
|
|
import static dev.plexapi.sdk.operations.Operations.RequestOperation;
|
|
|
|
import dev.plexapi.sdk.models.operations.GetTimelineRequest;
|
|
import dev.plexapi.sdk.models.operations.GetTimelineRequestBuilder;
|
|
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
|
|
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest;
|
|
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequestBuilder;
|
|
import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse;
|
|
import dev.plexapi.sdk.operations.GetTimeline;
|
|
import dev.plexapi.sdk.operations.StartUniversalTranscode;
|
|
import java.lang.Exception;
|
|
|
|
/**
|
|
* API Calls that perform operations with Plex Media Server Videos
|
|
*/
|
|
public class Video {
|
|
private final SDKConfiguration sdkConfiguration;
|
|
private final AsyncVideo asyncSDK;
|
|
|
|
Video(SDKConfiguration sdkConfiguration) {
|
|
this.sdkConfiguration = sdkConfiguration;
|
|
this.asyncSDK = new AsyncVideo(this, sdkConfiguration);
|
|
}
|
|
|
|
/**
|
|
* Switches to the async SDK.
|
|
*
|
|
* @return The async SDK
|
|
*/
|
|
public AsyncVideo async() {
|
|
return asyncSDK;
|
|
}
|
|
|
|
/**
|
|
* Get the timeline for a media item
|
|
*
|
|
* <p>Get the timeline for a media item
|
|
*
|
|
* @return The 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 The response from the API call
|
|
* @throws Exception if the API call fails
|
|
*/
|
|
public GetTimelineResponse getTimeline(GetTimelineRequest request) throws Exception {
|
|
RequestOperation<GetTimelineRequest, GetTimelineResponse> operation
|
|
= new GetTimeline.Sync(sdkConfiguration);
|
|
return operation.handleResponse(operation.doRequest(request));
|
|
}
|
|
|
|
/**
|
|
* Start Universal Transcode
|
|
*
|
|
* <p>Begin a Universal Transcode Session
|
|
*
|
|
* @return The 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 The response from the API call
|
|
* @throws Exception if the API call fails
|
|
*/
|
|
public StartUniversalTranscodeResponse startUniversalTranscode(StartUniversalTranscodeRequest request) throws Exception {
|
|
RequestOperation<StartUniversalTranscodeRequest, StartUniversalTranscodeResponse> operation
|
|
= new StartUniversalTranscode.Sync(sdkConfiguration);
|
|
return operation.handleResponse(operation.doRequest(request));
|
|
}
|
|
|
|
}
|