mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-10 12:37:44 +00:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
## Mark Played
|
||||
|
||||
This will mark the provided media key as Played.
|
||||
@@ -0,0 +1,7 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `key` *{`float`}*
|
||||
The media key to mark as played
|
||||
<br/>
|
||||
**Example:** `59398`
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import MarkPlayedResponse from "/content/types/models/operations/mark_played_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.MarkPlayedResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<MarkPlayedResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
<CH.Code>
|
||||
```python MarkPlayed.py
|
||||
import sdk
|
||||
from sdk.models import operations
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.media.mark_played(key=59398)
|
||||
|
||||
if res.status_code == 200:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Media*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
@@ -0,0 +1,3 @@
|
||||
## Mark Unplayed
|
||||
|
||||
This will mark the provided media key as Unplayed.
|
||||
@@ -0,0 +1,7 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `key` *{`float`}*
|
||||
The media key to mark as Unplayed
|
||||
<br/>
|
||||
**Example:** `59398`
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import MarkUnplayedResponse from "/content/types/models/operations/mark_unplayed_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.MarkUnplayedResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<MarkUnplayedResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
<CH.Code>
|
||||
```python MarkUnplayed.py
|
||||
import sdk
|
||||
from sdk.models import operations
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.media.mark_unplayed(key=59398)
|
||||
|
||||
if res.status_code == 200:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Media*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
22
content/pages/01-reference/python/resources/media/media.mdx
Normal file
22
content/pages/01-reference/python/resources/media/media.mdx
Normal file
@@ -0,0 +1,22 @@
|
||||
import MarkPlayed from "./mark_played/mark_played.mdx";
|
||||
import MarkUnplayed from "./mark_unplayed/mark_unplayed.mdx";
|
||||
import UpdatePlayProgress from "./update_play_progress/update_play_progress.mdx";
|
||||
|
||||
## Media
|
||||
API Calls interacting with Plex Media Server Media
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [Mark Played](/python/media/mark_played) - Mark Media Played
|
||||
* [Mark Unplayed](/python/media/mark_unplayed) - Mark Media Unplayed
|
||||
* [Update Play Progress](/python/media/update_play_progress) - Update Media Play Progress
|
||||
|
||||
---
|
||||
<MarkPlayed />
|
||||
|
||||
---
|
||||
<MarkUnplayed />
|
||||
|
||||
---
|
||||
<UpdatePlayProgress />
|
||||
@@ -0,0 +1,3 @@
|
||||
## Update Play Progress
|
||||
|
||||
This API command can be used to update the play progress of a media item.
|
||||
@@ -0,0 +1,13 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `key` *{`str`}*
|
||||
the media key
|
||||
|
||||
---
|
||||
##### `time` *{`float`}*
|
||||
The time, in milliseconds, used to set the media playback progress.
|
||||
|
||||
---
|
||||
##### `state` *{`str`}*
|
||||
The playback state of the media item.
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import UpdatePlayProgressResponse from "/content/types/models/operations/update_play_progress_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.UpdatePlayProgressResponse`}*
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<UpdatePlayProgressResponse/>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
<CH.Code>
|
||||
```python UpdatePlayProgress.py
|
||||
import sdk
|
||||
from sdk.models import operations
|
||||
|
||||
s = sdk.SDK(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.media.update_play_progress(key='string', time=6027.63, state='string')
|
||||
|
||||
if res.status_code == 200:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -0,0 +1,12 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Media*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
Reference in New Issue
Block a user