16 KiB
\PlexTvApi
All URIs are relative to https://plex.tv/api/v2
| Method | HTTP request | Description |
|---|---|---|
| GetCompanionsData | Get /companions | Get Companions Data |
| GetDevices | Get /resources | Get Devices |
| GetGeoData | Get /geoip | Get Geo Data |
| GetHomeData | Get /home | Get Home Data |
| GetPin | Post /pins | Get a Pin |
| GetToken | Get /pins/{pinID} | Get Access Token |
| GetUserDetails | Get /user | Get Logged in User |
| GetUserOptOutSettings | Get /user/settings/opt_outs | Get User Opt Out Settings |
| GetUserSettings | Get /user/settings | Get User Settings |
GetCompanionsData
interface{} GetCompanionsData(ctx).Execute()
Get Companions Data
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetCompanionsData(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetCompanionsData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCompanionsData`: interface{}
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetCompanionsData`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetCompanionsDataRequest struct via the builder pattern
Return type
interface{}
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDevices
interface{} GetDevices(ctx).IncludeHttps(includeHttps).IncludeRelay(includeRelay).IncludeIPv6(includeIPv6).Execute()
Get Devices
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
includeHttps := TODO // interface{} | Include Https entries in the results (optional)
includeRelay := TODO // interface{} | Include Relay addresses in the results (optional)
includeIPv6 := TODO // interface{} | Include IPv6 entries in the results (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetDevices(context.Background()).IncludeHttps(includeHttps).IncludeRelay(includeRelay).IncludeIPv6(includeIPv6).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevices`: interface{}
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetDevices`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetDevicesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| includeHttps | interface{} | Include Https entries in the results | |
| includeRelay | interface{} | Include Relay addresses in the results | |
| includeIPv6 | interface{} | Include IPv6 entries in the results |
Return type
interface{}
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetGeoData
GetGeoData200Response GetGeoData(ctx).Execute()
Get Geo Data
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetGeoData(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetGeoData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetGeoData`: GetGeoData200Response
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetGeoData`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetGeoDataRequest struct via the builder pattern
Return type
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetHomeData
GetGeoData200Response GetHomeData(ctx).Execute()
Get Home Data
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetHomeData(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetHomeData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHomeData`: GetGeoData200Response
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetHomeData`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetHomeDataRequest struct via the builder pattern
Return type
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetPin
GetPin200Response GetPin(ctx).Strong(strong).Execute()
Get a Pin
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
strong := TODO // interface{} | Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` (optional) (default to false)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetPin(context.Background()).Strong(strong).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetPin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPin`: GetPin200Response
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetPin`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetPinRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| strong | interface{} | Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` | [default to false] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetToken
GetToken(ctx, pinID).Execute()
Get Access Token
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
pinID := TODO // interface{} | The PinID to retrieve an access token for
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetToken(context.Background(), pinID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| pinID | interface{} | The PinID to retrieve an access token for |
Other Parameters
Other parameters are passed through a pointer to a apiGetTokenRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
Return type
(empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetUserDetails
GetUserDetails(ctx).Execute()
Get Logged in User
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetUserDetails(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetUserDetails``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetUserDetailsRequest struct via the builder pattern
Return type
(empty response body)
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetUserOptOutSettings
GetUserOptOutSettings200Response GetUserOptOutSettings(ctx).Execute()
Get User Opt Out Settings
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetUserOptOutSettings(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetUserOptOutSettings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUserOptOutSettings`: GetUserOptOutSettings200Response
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetUserOptOutSettings`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetUserOptOutSettingsRequest struct via the builder pattern
Return type
GetUserOptOutSettings200Response
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetUserSettings
interface{} GetUserSettings(ctx).Execute()
Get User Settings
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlexTvApi.GetUserSettings(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetUserSettings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUserSettings`: interface{}
fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetUserSettings`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetUserSettingsRequest struct via the builder pattern
Return type
interface{}
Authorization
PlatformVersion, ClientIdentifier, Platform, Version, Device, Product, Token, DeviceName
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]