Initial Commit

This commit is contained in:
Luke Hagar
2024-01-01 15:47:37 -06:00
parent 203c48ae7c
commit f91c1e6f54
4519 changed files with 88021 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
## Delete Library
Delate a library using a specific section

View File

@@ -0,0 +1,7 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
<br/>
**Example:** `1000`

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import DeleteLibraryResponse from "/content/types/models/operations/delete_library_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.DeleteLibraryResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<DeleteLibraryResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python DeleteLibrary.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.delete_library(section_id=1000)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Common Library Items
Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `type` *{`float`}*
item type
---
##### `filter_` *{`Optional[str]`}*
the filter parameter

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetCommonLibraryItemsResponse from "/content/types/models/operations/get_common_library_items_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetCommonLibraryItemsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetCommonLibraryItemsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetCommonLibraryItems.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_common_library_items(section_id=5288.95, type=4799.77, filter_='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>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get File Hash
This resource returns hash values for local files

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
##### `url` *{`str`}*
This is the path to the local file, must be prefixed by `file://`
<br/>
**Example:** `file://C:\Image.png&type=13`
---
##### `type` *{`Optional[float]`}*
Item type

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetFileHashResponse from "/content/types/models/operations/get_file_hash_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetFileHashResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetFileHashResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetFileHash.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_file_hash(url='file://C:\Image.png&type=13', type=567.13)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Latest Library Items
This endpoint will return a list of the latest library items filtered by the filter and type provided

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `type` *{`float`}*
item type
---
##### `filter_` *{`Optional[str]`}*
the filter parameter

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLatestLibraryItemsResponse from "/content/types/models/operations/get_latest_library_items_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLatestLibraryItemsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLatestLibraryItemsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLatestLibraryItems.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_latest_library_items(section_id=7917.25, type=8121.69, filter_='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>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,8 @@
## Get Libraries
A library section (commonly referred to as just a library) is a collection of media.
Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media.
For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat.
Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts.
This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibrariesResponse from "/content/types/models/operations/get_libraries_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibrariesResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibrariesResponse/>
</Collapsible>

View File

@@ -0,0 +1,30 @@
<CH.Code>
```python GetLibraries.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_libraries()
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,21 @@
## Get Library
Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are:
- A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here:
- Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.
- Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.
- Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly.
- A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains:
- `key`: This provides the root endpoint returning the actual media list for the type.
- `type`: This is the metadata type for the type (if a standard Plex type).
- `title`: The title for for the content of this type (e.g. "Movies").
- Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API.
- `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with.
- `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter.
- `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element.
- `title`: The title for the filter.
- Each `Sort` object contains a description of the sort field.
- `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending).
- `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort.
- `title`: The title of the field.

View File

@@ -0,0 +1,20 @@
{/* Autogenerated DO NOT EDIT */}
import IncludeDetails from "/content/types/models/operations/include_details/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### `section_id` *{`float`}*
the Id of the library to query
<br/>
**Example:** `1000`
---
##### `include_details` *{`Optional[operations.IncludeDetails]`}*
Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<IncludeDetails/>
</Collapsible>

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibraryResponse from "/content/types/models/operations/get_library_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibraryResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibraryResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLibrary.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_library(section_id=1000, include_details=operations.IncludeDetails.ONE)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Library Items
This endpoint will return a list of library items filtered by the filter and type provided

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to query
---
##### `type` *{`Optional[float]`}*
item type
---
##### `filter_` *{`Optional[str]`}*
the filter parameter

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetLibraryItemsResponse from "/content/types/models/operations/get_library_items_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetLibraryItemsResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetLibraryItemsResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetLibraryItems.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_library_items(section_id=2726.56, type=3834.41, filter_='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>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Metadata
This endpoint will return the metadata of a library item specified with the ratingKey.

View File

@@ -0,0 +1,5 @@
{/* Autogenerated DO NOT EDIT */}
##### `rating_key` *{`float`}*
the id of the library item to return the children of.

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetMetadataResponse from "/content/types/models/operations/get_metadata_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetMetadataResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetMetadataResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetMetadata.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_metadata(rating_key=5680.45)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Metadata Children
This endpoint will return the children of of a library item specified with the ratingKey.

View File

