All URIs are relative to http://localhost:5055/api/v1
Method | HTTP request | Description |
---|---|---|
CreateMediaByStatus | Post /media/{mediaId}/{status} | Update media status |
DeleteMedia | Delete /media/{mediaId} | Delete media item |
GetMedia | Get /media | Get media |
GetMediaWatchData | Get /media/{mediaId}/watch_data | Get watch data |
MediaInfo CreateMediaByStatus(ctx, mediaId, status).CreateMediaByStatusRequest(createMediaByStatusRequest).Execute()
Update media status
package main
import (
"context"
"fmt"
"os"
overseerrClient "github.com/devopsarr/overseerr-go/overseerr"
)
func main() {
mediaId := "1" // string | Media ID
status := "available" // string | New status
createMediaByStatusRequest := *overseerrClient.NewCreateMediaByStatusRequest() // CreateMediaByStatusRequest | (optional)
configuration := overseerrClient.NewConfiguration()
apiClient := overseerrClient.NewAPIClient(configuration)
resp, r, err := apiClient.MediaAPI.CreateMediaByStatus(context.Background(), mediaId, status).CreateMediaByStatusRequest(createMediaByStatusRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaAPI.CreateMediaByStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateMediaByStatus`: MediaInfo
fmt.Fprintf(os.Stdout, "Response from `MediaAPI.CreateMediaByStatus`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mediaId | string | Media ID | |
status | string | New status |
Other parameters are passed through a pointer to a apiCreateMediaByStatusRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createMediaByStatusRequest | CreateMediaByStatusRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteMedia(ctx, mediaId).Execute()
Delete media item
package main
import (
"context"
"fmt"
"os"
overseerrClient "github.com/devopsarr/overseerr-go/overseerr"
)
func main() {
mediaId := "1" // string | Media ID
configuration := overseerrClient.NewConfiguration()
apiClient := overseerrClient.NewAPIClient(configuration)
r, err := apiClient.MediaAPI.DeleteMedia(context.Background(), mediaId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaAPI.DeleteMedia``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mediaId | string | Media ID |
Other parameters are passed through a pointer to a apiDeleteMediaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMedia2XXResponse GetMedia(ctx).Take(take).Skip(skip).Filter(filter).Sort(sort).Execute()
Get media
package main
import (
"context"
"fmt"
"os"
overseerrClient "github.com/devopsarr/overseerr-go/overseerr"
)
func main() {
take := float32(20) // float32 | (optional)
skip := float32(0) // float32 | (optional)
filter := "filter_example" // string | (optional)
sort := "sort_example" // string | (optional) (default to "added")
configuration := overseerrClient.NewConfiguration()
apiClient := overseerrClient.NewAPIClient(configuration)
resp, r, err := apiClient.MediaAPI.GetMedia(context.Background()).Take(take).Skip(skip).Filter(filter).Sort(sort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaAPI.GetMedia``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMedia`: GetMedia2XXResponse
fmt.Fprintf(os.Stdout, "Response from `MediaAPI.GetMedia`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetMediaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
take | float32 | ||
skip | float32 | ||
filter | string | ||
sort | string | [default to "added"] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMediaWatchData2XXResponse GetMediaWatchData(ctx, mediaId).Execute()
Get watch data
package main
import (
"context"
"fmt"
"os"
overseerrClient "github.com/devopsarr/overseerr-go/overseerr"
)
func main() {
mediaId := "1" // string | Media ID
configuration := overseerrClient.NewConfiguration()
apiClient := overseerrClient.NewAPIClient(configuration)
resp, r, err := apiClient.MediaAPI.GetMediaWatchData(context.Background(), mediaId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaAPI.GetMediaWatchData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMediaWatchData`: GetMediaWatchData2XXResponse
fmt.Fprintf(os.Stdout, "Response from `MediaAPI.GetMediaWatchData`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mediaId | string | Media ID |
Other parameters are passed through a pointer to a apiGetMediaWatchDataRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]