ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2

This commit is contained in:
speakeasybot
2024-12-21 00:10:31 +00:00
parent 4bea7ae0d8
commit 16bb49d558
87 changed files with 2047 additions and 3580 deletions

View File

@@ -24,7 +24,7 @@
| `SeasonCount` | **int* | :heavy_minus_sign: | N/A | 2022 |
| `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `FlattenSeasons` | [*operations.GetLibraryItemsFlattenSeasons](../../models/operations/getlibraryitemsflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `ShowOrdering` | [*operations.GetLibraryItemsShowOrdering](../../models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `ShowOrdering` | [*operations.GetLibraryItemsShowOrdering](../../models/operations/getlibraryitemsshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `Banner` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
| `GetLibraryItemsQueryParamTypeTvShow` | 2 |
| `GetLibraryItemsQueryParamTypeSeason` | 3 |
| `GetLibraryItemsQueryParamTypeEpisode` | 4 |
| `GetLibraryItemsQueryParamTypeAudio` | 8 |
| `GetLibraryItemsQueryParamTypeAudio` | 8 |
| `GetLibraryItemsQueryParamTypeAlbum` | 9 |
| `GetLibraryItemsQueryParamTypeTrack` | 10 |

View File

@@ -1,20 +1,20 @@
# GetLibraryItemsShowOrdering
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
## Values
| Name | Value |
| --------------------------------------- | --------------------------------------- |
| `GetLibraryItemsShowOrderingNone` | None |
| `GetLibraryItemsShowOrderingTmdbAiring` | tmdbAiring |
| `GetLibraryItemsShowOrderingAired` | aired |
| `GetLibraryItemsShowOrderingDvd` | dvd |
| `GetLibraryItemsShowOrderingAbsolute` | absolute |
| Name | Value |
| ----------------------------------------- | ----------------------------------------- |
| `GetLibraryItemsShowOrderingNone` | None |
| `GetLibraryItemsShowOrderingTmdbAiring` | tmdbAiring |
| `GetLibraryItemsShowOrderingTvdbAiring` | tvdbAiring |
| `GetLibraryItemsShowOrderingTvdbDvd` | tvdbDvd |
| `GetLibraryItemsShowOrderingTvdbAbsolute` | tvdbAbsolute |

View File

@@ -14,6 +14,11 @@
| `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies |
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 1 |
| `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | The name of the album artist for the track when audio, and the name of the TV show for the episode when video. | |
| `ParentTitle` | **string* | :heavy_minus_sign: | The name of the album for the track when audio, and the name of the season for the episode when TV show. | |
| `OriginalTitle` | **string* | :heavy_minus_sign: | The orginal untranslated name of the media item when non-english. | |
| `Index` | **int64* | :heavy_minus_sign: | The index starting from 0 of this media item in the MetaData array. | |
| `ParentIndex` | **int64* | :heavy_minus_sign: | The parent index starting from 0 of this media item in the parent MetaData array. | |
| `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 |
| `Summary` | **string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. |
| `Rating` | **float64* | :heavy_minus_sign: | N/A | 8.2 |

View File

@@ -1,12 +0,0 @@
# GetPinGlobals
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku |

View File

@@ -6,7 +6,7 @@
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |

View File

@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
| `GetPlaylistContentsQueryParamTypeTvShow` | 2 |
| `GetPlaylistContentsQueryParamTypeSeason` | 3 |
| `GetPlaylistContentsQueryParamTypeEpisode` | 4 |
| `GetPlaylistContentsQueryParamTypeAudio` | 8 |
| `GetPlaylistContentsQueryParamTypeAudio` | 8 |
| `GetPlaylistContentsQueryParamTypeAlbum` | 9 |
| `GetPlaylistContentsQueryParamTypeTrack` | 10 |

View File

