mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79e46e9d00 | ||
|
|
46d64acf0d | ||
|
|
9132d30c11 | ||
|
|
bba1a7ab9e |
@@ -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: 550154cf1b4d0c237436fb18c418b5db
|
docChecksum: 45c73686e6dbe8c29b7e2857b6194ccf
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: internal
|
speakeasyVersion: internal
|
||||||
generationVersion: 2.228.1
|
generationVersion: 2.237.2
|
||||||
releaseVersion: 0.0.1
|
releaseVersion: 0.0.4
|
||||||
configChecksum: 17cc95530e519354b089a256cb0ca7f6
|
configChecksum: 270cef9347fac851edf7560dfe79d63c
|
||||||
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
|
||||||
@@ -14,9 +14,9 @@ management:
|
|||||||
features:
|
features:
|
||||||
go:
|
go:
|
||||||
constsAndDefaults: 0.1.2
|
constsAndDefaults: 0.1.2
|
||||||
core: 3.3.0
|
core: 3.3.1
|
||||||
flattening: 2.81.1
|
flattening: 2.81.1
|
||||||
globalSecurity: 2.82.3
|
globalSecurity: 2.82.4
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.1
|
||||||
nameOverrides: 2.81.1
|
nameOverrides: 2.81.1
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
@@ -36,7 +36,6 @@ generatedFiles:
|
|||||||
- plexapi.go
|
- plexapi.go
|
||||||
- go.mod
|
- go.mod
|
||||||
- go.sum
|
- go.sum
|
||||||
- tests/helpers.go
|
|
||||||
- models/sdkerrors/sdkerror.go
|
- models/sdkerrors/sdkerror.go
|
||||||
- types/bigint.go
|
- types/bigint.go
|
||||||
- types/date.go
|
- types/date.go
|
||||||
@@ -258,6 +257,10 @@ generatedFiles:
|
|||||||
- docs/models/operations/getrecentlyaddedmediacontainer.md
|
- docs/models/operations/getrecentlyaddedmediacontainer.md
|
||||||
- docs/models/operations/getrecentlyaddedresponsebody.md
|
- docs/models/operations/getrecentlyaddedresponsebody.md
|
||||||
- docs/models/operations/getrecentlyaddedresponse.md
|
- docs/models/operations/getrecentlyaddedresponse.md
|
||||||
|
- docs/models/operations/location.md
|
||||||
|
- docs/models/operations/getlibrariesdirectory.md
|
||||||
|
- docs/models/operations/getlibrariesmediacontainer.md
|
||||||
|
- docs/models/operations/getlibrariesresponsebody.md
|
||||||
- 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
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -7,15 +7,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
## 🏗 **Welcome to your new SDK!** 🏗
|
|
||||||
|
|
||||||
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
|
|
||||||
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
|
|
||||||
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
|
|
||||||
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/productionize-sdks/publish-sdks)
|
|
||||||
- [ ] ✨ When ready to productionize, delete this section from the README
|
|
||||||
|
|
||||||
<!-- Start SDK Installation [installation] -->
|
<!-- Start SDK Installation [installation] -->
|
||||||
## SDK Installation
|
## SDK Installation
|
||||||
|
|
||||||
@@ -218,8 +209,7 @@ You can override the default server globally using the `WithServerIndex` option
|
|||||||
|
|
||||||
| # | Server | Variables |
|
| # | Server | Variables |
|
||||||
| - | ------ | --------- |
|
| - | ------ | --------- |
|
||||||
| 0 | `http://10.10.10.47:32400` | None |
|
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
||||||
| 1 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
@@ -235,7 +225,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithServerIndex(1),
|
plexgo.WithServerIndex(0),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -274,7 +264,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithServerURL("http://10.10.10.47:32400"),
|
plexgo.WithServerURL("{protocol}://{ip}:{port}"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
30
RELEASES.md
30
RELEASES.md
@@ -9,3 +9,33 @@ Based on:
|
|||||||
- [go v0.0.1] .
|
- [go v0.0.1] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.0.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.1 - .
|
- [Go v0.0.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.1 - .
|
||||||
|
|
||||||
|
## 2024-01-05 19:50:49
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.133.1 (2.228.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.0.2] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.0.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.2 - .
|
||||||
|
|
||||||
|
## 2024-01-17 00:48:29
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.142.1 (2.234.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.0.3] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.0.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.3 - .
|
||||||
|
|
||||||
|
## 2024-01-18 23:37:12
|
||||||
|
### 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.4] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.0.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.0.4 - .
|
||||||
28
docs/models/operations/getlibrariesdirectory.md
Normal file
28
docs/models/operations/getlibrariesdirectory.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# GetLibrariesDirectory
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||||
|
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Art` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg |
|
||||||
|
| `Composite` | **string* | :heavy_minus_sign: | N/A | /library/sections/1/composite/1705615584 |
|
||||||
|
| `Filters` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Refreshing` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Thumb` | **string* | :heavy_minus_sign: | N/A | /:/resources/movie.png |
|
||||||
|
| `Key` | **string* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `Type` | **string* | :heavy_minus_sign: | N/A | movie |
|
||||||
|
| `Title` | **string* | :heavy_minus_sign: | N/A | Movies |
|
||||||
|
| `Agent` | **string* | :heavy_minus_sign: | N/A | tv.plex.agents.movie |
|
||||||
|
| `Scanner` | **string* | :heavy_minus_sign: | N/A | Plex Movie |
|
||||||
|
| `Language` | **string* | :heavy_minus_sign: | N/A | en-US |
|
||||||
|
| `UUID` | **string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||||
|
| `UpdatedAt` | **int* | :heavy_minus_sign: | N/A | 1705615634 |
|
||||||
|
| `CreatedAt` | **int* | :heavy_minus_sign: | N/A | 1654131312 |
|
||||||
|
| `ScannedAt` | **int* | :heavy_minus_sign: | N/A | 1705615584 |
|
||||||
|
| `Content` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `Directory` | **bool* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `ContentChangedAt` | **int* | :heavy_minus_sign: | N/A | 3192854 |
|
||||||
|
| `Hidden` | **int* | :heavy_minus_sign: | N/A | 0 |
|
||||||
|
| `Location` | [][operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | [{"id":1,"path":"/movies"}] |
|
||||||
11
docs/models/operations/getlibrariesmediacontainer.md
Normal file
11
docs/models/operations/getlibrariesmediacontainer.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetLibrariesMediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `Size` | **int* | :heavy_minus_sign: | N/A | 5 |
|
||||||
|
| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | false |
|
||||||
|
| `Title1` | **string* | :heavy_minus_sign: | N/A | Plex Library |
|
||||||
|
| `Directory` | [][operations.GetLibrariesDirectory](../../models/operations/getlibrariesdirectory.md) | :heavy_minus_sign: | N/A | [{"Location":[{"id":1,"path":"/movies"}],"agent":"tv.plex.agents.movie","allowSync":true,"art":"/:/resources/movie-fanart.jpg","composite":"/library/sections/1/composite/1705615584","content":true,"contentChangedAt":3192854,"createdAt":1654131312,"directory":true,"filters":true,"hidden":0,"key":"1","language":"en-US","refreshing":false,"scannedAt":1705615584,"scanner":"Plex Movie","thumb":"/:/resources/movie.png","title":"Movies","type":"movie","updatedAt":1705615634,"uuid":"322a231a-b7f7-49f5-920f-14c61199cd30"}] |
|
||||||
@@ -4,7 +4,8 @@
|
|||||||
## 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.GetLibrariesResponseBody](../../models/operations/getlibrariesresponsebody.md) | :heavy_minus_sign: | The libraries available on the Server |
|
||||||
10
docs/models/operations/getlibrariesresponsebody.md
Normal file
10
docs/models/operations/getlibrariesresponsebody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetLibrariesResponseBody
|
||||||
|
|
||||||
|
The libraries available on the Server
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||||
|
| `MediaContainer` | [*operations.GetLibrariesMediaContainer](../../models/operations/getlibrariesmediacontainer.md) | :heavy_minus_sign: | N/A |
|
||||||
9
docs/models/operations/location.md
Normal file
9
docs/models/operations/location.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Location
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `ID` | **int* | :heavy_minus_sign: | N/A | 1 |
|
||||||
|
| `Path` | **string* | :heavy_minus_sign: | N/A | /movies |
|
||||||
@@ -146,7 +146,6 @@ import(
|
|||||||
"github.com/LukeHagar/plexgo"
|
"github.com/LukeHagar/plexgo"
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -160,7 +159,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.1
|
version: 0.0.4
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
imports:
|
imports:
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module github.com/LukeHagar/plexgo
|
module github.com/LukeHagar/plexgo
|
||||||
|
|
||||||
go 1.14
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cenkalti/backoff/v4 v4.2.0
|
github.com/cenkalti/backoff/v4 v4.2.0
|
||||||
|
|||||||
@@ -204,9 +204,9 @@ func parseSecuritySchemeValue(client *securityConfig, schemeTag *securityTag, se
|
|||||||
panic("not supported")
|
panic("not supported")
|
||||||
}
|
}
|
||||||
case "openIdConnect":
|
case "openIdConnect":
|
||||||
client.headers[secTag.Name] = valToString(val)
|
client.headers[secTag.Name] = prefixBearer(valToString(val))
|
||||||
case "oauth2":
|
case "oauth2":
|
||||||
client.headers[secTag.Name] = valToString(val)
|
client.headers[secTag.Name] = prefixBearer(valToString(val))
|
||||||
case "http":
|
case "http":
|
||||||
switch schemeTag.SubType {
|
switch schemeTag.SubType {
|
||||||
case "bearer":
|
case "bearer":
|
||||||
|
|||||||
11
library.go
11
library.go
@@ -215,6 +215,17 @@ func (s *Library) GetLibraries(ctx context.Context) (*operations.GetLibrariesRes
|
|||||||
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.GetLibrariesResponseBody
|
||||||
|
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:
|
||||||
|
|||||||
@@ -6,6 +6,243 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Location struct {
|
||||||
|
ID *int `json:"id,omitempty"`
|
||||||
|
Path *string `json:"path,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Location) GetID() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Location) GetPath() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Path
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetLibrariesDirectory struct {
|
||||||
|
AllowSync *bool `json:"allowSync,omitempty"`
|
||||||
|
Art *string `json:"art,omitempty"`
|
||||||
|
Composite *string `json:"composite,omitempty"`
|
||||||
|
Filters *bool `json:"filters,omitempty"`
|
||||||
|
Refreshing *bool `json:"refreshing,omitempty"`
|
||||||
|
Thumb *string `json:"thumb,omitempty"`
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
Agent *string `json:"agent,omitempty"`
|
||||||
|
Scanner *string `json:"scanner,omitempty"`
|
||||||
|
Language *string `json:"language,omitempty"`
|
||||||
|
UUID *string `json:"uuid,omitempty"`
|
||||||
|
UpdatedAt *int `json:"updatedAt,omitempty"`
|
||||||
|
CreatedAt *int `json:"createdAt,omitempty"`
|
||||||
|
ScannedAt *int `json:"scannedAt,omitempty"`
|
||||||
|
Content *bool `json:"content,omitempty"`
|
||||||
|
Directory *bool `json:"directory,omitempty"`
|
||||||
|
ContentChangedAt *int `json:"contentChangedAt,omitempty"`
|
||||||
|
Hidden *int `json:"hidden,omitempty"`
|
||||||
|
Location []Location `json:"Location,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetAllowSync() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.AllowSync
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetArt() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Art
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetComposite() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Composite
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetFilters() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Filters
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetRefreshing() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Refreshing
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetThumb() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Thumb
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetAgent() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Agent
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetScanner() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Scanner
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetLanguage() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Language
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetUUID() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.UUID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetUpdatedAt() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.UpdatedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetCreatedAt() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.CreatedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetScannedAt() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ScannedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetContent() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Content
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetDirectory() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Directory
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetContentChangedAt() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ContentChangedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetHidden() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesDirectory) GetLocation() []Location {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Location
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetLibrariesMediaContainer struct {
|
||||||
|
Size *int `json:"size,omitempty"`
|
||||||
|
AllowSync *bool `json:"allowSync,omitempty"`
|
||||||
|
Title1 *string `json:"title1,omitempty"`
|
||||||
|
Directory []GetLibrariesDirectory `json:"Directory,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesMediaContainer) GetSize() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Size
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesMediaContainer) GetAllowSync() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.AllowSync
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesMediaContainer) GetTitle1() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title1
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesMediaContainer) GetDirectory() []GetLibrariesDirectory {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Directory
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLibrariesResponseBody - The libraries available on the Server
|
||||||
|
type GetLibrariesResponseBody struct {
|
||||||
|
MediaContainer *GetLibrariesMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesResponseBody) GetMediaContainer() *GetLibrariesMediaContainer {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaContainer
|
||||||
|
}
|
||||||
|
|
||||||
type GetLibrariesResponse struct {
|
type GetLibrariesResponse struct {
|
||||||
// HTTP response content type for this operation
|
// HTTP response content type for this operation
|
||||||
ContentType string
|
ContentType string
|
||||||
@@ -13,6 +250,8 @@ type GetLibrariesResponse 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 libraries available on the Server
|
||||||
|
Object *GetLibrariesResponseBody
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetLibrariesResponse) GetContentType() string {
|
func (o *GetLibrariesResponse) GetContentType() string {
|
||||||
@@ -35,3 +274,10 @@ func (o *GetLibrariesResponse) GetRawResponse() *http.Response {
|
|||||||
}
|
}
|
||||||
return o.RawResponse
|
return o.RawResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *GetLibrariesResponse) GetObject() *GetLibrariesResponseBody {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Object
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import (
|
|||||||
|
|
||||||
// ServerList contains the list of servers available to the SDK
|
// ServerList contains the list of servers available to the SDK
|
||||||
var ServerList = []string{
|
var ServerList = []string{
|
||||||
// The full address of your Plex Server
|
|
||||||
"http://10.10.10.47:32400",
|
|
||||||
// The full address of your Plex Server
|
// The full address of your Plex Server
|
||||||
"{protocol}://{ip}:{port}",
|
"{protocol}://{ip}:{port}",
|
||||||
}
|
}
|
||||||
@@ -253,11 +251,10 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
sdkConfiguration: sdkConfiguration{
|
sdkConfiguration: sdkConfiguration{
|
||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.0.1",
|
SDKVersion: "0.0.4",
|
||||||
GenVersion: "2.228.1",
|
GenVersion: "2.237.2",
|
||||||
UserAgent: "speakeasy-sdk/go 0.0.1 2.228.1 0.0.3 github.com/LukeHagar/plexgo",
|
UserAgent: "speakeasy-sdk/go 0.0.4 2.237.2 0.0.3 github.com/LukeHagar/plexgo",
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{},
|
|
||||||
{
|
{
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
"ip": "10.10.10.47",
|
"ip": "10.10.10.47",
|
||||||
|
|||||||
Reference in New Issue
Block a user