General endpoints for basic PMS operation not specific to any media provider
- GetServerInfo - Get PMS info
- GetSystemAccounts - Get System Accounts
- GetUserWebhooks - User Webhooks
- AddUserWebhook - Add User Webhook
- GetClients - Get Clients
- GetCloudServer - Get Cloud Server
- GetSystemDevices - Get System Devices
- GetDiagnostics - Get Diagnostics
- DownloadDatabaseDiagnostics - Download Database Diagnostics
- DownloadLogBundle - Download Log Bundle
- GetGeoIP - Get GeoIP
- GetIdentity - Get PMS identity
- GetIP - Get IP
- ClaimServer - Claim Server
- RefreshReachability - Refresh Reachability
- GetSourceConnectionInformation - Get Source Connection Information
- CreateTransientToken - Get Transient Tokens
- GetLocalServers - Get Local Servers
- BrowseFilesystem - Browse Filesystem
- GetBandwidthStatistics - Get Bandwidth Statistics
- GetResourceStatistics - Get Resource Statistics
- GetSyncStatus - Get Sync Status
- GetSyncItems - Get Sync Items
- GetSyncQueue - Get Sync Queue
- RefreshSyncContent - Refresh Sync Content
- RefreshSyncLists - Refresh Sync Lists
- GetSyncTranscodeQueue - Get Sync Transcode Queue
- GetMetadataAgents - Get Metadata Agents
- GetSystemSettings - Get System Settings
- CheckForSystemUpdates - Check for System Updates
- GetWebhooks - Get Webhooks
- AddWebhook - Add Webhook
- GetPlexDownloads - Get Plex Downloads
- BrowseFilesystemPath - Browse Filesystem Path
- GetSyncItem - Get Sync Item
- GetMetadataAgentDetails - Get Metadata Agent Details
Information about this PMS setup and configuration
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetServerInfo(ctx, operations.GetServerInfoRequest{}) if err != nil { log.Fatal(err) } if res.Object != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetServerInfoRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetServerInfoResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get a list of local system accounts.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSystemAccounts(ctx, operations.GetSystemAccountsRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSystemAccountsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSystemAccountsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
List webhook URLs for the logged-in user.
package main import( "context" "github.com/LukeHagar/plexgo" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetUserWebhooks(ctx) if err != nil { log.Fatal(err) } if res.WebhookPayload != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetUserWebhooksResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Add a webhook URL for the logged-in user.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.AddUserWebhook(ctx, operations.AddUserWebhookRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AddUserWebhookRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.AddUserWebhookResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get a list of connected Plex clients.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetClients(ctx, operations.GetClientsRequest{}) if err != nil { log.Fatal(err) } if res.Object != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetClientsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetClientsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get Plex Cloud server status for the logged-in user.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetCloudServer(ctx, operations.GetCloudServerRequest{}) if err != nil { log.Fatal(err) } if res.CloudServerResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetCloudServerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetCloudServerResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get a list of local system devices.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSystemDevices(ctx, operations.GetSystemDevicesRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDevice != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSystemDevicesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSystemDevicesResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get server diagnostics overview.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetDiagnostics(ctx, operations.GetDiagnosticsRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetDiagnosticsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetDiagnosticsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Download server database diagnostics bundle.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.DownloadDatabaseDiagnostics(ctx, operations.DownloadDatabaseDiagnosticsRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DownloadDatabaseDiagnosticsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DownloadDatabaseDiagnosticsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Download server logs bundle.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.DownloadLogBundle(ctx, operations.DownloadLogBundleRequest{}) if err != nil { log.Fatal(err) } if res.BinaryResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.DownloadLogBundleRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DownloadLogBundleResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get GeoIP lookup information for the current request.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetGeoIP(ctx, operations.GetGeoIPRequest{}) if err != nil { log.Fatal(err) } if res.GeoIPResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetGeoIPRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetGeoIPResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get details about this PMS's identity
package main import( "context" "github.com/LukeHagar/plexgo" "log" ) func main() { ctx := context.Background() s := plexgo.New() res, err := s.General.GetIdentity(ctx) if err != nil { log.Fatal(err) } if res.Object != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetIdentityResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get the public IP address detected by Plex.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetIP(ctx, operations.GetIPRequest{}) if err != nil { log.Fatal(err) } if res.IPResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetIPRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetIPResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Claim the local PMS server using a claim token obtained from plex.tv.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.ClaimServer(ctx, operations.ClaimServerRequest{}) if err != nil { log.Fatal(err) } if res.ClaimTokenResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ClaimServerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ClaimServerResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Refresh remote access port mapping.
package main import( "context" "github.com/LukeHagar/plexgo" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.RefreshReachability(ctx) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RefreshReachabilityResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSourceConnectionInformation(ctx, operations.GetSourceConnectionInformationRequest{ Source: "server://client-identifier", Refresh: components.BoolIntTrue.ToPointer(), }) if err != nil { log.Fatal(err) } if res.Object != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSourceConnectionInformationRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSourceConnectionInformationResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. Note: This endpoint responds to all HTTP verbs but POST in preferred
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.CreateTransientToken(ctx, operations.CreateTransientTokenRequest{ MediaType: operations.QueryParamTypeDelegation, Scope: operations.ScopeAll, }) if err != nil { log.Fatal(err) } if res.Object != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateTransientTokenRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTransientTokenResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get a list of local servers.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetLocalServers(ctx, operations.GetLocalServersRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetLocalServersRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetLocalServersResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Browse filesystem paths accessible to the server.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.BrowseFilesystem(ctx, operations.BrowseFilesystemRequest{ IncludeFiles: components.BoolIntTrue.ToPointer(), }) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.BrowseFilesystemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.BrowseFilesystemResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get dashboard bandwidth data.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetBandwidthStatistics(ctx, operations.GetBandwidthStatisticsRequest{ Timespan: plexgo.Pointer[int64](4), Lan: components.BoolIntTrue.ToPointer(), }) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetBandwidthStatisticsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetBandwidthStatisticsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get dashboard resource data.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetResourceStatistics(ctx, operations.GetResourceStatisticsRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetResourceStatisticsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetResourceStatisticsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get sync status overview.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSyncStatus(ctx, operations.GetSyncStatusRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithStatus != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSyncStatusRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSyncStatusResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get sync items list.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSyncItems(ctx, operations.GetSyncItemsRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSyncItemsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSyncItemsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get sync queue.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSyncQueue(ctx, operations.GetSyncQueueRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSyncQueueRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSyncQueueResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Force PMS to refresh content for known SyncLists.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.RefreshSyncContent(ctx, operations.RefreshSyncContentRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RefreshSyncContentRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RefreshSyncContentResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Force PMS to download new SyncList from plex.tv.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.RefreshSyncLists(ctx, operations.RefreshSyncListsRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RefreshSyncListsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RefreshSyncListsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get sync transcode queue status.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSyncTranscodeQueue(ctx, operations.GetSyncTranscodeQueueRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSyncTranscodeQueueRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSyncTranscodeQueueResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get a list of available metadata agents.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetMetadataAgents(ctx, operations.GetMetadataAgentsRequest{}) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetMetadataAgentsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetMetadataAgentsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get system-level settings.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSystemSettings(ctx, operations.GetSystemSettingsRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSystemSettingsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSystemSettingsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Check for available PMS updates.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.CheckForSystemUpdates(ctx, operations.CheckForSystemUpdatesRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CheckForSystemUpdatesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CheckForSystemUpdatesResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
List configured webhook URLs for the logged-in user.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetWebhooks(ctx, operations.GetWebhooksRequest{}) if err != nil { log.Fatal(err) } if res.WebhookPayload != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetWebhooksRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetWebhooksResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Add a webhook URL for the logged-in user.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.AddWebhook(ctx, operations.AddWebhookRequest{}) if err != nil { log.Fatal(err) } if res.SuccessResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.AddWebhookRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.AddWebhookResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get available Plex update downloads for a specific channel (e.g. plexpass, public).
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetPlexDownloads(ctx, operations.GetPlexDownloadsRequest{ Channel: "<value>", }) if err != nil { log.Fatal(err) } if res.PlexDownloadsResponse != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetPlexDownloadsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetPlexDownloadsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Browse a specific filesystem path.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.BrowseFilesystemPath(ctx, operations.BrowseFilesystemPathRequest{ Base64path: "<value>", }) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.BrowseFilesystemPathRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.BrowseFilesystemPathResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get sync item details.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetSyncItem(ctx, operations.GetSyncItemRequest{ SyncID: 761088, }) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetSyncItemRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetSyncItemResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |
Get details and settings for a specific metadata agent.
package main import( "context" "github.com/LukeHagar/plexgo/models/components" "github.com/LukeHagar/plexgo" "github.com/LukeHagar/plexgo/models/operations" "log" ) func main() { ctx := context.Background() s := plexgo.New( plexgo.WithAccepts(components.AcceptsApplicationXML), plexgo.WithClientIdentifier("abc123"), plexgo.WithProduct("Plex for Roku"), plexgo.WithVersion("2.4.1"), plexgo.WithPlatform("Roku"), plexgo.WithPlatformVersion("4.3 build 1057"), plexgo.WithDevice("Roku 3"), plexgo.WithModel("4200X"), plexgo.WithDeviceVendor("Roku"), plexgo.WithDeviceName("Living Room TV"), plexgo.WithMarketplace("googlePlay"), plexgo.WithSecurity("<YOUR_API_KEY_HERE>"), ) res, err := s.General.GetMetadataAgentDetails(ctx, operations.GetMetadataAgentDetailsRequest{ AgentID: "<id>", }) if err != nil { log.Fatal(err) } if res.MediaContainerWithDirectory != nil { // handle response } }
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetMetadataAgentDetailsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetMetadataAgentDetailsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.Error | 401 | application/json |
| sdkerrors.SDKError | 4XX, 5XX | */* |