mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.0
This commit is contained in:
15
docs/models/operations/account.md
Normal file
15
docs/models/operations/account.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Account
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 238960586 |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | /accounts/238960586 |
|
||||
| `Name` | **string* | :heavy_minus_sign: | N/A | Diane |
|
||||
| `DefaultAudioLanguage` | **string* | :heavy_minus_sign: | N/A | en |
|
||||
| `AutoSelectAudio` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `DefaultSubtitleLanguage` | **string* | :heavy_minus_sign: | N/A | en |
|
||||
| `SubtitleMode` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 161 |
|
||||
| `Setting` | [][operations.Setting](../../models/operations/setting.md) | :heavy_minus_sign: | N/A | [{"advanced":false,"default":"","group":"general","hidden":false,"id":"FriendlyName","label":"Friendly name","summary":"This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead.","type":"text","value":"Hera"},{"advanced":false,"default":3600,"enumValues":"900:every 15 minutes\|1800:every 30 minutes\|3600:hourly\|7200:every 2 hours\|21600:every 6 hours\|43200:every 12 hours\|86400:daily","group":"library","hidden":false,"id":"ScheduledLibraryUpdateInterval","label":"Library scan interval","summary":"","type":"int","value":3600}] |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 161 |
|
||||
| `Setting` | [][operations.Setting](../../models/operations/setting.md) | :heavy_minus_sign: | N/A | [{"advanced":false,"default":false,"enumValues":"1:admin only\|2:everyone","group":"","hidden":true,"id":"EnableDatabaseTrace","label":"","summary":"","type":"bool","value":false}] |
|
||||
12
docs/models/operations/getstatisticsdevice.md
Normal file
12
docs/models/operations/getstatisticsdevice.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# GetStatisticsDevice
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 208 |
|
||||
| `Name` | **string* | :heavy_minus_sign: | N/A | Roku Express |
|
||||
| `Platform` | **string* | :heavy_minus_sign: | N/A | Roku |
|
||||
| `ClientIdentifier` | **string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 |
|
||||
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1706470556 |
|
||||
@@ -1,17 +1,11 @@
|
||||
# Two
|
||||
# GetStatisticsMediaContainer
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ID` | **string* | :heavy_minus_sign: | N/A | ScheduledLibraryUpdateInterval |
|
||||
| `Label` | **string* | :heavy_minus_sign: | N/A | Library scan interval |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | int |
|
||||
| `Default` | **int* | :heavy_minus_sign: | N/A | 3600 |
|
||||
| `Value` | **int* | :heavy_minus_sign: | N/A | 3600 |
|
||||
| `Hidden` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Advanced` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Group` | **string* | :heavy_minus_sign: | N/A | library |
|
||||
| `EnumValues` | **string* | :heavy_minus_sign: | N/A | 900:every 15 minutes\|1800:every 30 minutes\|3600:hourly\|7200:every 2 hours\|21600:every 6 hours\|43200:every 12 hours\|86400:daily |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Size` | **int* | :heavy_minus_sign: | N/A | 5497 |
|
||||
| `Device` | [][operations.GetStatisticsDevice](../../models/operations/getstatisticsdevice.md) | :heavy_minus_sign: | N/A | [{"clientIdentifier":"793095d235660625108ef785cc7646e9","createdAt":1706470556,"id":208,"name":"Roku Express","platform":"Roku"}] |
|
||||
| `Account` | [][operations.Account](../../models/operations/account.md) | :heavy_minus_sign: | N/A | [{"autoSelectAudio":true,"defaultAudioLanguage":"en","defaultSubtitleLanguage":"en","id":238960586,"key":"/accounts/238960586","name":"Diane","subtitleMode":1,"thumb":"https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}] |
|
||||
| `StatisticsMedia` | [][operations.StatisticsMedia](../../models/operations/statisticsmedia.md) | :heavy_minus_sign: | N/A | [{"accountID":1,"at":1707141600,"count":1,"deviceID":13,"duration":1555,"metadataType":4,"timespan":4}] |
|
||||
8
docs/models/operations/getstatisticsrequest.md
Normal file
8
docs/models/operations/getstatisticsrequest.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetStatisticsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `Timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
||||
11
docs/models/operations/getstatisticsresponse.md
Normal file
11
docs/models/operations/getstatisticsresponse.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetStatisticsResponse
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `Object` | [*operations.GetStatisticsResponseBody](../../models/operations/getstatisticsresponsebody.md) | :heavy_minus_sign: | Media Statistics |
|
||||
10
docs/models/operations/getstatisticsresponsebody.md
Normal file
10
docs/models/operations/getstatisticsresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetStatisticsResponseBody
|
||||
|
||||
Media Statistics
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `MediaContainer` | [*operations.GetStatisticsMediaContainer](../../models/operations/getstatisticsmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,16 +0,0 @@
|
||||
# One
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ID` | **string* | :heavy_minus_sign: | N/A | FriendlyName |
|
||||
| `Label` | **string* | :heavy_minus_sign: | N/A | Friendly name |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead. |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | text |
|
||||
| `Default` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `Value` | **string* | :heavy_minus_sign: | N/A | Hera |
|
||||
| `Hidden` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Advanced` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Group` | **string* | :heavy_minus_sign: | N/A | general |
|
||||
@@ -1,17 +1,17 @@
|
||||
# Setting
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### One
|
||||
|
||||
```go
|
||||
setting := operations.CreateSettingOne(operations.One{/* values here */})
|
||||
```
|
||||
|
||||
### Two
|
||||
|
||||
```go
|
||||
setting := operations.CreateSettingTwo(operations.Two{/* values here */})
|
||||
```
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||
| `ID` | **string* | :heavy_minus_sign: | N/A | EnableDatabaseTrace |
|
||||
| `Label` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `Summary` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | bool |
|
||||
| `Default` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Value` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Hidden` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Advanced` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Group` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `EnumValues` | **string* | :heavy_minus_sign: | N/A | 1:admin only\|2:everyone |
|
||||
14
docs/models/operations/statisticsmedia.md
Normal file
14
docs/models/operations/statisticsmedia.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# StatisticsMedia
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `AccountID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `DeviceID` | **int* | :heavy_minus_sign: | N/A | 13 |
|
||||
| `Timespan` | **int* | :heavy_minus_sign: | N/A | 4 |
|
||||
| `At` | **int* | :heavy_minus_sign: | N/A | 1707141600 |
|
||||
| `MetadataType` | **int* | :heavy_minus_sign: | N/A | 4 |
|
||||
| `Count` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Duration` | **int* | :heavy_minus_sign: | N/A | 1555 |
|
||||
10
docs/models/sdkerrors/getstatisticserrors.md
Normal file
10
docs/models/sdkerrors/getstatisticserrors.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetStatisticsErrors
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `Code` | **float64* | :heavy_minus_sign: | N/A | 1001 |
|
||||
| `Message` | **string* | :heavy_minus_sign: | N/A | User could not be authenticated |
|
||||
| `Status` | **float64* | :heavy_minus_sign: | N/A | 401 |
|
||||
11
docs/models/sdkerrors/getstatisticsresponsebody.md
Normal file
11
docs/models/sdkerrors/getstatisticsresponsebody.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetStatisticsResponseBody
|
||||
|
||||
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `Errors` | [][sdkerrors.GetStatisticsErrors](../../models/sdkerrors/getstatisticserrors.md) | :heavy_minus_sign: | N/A |
|
||||
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
|
||||
@@ -88,7 +88,7 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var activityUUID string = "string"
|
||||
var activityUUID string = "<value>"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Activities.CancelServerActivities(ctx, activityUUID)
|
||||
|
||||
@@ -34,9 +34,9 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var count *float64 = 1262.49
|
||||
var count *float64 = plexgo.Float64(1262.49)
|
||||
|
||||
var onlyTransient *operations.OnlyTransient = operations.OnlyTransientOne
|
||||
var onlyTransient *operations.OnlyTransient = operations.OnlyTransientOne.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Hubs.GetGlobalHubs(ctx, count, onlyTransient)
|
||||
@@ -93,9 +93,9 @@ func main() {
|
||||
|
||||
var sectionID float64 = 6728.76
|
||||
|
||||
var count *float64 = 9010.22
|
||||
var count *float64 = plexgo.Float64(9010.22)
|
||||
|
||||
var onlyTransient *operations.QueryParamOnlyTransient = operations.QueryParamOnlyTransientZero
|
||||
var onlyTransient *operations.QueryParamOnlyTransient = operations.QueryParamOnlyTransientZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Hubs.GetLibraryHubs(ctx, sectionID, count, onlyTransient)
|
||||
|
||||
@@ -45,7 +45,7 @@ func main() {
|
||||
|
||||
var url_ string = "file://C:\Image.png&type=13"
|
||||
|
||||
var type_ *float64 = 4462.17
|
||||
var type_ *float64 = plexgo.Float64(4462.17)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetFileHash(ctx, url_, type_)
|
||||
@@ -243,7 +243,7 @@ func main() {
|
||||
|
||||
var sectionID float64 = 1000
|
||||
|
||||
var includeDetails *operations.IncludeDetails = operations.IncludeDetailsZero
|
||||
var includeDetails *operations.IncludeDetails = operations.IncludeDetailsZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Library.GetLibrary(ctx, sectionID, includeDetails)
|
||||
|
||||
@@ -142,11 +142,11 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var key string = "string"
|
||||
var key string = "<value>"
|
||||
|
||||
var time float64 = 6900.91
|
||||
|
||||
var state string = "string"
|
||||
var state string = "<value>"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Media.UpdatePlayProgress(ctx, key, time, state)
|
||||
|
||||
@@ -48,7 +48,7 @@ func main() {
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{
|
||||
Title: "string",
|
||||
Title: "<value>",
|
||||
Type: operations.QueryParamTypePhoto,
|
||||
Smart: operations.SmartOne,
|
||||
URI: "https://inborn-brochure.biz",
|
||||
@@ -102,9 +102,9 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var playlistType *operations.PlaylistType = operations.PlaylistTypeAudio
|
||||
var playlistType *operations.PlaylistType = operations.PlaylistTypeAudio.ToPointer()
|
||||
|
||||
var smart *operations.QueryParamSmart = operations.QueryParamSmartZero
|
||||
var smart *operations.QueryParamSmart = operations.QueryParamSmartZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.GetPlaylists(ctx, playlistType, smart)
|
||||
@@ -269,9 +269,9 @@ func main() {
|
||||
|
||||
var playlistID float64 = 3915
|
||||
|
||||
var title *string = "string"
|
||||
var title *string = plexgo.String("<value>")
|
||||
|
||||
var summary *string = "string"
|
||||
var summary *string = plexgo.String("<value>")
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.UpdatePlaylist(ctx, playlistID, title, summary)
|
||||
@@ -444,7 +444,7 @@ func main() {
|
||||
|
||||
var uri string = "server://12345/com.plexapp.plugins.library/library/metadata/1"
|
||||
|
||||
var playQueueID *float64 = 123
|
||||
var playQueueID *float64 = plexgo.Float64(123)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Playlists.AddPlaylistContents(ctx, playlistID, uri, playQueueID)
|
||||
|
||||
@@ -33,9 +33,9 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var xPlexClientIdentifier string = "string"
|
||||
var xPlexClientIdentifier string = "<value>"
|
||||
|
||||
var strong *bool = false
|
||||
var strong *bool = plexgo.Bool(false)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.GetPin(ctx, xPlexClientIdentifier, strong)
|
||||
@@ -90,9 +90,9 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var pinID string = "string"
|
||||
var pinID string = "<value>"
|
||||
|
||||
var xPlexClientIdentifier string = "string"
|
||||
var xPlexClientIdentifier string = "<value>"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.GetToken(ctx, pinID, xPlexClientIdentifier)
|
||||
|
||||
@@ -49,9 +49,9 @@ func main() {
|
||||
|
||||
var query string = "dylan"
|
||||
|
||||
var sectionID *float64 = 1516.53
|
||||
var sectionID *float64 = plexgo.Float64(1516.53)
|
||||
|
||||
var limit *float64 = 5
|
||||
var limit *float64 = plexgo.Float64(5)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Search.PerformSearch(ctx, query, sectionID, limit)
|
||||
@@ -112,9 +112,9 @@ func main() {
|
||||
|
||||
var query string = "dead+poop"
|
||||
|
||||
var sectionID *float64 = 4094.8
|
||||
var sectionID *float64 = plexgo.Float64(4094.8)
|
||||
|
||||
var limit *float64 = 5
|
||||
var limit *float64 = plexgo.Float64(5)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Search.PerformVoiceSearch(ctx, query, sectionID, limit)
|
||||
|
||||
63
docs/sdks/statistics/README.md
Normal file
63
docs/sdks/statistics/README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Statistics
|
||||
(*Statistics*)
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls that perform operations with Plex Media Server Statistics
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetStatistics](#getstatistics) - Get Media Statistics
|
||||
|
||||
## GetStatistics
|
||||
|
||||
This will return the media statistics for the server
|
||||
|
||||
### Example Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
|
||||
var timespan *int64 = plexgo.Int64(411769)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Statistics.GetStatistics(ctx, timespan)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
||||
| `timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[*operations.GetStatisticsResponse](../../models/operations/getstatisticsresponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| sdkerrors.GetStatisticsResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
@@ -85,7 +85,7 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var download *operations.Download = operations.DownloadOne
|
||||
var download *operations.Download = operations.DownloadOne.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Updater.CheckForUpdates(ctx, download)
|
||||
@@ -140,9 +140,9 @@ func main() {
|
||||
)
|
||||
|
||||
|
||||
var tonight *operations.Tonight = operations.TonightOne
|
||||
var tonight *operations.Tonight = operations.TonightOne.ToPointer()
|
||||
|
||||
var skip *operations.Skip = operations.SkipZero
|
||||
var skip *operations.Skip = operations.SkipZero.ToPointer()
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Updater.ApplyUpdates(ctx, tonight, skip)
|
||||
|
||||
@@ -8,65 +8,8 @@ API Calls that perform operations with Plex Media Server Videos
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [StartUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode
|
||||
* [GetTimeline](#gettimeline) - Get the timeline for a media item
|
||||
|
||||
## StartUniversalTranscode
|
||||
|
||||
Begin a Universal Transcode Session
|
||||
|
||||
### Example Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{
|
||||
HasMDE: 8924.99,
|
||||
Path: "/etc/mail",
|
||||
MediaIndex: 9962.95,
|
||||
PartIndex: 1232.82,
|
||||
Protocol: "string",
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.StatusCode == http.StatusOK {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
||||
| `request` | [operations.StartUniversalTranscodeRequest](../../models/operations/startuniversaltranscoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[*operations.StartUniversalTranscodeResponse](../../models/operations/startuniversaltranscoderesponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| sdkerrors.StartUniversalTranscodeResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
* [StartUniversalTranscode](#startuniversaltranscode) - Start Universal Transcode
|
||||
|
||||
## GetTimeline
|
||||
|
||||
@@ -99,7 +42,7 @@ func main() {
|
||||
HasMDE: 7574.33,
|
||||
Time: 3327.51,
|
||||
Duration: 7585.39,
|
||||
Context: "string",
|
||||
Context: "<value>",
|
||||
PlayQueueItemID: 1406.21,
|
||||
PlayBackTime: 2699.34,
|
||||
Row: 3536.42,
|
||||
@@ -129,3 +72,60 @@ func main() {
|
||||
| --------------------------------- | --------------------------------- | --------------------------------- |
|
||||
| sdkerrors.GetTimelineResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## StartUniversalTranscode
|
||||
|
||||
Begin a Universal Transcode Session
|
||||
|
||||
### Example Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{
|
||||
HasMDE: 8924.99,
|
||||
Path: "/etc/mail",
|
||||
MediaIndex: 9962.95,
|
||||
PartIndex: 1232.82,
|
||||
Protocol: "<value>",
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.StatusCode == http.StatusOK {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
||||
| `request` | [operations.StartUniversalTranscodeRequest](../../models/operations/startuniversaltranscoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[*operations.StartUniversalTranscodeResponse](../../models/operations/startuniversaltranscoderesponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| sdkerrors.StartUniversalTranscodeResponseBody | 401 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user