mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89e9047e5b |
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
||||||
management:
|
management:
|
||||||
docChecksum: 45c73686e6dbe8c29b7e2857b6194ccf
|
docChecksum: a14d0ae27d4f5bd83b80747112f74352
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: internal
|
speakeasyVersion: internal
|
||||||
generationVersion: 2.237.2
|
generationVersion: 2.237.2
|
||||||
releaseVersion: 0.0.4
|
releaseVersion: 0.0.5
|
||||||
configChecksum: 270cef9347fac851edf7560dfe79d63c
|
configChecksum: 5b3127b5f000f6d96e7a3e6ea5fc06e9
|
||||||
repoURL: https://github.com/LukeHagar/plexgo.git
|
repoURL: https://github.com/LukeHagar/plexgo.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
installationURL: https://github.com/LukeHagar/plexgo
|
installationURL: https://github.com/LukeHagar/plexgo
|
||||||
@@ -264,6 +264,9 @@ generatedFiles:
|
|||||||
- docs/models/operations/getlibrariesresponse.md
|
- docs/models/operations/getlibrariesresponse.md
|
||||||
- docs/models/operations/includedetails.md
|
- docs/models/operations/includedetails.md
|
||||||
- docs/models/operations/getlibraryrequest.md
|
- docs/models/operations/getlibraryrequest.md
|
||||||
|
- docs/models/operations/getlibrarydirectory.md
|
||||||
|
- docs/models/operations/getlibrarymediacontainer.md
|
||||||
|
- docs/models/operations/getlibraryresponsebody.md
|
||||||
- docs/models/operations/getlibraryresponse.md
|
- docs/models/operations/getlibraryresponse.md
|
||||||
- docs/models/operations/deletelibraryrequest.md
|
- docs/models/operations/deletelibraryrequest.md
|
||||||
- docs/models/operations/deletelibraryresponse.md
|
- docs/models/operations/deletelibraryresponse.md
|
||||||
|
|||||||
12
RELEASES.md
12
RELEASES.md
@@ -38,4 +38,14 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [go v0.0.4] .
|
- [go v0.0.4] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.0.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.4 - .
|
- [Go v0.0.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.4 - .
|
||||||
|
|
||||||
|
## 2024-01-19 17:28:15
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.0.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.0.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.5 - .
|
||||||
12
docs/models/operations/getlibrarydirectory.md
Normal file
12
docs/models/operations/getlibrarydirectory.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetLibraryDirectory
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `Secondary` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Prompt` | **string* | :heavy_minus_sign: | N/A | Search Movies |
|
||||||
|
| `Search` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A | search?type=1 |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A | Search... |
|
||||||
20
docs/models/operations/getlibrarymediacontainer.md
Normal file
20
docs/models/operations/getlibrarymediacontainer.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# GetLibraryMediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Size` | **int* | :heavy_minus_sign: | N/A | 20 |
|
||||||
|
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||||
|
| `Content` | **string* | :heavy_minus_sign: | N/A | secondary |
|
||||||
|
| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
|
||||||
|
| `LibrarySectionID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `MediaTagPrefix` | **string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ |
|
||||||
|
| `MediaTagVersion` | **int* | :heavy_minus_sign: | N/A | 1698860922 |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||||
|
| `Title1` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||||
|
| `ViewGroup` | **string* | :heavy_minus_sign: | N/A | secondary |
|
||||||
|
| `ViewMode` | **int* | :heavy_minus_sign: | N/A | 65592 |
|
||||||
|
| `Directory` | [][operations.GetLibraryDirectory](../../models/operations/getlibrarydirectory.md) | :heavy_minus_sign: | N/A | [{"key":"search?type=1","prompt":"Search Movies","search":true,"secondary":true,"title":"Search..."}] |
|
||||||
@@ -3,8 +3,9 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code 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 |
|
| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
|
| `Object` | [*operations.GetLibraryResponseBody](../../models/operations/getlibraryresponsebody.md) | :heavy_minus_sign: | The details of the library |
|
||||||
10
docs/models/operations/getlibraryresponsebody.md
Normal file
10
docs/models/operations/getlibraryresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetLibraryResponseBody
|
||||||
|
|
||||||
|
The details of the library
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*operations.GetLibraryMediaContainer](../../models/operations/getlibrarymediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -214,7 +214,6 @@ import(
|
|||||||
"github.com/LukeHagar/plexgo/models/operations"
|
"github.com/LukeHagar/plexgo/models/operations"
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -233,7 +232,7 @@ func main() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.StatusCode == http.StatusOK {
|
if res.Object != nil {
|
||||||
// handle response
|
// handle response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
gen.yaml
2
gen.yaml
@@ -8,7 +8,7 @@ generation:
|
|||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: false
|
nameResolutionDec2023: false
|
||||||
go:
|
go:
|
||||||
version: 0.0.4
|
version: 0.0.5
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
imports:
|
imports:
|
||||||
|
|||||||
11
library.go
11
library.go
@@ -322,6 +322,17 @@ func (s *Library) GetLibrary(ctx context.Context, sectionID float64, includeDeta
|
|||||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||||
switch {
|
switch {
|
||||||
case httpRes.StatusCode == 200:
|
case httpRes.StatusCode == 200:
|
||||||
|
switch {
|
||||||
|
case utils.MatchContentType(contentType, `application/json`):
|
||||||
|
var out operations.GetLibraryResponseBody
|
||||||
|
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", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
}
|
||||||
case httpRes.StatusCode == 400:
|
case httpRes.StatusCode == 400:
|
||||||
fallthrough
|
fallthrough
|
||||||
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
|
||||||
|
|||||||
@@ -72,6 +72,168 @@ func (o *GetLibraryRequest) GetIncludeDetails() *IncludeDetails {
|
|||||||
return o.IncludeDetails
|
return o.IncludeDetails
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetLibraryDirectory struct {
|
||||||
|
Secondary *bool `json:"secondary,omitempty"`
|
||||||
|
Prompt *string `json:"prompt,omitempty"`
|
||||||
|
Search *bool `json:"search,omitempty"`
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryDirectory) GetSecondary() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Secondary
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryDirectory) GetPrompt() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryDirectory) GetSearch() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Search
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryDirectory) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryDirectory) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetLibraryMediaContainer struct {
|
||||||
|
Size *int `json:"size,omitempty"`
|
||||||
|
AllowSync *bool `json:"allowSync,omitempty"`
|
||||||
|
Art *string `json:"art,omitempty"`
|
||||||
|
Content *string `json:"content,omitempty"`
|
||||||
|
Identifier *string `json:"identifier,omitempty"`
|
||||||
|
LibrarySectionID *int `json:"librarySectionID,omitempty"`
|
||||||
|
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
|
||||||
|
MediaTagVersion *int `json:"mediaTagVersion,omitempty"`
|
||||||
|
Thumb *string `json:"thumb,omitempty"`
|
||||||
|
Title1 *string `json:"title1,omitempty"`
|
||||||
|
ViewGroup *string `json:"viewGroup,omitempty"`
|
||||||
|
ViewMode *int `json:"viewMode,omitempty"`
|
||||||
|
Directory []GetLibraryDirectory `json:"Directory,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetSize() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Size
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetAllowSync() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.AllowSync
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetArt() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Art
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetContent() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Content
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetIdentifier() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Identifier
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetLibrarySectionID() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.LibrarySectionID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetMediaTagPrefix() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaTagPrefix
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetMediaTagVersion() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaTagVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetThumb() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Thumb
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetTitle1() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title1
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetViewGroup() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ViewGroup
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetViewMode() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ViewMode
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetDirectory() []GetLibraryDirectory {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Directory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLibraryResponseBody - The details of the library
|
||||||
|
type GetLibraryResponseBody struct {
|
||||||
|
MediaContainer *GetLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryResponseBody) GetMediaContainer() *GetLibraryMediaContainer {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaContainer
|
||||||
|
}
|
||||||
|
|
||||||
type GetLibraryResponse struct {
|
type GetLibraryResponse struct {
|
||||||
// HTTP response content type for this operation
|
// HTTP response content type for this operation
|
||||||
ContentType string
|
ContentType string
|
||||||
@@ -79,6 +241,8 @@ type GetLibraryResponse struct {
|
|||||||
StatusCode int
|
StatusCode int
|
||||||
// Raw HTTP response; suitable for custom response parsing
|
// Raw HTTP response; suitable for custom response parsing
|
||||||
RawResponse *http.Response
|
RawResponse *http.Response
|
||||||
|
// The details of the library
|
||||||
|
Object *GetLibraryResponseBody
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetLibraryResponse) GetContentType() string {
|
func (o *GetLibraryResponse) GetContentType() string {
|
||||||
@@ -101,3 +265,10 @@ func (o *GetLibraryResponse) GetRawResponse() *http.Response {
|
|||||||
}
|
}
|
||||||
return o.RawResponse
|
return o.RawResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryResponse) GetObject() *GetLibraryResponseBody {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Object
|
||||||
|
}
|
||||||
|
|||||||
@@ -251,9 +251,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
sdkConfiguration: sdkConfiguration{
|
sdkConfiguration: sdkConfiguration{
|
||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.0.4",
|
SDKVersion: "0.0.5",
|
||||||
GenVersion: "2.237.2",
|
GenVersion: "2.237.2",
|
||||||
UserAgent: "speakeasy-sdk/go 0.0.4 2.237.2 0.0.3 github.com/LukeHagar/plexgo",
|
UserAgent: "speakeasy-sdk/go 0.0.5 2.237.2 0.0.3 github.com/LukeHagar/plexgo",
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{
|
{
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
|||||||
Reference in New Issue
Block a user