mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-09 20:57:44 +00:00
124 lines
3.7 KiB
Python
124 lines
3.7 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from enum import Enum
|
|
import httpx
|
|
from plex_api_client import utils
|
|
from plex_api_client.types import BaseModel
|
|
from plex_api_client.utils import FieldMetadata, QueryParamMetadata, validate_open_enum
|
|
import pydantic
|
|
from pydantic.functional_validators import PlainValidator
|
|
from typing_extensions import Annotated, TypedDict
|
|
|
|
|
|
class State(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
r"""The state of the media item"""
|
|
|
|
PLAYING = "playing"
|
|
PAUSED = "paused"
|
|
STOPPED = "stopped"
|
|
|
|
|
|
class GetTimelineRequestTypedDict(TypedDict):
|
|
rating_key: float
|
|
r"""The rating key of the media item"""
|
|
key: str
|
|
r"""The key of the media item to get the timeline for"""
|
|
state: State
|
|
r"""The state of the media item"""
|
|
has_mde: float
|
|
r"""Whether the media item has MDE"""
|
|
time: float
|
|
r"""The time of the media item"""
|
|
duration: float
|
|
r"""The duration of the media item"""
|
|
context: str
|
|
r"""The context of the media item"""
|
|
play_queue_item_id: float
|
|
r"""The play queue item ID of the media item"""
|
|
play_back_time: float
|
|
r"""The playback time of the media item"""
|
|
row: float
|
|
r"""The row of the media item"""
|
|
|
|
|
|
class GetTimelineRequest(BaseModel):
|
|
rating_key: Annotated[
|
|
float,
|
|
pydantic.Field(alias="ratingKey"),
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
]
|
|
r"""The rating key of the media item"""
|
|
|
|
key: Annotated[
|
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
]
|
|
r"""The key of the media item to get the timeline for"""
|
|
|
|
state: Annotated[
|
|
Annotated[State, PlainValidator(validate_open_enum(False))],
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
]
|
|
r"""The state of the media item"""
|
|
|
|
has_mde: Annotated[
|
|
float,
|
|
pydantic.Field(alias="hasMDE"),
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
]
|
|
r"""Whether the media item has MDE"""
|
|
|
|
time: Annotated[
|
|
float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
]
|
|
r"""The time of the media item"""
|
|
|
|
duration: Annotated[
|
|
float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
]
|
|
r"""The duration of the media item"""
|
|
|
|
context: Annotated[
|
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
]
|
|
r"""The context of the media item"""
|
|
|
|
play_queue_item_id: Annotated[
|
|
float,
|
|
pydantic.Field(alias="playQueueItemID"),
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
]
|
|
r"""The play queue item ID of the media item"""
|
|
|
|
play_back_time: Annotated[
|
|
float,
|
|
pydantic.Field(alias="playBackTime"),
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
]
|
|
r"""The playback time of the media item"""
|
|
|
|
row: Annotated[
|
|
float, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
]
|
|
r"""The row of the media item"""
|
|
|
|
|
|
class GetTimelineResponseTypedDict(TypedDict):
|
|
content_type: str
|
|
r"""HTTP response content type for this operation"""
|
|
status_code: int
|
|
r"""HTTP response status code for this operation"""
|
|
raw_response: httpx.Response
|
|
r"""Raw HTTP response; suitable for custom response parsing"""
|
|
|
|
|
|
class GetTimelineResponse(BaseModel):
|
|
content_type: str
|
|
r"""HTTP response content type for this operation"""
|
|
|
|
status_code: int
|
|
r"""HTTP response status code for this operation"""
|
|
|
|
raw_response: httpx.Response
|
|
r"""Raw HTTP response; suitable for custom response parsing"""
|