mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 04:20:49 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.404.5
This commit is contained in:
145
src/test/java/dev/plexapi/sdk/MediaTests.java
Normal file
145
src/test/java/dev/plexapi/sdk/MediaTests.java
Normal file
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetThumbImageRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetThumbImageResponse;
|
||||
import dev.plexapi.sdk.models.operations.MarkPlayedResponse;
|
||||
import dev.plexapi.sdk.models.operations.MarkUnplayedResponse;
|
||||
import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse;
|
||||
import java.lang.Exception;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class MediaTests {
|
||||
|
||||
@Disabled // test marked as skipped for java or generated unit tests not production ready yet
|
||||
@Test
|
||||
public void testMedia_MarkPlayed() throws Exception {
|
||||
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
MarkPlayedResponse res = sdk.media().markPlayed()
|
||||
.key(59398d)
|
||||
.call();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Disabled // test marked as skipped for java or generated unit tests not production ready yet
|
||||
@Test
|
||||
public void testMedia_MarkUnplayed() throws Exception {
|
||||
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
MarkUnplayedResponse res = sdk.media().markUnplayed()
|
||||
.key(59398d)
|
||||
.call();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Disabled // test marked as skipped for java or generated unit tests not production ready yet
|
||||
@Test
|
||||
public void testMedia_UpdatePlayProgress_() throws Exception {
|
||||
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
|
||||
.key("<key>")
|
||||
.time(90000d)
|
||||
.state("played")
|
||||
.call();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Disabled // test marked as skipped for java or generated unit tests not production ready yet
|
||||
@Test
|
||||
public void testMedia_GetBannerImage() throws Exception {
|
||||
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetBannerImageRequest req = GetBannerImageRequest.builder()
|
||||
.ratingKey(9518L)
|
||||
.width(396L)
|
||||
.height(396L)
|
||||
.minSize(1L)
|
||||
.upscale(1L)
|
||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||
.build();
|
||||
|
||||
GetBannerImageResponse res = sdk.media().getBannerImage()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Disabled // test marked as skipped for java or generated unit tests not production ready yet
|
||||
@Test
|
||||
public void testMedia_GetThumbImage() throws Exception {
|
||||
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("gcgzw5rz2xovp84b4vha3a40")
|
||||
.clientName("Plex Web")
|
||||
.clientVersion("4.133.0")
|
||||
.clientPlatform("Chrome")
|
||||
.deviceName("Linux")
|
||||
.build();
|
||||
|
||||
GetThumbImageRequest req = GetThumbImageRequest.builder()
|
||||
.ratingKey(9518L)
|
||||
.width(396L)
|
||||
.height(396L)
|
||||
.minSize(1L)
|
||||
.upscale(1L)
|
||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||
.build();
|
||||
|
||||
GetThumbImageResponse res = sdk.media().getThumbImage()
|
||||
.request(req)
|
||||
.call();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user