Compare commits

...

6 Commits

Author SHA1 Message Date
speakeasybot
a34f15746e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.285.0 2024-05-08 18:15:46 +00:00
speakeasybot
12afbc6467 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.283.1 2024-05-08 00:39:09 +00:00
speakeasybot
8267c3fcbd ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.280.1 2024-05-07 00:47:31 +00:00
speakeasybot
3f2fc4fe8c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.279.0 2024-05-06 00:48:33 +00:00
speakeasybot
21517ca298 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.279.0 2024-05-05 00:51:13 +00:00
speakeasybot
d7fe60ed91 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.279.0 2024-05-04 00:47:01 +00:00
45 changed files with 695 additions and 3601 deletions

View File

@@ -1,27 +1,33 @@
lockVersion: 2.0.0
id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
management:
docChecksum: 7a43cd3413d535205cfaee20a4b6a250
docChecksum: 543cb95355401d2e3c2ba11a50d9dd94
docVersion: 0.0.3
speakeasyVersion: 1.277.8
generationVersion: 2.319.10
releaseVersion: 0.6.6
configChecksum: f8398b860184344aa6c067b6ffd710a4
speakeasyVersion: 1.285.0
generationVersion: 2.326.3
releaseVersion: 0.7.0
configChecksum: 98c0e864ba8f7c2e3b366fd643dd90ab
repoURL: https://github.com/LukeHagar/plexgo.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexgo
published: true
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.4
core: 3.4.7
flattening: 2.81.1
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.2
globals: 2.82.2
intellisenseMarkdownSupport: 0.1.0
methodServerURLs: 2.82.1
nameOverrides: 2.81.2
responseFormat: 0.1.0
responseFormat: 0.1.1
sdkHooks: 0.1.0
unions: 2.85.5
generatedFiles:
- server.go
- media.go
@@ -87,7 +93,6 @@ generatedFiles:
- /models/operations/getlibraries.go
- /models/operations/getlibrary.go
- /models/operations/deletelibrary.go
- /models/operations/getlibraryitems.go
- /models/operations/refreshlibrary.go
- /models/operations/searchlibrary.go
- /models/operations/getmetadata.go
@@ -307,19 +312,6 @@ generatedFiles:
- docs/models/operations/getlibraryresponse.md
- docs/models/operations/deletelibraryrequest.md
- docs/models/operations/deletelibraryresponse.md
- docs/models/operations/tag.md
- docs/models/operations/getlibraryitemsrequest.md
- docs/models/operations/getlibraryitemspart.md
- docs/models/operations/getlibraryitemsmedia.md
- docs/models/operations/getlibraryitemsgenre.md
- docs/models/operations/getlibraryitemscountry.md
- docs/models/operations/getlibraryitemsdirector.md
- docs/models/operations/getlibraryitemswriter.md
- docs/models/operations/getlibraryitemsrole.md
- docs/models/operations/getlibraryitemsmetadata.md
- docs/models/operations/getlibraryitemsmediacontainer.md
- docs/models/operations/getlibraryitemsresponsebody.md
- docs/models/operations/getlibraryitemsresponse.md
- docs/models/operations/refreshlibraryrequest.md
- docs/models/operations/refreshlibraryresponse.md
- docs/models/operations/type.md

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
version: 0.6.6
version: 0.7.0
additionalDependencies: {}
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
@@ -26,6 +26,7 @@ go:
webhooks: models/webhooks
inputModelSuffix: input
maxMethodParams: 4
methodArguments: require-security-and-request
outputModelSuffix: output
packageName: github.com/LukeHagar/plexgo
responseFormat: envelope

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.277.8
speakeasyVersion: 1.285.0
sources: {}
targets: {}
workflow:

View File

