ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2

This commit is contained in:
speakeasybot
2024-06-22 00:10:56 +00:00
parent 5fc7421ebf
commit 6e9e5028bc
70 changed files with 3323 additions and 1130 deletions

View File

@@ -18,6 +18,7 @@ API Calls interacting with Plex Media Server Libraries
* [SearchLibrary](#searchlibrary) - Search Library
* [GetMetadata](#getmetadata) - Get Items Metadata
* [GetMetadataChildren](#getmetadatachildren) - Get Items Children
* [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
* [GetOnDeck](#getondeck) - Get On Deck
## GetFileHash
@@ -355,8 +356,10 @@ func main() {
var sectionID any = "<value>"
var tag operations.Tag = operations.TagGenre
var includeGuids *int64 = plexgo.Int64(1)
ctx := context.Background()
res, err := s.Library.GetLibraryItems(ctx, sectionID, tag)
res, err := s.Library.GetLibraryItems(ctx, sectionID, tag, includeGuids)
if err != nil {
log.Fatal(err)
}
@@ -368,11 +371,12 @@ func main() {
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `sectionID` | *any* | :heavy_check_mark: | the Id of the library to query |
| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. |
| 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` | *any* | :heavy_check_mark: | the Id of the library to query | |
| `tag` | [operations.Tag](../../models/operations/tag.md) | :heavy_check_mark: | A key representing a specific tag within the section. | |
| `includeGuids` | **int64* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
### Response
@@ -573,8 +577,10 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var ratingKey float64 = 1539.14
var includeElements *string = plexgo.String("<value>")
ctx := context.Background()
res, err := s.Library.GetMetadataChildren(ctx, ratingKey)
res, err := s.Library.GetMetadataChildren(ctx, ratingKey, includeElements)
if err != nil {
log.Fatal(err)
}
@@ -586,10 +592,11 @@ func main() {
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `ratingKey` | *float64* | :heavy_check_mark: | the id of the library item to return the children of. |
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `ratingKey` | *float64* | :heavy_check_mark: | the id of the library item to return the children of. |
| `includeElements` | **string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)<br/> |
### Response
@@ -600,6 +607,57 @@ func main() {
| sdkerrors.GetMetadataChildrenResponseBody | 401 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |
## GetTopWatchedContent
This endpoint will return the top watched content from libraries of a certain type
### Example Usage
```go
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"),
)
var type_ int64 = 505531
var includeGuids *int64 = plexgo.Int64(1)
ctx := context.Background()
res, err := s.Library.GetTopWatchedContent(ctx, type_, includeGuids)
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. | |
| `type_` | *int64* | :heavy_check_mark: | the library type (1 - movies, 2 - shows, 3 - music) | |
| `includeGuids` | **int64* | :heavy_minus_sign: | Adds the Guids object to the response<br/> | 1 |
### Response
**[*operations.GetTopWatchedContentResponse](../../models/operations/gettopwatchedcontentresponse.md), error**
| Error Object | Status Code | Content Type |
| ------------------ | ------------------ | ------------------ |
| sdkerrors.SDKError | 4xx-5xx | */* |
## GetOnDeck
This endpoint will return the on deck content.

View File

@@ -8,7 +8,7 @@ Operations against the Plex Media Server System.
### Available Operations
* [GetServerCapabilities](#getservercapabilities) - Server Capabilities
* [GetServerCapabilities](#getservercapabilities) - Get Server Capabilities
* [GetServerPreferences](#getserverpreferences) - Get Server Preferences
* [GetAvailableClients](#getavailableclients) - Get Available Clients
* [GetDevices](#getdevices) - Get Devices
@@ -19,7 +19,7 @@ Operations against the Plex Media Server System.
## GetServerCapabilities
Server Capabilities
Get Server Capabilities
### Example Usage

View File

@@ -71,6 +71,7 @@ package main
import(
"github.com/LukeHagar/plexgo"
"github.com/LukeHagar/plexgo/models/operations"
"context"
"log"
)
@@ -80,9 +81,15 @@ func main() {
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sort *string = plexgo.String("<value>")
var accountID *int64 = plexgo.Int64(1)
var filter *operations.Filter = &operations.Filter{}
var librarySectionID *int64 = plexgo.Int64(12)
ctx := context.Background()
res, err := s.Sessions.GetSessionHistory(ctx)
res, err := s.Sessions.GetSessionHistory(ctx, sort, accountID, filter, librarySectionID)
if err != nil {
log.Fatal(err)
}
@@ -94,9 +101,13 @@ func main() {
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `sort` | **string* | :heavy_minus_sign: | Sorts the results by the specified field followed by the direction (asc, desc)<br/> | |
| `accountID` | **int64* | :heavy_minus_sign: | Filter results by those that are related to a specific users id<br/> | 1 |
| `filter` | [*operations.Filter](../../models/operations/filter.md) | :heavy_minus_sign: | Filters content by field and direction/equality<br/>(Unknown if viewedAt is the only supported column)<br/> | {<br/>"viewed-at-greater-than": {<br/>"value": "viewedAt\u003e"<br/>},<br/>"viewed-at-greater-than-or-equal-to": {<br/>"value": "viewedAt\u003e=\u003e"<br/>},<br/>"viewed-at-less-than": {<br/>"value": "viewedAt\u003c"<br/>}<br/>} |
| `librarySectionID` | **int64* | :heavy_minus_sign: | Filters the results based on the id of a valid library section<br/> | 12 |
### Response

View File

@@ -9,6 +9,8 @@ API Calls that perform operations with Plex Media Server Statistics
### Available Operations
* [GetStatistics](#getstatistics) - Get Media Statistics
* [GetResourcesStatistics](#getresourcesstatistics) - Get Resources Statistics
* [GetBandwidthStatistics](#getbandwidthstatistics) - Get Bandwidth Statistics
## GetStatistics
@@ -57,3 +59,99 @@ func main() {
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
| sdkerrors.GetStatisticsResponseBody | 401 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |
## GetResourcesStatistics
This will return the resources for the server
### Example Usage
```go
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"),
)
var timespan *int64 = plexgo.Int64(4)
ctx := context.Background()
res, err := s.Statistics.GetResourcesStatistics(ctx, timespan)
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. | |
| `timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
### Response
**[*operations.GetResourcesStatisticsResponse](../../models/operations/getresourcesstatisticsresponse.md), error**
| Error Object | Status Code | Content Type |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| sdkerrors.GetResourcesStatisticsResponseBody | 401 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |
## GetBandwidthStatistics
This will return the bandwidth statistics for the server
### Example Usage
```go
package main
import(
"github.com/LukeHagar/plexgo"
"context"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("Postman"),
)
var timespan *int64 = plexgo.Int64(4)
ctx := context.Background()
res, err := s.Statistics.GetBandwidthStatistics(ctx, timespan)
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. | |
| `timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
### Response
**[*operations.GetBandwidthStatisticsResponse](../../models/operations/getbandwidthstatisticsresponse.md), error**
| Error Object | Status Code | Content Type |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| sdkerrors.GetBandwidthStatisticsResponseBody | 401 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |

View File

@@ -32,7 +32,7 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
request := operations.GetWatchlistRequest{
Filter: operations.FilterReleased,
Filter: operations.PathParamFilterReleased,
XPlexToken: "<value>",
}
ctx := context.Background()