mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.1
This commit is contained in:
@@ -27,7 +27,6 @@ Get Server Activities
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -39,8 +38,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Activities.GetServerActivities(ctx)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ Cancel Server Activities
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -88,9 +84,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var activityUUID string = "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Activities.CancelServerActivities(ctx, activityUUID)
|
||||
if err != nil {
|
||||
|
||||
@@ -22,7 +22,6 @@ This endpoint provides the caller with a temporary token with the same access le
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -34,11 +33,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var type_ operations.GetTransientTokenQueryParamType = operations.GetTransientTokenQueryParamTypeDelegation
|
||||
|
||||
var scope operations.Scope = operations.ScopeAll
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Authentication.GetTransientToken(ctx, type_, scope)
|
||||
if err != nil {
|
||||
@@ -79,7 +76,6 @@ Note: requires Plex Media Server >= 1.15.4.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -90,9 +86,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var source string = "server://client-identifier"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Authentication.GetSourceConnectionInformation(ctx, source)
|
||||
if err != nil {
|
||||
|
||||
@@ -24,7 +24,6 @@ Returns a list of butler tasks
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -36,8 +35,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Butler.GetButlerTasks(ctx)
|
||||
if err != nil {
|
||||
@@ -79,7 +76,6 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -91,8 +87,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Butler.StartAllTasks(ctx)
|
||||
if err != nil {
|
||||
@@ -130,7 +124,6 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -142,8 +135,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Butler.StopAllTasks(ctx)
|
||||
if err != nil {
|
||||
@@ -185,7 +176,6 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -197,9 +187,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var taskName operations.TaskName = operations.TaskNameCleanOldBundles
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Butler.StartTask(ctx, taskName)
|
||||
if err != nil {
|
||||
@@ -238,7 +226,6 @@ This endpoint will stop a currently running task by name, or remove it from the
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -250,9 +237,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var taskName operations.PathParamTaskName = operations.PathParamTaskNameBackupDatabase
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Butler.StopTask(ctx, taskName)
|
||||
if err != nil {
|
||||
|
||||
@@ -21,7 +21,6 @@ Get Global Hubs filtered by the parameters provided.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -33,11 +32,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var count *float64 = plexgo.Float64(1262.49)
|
||||
|
||||
var onlyTransient *operations.OnlyTransient = operations.OnlyTransientOne.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Hubs.GetGlobalHubs(ctx, count, onlyTransient)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ This endpoint will return a list of library specific hubs
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -89,13 +85,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var sectionID float64 = 6728.76
|
||||
|
||||
var count *float64 = plexgo.Float64(9010.22)
|
||||
|
||||
var onlyTransient *operations.QueryParamOnlyTransient = operations.QueryParamOnlyTransientZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Hubs.GetLibraryHubs(ctx, sectionID, count, onlyTransient)
|
||||
if err != nil {
|
||||
|
||||
@@ -13,6 +13,7 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [GetLibraries](#getlibraries) - Get All Libraries
|
||||
* [GetLibrary](#getlibrary) - Get Library Details
|
||||
* [DeleteLibrary](#deletelibrary) - Delete Library Section
|
||||
* [GetLibraryItems](#getlibraryitems) - Get Library Items
|
||||
* [RefreshLibrary](#refreshlibrary) - Refresh Library
|
||||
* [SearchLibrary](#searchlibrary) - Search Library
|
||||
* [GetMetadata](#getmetadata) - Get Items Metadata
|
||||
@@ -29,7 +30,6 @@ This resource returns hash values for local files
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -40,11 +40,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var url_ string = "file://C:\Image.png&type=13"
|
||||
|
||||
var type_ *float64 = plexgo.Float64(4462.17)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetFileHash(ctx, url_, type_)
|
||||
if err != nil {
|
||||
@@ -84,7 +82,6 @@ This endpoint will return the recently added content.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -96,8 +93,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetRecentlyAdded(ctx)
|
||||
if err != nil {
|
||||
@@ -140,7 +135,6 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -152,8 +146,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetLibraries(ctx)
|
||||
if err != nil {
|
||||
@@ -229,7 +221,6 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -241,11 +232,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var sectionID float64 = 1000
|
||||
|
||||
var includeDetails *operations.IncludeDetails = operations.IncludeDetailsZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetLibrary(ctx, sectionID, includeDetails)
|
||||
if err != nil {
|
||||
@@ -284,7 +273,6 @@ Delate a library using a specific section
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -295,9 +283,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var sectionID float64 = 1000
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.DeleteLibrary(ctx, sectionID)
|
||||
if err != nil {
|
||||
@@ -325,6 +311,78 @@ func main() {
|
||||
| sdkerrors.DeleteLibraryResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## GetLibraryItems
|
||||
|
||||
Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values:
|
||||
- `all`: All items in the section.
|
||||
- `unwatched`: Items that have not been played.
|
||||
- `newest`: Items that are recently released.
|
||||
- `recentlyAdded`: Items that are recently added to the library.
|
||||
- `recentlyViewed`: Items that were recently viewed.
|
||||
- `onDeck`: Items to continue watching.
|
||||
- `collection`: Items categorized by collection.
|
||||
- `edition`: Items categorized by edition.
|
||||
- `genre`: Items categorized by genre.
|
||||
- `year`: Items categorized by year of release.
|
||||
- `decade`: Items categorized by decade.
|
||||
- `director`: Items categorized by director.
|
||||
- `actor`: Items categorized by starring actor.
|
||||
- `country`: Items categorized by country of origin.
|
||||
- `contentRating`: Items categorized by content rating.
|
||||
- `rating`: Items categorized by rating.
|
||||
- `resolution`: Items categorized by resolution.
|
||||
- `firstCharacter`: Items categorized by the first letter.
|
||||
- `folder`: Items categorized by folder.
|
||||
|
||||
|
||||
### Example Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
var sectionID int64 = 1
|
||||
|
||||
var tag operations.Tag = operations.TagGenre
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetLibraryItems(ctx, sectionID, tag)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||
| `sectionID` | *int64* | :heavy_check_mark: | the Id of the library to query | 1 |
|
||||
| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[*operations.GetLibraryItemsResponse](../../models/operations/getlibraryitemsresponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------- | ------------------------------------- | ------------------------------------- |
|
||||
| sdkerrors.GetLibraryItemsResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## RefreshLibrary
|
||||
|
||||
This endpoint Refreshes the library.
|
||||
@@ -336,7 +394,6 @@ This endpoint Refreshes the library.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -347,9 +404,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var sectionID float64 = 934.16
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.RefreshLibrary(ctx, sectionID)
|
||||
if err != nil {
|
||||
@@ -405,7 +460,6 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -417,11 +471,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var sectionID int64 = 933505
|
||||
|
||||
var type_ operations.Type = operations.TypeFour
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.SearchLibrary(ctx, sectionID, type_)
|
||||
if err != nil {
|
||||
@@ -445,9 +497,10 @@ func main() {
|
||||
### Response
|
||||
|
||||
**[*operations.SearchLibraryResponse](../../models/operations/searchlibraryresponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------ | ------------------ | ------------------ |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| sdkerrors.SearchLibraryResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## GetMetadata
|
||||
|
||||
@@ -460,7 +513,6 @@ This endpoint will return the metadata of a library item specified with the rati
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -471,9 +523,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var ratingKey float64 = 8382.31
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetMetadata(ctx, ratingKey)
|
||||
if err != nil {
|
||||
@@ -512,7 +562,6 @@ This endpoint will return the children of of a library item specified with the r
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -523,9 +572,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var ratingKey float64 = 1539.14
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetMetadataChildren(ctx, ratingKey)
|
||||
if err != nil {
|
||||
@@ -564,7 +611,6 @@ This endpoint will return the on deck content.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -576,8 +622,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetOnDeck(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -23,7 +23,6 @@ This endpoint will write a single-line log message, including a level and source
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -35,13 +34,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var level operations.Level = operations.LevelThree
|
||||
|
||||
var message string = "Test log message"
|
||||
|
||||
var source string = "Postman"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Log.LogLine(ctx, level, message, source)
|
||||
if err != nil {
|
||||
@@ -102,7 +99,6 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -113,11 +109,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var request string = "level=4&message=Test%20message%201&source=postman
|
||||
level=3&message=Test%20message%202&source=postman
|
||||
level=1&message=Test%20message%203&source=postman"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Log.LogMultiLine(ctx, request)
|
||||
if err != nil {
|
||||
@@ -156,7 +150,6 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -168,8 +161,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Log.EnablePaperTrail(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -22,7 +22,6 @@ This will mark the provided media key as Played.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -33,9 +32,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var key float64 = 59398
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Media.MarkPlayed(ctx, key)
|
||||
if err != nil {
|
||||
@@ -73,7 +70,6 @@ This will mark the provided media key as Unplayed.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -84,9 +80,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var key float64 = 59398
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Media.MarkUnplayed(ctx, key)
|
||||
if err != nil {
|
||||
@@ -125,7 +119,6 @@ This API command can be used to update the play progress of a media item.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -136,13 +129,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var key string = "<value>"
|
||||
|
||||
var time float64 = 90000
|
||||
|
||||
var state string = "played"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Media.UpdatePlayProgress(ctx, key, time, state)
|
||||
if err != nil {
|
||||
|
||||
@@ -34,7 +34,6 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -46,14 +45,12 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
request := operations.CreatePlaylistRequest{
|
||||
Title: "<value>",
|
||||
Type: operations.QueryParamTypePhoto,
|
||||
Smart: operations.SmartOne,
|
||||
URI: "https://inborn-brochure.biz",
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.CreatePlaylist(ctx, request)
|
||||
if err != nil {
|
||||
@@ -91,7 +88,6 @@ Get All Playlists given the specified filters.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -103,11 +99,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistType *operations.PlaylistType = operations.PlaylistTypeAudio.ToPointer()
|
||||
|
||||
var smart *operations.QueryParamSmart = operations.QueryParamSmartZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.GetPlaylists(ctx, playlistType, smart)
|
||||
if err != nil {
|
||||
@@ -148,7 +142,6 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -159,9 +152,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistID float64 = 4109.48
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.GetPlaylist(ctx, playlistID)
|
||||
if err != nil {
|
||||
@@ -200,7 +191,6 @@ This endpoint will delete a playlist
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -211,9 +201,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistID float64 = 216.22
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.DeletePlaylist(ctx, playlistID)
|
||||
if err != nil {
|
||||
@@ -252,7 +240,6 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -263,13 +250,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistID float64 = 3915
|
||||
|
||||
var title *string = plexgo.String("<value>")
|
||||
|
||||
var summary *string = plexgo.String("<value>")
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.UpdatePlaylist(ctx, playlistID, title, summary)
|
||||
if err != nil {
|
||||
@@ -313,7 +298,6 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -324,11 +308,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistID float64 = 5004.46
|
||||
|
||||
var type_ float64 = 9403.59
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.GetPlaylistContents(ctx, playlistID, type_)
|
||||
if err != nil {
|
||||
@@ -368,7 +350,6 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -379,9 +360,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistID float64 = 1893.18
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.ClearPlaylistContents(ctx, playlistID)
|
||||
if err != nil {
|
||||
@@ -421,7 +400,6 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -432,13 +410,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var playlistID float64 = 8502.01
|
||||
|
||||
var uri string = "server://12345/com.plexapp.plugins.library/library/metadata/1"
|
||||
|
||||
var playQueueID *float64 = plexgo.Float64(123)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.AddPlaylistContents(ctx, playlistID, uri, playQueueID)
|
||||
if err != nil {
|
||||
@@ -479,7 +455,6 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -491,11 +466,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var path string = "/home/barkley/playlist.m3u"
|
||||
|
||||
var force operations.Force = operations.ForceZero
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.UploadPlaylist(ctx, path, force)
|
||||
if err != nil {
|
||||
|
||||
@@ -30,11 +30,9 @@ func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var strong *bool = plexgo.Bool(false)
|
||||
|
||||
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
|
||||
if err != nil {
|
||||
@@ -83,11 +81,9 @@ func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var pinID string = "<value>"
|
||||
|
||||
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.GetToken(ctx, pinID, xPlexClientIdentifier)
|
||||
if err != nil {
|
||||
|
||||
@@ -34,7 +34,6 @@ This request is intended to be very fast, and called as the user types.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -45,13 +44,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var query string = "dylan"
|
||||
|
||||
var sectionID *float64 = plexgo.Float64(1516.53)
|
||||
|
||||
var limit *float64 = plexgo.Float64(5)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Search.PerformSearch(ctx, query, sectionID, limit)
|
||||
if err != nil {
|
||||
@@ -95,7 +92,6 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -106,13 +102,11 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var query string = "dead+poop"
|
||||
|
||||
var sectionID *float64 = plexgo.Float64(4094.8)
|
||||
|
||||
var limit *float64 = plexgo.Float64(5)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Search.PerformVoiceSearch(ctx, query, sectionID, limit)
|
||||
if err != nil {
|
||||
@@ -152,7 +146,6 @@ This will search the database for the string provided.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -163,9 +156,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var query string = "110"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Search.GetSearchResults(ctx, query)
|
||||
if err != nil {
|
||||
|
||||
@@ -27,7 +27,6 @@ Server Capabilities
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -39,8 +38,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetServerCapabilities(ctx)
|
||||
if err != nil {
|
||||
@@ -77,7 +74,6 @@ Get Server Preferences
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -89,8 +85,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetServerPreferences(ctx)
|
||||
if err != nil {
|
||||
@@ -127,7 +121,6 @@ Get Available Clients
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -139,8 +132,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetAvailableClients(ctx)
|
||||
if err != nil {
|
||||
@@ -177,7 +168,6 @@ Get Devices
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -189,8 +179,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetDevices(ctx)
|
||||
if err != nil {
|
||||
@@ -227,7 +215,6 @@ Get Server Identity
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -239,8 +226,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetServerIdentity(ctx)
|
||||
if err != nil {
|
||||
@@ -277,7 +262,6 @@ Returns MyPlex Account Information
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -289,8 +273,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetMyPlexAccount(ctx)
|
||||
if err != nil {
|
||||
@@ -328,7 +310,6 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -340,7 +321,6 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
request := operations.GetResizedPhotoRequest{
|
||||
Width: 110,
|
||||
Height: 165,
|
||||
@@ -350,7 +330,6 @@ func main() {
|
||||
Upscale: operations.UpscaleZero,
|
||||
URL: "/library/metadata/49564/thumb/1654258204",
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetResizedPhoto(ctx, request)
|
||||
if err != nil {
|
||||
@@ -388,7 +367,6 @@ Get Server List
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -400,8 +378,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Server.GetServerList(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -23,7 +23,6 @@ This will retrieve the "Now Playing" Information of the PMS.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -35,8 +34,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Sessions.GetSessions(ctx)
|
||||
if err != nil {
|
||||
@@ -73,7 +70,6 @@ This will Retrieve a listing of all history views.
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -85,8 +81,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Sessions.GetSessionHistory(ctx)
|
||||
if err != nil {
|
||||
@@ -123,7 +117,6 @@ Get Transcode Sessions
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -135,8 +128,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Sessions.GetTranscodeSessions(ctx)
|
||||
if err != nil {
|
||||
@@ -173,7 +164,6 @@ Stop a Transcode Session
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -184,9 +174,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var sessionKey string = "zz7llzqlx8w9vnrsbnwhbmep"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Sessions.StopTranscodeSession(ctx, sessionKey)
|
||||
if err != nil {
|
||||
|
||||
@@ -20,7 +20,6 @@ This will return the media statistics for the server
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -31,9 +30,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var timespan *int64 = plexgo.Int64(4)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Statistics.GetStatistics(ctx, timespan)
|
||||
if err != nil {
|
||||
|
||||
@@ -23,7 +23,6 @@ Querying status of updates
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
@@ -35,8 +34,6 @@ func main() {
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Updater.GetUpdateStatus(ctx)
|
||||
if err != nil {
|
||||
@@ -73,7 +70,6 @@ Checking for updates
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -85,9 +81,7 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var download *operations.Download = operations.DownloadOne.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Updater.CheckForUpdates(ctx, download)
|
||||
if err != nil {
|
||||
@@ -126,7 +120,6 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -138,11 +131,9 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
var tonight *operations.Tonight = operations.TonightOne.ToPointer()
|
||||
|
||||
var skip *operations.Skip = operations.SkipOne.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Updater.ApplyUpdates(ctx, tonight, skip)
|
||||
if err != nil {
|
||||
|
||||
@@ -21,7 +21,6 @@ Get the timeline for a media item
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -33,7 +32,6 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
request := operations.GetTimelineRequest{
|
||||
RatingKey: 23409,
|
||||
Key: "/library/metadata/23409",
|
||||
@@ -46,7 +44,6 @@ func main() {
|
||||
PlayBackTime: 2000,
|
||||
Row: 1,
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Video.GetTimeline(ctx, request)
|
||||
if err != nil {
|
||||
@@ -84,7 +81,6 @@ Begin a Universal Transcode Session
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"context"
|
||||
@@ -96,7 +92,6 @@ func main() {
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||
)
|
||||
|
||||
request := operations.StartUniversalTranscodeRequest{
|
||||
HasMDE: 1,
|
||||
Path: "/library/metadata/23409",
|
||||
@@ -115,7 +110,6 @@ func main() {
|
||||
AddDebugOverlay: plexgo.Float64(0),
|
||||
AutoAdjustQuality: plexgo.Float64(0),
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Video.StartUniversalTranscode(ctx, request)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user