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.158.0
This commit is contained in:
@@ -3,26 +3,26 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `Filters` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Refreshing` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `Agent` | **string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
||||
| `Scanner` | **string* | :heavy_minus_sign: | N/A | Plex Movie |
|
||||
| `Language` | **string* | :heavy_minus_sign: | N/A | en-US |
|
||||
| `UUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705615634 |
|
||||
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1654131312 |
|
||||
| `ScannedAt` | **int* | :heavy_minus_sign: | N/A | 1705615584 |
|
||||
| `Content` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Directory` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `ContentChangedAt` | **int* | :heavy_minus_sign: | N/A | 3192854 |
|
||||
| `Hidden` | **int* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `Location` | [][operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | [{"id":1,"path":"/movies"}] |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `Composite` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `Filters` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Refreshing` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||
| `Key` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `Agent` | **string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
||||
| `Scanner` | **string* | :heavy_minus_sign: | N/A | Plex Movie |
|
||||
| `Language` | **string* | :heavy_minus_sign: | N/A | en-US |
|
||||
| `UUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705615634 |
|
||||
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1654131312 |
|
||||
| `ScannedAt` | **int* | :heavy_minus_sign: | N/A | 1705615584 |
|
||||
| `Content` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `Directory` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||
| `ContentChangedAt` | **int* | :heavy_minus_sign: | N/A | 3192854 |
|
||||
| `Hidden` | **int* | :heavy_minus_sign: | N/A | 0 |
|
||||
| `Location` | [][operations.GetLibrariesLocation](../../models/operations/getlibrarieslocation.md) | :heavy_minus_sign: | N/A | [{"id":1,"path":"/movies"}] |
|
||||
9
docs/models/operations/getlibrarieslocation.md
Normal file
9
docs/models/operations/getlibrarieslocation.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetLibrariesLocation
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Path` | **string* | :heavy_minus_sign: | N/A | /movies |
|
||||
9
docs/models/operations/getpinrequest.md
Normal file
9
docs/models/operations/getpinrequest.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetPinRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | Plex Authentication Token |
|
||||
| `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/> |
|
||||
11
docs/models/operations/getpinresponse.md
Normal file
11
docs/models/operations/getpinresponse.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetPinResponse
|
||||
|
||||
|
||||
## 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.GetPinResponseBody](../../models/operations/getpinresponsebody.md) | :heavy_minus_sign: | The Pin |
|
||||
21
docs/models/operations/getpinresponsebody.md
Normal file
21
docs/models/operations/getpinresponsebody.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# GetPinResponseBody
|
||||
|
||||
The Pin
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ID` | **float64* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 |
|
||||
| `Code` | **string* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t |
|
||||
| `Product` | **string* | :heavy_minus_sign: | N/A | Plex Web |
|
||||
| `Trusted` | **bool* | :heavy_minus_sign: | N/A | |
|
||||
| `Qr` | **string* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv <br/>The QR code redirects to the relevant `plex.tv/link` authentication page<br/>Which then prompts the user for the 4 Digit Link Pin<br/> | https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t |
|
||||
| `ClientIdentifier` | **string* | :heavy_minus_sign: | N/A | Postman |
|
||||
| `Location` | [*operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | |
|
||||
| `ExpiresIn` | **float64* | :heavy_minus_sign: | N/A | 1800 |
|
||||
| `CreatedAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC |
|
||||
| `ExpiresAt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC |
|
||||
| `AuthToken` | **string* | :heavy_minus_sign: | N/A | |
|
||||
| `NewRegistration` | **string* | :heavy_minus_sign: | N/A | |
|
||||
9
docs/models/operations/gettokenrequest.md
Normal file
9
docs/models/operations/gettokenrequest.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# GetTokenRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
||||
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | Plex Authentication Token |
|
||||
10
docs/models/operations/gettokenresponse.md
Normal file
10
docs/models/operations/gettokenresponse.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetTokenResponse
|
||||
|
||||
|
||||
## 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 |
|
||||
@@ -3,7 +3,15 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `ID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `Path` | **string* | :heavy_minus_sign: | N/A | /movies |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
|
||||
| `Code` | **string* | :heavy_minus_sign: | N/A | US |
|
||||
| `EuropeanUnionMember` | **bool* | :heavy_minus_sign: | N/A | |
|
||||
| `ContinentCode` | **string* | :heavy_minus_sign: | N/A | NA |
|
||||
| `Country` | **string* | :heavy_minus_sign: | N/A | United States |
|
||||
| `City` | **string* | :heavy_minus_sign: | N/A | Austin |
|
||||
| `TimeZone` | **string* | :heavy_minus_sign: | N/A | America/Chicago |
|
||||
| `PostalCode` | **float64* | :heavy_minus_sign: | N/A | 78732 |
|
||||
| `InPrivacyRestrictedCountry` | **bool* | :heavy_minus_sign: | N/A | |
|
||||
| `Subdivisions` | **string* | :heavy_minus_sign: | N/A | Texas |
|
||||
| `Coordinates` | **string* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 |
|
||||
37
docs/models/operations/option.md
Normal file
37
docs/models/operations/option.md
Normal file
@@ -0,0 +1,37 @@
|
||||
## Options
|
||||
|
||||
### WithServerURL
|
||||
|
||||
WithServerURL allows providing an alternative server URL.
|
||||
|
||||
```go
|
||||
operations.WithServerURL("http://api.example.com")
|
||||
```
|
||||
|
||||
## WithTemplatedServerURL
|
||||
|
||||
WithTemplatedServerURL allows providing an alternative server URL with templated parameters.
|
||||
|
||||
```go
|
||||
operations.WithTemplatedServerURL("http://{host}:{port}", map[string]string{
|
||||
"host": "api.example.com",
|
||||
"port": "8080",
|
||||
})
|
||||
```
|
||||
|
||||
### WithRetries
|
||||
|
||||
WithRetries allows customizing the default retry configuration. Only usable with methods that mention they support retries.
|
||||
|
||||
```go
|
||||
operations.WithRetries(utils.RetryConfig{
|
||||
Strategy: "backoff",
|
||||
Backoff: utils.BackoffStrategy{
|
||||
InitialInterval: 500 * time.Millisecond,
|
||||
MaxInterval: 60 * time.Second,
|
||||
Exponent: 1.5,
|
||||
MaxElapsedTime: 5 * time.Minute,
|
||||
},
|
||||
RetryConnectionErrors: true,
|
||||
})
|
||||
```
|
||||
10
docs/models/sdkerrors/getpinerrors.md
Normal file
10
docs/models/sdkerrors/getpinerrors.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetPinErrors
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `Code` | **float64* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `Message` | **string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
|
||||
| `Status` | **float64* | :heavy_minus_sign: | N/A | 400 |
|
||||
11
docs/models/sdkerrors/getpinresponsebody.md
Normal file
11
docs/models/sdkerrors/getpinresponsebody.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetPinResponseBody
|
||||
|
||||
X-Plex-Client-Identifier is missing
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `Errors` | [][sdkerrors.GetPinErrors](../../models/sdkerrors/getpinerrors.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 |
|
||||
10
docs/models/sdkerrors/gettokenerrors.md
Normal file
10
docs/models/sdkerrors/gettokenerrors.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetTokenErrors
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `Code` | **float64* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `Message` | **string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
|
||||
| `Status` | **float64* | :heavy_minus_sign: | N/A | 400 |
|
||||
11
docs/models/sdkerrors/gettokenresponsebody.md
Normal file
11
docs/models/sdkerrors/gettokenresponsebody.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# GetTokenResponseBody
|
||||
|
||||
X-Plex-Client-Identifier is missing
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `Errors` | [][sdkerrors.GetTokenErrors](../../models/sdkerrors/gettokenerrors.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 |
|
||||
5
docs/sdks/plex/README.md
Normal file
5
docs/sdks/plex/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Plex
|
||||
(*Plex*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
120
docs/sdks/tv/README.md
Normal file
120
docs/sdks/tv/README.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# Tv
|
||||
(*Plex.Tv*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [GetPin](#getpin) - Get a Pin
|
||||
* [GetToken](#gettoken) - Get Access Token
|
||||
|
||||
## GetPin
|
||||
|
||||
Retrieve a Pin from Plex.tv for authentication flows
|
||||
|
||||
### 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 xPlexClientIdentifier string = "string"
|
||||
|
||||
var strong *bool = false
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.Tv.GetPin(ctx, xPlexClientIdentifier, strong)
|
||||
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. |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | Plex Authentication Token |
|
||||
| `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/> |
|
||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[*operations.GetPinResponse](../../models/operations/getpinresponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------- | ---------------------------- | ---------------------------- |
|
||||
| sdkerrors.GetPinResponseBody | 400 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## GetToken
|
||||
|
||||
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
||||
|
||||
### Example Usage
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import(
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"context"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
|
||||
var pinID string = "string"
|
||||
|
||||
var xPlexClientIdentifier string = "string"
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.Tv.GetToken(ctx, pinID, xPlexClientIdentifier)
|
||||
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. |
|
||||
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | Plex Authentication Token |
|
||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[*operations.GetTokenResponse](../../models/operations/gettokenresponse.md), error**
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------ | ------------------------------ | ------------------------------ |
|
||||
| sdkerrors.GetTokenResponseBody | 400 | application/json |
|
||||
| sdkerrors.SDKError | 4xx-5xx | */* |
|
||||
Reference in New Issue
Block a user