@@ -105,7 +105,6 @@ func main() {
* [GetLibraries](docs/sdks/library/README.md#getlibraries) - Get All Libraries
* [GetLibrary](docs/sdks/library/README.md#getlibrary) - Get Library Details
* [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
* [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
* [RefreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
* [SearchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library
* [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
@@ -312,7 +311,7 @@ func main() {
var xPlexClientIdentifier *string = plexgo.String("Postman")
ctx := context.Background()
res, err := s.Plex.GetPin(ctx, operations.WithServerURL("https://plex.tv/api/v2"), strong, xPlexClientIdentifier)
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier, operations.WithServerURL("https://plex.tv/api/v2"))
if err != nil {
log.Fatal(err)
}

View File

@@ -343,3 +343,63 @@ Based on:
- [go v0.6.6] .
### Releases
- [Go v0.6.6] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.6 - .
## 2024-05-04 00:46:06
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.6.7] .
### Releases
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
## 2024-05-05 00:50:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.6.7] .
### Releases
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
## 2024-05-06 00:48:07
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.6.7] .
### Releases
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
## 2024-05-07 00:47:05
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.280.1 (2.322.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.6.7] .
### Releases
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
## 2024-05-08 00:38:43
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.283.1 (2.324.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.6.7] .
### Releases
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
## 2024-05-08 18:14:51
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.285.0 (2.326.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.7.0] .
### Releases
- [Go v0.7.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.7.0 - .

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |

View File

@@ -3,6 +3,6 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
| Field | Type | Required | Description | Example |
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |

View File

@@ -3,6 +3,6 @@
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |

View File

@@ -1,8 +0,0 @@
# GetLibraryItemsCountry
## Fields
| Field | Type | Required | Description | Example |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | United States of America |

View File

@@ -1,8 +0,0 @@
# GetLibraryItemsDirector
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | James Cameron |

View File

@@ -1,8 +0,0 @@
# GetLibraryItemsGenre
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | Adventure |

View File

@@ -1,21 +0,0 @@
# GetLibraryItemsMedia
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 119534 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 |
| `Bitrate` | **int* | :heavy_minus_sign: | N/A | 25025 |
| `Width` | **int* | :heavy_minus_sign: | N/A | 3840 |
| `Height` | **int* | :heavy_minus_sign: | N/A | 2072 |
| `AspectRatio` | **float64* | :heavy_minus_sign: | N/A | 1.85 |
| `AudioChannels` | **int* | :heavy_minus_sign: | N/A | 6 |
| `AudioCodec` | **string* | :heavy_minus_sign: | N/A | eac3 |
| `VideoCodec` | **string* | :heavy_minus_sign: | N/A | hevc |
| `VideoResolution` | **string* | :heavy_minus_sign: | N/A | 4k |
| `Container` | **string* | :heavy_minus_sign: | N/A | mkv |
| `VideoFrameRate` | **string* | :heavy_minus_sign: | N/A | 24p |
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 |
| `Part` | [][operations.GetLibraryItemsPart](../../models/operations/getlibraryitemspart.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 119542,<br/>"key": "/library/parts/119542/1680457526/file.mkv",<br/>"duration": 11558112,<br/>"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",<br/>"size": 36158371307,<br/>"container": "mkv",<br/>"videoProfile": "main 10"<br/>}<br/>] |

File diff suppressed because one or more lines are too long

View File

@@ -1,64 +0,0 @@
# GetLibraryItemsMetadata
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `RatingKey` | **string* | :heavy_minus_sign: | N/A | 58683 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683 |
| `GUID` | **string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 |
| `Studio` | **string* | :heavy_minus_sign: | N/A | 20th Century Studios |
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
| `Title` | **string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water |
| `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 |
| `Summary` | **string* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. |
| `Rating` | **float64* | :heavy_minus_sign: | N/A | 7.6 |
| `AudienceRating` | **float64* | :heavy_minus_sign: | N/A | 9.2 |
| `Year` | **int* | :heavy_minus_sign: | N/A | 2022 |
| `Tagline` | **string* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `Art` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 |
| `OriginallyAvailableAt` | [*types.Date](../../types/date.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC |
| `AddedAt` | **int* | :heavy_minus_sign: | N/A | 1680457607 |
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1703239236 |
| `AudienceRatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright |
| `ChapterSource` | **string* | :heavy_minus_sign: | N/A | media |
| `PrimaryExtraKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/58684 |
| `RatingImage` | **string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe |
| `GrandparentRatingKey` | **string* | :heavy_minus_sign: | N/A | 66 |
| `GrandparentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
| `GrandparentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
| `GrandparentTitle` | **string* | :heavy_minus_sign: | N/A | Caprica |
| `GrandparentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
| `GrandparentArt` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 |
| `GrandparentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |
| `Media` | [][operations.GetLibraryItemsMedia](../../models/operations/getlibraryitemsmedia.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"id": 119534,<br/>"duration": 11558112,<br/>"bitrate": 25025,<br/>"width": 3840,<br/>"height": 2072,<br/>"aspectRatio": 1.85,<br/>"audioChannels": 6,<br/>"audioCodec": "eac3",<br/>"videoCodec": "hevc",<br/>"videoResolution": "4k",<br/>"container": "mkv",<br/>"videoFrameRate": "24p",<br/>"videoProfile": "main 10",<br/>"Part": [<br/>{<br/>"id": 119542,<br/>"key": "/library/parts/119542/1680457526/file.mkv",<br/>"duration": 11558112,<br/>"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",<br/>"size": 36158371307,<br/>"container": "mkv",<br/>"videoProfile": "main 10"<br/>}<br/>]<br/>}<br/>] |
| `Genre` | [][operations.GetLibraryItemsGenre](../../models/operations/getlibraryitemsgenre.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Adventure"<br/>}<br/>] |
| `Country` | [][operations.GetLibraryItemsCountry](../../models/operations/getlibraryitemscountry.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "United States of America"<br/>}<br/>] |
| `Director` | [][operations.GetLibraryItemsDirector](../../models/operations/getlibraryitemsdirector.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "James Cameron"<br/>}<br/>] |
| `Writer` | [][operations.GetLibraryItemsWriter](../../models/operations/getlibraryitemswriter.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "James Cameron"<br/>}<br/>] |
| `Role` | [][operations.GetLibraryItemsRole](../../models/operations/getlibraryitemsrole.md) | :heavy_minus_sign: | N/A | [<br/>{<br/>"tag": "Sigourney Weaver"<br/>}<br/>] |
| `TitleSort` | **string* | :heavy_minus_sign: | N/A | Whale |
| `ViewCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `LastViewedAt` | **int* | :heavy_minus_sign: | N/A | 1682752242 |
| `OriginalTitle` | **string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 |
| `ViewOffset` | **int* | :heavy_minus_sign: | N/A | 5222500 |
| `SkipCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `Index` | **int* | :heavy_minus_sign: | N/A | 1 |
| `Theme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 |
| `LeafCount` | **int* | :heavy_minus_sign: | N/A | 14 |
| `ViewedLeafCount` | **int* | :heavy_minus_sign: | N/A | 0 |
| `ChildCount` | **int* | :heavy_minus_sign: | N/A | 1 |
| `HasPremiumExtras` | **string* | :heavy_minus_sign: | N/A | 1 |
| `HasPremiumPrimaryExtra` | **string* | :heavy_minus_sign: | N/A | 1 |
| `ParentRatingKey` | **string* | :heavy_minus_sign: | N/A | 66 |
| `ParentGUID` | **string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 |
| `ParentStudio` | **string* | :heavy_minus_sign: | N/A | UCP |
| `ParentKey` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66 |
| `ParentTitle` | **string* | :heavy_minus_sign: | N/A | Caprica |
| `ParentIndex` | **int* | :heavy_minus_sign: | N/A | 1 |
| `ParentYear` | **int* | :heavy_minus_sign: | N/A | 2010 |
| `ParentThumb` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 |
| `ParentTheme` | **string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |

View File

@@ -1,14 +0,0 @@
# GetLibraryItemsPart
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `ID` | **int* | :heavy_minus_sign: | N/A | 119542 |
| `Key` | **string* | :heavy_minus_sign: | N/A | /library/parts/119542/1680457526/file.mkv |
| `Duration` | **int* | :heavy_minus_sign: | N/A | 11558112 |
| `File` | **string* | :heavy_minus_sign: | N/A | /movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv |
| `Size` | **int64* | :heavy_minus_sign: | N/A | 36158371307 |
| `Container` | **string* | :heavy_minus_sign: | N/A | mkv |
| `VideoProfile` | **string* | :heavy_minus_sign: | N/A | main 10 |

View File

@@ -1,9 +0,0 @@
# GetLibraryItemsRequest
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `SectionID` | *int64* | :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. |

View File

@@ -1,11 +0,0 @@
# GetLibraryItemsResponse
## 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.GetLibraryItemsResponseBody](../../models/operations/getlibraryitemsresponsebody.md) | :heavy_minus_sign: | The contents of the library by section and tag |

View File

@@ -1,10 +0,0 @@
# GetLibraryItemsResponseBody
The contents of the library by section and tag
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `MediaContainer` | [*operations.GetLibraryItemsMediaContainer](../../models/operations/getlibraryitemsmediacontainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -1,8 +0,0 @@
# GetLibraryItemsRole
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | Sigourney Weaver |

View File

@@ -1,8 +0,0 @@
# GetLibraryItemsWriter
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `Tag` | **string* | :heavy_minus_sign: | N/A | James Cameron |

View File

@@ -3,6 +3,6 @@
## 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/> |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `Timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |

View File

@@ -3,15 +3,15 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `RatingKey` | *float64* | :heavy_check_mark: | The rating key of the media item |
| `Key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for |
| `State` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item |
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE |
| `Time` | *float64* | :heavy_check_mark: | The time of the media item |
| `Duration` | *float64* | :heavy_check_mark: | The duration of the media item |
| `Context` | *string* | :heavy_check_mark: | The context of the media item |
| `PlayQueueItemID` | *float64* | :heavy_check_mark: | The play queue item ID of the media item |
| `PlayBackTime` | *float64* | :heavy_check_mark: | The playback time of the media item |
| `Row` | *float64* | :heavy_check_mark: | The row of the media item |
| Field | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `RatingKey` | *float64* | :heavy_check_mark: | The rating key of the media item | 23409 |
| `Key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 |
| `State` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item | playing |
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE | 1 |
| `Time` | *float64* | :heavy_check_mark: | The time of the media item | 2000 |
| `Duration` | *float64* | :heavy_check_mark: | The duration of the media item | 10000 |
| `Context` | *string* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching |
| `PlayQueueItemID` | *float64* | :heavy_check_mark: | The play queue item ID of the media item | 1 |
| `PlayBackTime` | *float64* | :heavy_check_mark: | The playback time of the media item | 2000 |
| `Row` | *float64* | :heavy_check_mark: | The row of the media item | 1 |

View File

@@ -3,21 +3,21 @@
## Fields
| Field | Type | Required | Description |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE |
| `Path` | *string* | :heavy_check_mark: | The path to the media item to transcode |
| `MediaIndex` | *float64* | :heavy_check_mark: | The index of the media item to transcode |
| `PartIndex` | *float64* | :heavy_check_mark: | The index of the part to transcode |
| `Protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session |
| `FastSeek` | **float64* | :heavy_minus_sign: | Whether to use fast seek or not |
| `DirectPlay` | **float64* | :heavy_minus_sign: | Whether to use direct play or not |
| `DirectStream` | **float64* | :heavy_minus_sign: | Whether to use direct stream or not |
| `SubtitleSize` | **float64* | :heavy_minus_sign: | The size of the subtitles |
| `Subtites` | **string* | :heavy_minus_sign: | The subtitles |
| `AudioBoost` | **float64* | :heavy_minus_sign: | The audio boost |
| `Location` | **string* | :heavy_minus_sign: | The location of the transcode session |
| `MediaBufferSize` | **float64* | :heavy_minus_sign: | The size of the media buffer |
| `Session` | **string* | :heavy_minus_sign: | The session ID |
| `AddDebugOverlay` | **float64* | :heavy_minus_sign: | Whether to add a debug overlay or not |
| `AutoAdjustQuality` | **float64* | :heavy_minus_sign: | Whether to auto adjust quality or not |
| Field | Type | Required | Description | Example |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE | 1 |
| `Path` | *string* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 |
| `MediaIndex` | *float64* | :heavy_check_mark: | The index of the media item to transcode | 0 |
| `PartIndex` | *float64* | :heavy_check_mark: | The index of the part to transcode | 0 |
| `Protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | hls |
| `FastSeek` | **float64* | :heavy_minus_sign: | Whether to use fast seek or not | 0 |
| `DirectPlay` | **float64* | :heavy_minus_sign: | Whether to use direct play or not | 0 |
| `DirectStream` | **float64* | :heavy_minus_sign: | Whether to use direct stream or not | 0 |
| `SubtitleSize` | **float64* | :heavy_minus_sign: | The size of the subtitles | 100 |
| `Subtites` | **string* | :heavy_minus_sign: | The subtitles | burn |
| `AudioBoost` | **float64* | :heavy_minus_sign: | The audio boost | 100 |
| `Location` | **string* | :heavy_minus_sign: | The location of the transcode session | lan |
| `MediaBufferSize` | **float64* | :heavy_minus_sign: | The size of the media buffer | 102400 |
| `Session` | **string* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c |
| `AddDebugOverlay` | **float64* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 |
| `AutoAdjustQuality` | **float64* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 |

View File

@@ -1,28 +0,0 @@
# Tag
A key representing a specific tag within the section.
## Values
| Name | Value |
| ------------------- | ------------------- |
| `TagAll` | all |
| `TagUnwatched` | unwatched |
| `TagNewest` | newest |
| `TagRecentlyAdded` | recentlyAdded |
| `TagRecentlyViewed` | recentlyViewed |
| `TagOnDeck` | onDeck |
| `TagCollection` | collection |
| `TagEdition` | edition |
| `TagGenre` | genre |
| `TagYear` | year |
| `TagDecade` | decade |
| `TagDirector` | director |
| `TagActor` | actor |
| `TagCountry` | country |
| `TagContentRating` | contentRating |
| `TagRating` | rating |
| `TagResolution` | resolution |
| `TagFirstCharacter` | firstCharacter |
| `TagFolder` | folder |

View File

@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `Key` | *string* | :heavy_check_mark: | the media key |
| `Time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
| `State` | *string* | :heavy_check_mark: | The playback state of the media item. |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `Key` | *string* | :heavy_check_mark: | the media key | |
| `Time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | played |

View File

@@ -39,6 +39,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Activities.GetServerActivities(ctx)
if err != nil {
@@ -87,8 +89,7 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var activityUUID string = "<value>"
var activityUUID string = "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"
ctx := context.Background()
res, err := s.Activities.CancelServerActivities(ctx, activityUUID)
@@ -103,10 +104,10 @@ 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. |
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
### Response

View File

@@ -35,7 +35,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var type_ operations.GetTransientTokenQueryParamType = operations.GetTransientTokenQueryParamTypeDelegation
var scope operations.Scope = operations.ScopeAll
@@ -92,7 +91,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var source string = "server://client-identifier"
ctx := context.Background()

View File

@@ -36,6 +36,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Butler.GetButlerTasks(ctx)
if err != nil {
@@ -89,6 +91,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Butler.StartAllTasks(ctx)
if err != nil {
@@ -138,6 +142,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Butler.StopAllTasks(ctx)
if err != nil {
@@ -192,7 +198,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var taskName operations.TaskName = operations.TaskNameCleanOldBundles
ctx := context.Background()
@@ -246,7 +251,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var taskName operations.PathParamTaskName = operations.PathParamTaskNameBackupDatabase
ctx := context.Background()

View File

@@ -34,7 +34,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var count *float64 = plexgo.Float64(1262.49)
var onlyTransient *operations.OnlyTransient = operations.OnlyTransientOne.ToPointer()
@@ -91,7 +90,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sectionID float64 = 6728.76
var count *float64 = plexgo.Float64(9010.22)

View File

@@ -13,7 +13,6 @@ 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
@@ -42,7 +41,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var url_ string = "file://C:\Image.png&type=13"
var type_ *float64 = plexgo.Float64(4462.17)
@@ -98,6 +96,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Library.GetRecentlyAdded(ctx)
if err != nil {
@@ -152,6 +152,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Library.GetLibraries(ctx)
if err != nil {
@@ -240,7 +242,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sectionID float64 = 1000
var includeDetails *operations.IncludeDetails = operations.IncludeDetailsZero.ToPointer()
@@ -295,7 +296,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sectionID float64 = 1000
ctx := context.Background()
@@ -325,81 +325,6 @@ 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/models/components"
"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 = 451092
var tag operations.Tag = operations.TagUnwatched
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 |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `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 |
| `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.SDKError | 4xx-5xx | */* |
## RefreshLibrary
This endpoint Refreshes the library.
@@ -423,7 +348,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sectionID float64 = 934.16
ctx := context.Background()
@@ -494,7 +418,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sectionID int64 = 933505
var type_ operations.Type = operations.TypeFour
@@ -549,7 +472,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var ratingKey float64 = 8382.31
ctx := context.Background()
@@ -602,7 +524,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var ratingKey float64 = 1539.14
ctx := context.Background()
@@ -655,6 +576,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Library.GetOnDeck(ctx)
if err != nil {

View File

@@ -36,7 +36,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var level operations.Level = operations.LevelThree
var message string = "Test log message"
@@ -115,10 +114,12 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Log.LogMultiLine(ctx, "level=4&message=Test%20message%201&source=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")
level=1&message=Test%20message%203&source=postman"
ctx := context.Background()
res, err := s.Log.LogMultiLine(ctx, request)
if err != nil {
log.Fatal(err)
}
@@ -167,6 +168,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Log.EnablePaperTrail(ctx)
if err != nil {

View File

@@ -34,7 +34,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var key float64 = 59398
ctx := context.Background()
@@ -86,7 +85,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var key float64 = 59398
ctx := context.Background()
@@ -139,12 +137,11 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var key string = "<value>"
var time float64 = 6900.91
var time float64 = 90000
var state string = "<value>"
var state string = "played"
ctx := context.Background()
res, err := s.Media.UpdatePlayProgress(ctx, key, time, state)
@@ -159,12 +156,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. |
| `key` | *string* | :heavy_check_mark: | the media key |
| `time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `key` | *string* | :heavy_check_mark: | the media key | |
| `time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | played |
### Response

View File

@@ -36,8 +36,8 @@ package main
import(
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo/models/operations"
"context"
"log"
)
@@ -47,13 +47,15 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{
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 {
log.Fatal(err)
}
@@ -102,7 +104,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistType *operations.PlaylistType = operations.PlaylistTypeAudio.ToPointer()
var smart *operations.QueryParamSmart = operations.QueryParamSmartZero.ToPointer()
@@ -159,7 +160,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistID float64 = 4109.48
ctx := context.Background()
@@ -212,7 +212,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistID float64 = 216.22
ctx := context.Background()
@@ -265,7 +264,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistID float64 = 3915
var title *string = plexgo.String("<value>")
@@ -327,7 +325,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistID float64 = 5004.46
var type_ float64 = 9403.59
@@ -383,7 +380,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistID float64 = 1893.18
ctx := context.Background()
@@ -437,7 +433,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var playlistID float64 = 8502.01
var uri string = "server://12345/com.plexapp.plugins.library/library/metadata/1"
@@ -497,7 +492,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var path string = "/home/barkley/playlist.m3u"
var force operations.Force = operations.ForceZero

View File

@@ -31,7 +31,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var strong *bool = plexgo.Bool(false)
var xPlexClientIdentifier *string = plexgo.String("Postman")
@@ -85,7 +84,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var pinID string = "<value>"
var xPlexClientIdentifier *string = plexgo.String("Postman")

View File

@@ -46,7 +46,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var query string = "dylan"
var sectionID *float64 = plexgo.Float64(1516.53)
@@ -108,7 +107,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var query string = "dead+poop"
var sectionID *float64 = plexgo.Float64(4094.8)
@@ -166,7 +164,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var query string = "110"
ctx := context.Background()

View File

@@ -39,6 +39,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
@@ -87,6 +89,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetServerPreferences(ctx)
if err != nil {
@@ -135,6 +139,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetAvailableClients(ctx)
if err != nil {
@@ -183,6 +189,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetDevices(ctx)
if err != nil {
@@ -231,6 +239,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetServerIdentity(ctx)
if err != nil {
@@ -279,6 +289,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetMyPlexAccount(ctx)
if err != nil {
@@ -318,8 +330,8 @@ package main
import(
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo/models/operations"
"context"
"log"
)
@@ -329,8 +341,7 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetResizedPhoto(ctx, operations.GetResizedPhotoRequest{
request := operations.GetResizedPhotoRequest{
Width: 110,
Height: 165,
Opacity: 100,
@@ -338,7 +349,10 @@ func main() {
MinSize: operations.MinSizeOne,
Upscale: operations.UpscaleZero,
URL: "/library/metadata/49564/thumb/1654258204",
})
}
ctx := context.Background()
res, err := s.Server.GetResizedPhoto(ctx, request)
if err != nil {
log.Fatal(err)
}
@@ -386,6 +400,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Server.GetServerList(ctx)
if err != nil {

View File

@@ -35,6 +35,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Sessions.GetSessions(ctx)
if err != nil {
@@ -83,6 +85,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Sessions.GetSessionHistory(ctx)
if err != nil {
@@ -131,6 +135,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Sessions.GetTranscodeSessions(ctx)
if err != nil {
@@ -179,7 +185,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var sessionKey string = "zz7llzqlx8w9vnrsbnwhbmep"
ctx := context.Background()

View File

@@ -32,8 +32,7 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var timespan *int64 = plexgo.Int64(411769)
var timespan *int64 = plexgo.Int64(4)
ctx := context.Background()
res, err := s.Statistics.GetStatistics(ctx, timespan)
@@ -48,10 +47,10 @@ 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. |
| `timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
| 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

View File

@@ -35,6 +35,8 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
ctx := context.Background()
res, err := s.Updater.GetUpdateStatus(ctx)
if err != nil {
@@ -84,7 +86,6 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var download *operations.Download = operations.DownloadOne.ToPointer()
ctx := context.Background()
@@ -100,10 +101,10 @@ 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. |
| `download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
### Response
@@ -138,10 +139,9 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
var tonight *operations.Tonight = operations.TonightOne.ToPointer()
var skip *operations.Skip = operations.SkipZero.ToPointer()
var skip *operations.Skip = operations.SkipOne.ToPointer()
ctx := context.Background()
res, err := s.Updater.ApplyUpdates(ctx, tonight, skip)
@@ -156,11 +156,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. |
| `tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
| `skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
| Parameter | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
| `tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
| `skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |
### Response

View File

@@ -23,8 +23,8 @@ package main
import(
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo/models/operations"
"context"
"log"
)
@@ -34,19 +34,21 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
request := operations.GetTimelineRequest{
RatingKey: 23409,
Key: "/library/metadata/23409",
State: operations.StatePlaying,
HasMDE: 1,
Time: 2000,
Duration: 10000,
Context: "home:hub.continueWatching",
PlayQueueItemID: 1,
PlayBackTime: 2000,
Row: 1,
}
ctx := context.Background()
res, err := s.Video.GetTimeline(ctx, operations.GetTimelineRequest{
RatingKey: 716.56,
Key: "<key>",
State: operations.StatePaused,
HasMDE: 7574.33,
Time: 3327.51,
Duration: 7585.39,
Context: "<value>",
PlayQueueItemID: 1406.21,
PlayBackTime: 2699.34,
Row: 3536.42,
})
res, err := s.Video.GetTimeline(ctx, request)
if err != nil {
log.Fatal(err)
}
@@ -84,8 +86,8 @@ package main
import(
"github.com/LukeHagar/plexgo/models/components"
"github.com/LukeHagar/plexgo"
"context"
"github.com/LukeHagar/plexgo/models/operations"
"context"
"log"
)
@@ -95,14 +97,27 @@ func main() {
plexgo.WithXPlexClientIdentifier("Postman"),
)
request := operations.StartUniversalTranscodeRequest{
HasMDE: 1,
Path: "/library/metadata/23409",
MediaIndex: 0,
PartIndex: 0,
Protocol: "hls",
FastSeek: plexgo.Float64(0),
DirectPlay: plexgo.Float64(0),
DirectStream: plexgo.Float64(0),
SubtitleSize: plexgo.Float64(100),
Subtites: plexgo.String("burn"),
AudioBoost: plexgo.Float64(100),
Location: plexgo.String("lan"),
MediaBufferSize: plexgo.Float64(102400),
Session: plexgo.String("zvcage8b7rkioqcm8f4uns4c"),
AddDebugOverlay: plexgo.Float64(0),
AutoAdjustQuality: plexgo.Float64(0),
}
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>",
})
res, err := s.Video.StartUniversalTranscode(ctx, request)
if err != nil {
log.Fatal(err)
}

View File

@@ -8,6 +8,7 @@ import (
"fmt"
"math/big"
"reflect"
"strconv"
"strings"
"time"
"unsafe"
@@ -260,6 +261,18 @@ func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error)
typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v))
switch typ.Kind() {
case reflect.Int64:
format := tag.Get("integer")
if format == "string" {
b := val.Interface().(int64)
return []byte(fmt.Sprintf(`"%d"`, b)), nil
}
case reflect.Float64:
format := tag.Get("number")
if format == "string" {
b := val.Interface().(float64)
return []byte(fmt.Sprintf(`"%g"`, b)), nil
}
case reflect.Map:
if isNil(typ, val) {
return []byte("null"), nil
@@ -349,6 +362,16 @@ func handleDefaultConstValue(tagValue string, val interface{}, tag reflect.Struc
if bigIntTag == "string" {
return []byte(fmt.Sprintf(`"%s"`, tagValue))
}
case reflect.TypeOf(int64(0)):
format := tag.Get("integer")
if format == "string" {
return []byte(fmt.Sprintf(`"%s"`, tagValue))
}
case reflect.TypeOf(float64(0)):
format := tag.Get("number")
if format == "string" {
return []byte(fmt.Sprintf(`"%s"`, tagValue))
}
case reflect.TypeOf(decimal.Big{}):
decimalTag := tag.Get("decimal")
if decimalTag != "number" {
@@ -377,6 +400,57 @@ func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTa
typ := dereferenceTypePointer(v.Type())
switch typ.Kind() {
case reflect.Int64:
var b int64
format := tag.Get("integer")
if format == "string" {
var s string
if err := json.Unmarshal(value, &s); err != nil {
return err
}
var err error
b, err = strconv.ParseInt(s, 10, 64)
if err != nil {
return fmt.Errorf("failed to parse string as int64: %w", err)
}
if v.Kind() == reflect.Ptr {
if v.IsNil() {
v.Set(reflect.New(typ))
}
v = v.Elem()
}
v.Set(reflect.ValueOf(b))
return nil
}
case reflect.Float64:
var b float64
format := tag.Get("number")
if format == "string" {
var s string
if err := json.Unmarshal(value, &s); err != nil {
return err
}
var err error
b, err = strconv.ParseFloat(s, 64)
if err != nil {
return fmt.Errorf("failed to parse string as float64: %w", err)
}
if v.Kind() == reflect.Ptr {
if v.IsNil() {
v.Set(reflect.New(typ))
}
v = v.Elem()
}
v.Set(reflect.ValueOf(b))
return nil
}
case reflect.Map:
if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) {
if v.CanAddr() {

View File

@@ -609,123 +609,6 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionID float64) (*operat
return res, nil
}
// GetLibraryItems - Get Library Items
// 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.
func (s *Library) GetLibraryItems(ctx context.Context, sectionID int64, tag operations.Tag) (*operations.GetLibraryItemsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getLibraryItems",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetLibraryItemsRequest{
SectionID: sectionID,
Tag: tag,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/{tag}", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
res := &operations.GetLibraryItemsResponse{
StatusCode: httpRes.StatusCode,
ContentType: httpRes.Header.Get("Content-Type"),
RawResponse: httpRes,
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out operations.GetLibraryItemsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// RefreshLibrary - Refresh Library
// This endpoint Refreshes the library.
func (s *Library) RefreshLibrary(ctx context.Context, sectionID float64) (*operations.RefreshLibraryResponse, error) {

View File

@@ -1,992 +0,0 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/plexgo/internal/utils"
"github.com/LukeHagar/plexgo/types"
"net/http"
)
// Tag - A key representing a specific tag within the section.
type Tag string
const (
TagAll Tag = "all"
TagUnwatched Tag = "unwatched"
TagNewest Tag = "newest"
TagRecentlyAdded Tag = "recentlyAdded"
TagRecentlyViewed Tag = "recentlyViewed"
TagOnDeck Tag = "onDeck"
TagCollection Tag = "collection"
TagEdition Tag = "edition"
TagGenre Tag = "genre"
TagYear Tag = "year"
TagDecade Tag = "decade"
TagDirector Tag = "director"
TagActor Tag = "actor"
TagCountry Tag = "country"
TagContentRating Tag = "contentRating"
TagRating Tag = "rating"
TagResolution Tag = "resolution"
TagFirstCharacter Tag = "firstCharacter"
TagFolder Tag = "folder"
)
func (e Tag) ToPointer() *Tag {
return &e
}
func (e *Tag) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "all":
fallthrough
case "unwatched":
fallthrough
case "newest":
fallthrough
case "recentlyAdded":
fallthrough
case "recentlyViewed":
fallthrough
case "onDeck":
fallthrough
case "collection":
fallthrough
case "edition":
fallthrough
case "genre":
fallthrough
case "year":
fallthrough
case "decade":
fallthrough
case "director":
fallthrough
case "actor":
fallthrough
case "country":
fallthrough
case "contentRating":
fallthrough
case "rating":
fallthrough
case "resolution":
fallthrough
case "firstCharacter":
fallthrough
case "folder":
*e = Tag(v)
return nil
default:
return fmt.Errorf("invalid value for Tag: %v", v)
}
}
type GetLibraryItemsRequest struct {
// the Id of the library to query
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
// A key representing a specific tag within the section.
Tag Tag `pathParam:"style=simple,explode=false,name=tag"`
}
func (o *GetLibraryItemsRequest) GetSectionID() int64 {
if o == nil {
return 0
}
return o.SectionID
}
func (o *GetLibraryItemsRequest) GetTag() Tag {
if o == nil {
return Tag("")
}
return o.Tag
}
type GetLibraryItemsPart struct {
ID *int `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *int `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *int64 `json:"size,omitempty"`
Container *string `json:"container,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
}
func (o *GetLibraryItemsPart) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetLibraryItemsPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryItemsPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryItemsPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetLibraryItemsPart) GetSize() *int64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryItemsPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetLibraryItemsPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
type GetLibraryItemsMedia struct {
ID *int `json:"id,omitempty"`
Duration *int `json:"duration,omitempty"`
Bitrate *int `json:"bitrate,omitempty"`
Width *int `json:"width,omitempty"`
Height *int `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *int `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *string `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []GetLibraryItemsPart `json:"Part,omitempty"`
}
func (o *GetLibraryItemsMedia) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetLibraryItemsMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryItemsMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetLibraryItemsMedia) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetLibraryItemsMedia) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetLibraryItemsMedia) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetLibraryItemsMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetLibraryItemsMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetLibraryItemsMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetLibraryItemsMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetLibraryItemsMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetLibraryItemsMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetLibraryItemsMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetLibraryItemsMedia) GetPart() []GetLibraryItemsPart {
if o == nil {
return nil
}
return o.Part
}
type GetLibraryItemsGenre struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsGenre) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsCountry struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsCountry) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsDirector struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsDirector) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsWriter struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsWriter) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsRole struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsRole) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Studio *string `json:"studio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Rating *float64 `json:"rating,omitempty"`
AudienceRating *float64 `json:"audienceRating,omitempty"`
Year *int `json:"year,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
Duration *int `json:"duration,omitempty"`
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
ChapterSource *string `json:"chapterSource,omitempty"`
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
RatingImage *string `json:"ratingImage,omitempty"`
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
GrandparentKey *string `json:"grandparentKey,omitempty"`
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
GrandparentArt *string `json:"grandparentArt,omitempty"`
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
Media []GetLibraryItemsMedia `json:"Media,omitempty"`
Genre []GetLibraryItemsGenre `json:"Genre,omitempty"`
Country []GetLibraryItemsCountry `json:"Country,omitempty"`
Director []GetLibraryItemsDirector `json:"Director,omitempty"`
Writer []GetLibraryItemsWriter `json:"Writer,omitempty"`
Role []GetLibraryItemsRole `json:"Role,omitempty"`
TitleSort *string `json:"titleSort,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
OriginalTitle *string `json:"originalTitle,omitempty"`
ViewOffset *int `json:"viewOffset,omitempty"`
SkipCount *int `json:"skipCount,omitempty"`
Index *int `json:"index,omitempty"`
Theme *string `json:"theme,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
ChildCount *int `json:"childCount,omitempty"`
HasPremiumExtras *string `json:"hasPremiumExtras,omitempty"`
HasPremiumPrimaryExtra *string `json:"hasPremiumPrimaryExtra,omitempty"`
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
ParentGUID *string `json:"parentGuid,omitempty"`
ParentStudio *string `json:"parentStudio,omitempty"`
ParentKey *string `json:"parentKey,omitempty"`
ParentTitle *string `json:"parentTitle,omitempty"`
ParentIndex *int `json:"parentIndex,omitempty"`
ParentYear *int `json:"parentYear,omitempty"`
ParentThumb *string `json:"parentThumb,omitempty"`
ParentTheme *string `json:"parentTheme,omitempty"`
}
func (g GetLibraryItemsMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetLibraryItemsMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetLibraryItemsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetLibraryItemsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryItemsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetLibraryItemsMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetLibraryItemsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetLibraryItemsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetLibraryItemsMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetLibraryItemsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetLibraryItemsMetadata) GetRating() *float64 {
if o == nil {
return nil
}
return o.Rating
}
func (o *GetLibraryItemsMetadata) GetAudienceRating() *float64 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *GetLibraryItemsMetadata) GetYear() *int {
if o == nil {
return nil
}
return o.Year
}
func (o *GetLibraryItemsMetadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *GetLibraryItemsMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetLibraryItemsMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetLibraryItemsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryItemsMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetLibraryItemsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetLibraryItemsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetLibraryItemsMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetLibraryItemsMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *GetLibraryItemsMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetLibraryItemsMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetLibraryItemsMetadata) GetGrandparentRatingKey() *string {
if o == nil {
return nil
}
return o.GrandparentRatingKey
}
func (o *GetLibraryItemsMetadata) GetGrandparentGUID() *string {
if o == nil {
return nil
}
return o.GrandparentGUID
}
func (o *GetLibraryItemsMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetLibraryItemsMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetLibraryItemsMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetLibraryItemsMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetLibraryItemsMetadata) GetGrandparentTheme() *string {
if o == nil {
return nil
}
return o.GrandparentTheme
}
func (o *GetLibraryItemsMetadata) GetMedia() []GetLibraryItemsMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetLibraryItemsMetadata) GetGenre() []GetLibraryItemsGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetLibraryItemsMetadata) GetCountry() []GetLibraryItemsCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetLibraryItemsMetadata) GetDirector() []GetLibraryItemsDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetLibraryItemsMetadata) GetWriter() []GetLibraryItemsWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetLibraryItemsMetadata) GetRole() []GetLibraryItemsRole {
if o == nil {
return nil
}
return o.Role
}
func (o *GetLibraryItemsMetadata) GetTitleSort() *string {
if o == nil {
return nil
}
return o.TitleSort
}
func (o *GetLibraryItemsMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetLibraryItemsMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetLibraryItemsMetadata) GetOriginalTitle() *string {
if o == nil {
return nil
}
return o.OriginalTitle
}
func (o *GetLibraryItemsMetadata) GetViewOffset() *int {
if o == nil {
return nil
}
return o.ViewOffset
}
func (o *GetLibraryItemsMetadata) GetSkipCount() *int {
if o == nil {
return nil
}
return o.SkipCount
}
func (o *GetLibraryItemsMetadata) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *GetLibraryItemsMetadata) GetTheme() *string {
if o == nil {
return nil
}
return o.Theme
}
func (o *GetLibraryItemsMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetLibraryItemsMetadata) GetViewedLeafCount() *int {
if o == nil {
return nil
}
return o.ViewedLeafCount
}
func (o *GetLibraryItemsMetadata) GetChildCount() *int {
if o == nil {
return nil
}
return o.ChildCount
}
func (o *GetLibraryItemsMetadata) GetHasPremiumExtras() *string {
if o == nil {
return nil
}
return o.HasPremiumExtras
}
func (o *GetLibraryItemsMetadata) GetHasPremiumPrimaryExtra() *string {
if o == nil {
return nil
}
return o.HasPremiumPrimaryExtra
}
func (o *GetLibraryItemsMetadata) GetParentRatingKey() *string {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetLibraryItemsMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetLibraryItemsMetadata) GetParentStudio() *string {
if o == nil {
return nil
}
return o.ParentStudio
}
func (o *GetLibraryItemsMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetLibraryItemsMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetLibraryItemsMetadata) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetLibraryItemsMetadata) GetParentYear() *int {
if o == nil {
return nil
}
return o.ParentYear
}
func (o *GetLibraryItemsMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetLibraryItemsMetadata) GetParentTheme() *string {
if o == nil {
return nil
}
return o.ParentTheme
}
type GetLibraryItemsMediaContainer struct {
Size *int `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Art *string `json:"art,omitempty"`
Identifier *string `json:"identifier,omitempty"`
LibrarySectionID *int `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *int `json:"mediaTagVersion,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Title1 *string `json:"title1,omitempty"`
Title2 *string `json:"title2,omitempty"`
ViewGroup *string `json:"viewGroup,omitempty"`
ViewMode *int `json:"viewMode,omitempty"`
MixedParents *bool `json:"mixedParents,omitempty"`
Metadata []GetLibraryItemsMetadata `json:"Metadata,omitempty"`
}
func (o *GetLibraryItemsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryItemsMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetLibraryItemsMediaContainer) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetLibraryItemsMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionID() *int {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetLibraryItemsMediaContainer) GetMediaTagPrefix() *string {
if o == nil {
return nil
}
return o.MediaTagPrefix
}
func (o *GetLibraryItemsMediaContainer) GetMediaTagVersion() *int {
if o == nil {
return nil
}
return o.MediaTagVersion
}
func (o *GetLibraryItemsMediaContainer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetLibraryItemsMediaContainer) GetTitle1() *string {
if o == nil {
return nil
}
return o.Title1
}
func (o *GetLibraryItemsMediaContainer) GetTitle2() *string {
if o == nil {
return nil
}
return o.Title2
}
func (o *GetLibraryItemsMediaContainer) GetViewGroup() *string {
if o == nil {
return nil
}
return o.ViewGroup
}
func (o *GetLibraryItemsMediaContainer) GetViewMode() *int {
if o == nil {
return nil
}
return o.ViewMode
}
func (o *GetLibraryItemsMediaContainer) GetMixedParents() *bool {
if o == nil {
return nil
}
return o.MixedParents
}
func (o *GetLibraryItemsMediaContainer) GetMetadata() []GetLibraryItemsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetLibraryItemsResponseBody - The contents of the library by section and tag
type GetLibraryItemsResponseBody struct {
MediaContainer *GetLibraryItemsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetLibraryItemsResponseBody) GetMediaContainer() *GetLibraryItemsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetLibraryItemsResponse struct {
// HTTP response content type for this operation
ContentType string
// HTTP response status code for this operation
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The contents of the library by section and tag
Object *GetLibraryItemsResponseBody
}
func (o *GetLibraryItemsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetLibraryItemsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetLibraryItemsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetLibraryItemsResponse) GetObject() *GetLibraryItemsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -276,9 +276,9 @@ func New(opts ...SDKOption) *PlexAPI {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "0.0.3",
SDKVersion: "0.6.6",
GenVersion: "2.319.10",
UserAgent: "speakeasy-sdk/go 0.6.6 2.319.10 0.0.3 github.com/LukeHagar/plexgo",
SDKVersion: "0.7.0",
GenVersion: "2.326.3",
UserAgent: "speakeasy-sdk/go 0.7.0 2.326.3 0.0.3 github.com/LukeHagar/plexgo",
Globals: globals.Globals{},
ServerDefaults: []map[string]string{
{