@@ -0,0 +1,5 @@
{/* Autogenerated DO NOT EDIT */}
##### `rating_key` *{`float`}*
the id of the library item to return the children of.

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetMetadataChildrenResponse from "/content/types/models/operations/get_metadata_children_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetMetadataChildrenResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetMetadataChildrenResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetMetadataChildren.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_metadata_children(rating_key=3927.85)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get On Deck
This endpoint will return the on deck content.

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetOnDeckResponse from "/content/types/models/operations/get_on_deck_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetOnDeckResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetOnDeckResponse/>
</Collapsible>

View File

@@ -0,0 +1,131 @@
<CH.Code>
```python GetOnDeck.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_on_deck()
if res.object is not None:
# handle response
pass
```
---
```json Example Response
{
"MediaContainer": {
"size": 16,
"allowSync": false,
"identifier": "com.plexapp.plugins.library",
"mediaTagPrefix": "/system/bundle/media/flags/",
"mediaTagVersion": 1680021154,
"mixedParents": false,
"Metadata": [
{
"allowSync": false,
"librarySectionID": 2,
"librarySectionTitle": "TV Shows",
"librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd",
"ratingKey": 49564,
"key": "/library/metadata/49564",
"parentRatingKey": 49557,
"grandparentRatingKey": 49556,
"guid": "plex://episode/5ea7d7402e7ab10042e74d4f",
"parentGuid": "plex://season/602e754d67f4c8002ce54b3d",
"grandparentGuid": "plex://show/5d9c090e705e7a001e6e94d8",
"type": "episode",
"title": "Circus",
"grandparentKey": "/library/metadata/49556",
"parentKey": "/library/metadata/49557",
"librarySectionKey": "/library/sections/2",
"grandparentTitle": "Bluey (2018)",
"parentTitle": "Season 2",
"contentRating": "TV-Y",
"summary": "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.",
"index": 33,
"parentIndex": 2,
"lastViewedAt": 1681908352,
"year": 2018,
"thumb": "/library/metadata/49564/thumb/1654258204",
"art": "/library/metadata/49556/art/1680939546",
"parentThumb": "/library/metadata/49557/thumb/1654258204",
"grandparentThumb": "/library/metadata/49556/thumb/1680939546",
"grandparentArt": "/library/metadata/49556/art/1680939546",
"grandparentTheme": "/library/metadata/49556/theme/1680939546",
"duration": 420080,
"originallyAvailableAt": "2020-10-31T00:00:00Z",
"addedAt": 1654258196,
"updatedAt": 1654258204,
"Media": [
{
"id": 80994,
"duration": 420080,
"bitrate": 1046,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "hevc",
"videoResolution": "1080",
"container": "mkv",
"videoFrameRate": "PAL",
"audioProfile": "lc",
"videoProfile": "main",
"Part": [
{
"id": 80994,
"key": "/library/parts/80994/1655007810/file.mkv",
"duration": 420080,
"file": "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv",
"size": 55148931,
"audioProfile": "lc",
"container": "mkv",
"videoProfile": "main",
"Stream": [
{
"id": 211234,
"streamType": 1,
"default": false,
"codec": "hevc",
"index": 0,
"bitrate": 918,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": "4:2:0",
"codedHeight": 1080,
"codedWidth": 1920,
"colorRange": "tv",
"frameRate": 25,
"height": 1080,
"level": 120,
"profile": "main",
"refFrames": 1,
"width": 1920,
"displayTitle": "1080p (HEVC Main)",
"extendedDisplayTitle": "1080p (HEVC Main)"
}
]
}
]
}
],
"guids": [
{
"id": "imdb://tt13303712"
}
]
}
]
}
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Recently Added
This endpoint will return the recently added content.

View File

@@ -0,0 +1,2 @@
{/* Autogenerated DO NOT EDIT */}

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import GetRecentlyAddedResponse from "/content/types/models/operations/get_recently_added_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetRecentlyAddedResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetRecentlyAddedResponse/>
</Collapsible>

View File

@@ -0,0 +1,119 @@
<CH.Code>
```python GetRecentlyAdded.py
import sdk
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.get_recently_added()
if res.object is not None:
# handle response
pass
```
---
```json Example Response
{
"MediaContainer": {
"size": 50,
"allowSync": false,
"identifier": "com.plexapp.plugins.library",
"mediaTagPrefix": "/system/bundle/media/flags/",
"mediaTagVersion": 1680021154,
"mixedParents": false,
"Metadata": [
{
"allowSync": false,
"librarySectionID": 1,
"librarySectionTitle": "Movies",
"librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30",
"ratingKey": 59398,
"key": "/library/metadata/59398",
"guid": "plex://movie/5e161a83bea6ac004126e148",
"studio": "Marvel Studios",
"type": "movie",
"title": "Ant-Man and the Wasp: Quantumania",
"contentRating": "PG-13",
"summary": "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.",
"rating": 4.7,
"audienceRating": 8.3,
"year": 2023,
"tagline": "Witness the beginning of a new dynasty.",
"thumb": "/library/metadata/59398/thumb/1681888010",
"art": "/library/metadata/59398/art/1681888010",
"duration": 7474422,
"originallyAvailableAt": "2023-02-15T00:00:00Z",
"addedAt": 1681803215,
"updatedAt": 1681888010,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/59399",
"ratingImage": "rottentomatoes://image.rating.rotten",
"Media": [
{
"id": 120345,
"duration": 7474422,
"bitrate": 3623,
"width": 1920,
"height": 804,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "ac3",
"videoCodec": "h264",
"videoResolution": 1080,
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 120353,
"key": "/library/parts/120353/1681803203/file.mp4",
"duration": 7474422,
"file": "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4",
"size": 3395307162,
"container": "mp4",
"has64bitOffsets": false,
"hasThumbnail": 1,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
}
],
"Director": [
{
"tag": "Peyton Reed"
}
],
"Writer": [
{
"tag": "Jeff Loveness"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Role": [
{
"tag": "Paul Rudd"
}
]
}
]
}
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,67 @@
import GetFileHash from "./get_file_hash/get_file_hash.mdx";
import GetRecentlyAdded from "./get_recently_added/get_recently_added.mdx";
import GetLibraries from "./get_libraries/get_libraries.mdx";
import GetLibrary from "./get_library/get_library.mdx";
import DeleteLibrary from "./delete_library/delete_library.mdx";
import GetLibraryItems from "./get_library_items/get_library_items.mdx";
import RefreshLibrary from "./refresh_library/refresh_library.mdx";
import GetLatestLibraryItems from "./get_latest_library_items/get_latest_library_items.mdx";
import GetCommonLibraryItems from "./get_common_library_items/get_common_library_items.mdx";
import GetMetadata from "./get_metadata/get_metadata.mdx";
import GetMetadataChildren from "./get_metadata_children/get_metadata_children.mdx";
import GetOnDeck from "./get_on_deck/get_on_deck.mdx";
## Library
API Calls interacting with Plex Media Server Libraries
### Available Operations
* [Get File Hash](/python/library/get_file_hash) - Get Hash Value
* [Get Recently Added](/python/library/get_recently_added) - Get Recently Added
* [Get Libraries](/python/library/get_libraries) - Get All Libraries
* [Get Library](/python/library/get_library) - Get Library Details
* [Delete Library](/python/library/delete_library) - Delete Library Section
* [Get Library Items](/python/library/get_library_items) - Get Library Items
* [Refresh Library](/python/library/refresh_library) - Refresh Library
* [Get Latest Library Items](/python/library/get_latest_library_items) - Get Latest Library Items
* [Get Common Library Items](/python/library/get_common_library_items) - Get Common Library Items
* [Get Metadata](/python/library/get_metadata) - Get Items Metadata
* [Get Metadata Children](/python/library/get_metadata_children) - Get Items Children
* [Get On Deck](/python/library/get_on_deck) - Get On Deck
---
<GetFileHash />
---
<GetRecentlyAdded />
---
<GetLibraries />
---
<GetLibrary />
---
<DeleteLibrary />
---
<GetLibraryItems />
---
<RefreshLibrary />
---
<GetLatestLibraryItems />
---
<GetCommonLibraryItems />
---
<GetMetadata />
---
<GetMetadataChildren />
---
<GetOnDeck />

View File

@@ -0,0 +1,3 @@
## Refresh Library
This endpoint Refreshes the library.

View File

@@ -0,0 +1,5 @@
{/* Autogenerated DO NOT EDIT */}
##### `section_id` *{`float`}*
the Id of the library to refresh

View File

@@ -0,0 +1,11 @@
{/* Autogenerated DO NOT EDIT */}
import RefreshLibraryResponse from "/content/types/models/operations/refresh_library_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.RefreshLibraryResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<RefreshLibraryResponse/>
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python RefreshLibrary.py
import sdk
from sdk.models import operations
s = sdk.SDK(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.library.refresh_library(section_id=4776.65)
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1001,
"message": "User could not be authenticated",
"status": 401
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Library*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}