mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
260 lines
5.9 KiB
Markdown
260 lines
5.9 KiB
Markdown
# \SessionsApi
|
|
|
|
All URIs are relative to *http://10.10.10.47:32400*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**GetSessionHistory**](SessionsApi.md#GetSessionHistory) | **Get** /status/sessions/history/all | Get Session History
|
|
[**GetSessions**](SessionsApi.md#GetSessions) | **Get** /status/sessions | Get Active Sessions
|
|
[**GetTranscodeSessions**](SessionsApi.md#GetTranscodeSessions) | **Get** /transcode/sessions | Get Transcode Sessions
|
|
[**StopTranscodeSession**](SessionsApi.md#StopTranscodeSession) | **Delete** /transcode/sessions/{sessionKey} | Stop a Transcode Session
|
|
|
|
|
|
|
|
## GetSessionHistory
|
|
|
|
> GetSessionHistory(ctx).Execute()
|
|
|
|
Get Session History
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "./openapi"
|
|
)
|
|
|
|
func main() {
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.SessionsApi.GetSessionHistory(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.GetSessionHistory``: %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 apiGetSessionHistoryRequest struct via the builder pattern
|
|
|
|
|
|
### Return type
|
|
|
|
(empty response body)
|
|
|
|
### Authorization
|
|
|
|
[accessToken](../README.md#accessToken)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
|
[[Back to Model list]](../README.md#documentation-for-models)
|
|
[[Back to README]](../README.md)
|
|
|
|
|
|
## GetSessions
|
|
|
|
> GetSessions(ctx).Execute()
|
|
|
|
Get Active Sessions
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "./openapi"
|
|
)
|
|
|
|
func main() {
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.SessionsApi.GetSessions(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.GetSessions``: %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 apiGetSessionsRequest struct via the builder pattern
|
|
|
|
|
|
### Return type
|
|
|
|
(empty response body)
|
|
|
|
### Authorization
|
|
|
|
[accessToken](../README.md#accessToken)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
|
[[Back to Model list]](../README.md#documentation-for-models)
|
|
[[Back to README]](../README.md)
|
|
|
|
|
|
## GetTranscodeSessions
|
|
|
|
> GetTranscodeSessions200Response GetTranscodeSessions(ctx).Execute()
|
|
|
|
Get Transcode Sessions
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "./openapi"
|
|
)
|
|
|
|
func main() {
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.SessionsApi.GetTranscodeSessions(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.GetTranscodeSessions``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetTranscodeSessions`: GetTranscodeSessions200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `SessionsApi.GetTranscodeSessions`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
This endpoint does not need any parameter.
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiGetTranscodeSessionsRequest struct via the builder pattern
|
|
|
|
|
|
### Return type
|
|
|
|
[**GetTranscodeSessions200Response**](GetTranscodeSessions200Response.md)
|
|
|
|
### Authorization
|
|
|
|
[accessToken](../README.md#accessToken)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
|
[[Back to Model list]](../README.md#documentation-for-models)
|
|
[[Back to README]](../README.md)
|
|
|
|
|
|
## StopTranscodeSession
|
|
|
|
> StopTranscodeSession(ctx, sessionKey).Execute()
|
|
|
|
Stop a Transcode Session
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "./openapi"
|
|
)
|
|
|
|
func main() {
|
|
sessionKey := TODO // interface{} | the Key of the transcode session to stop
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.SessionsApi.StopTranscodeSession(context.Background(), sessionKey).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.StopTranscodeSession``: %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.
|
|
**sessionKey** | [**interface{}**](.md) | the Key of the transcode session to stop |
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiStopTranscodeSessionRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
|
|
|
|
### Return type
|
|
|
|
(empty response body)
|
|
|
|
### Authorization
|
|
|
|
[accessToken](../README.md#accessToken)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
|
[[Back to Model list]](../README.md#documentation-for-models)
|
|
[[Back to README]](../README.md)
|
|
|