@@ -24,7 +24,7 @@
| `SeasonCount` | **int* | :heavy_minus_sign: | N/A | 2022 |
| `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `FlattenSeasons` | [*operations.FlattenSeasons](../../models/operations/flattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `ShowOrdering` | [*operations.ShowOrdering](../../models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `ShowOrdering` | [*operations.ShowOrdering](../../models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `Banner` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -1,8 +0,0 @@
# GetSearchAllLibrariesGlobals
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |

View File

@@ -24,7 +24,7 @@
| `SeasonCount` | **int* | :heavy_minus_sign: | N/A | 2022 |
| `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `FlattenSeasons` | [*operations.GetSearchAllLibrariesFlattenSeasons](../../models/operations/getsearchalllibrariesflattenseasons.md) | :heavy_minus_sign: | N/A | 1 |
| `ShowOrdering` | [*operations.GetSearchAllLibrariesShowOrdering](../../models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show <br/>None = Library default, <br/>tmdbAiring = The Movie Database (Aired), <br/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
| `ShowOrdering` | [*operations.GetSearchAllLibrariesShowOrdering](../../models/operations/getsearchalllibrariesshowordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `Banner` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -6,7 +6,7 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `Query` | *string* | :heavy_check_mark: | The search query term. | |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `Limit` | **int64* | :heavy_minus_sign: | Limit the number of results returned. | |
| `SearchTypes` | [][operations.SearchTypes](../../models/operations/searchtypes.md) | :heavy_minus_sign: | A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.<br/> | movies,music,otherVideos,people,tv |
| `IncludeCollections` | [*operations.QueryParamIncludeCollections](../../models/operations/queryparamincludecollections.md) | :heavy_minus_sign: | Whether to include collections in the search results. | 1 |

View File

@@ -1,20 +1,20 @@
# GetSearchAllLibrariesShowOrdering
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
## Values
| Name | Value |
| --------------------------------------------- | --------------------------------------------- |
| `GetSearchAllLibrariesShowOrderingNone` | None |
| `GetSearchAllLibrariesShowOrderingTmdbAiring` | tmdbAiring |
| `GetSearchAllLibrariesShowOrderingAired` | aired |
| `GetSearchAllLibrariesShowOrderingDvd` | dvd |
| `GetSearchAllLibrariesShowOrderingAbsolute` | absolute |
| Name | Value |
| ----------------------------------------------- | ----------------------------------------------- |
| `GetSearchAllLibrariesShowOrderingNone` | None |
| `GetSearchAllLibrariesShowOrderingTmdbAiring` | tmdbAiring |
| `GetSearchAllLibrariesShowOrderingTvdbAiring` | tvdbAiring |
| `GetSearchAllLibrariesShowOrderingTvdbDvd` | tvdbDvd |
| `GetSearchAllLibrariesShowOrderingTvdbAbsolute` | tvdbAbsolute |

View File

@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
| `GetSearchLibraryQueryParamTypeTvShow` | 2 |
| `GetSearchLibraryQueryParamTypeSeason` | 3 |
| `GetSearchLibraryQueryParamTypeEpisode` | 4 |
| `GetSearchLibraryQueryParamTypeAudio` | 8 |
| `GetSearchLibraryQueryParamTypeAudio` | 8 |
| `GetSearchLibraryQueryParamTypeAlbum` | 9 |
| `GetSearchLibraryQueryParamTypeTrack` | 10 |

View File

@@ -1,8 +0,0 @@
# GetServerResourcesGlobals
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |

View File

@@ -8,4 +8,4 @@
| `IncludeHTTPS` | [*operations.IncludeHTTPS](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `IncludeRelay` | [*operations.IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `IncludeIPv6` | [*operations.IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |

View File

@@ -1,12 +0,0 @@
# GetTokenByPinIDGlobals
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku |

View File

@@ -6,7 +6,7 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `PinID` | *int64* | :heavy_check_mark: | The PinID to retrieve an access token for | |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |

View File

@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
| `GetTopWatchedContentQueryParamTypeTvShow` | 2 |
| `GetTopWatchedContentQueryParamTypeSeason` | 3 |
| `GetTopWatchedContentQueryParamTypeEpisode` | 4 |
| `GetTopWatchedContentQueryParamTypeAudio` | 8 |
| `GetTopWatchedContentQueryParamTypeAudio` | 8 |
| `GetTopWatchedContentQueryParamTypeAlbum` | 9 |
| `GetTopWatchedContentQueryParamTypeTrack` | 10 |

View File

@@ -1,12 +0,0 @@
# PostUsersSignInDataGlobals
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `Platform` | **string* | :heavy_minus_sign: | The platform of the client application. | Roku |

View File

@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `ClientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `ClientName` | **string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `DeviceNickname` | **string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `ClientVersion` | **string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |

View File

@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
| `QueryParamTypeTvShow` | 2 |
| `QueryParamTypeSeason` | 3 |
| `QueryParamTypeEpisode` | 4 |
| `QueryParamTypeAudio` | 8 |
| `QueryParamTypeAudio` | 8 |
| `QueryParamTypeAlbum` | 9 |
| `QueryParamTypeTrack` | 10 |

View File

@@ -1,20 +1,20 @@
# ShowOrdering
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
Setting that indicates the episode ordering for the show
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
## Values
| Name | Value |
| ------------------------ | ------------------------ |
| `ShowOrderingNone` | None |
| `ShowOrderingTmdbAiring` | tmdbAiring |
| `ShowOrderingAired` | aired |
| `ShowOrderingDvd` | dvd |
| `ShowOrderingAbsolute` | absolute |
| Name | Value |
| -------------------------- | -------------------------- |
| `ShowOrderingNone` | None |
| `ShowOrderingTmdbAiring` | tmdbAiring |
| `ShowOrderingTvdbAiring` | tvdbAiring |
| `ShowOrderingTvdbDvd` | tvdbDvd |
| `ShowOrderingTvdbAbsolute` | tvdbAbsolute |

View File

@@ -25,4 +25,5 @@ A key representing a specific tag within the section.
| `TagRating` | rating |
| `TagResolution` | resolution |
| `TagFirstCharacter` | firstCharacter |
| `TagFolder` | folder |
| `TagFolder` | folder |
| `TagAlbums` | albums |

View File

@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
| `TypeTvShow` | 2 |
| `TypeSeason` | 3 |
| `TypeEpisode` | 4 |
| `TypeAudio` | 8 |
| `TypeAudio` | 8 |
| `TypeAlbum` | 9 |
| `TypeTrack` | 10 |

View File

@@ -27,22 +27,18 @@ Get Server Activities
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Activities.GetServerActivities(ctx)
if err != nil {
log.Fatal(err)
@@ -82,22 +78,18 @@ Cancel Server Activities
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Activities.CancelServerActivities(ctx, "25b71ed5-0f9d-461c-baa7-d404e9e10d3e")
if err != nil {
log.Fatal(err)

View File

@@ -24,23 +24,19 @@ This endpoint provides the caller with a temporary token with the same access le
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Authentication.GetTransientToken(ctx, operations.GetTransientTokenQueryParamTypeDelegation, operations.ScopeAll)
if err != nil {
log.Fatal(err)
@@ -84,22 +80,18 @@ Note: requires Plex Media Server >= 1.15.4.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Authentication.GetSourceConnectionInformation(ctx, "provider://provider-identifier")
if err != nil {
log.Fatal(err)
@@ -140,22 +132,18 @@ Get the User data from the provided X-Plex-Token
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Authentication.GetTokenDetails(ctx)
if err != nil {
log.Fatal(err)
@@ -195,23 +183,23 @@ Sign in user with username and password and return user data with Plex authentic
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
s := plexgo.New()
res, err := s.Authentication.PostUsersSignInData(ctx, operations.PostUsersSignInDataRequest{
ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
ClientName: plexgo.String("Plex for Roku"),
DeviceNickname: plexgo.String("Roku 3"),
ClientVersion: plexgo.String("2.4.1"),
Platform: plexgo.String("Roku"),
RequestBody: &operations.PostUsersSignInDataRequestBody{
Login: "username@email.com",
Password: "password123",

View File

@@ -24,22 +24,18 @@ Returns a list of butler tasks
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Butler.GetButlerTasks(ctx)
if err != nil {
log.Fatal(err)
@@ -84,22 +80,18 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Butler.StartAllTasks(ctx)
if err != nil {
log.Fatal(err)
@@ -140,22 +132,18 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Butler.StopAllTasks(ctx)
if err != nil {
log.Fatal(err)
@@ -200,23 +188,19 @@ This endpoint will attempt to start a single Butler task that is enabled in the
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Butler.StartTask(ctx, operations.TaskNameCleanOldBundles)
if err != nil {
log.Fatal(err)
@@ -258,23 +242,19 @@ This endpoint will stop a currently running task by name, or remove it from the
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameBackupDatabase)
if err != nil {
log.Fatal(err)

View File

@@ -22,22 +22,18 @@ Get Global Hubs filtered by the parameters provided.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Hubs.GetGlobalHubs(ctx, nil, nil)
if err != nil {
log.Fatal(err)
@@ -80,23 +76,19 @@ This endpoint will return the recently added content.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Hubs.GetRecentlyAdded(ctx, operations.GetRecentlyAddedRequest{
ContentDirectoryID: 470161,
SectionID: plexgo.Int64(2),
@@ -143,22 +135,18 @@ This endpoint will return a list of library specific hubs
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Hubs.GetLibraryHubs(ctx, 6728.76, nil, nil)
if err != nil {
log.Fatal(err)

View File

@@ -32,22 +32,18 @@ This resource returns hash values for local files
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetFileHash(ctx, "file://C:\Image.png&type=13", nil)
if err != nil {
log.Fatal(err)
@@ -90,23 +86,19 @@ This endpoint will return the recently added content.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetRecentlyAddedLibrary(ctx, operations.GetRecentlyAddedLibraryRequest{
ContentDirectoryID: plexgo.Int64(2),
PinnedContentDirectoryID: []int64{
@@ -174,22 +166,18 @@ This allows a client to provide a rich interface around the media (e.g. allow so
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetAllLibraries(ctx)
if err != nil {
log.Fatal(err)
@@ -268,22 +256,18 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetLibraryDetails(ctx, 9518, nil)
if err != nil {
log.Fatal(err)
@@ -325,22 +309,18 @@ Delete a library using a specific section id
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.DeleteLibrary(ctx, 9518)
if err != nil {
log.Fatal(err)
@@ -393,6 +373,7 @@ Fetches details from a specific section of the library identified by a section k
- `resolution`: Items categorized by resolution.
- `firstCharacter`: Items categorized by the first letter.
- `folder`: Items categorized by folder.
- `albums`: Items categorized by album.
### Example Usage
@@ -401,23 +382,19 @@ Fetches details from a specific section of the library identified by a section k
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{
Tag: operations.TagEdition,
IncludeGuids: operations.IncludeGuidsEnable.ToPointer(),
@@ -467,23 +444,19 @@ This endpoint Refreshes all the Metadata of the library.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceOne.ToPointer())
if err != nil {
log.Fatal(err)
@@ -543,23 +516,19 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetSearchLibrary(ctx, 9518, operations.GetSearchLibraryQueryParamTypeTvShow)
if err != nil {
log.Fatal(err)
@@ -602,25 +571,22 @@ Search the provided query across all library sections, or a single section, and
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetSearchAllLibraries(ctx, operations.GetSearchAllLibrariesRequest{
Query: "<value>",
ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
SearchTypes: []operations.SearchTypes{
operations.SearchTypesPeople,
},
@@ -667,22 +633,18 @@ This endpoint will return the metadata of a library item specified with the rati
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetMetaDataByRatingKey(ctx, 9518)
if err != nil {
log.Fatal(err)
@@ -724,22 +686,18 @@ This endpoint will return the children of of a library item specified with the r
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetMetadataChildren(ctx, 1539.14, plexgo.String("Stream"))
if err != nil {
log.Fatal(err)
@@ -782,23 +740,19 @@ This endpoint will return the top watched content from libraries of a certain ty
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, plexgo.Int64(1))
if err != nil {
log.Fatal(err)
@@ -841,22 +795,18 @@ This endpoint will return the on deck content.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Library.GetOnDeck(ctx)
if err != nil {
log.Fatal(err)

View File

@@ -23,23 +23,19 @@ This endpoint will write a single-line log message, including a level and source
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Log.LogLine(ctx, operations.LevelThree, "Test log message", "Postman")
if err != nil {
log.Fatal(err)
@@ -103,22 +99,18 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Log.LogMultiLine(ctx, "level=4&message=Test%20message%201&source=postman\n" +
"level=3&message=Test%20message%202&source=postman\n" +
"level=1&message=Test%20message%203&source=postman")
@@ -162,22 +154,18 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Log.EnablePaperTrail(ctx)
if err != nil {
log.Fatal(err)

View File

@@ -24,22 +24,18 @@ This will mark the provided media key as Played.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Media.MarkPlayed(ctx, 59398)
if err != nil {
log.Fatal(err)
@@ -80,22 +76,18 @@ This will mark the provided media key as Unplayed.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Media.MarkUnplayed(ctx, 59398)
if err != nil {
log.Fatal(err)
@@ -137,22 +129,18 @@ This API command can be used to update the play progress of a media item.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Media.UpdatePlayProgress(ctx, "<key>", 90000, "played")
if err != nil {
log.Fatal(err)
@@ -195,23 +183,19 @@ Gets the banner image of the media item
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Media.GetBannerImage(ctx, operations.GetBannerImageRequest{
RatingKey: 9518,
Width: 396,
@@ -259,23 +243,19 @@ Gets the thumbnail image of the media item
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Media.GetThumbImage(ctx, operations.GetThumbImageRequest{
RatingKey: 9518,
Width: 396,

View File

@@ -34,23 +34,19 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{
Title: "<value>",
Type: operations.CreatePlaylistQueryParamTypePhoto,
@@ -96,22 +92,18 @@ Get All Playlists given the specified filters.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.GetPlaylists(ctx, nil, nil)
if err != nil {
log.Fatal(err)
@@ -155,22 +147,18 @@ Smart playlist details contain the `content` attribute. This is the content URI
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.GetPlaylist(ctx, 4109.48)
if err != nil {
log.Fatal(err)
@@ -212,22 +200,18 @@ This endpoint will delete a playlist
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.DeletePlaylist(ctx, 216.22)
if err != nil {
log.Fatal(err)
@@ -269,22 +253,18 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.UpdatePlaylist(ctx, 3915, nil, nil)
if err != nil {
log.Fatal(err)
@@ -331,23 +311,19 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.GetPlaylistContents(ctx, 5004.46, operations.GetPlaylistContentsQueryParamTypeTvShow)
if err != nil {
log.Fatal(err)
@@ -390,22 +366,18 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.ClearPlaylistContents(ctx, 1893.18)
if err != nil {
log.Fatal(err)
@@ -448,22 +420,18 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.AddPlaylistContents(ctx, 8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", plexgo.Float64(123))
if err != nil {
log.Fatal(err)
@@ -507,23 +475,19 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Playlists.UploadPlaylist(ctx, "/home/barkley/playlist.m3u", operations.QueryParamForceZero, 1)
if err != nil {
log.Fatal(err)

View File

@@ -26,22 +26,18 @@ Get Companions Data
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Plex.GetCompanionsData(ctx)
if err != nil {
log.Fatal(err)
@@ -81,22 +77,18 @@ Get friends of provided auth token.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Plex.GetUserFriends(ctx)
if err != nil {
log.Fatal(err)
@@ -136,21 +128,16 @@ Returns the geolocation and locale data of the caller
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
s := plexgo.New()
res, err := s.Plex.GetGeoData(ctx)
if err != nil {
log.Fatal(err)
@@ -190,22 +177,18 @@ Retrieves the home data for the authenticated user, including details like home
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Plex.GetHomeData(ctx)
if err != nil {
log.Fatal(err)
@@ -245,24 +228,20 @@ Get Plex server access tokens and server connections
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Plex.GetServerResources(ctx, operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer(), plexgo.String("3381b62b-9ab7-4e37-827b-203e9809eb58"))
res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer())
if err != nil {
log.Fatal(err)
}
@@ -277,10 +256,10 @@ func main() {
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `clientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `includeHTTPS` | [*operations.IncludeHTTPS](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
| `includeRelay` | [*operations.IncludeRelay](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
| `includeIPv6` | [*operations.IncludeIPv6](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
| `clientID` | **string* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
### Response
@@ -305,23 +284,24 @@ Retrieve a Pin ID from Plex.tv to use for authentication flows
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{})
s := plexgo.New()
res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{
ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
ClientName: plexgo.String("Plex for Roku"),
DeviceNickname: plexgo.String("Roku 3"),
ClientVersion: plexgo.String("2.4.1"),
Platform: plexgo.String("Roku"),
})
if err != nil {
log.Fatal(err)
}
@@ -360,24 +340,24 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
s := plexgo.New()
res, err := s.Plex.GetTokenByPinID(ctx, operations.GetTokenByPinIDRequest{
PinID: 408895,
ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58",
ClientName: plexgo.String("Plex for Roku"),
DeviceNickname: plexgo.String("Roku 3"),
ClientVersion: plexgo.String("2.4.1"),
Platform: plexgo.String("Roku"),
})
if err != nil {
log.Fatal(err)

View File

@@ -26,3 +26,6 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
### Available Operations

View File

@@ -34,22 +34,18 @@ This request is intended to be very fast, and called as the user types.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Search.PerformSearch(ctx, "dylan", nil, plexgo.Float64(5))
if err != nil {
log.Fatal(err)
@@ -96,22 +92,18 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, plexgo.Float64(5))
if err != nil {
log.Fatal(err)
@@ -154,22 +146,18 @@ This will search the database for the string provided.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Search.GetSearchResults(ctx, "110")
if err != nil {
log.Fatal(err)

View File

@@ -28,22 +28,18 @@ Get Server Capabilities
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
@@ -83,22 +79,18 @@ Get Server Preferences
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetServerPreferences(ctx)
if err != nil {
log.Fatal(err)
@@ -138,22 +130,18 @@ Get Available Clients
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetAvailableClients(ctx)
if err != nil {
log.Fatal(err)
@@ -193,22 +181,18 @@ Get Devices
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetDevices(ctx)
if err != nil {
log.Fatal(err)
@@ -248,21 +232,16 @@ This request is useful to determine if the server is online or offline
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
s := plexgo.New()
res, err := s.Server.GetServerIdentity(ctx)
if err != nil {
log.Fatal(err)
@@ -301,22 +280,18 @@ Returns MyPlex Account Information
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetMyPlexAccount(ctx)
if err != nil {
log.Fatal(err)
@@ -357,30 +332,26 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetResizedPhoto(ctx, operations.GetResizedPhotoRequest{
Width: 110,
Height: 165,
Opacity: 100,
Blur: 0,
MinSize: operations.MinSizeOne,
Upscale: operations.UpscaleOne,
Upscale: operations.UpscaleZero,
URL: "/library/metadata/49564/thumb/1654258204",
})
if err != nil {
@@ -422,22 +393,18 @@ Retrieves media providers and their features from the Plex server.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetMediaProviders(ctx, "CV5xoxjTpFKUzBTShsaf")
if err != nil {
log.Fatal(err)
@@ -478,22 +445,18 @@ Get Server List
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Server.GetServerList(ctx)
if err != nil {
log.Fatal(err)

View File

@@ -23,22 +23,18 @@ This will retrieve the "Now Playing" Information of the PMS.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Sessions.GetSessions(ctx)
if err != nil {
log.Fatal(err)
@@ -78,23 +74,19 @@ This will Retrieve a listing of all history views.
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Sessions.GetSessionHistory(ctx, plexgo.String("viewedAt:desc"), plexgo.Int64(1), &operations.QueryParamFilter{}, plexgo.Int64(12))
if err != nil {
log.Fatal(err)
@@ -138,22 +130,18 @@ Get Transcode Sessions
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Sessions.GetTranscodeSessions(ctx)
if err != nil {
log.Fatal(err)
@@ -193,22 +181,18 @@ Stop a Transcode Session
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Sessions.StopTranscodeSession(ctx, "zz7llzqlx8w9vnrsbnwhbmep")
if err != nil {
log.Fatal(err)

View File

@@ -22,22 +22,18 @@ This will return the media statistics for the server
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Statistics.GetStatistics(ctx, plexgo.Int64(4))
if err != nil {
log.Fatal(err)
@@ -78,22 +74,18 @@ This will return the resources for the server
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Statistics.GetResourcesStatistics(ctx, plexgo.Int64(4))
if err != nil {
log.Fatal(err)
@@ -134,22 +126,18 @@ This will return the bandwidth statistics for the server
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Statistics.GetBandwidthStatistics(ctx, plexgo.Int64(4))
if err != nil {
log.Fatal(err)

View File

@@ -23,22 +23,18 @@ Querying status of updates
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Updater.GetUpdateStatus(ctx)
if err != nil {
log.Fatal(err)
@@ -78,23 +74,19 @@ Checking for updates
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Updater.CheckForUpdates(ctx, operations.DownloadOne.ToPointer())
if err != nil {
log.Fatal(err)
@@ -136,23 +128,19 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Updater.ApplyUpdates(ctx, operations.TonightOne.ToPointer(), operations.SkipOne.ToPointer())
if err != nil {
log.Fatal(err)

View File

@@ -21,23 +21,19 @@ Get the timeline for a media item
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Video.GetTimeline(ctx, operations.GetTimelineRequest{
RatingKey: 23409,
Key: "/library/metadata/23409",
@@ -89,23 +85,19 @@ Begin a Universal Transcode Session
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{
HasMDE: 1,
Path: "/library/metadata/23409",

View File

@@ -20,23 +20,19 @@ Get User Watchlist
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithClientID("3381b62b-9ab7-4e37-827b-203e9809eb58"),
plexgo.WithClientName("Plex for Roku"),
plexgo.WithClientVersion("2.4.1"),
plexgo.WithPlatform("Roku"),
plexgo.WithDeviceNickname("Roku 3"),
)
ctx := context.Background()
res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{
Filter: operations.FilterAvailable,
XPlexContainerStart: plexgo.Int(0),