4.8 KiB
\MediaApi
All URIs are relative to http://10.10.10.47:32400
| Method | HTTP request | Description |
|---|---|---|
| MarkPlayed | Get /:/scrobble | Mark Media Played |
| MarkUnplayed | Get /:/unscrobble | Mark Media Unplayed |
| UpdatePlayProgress | Post /:/progress | Update Media Play Progress |
MarkPlayed
MarkPlayed(ctx).Key(key).Execute()
Mark Media Played
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
key := TODO // interface{} | The media key to mark as played
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MediaApi.MarkPlayed(context.Background()).Key(key).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaApi.MarkPlayed``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiMarkPlayedRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| key | interface{} | The media key to mark as played |
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]
MarkUnplayed
MarkUnplayed(ctx).Key(key).Execute()
Mark Media Unplayed
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
key := TODO // interface{} | The media key to mark as Unplayed
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MediaApi.MarkUnplayed(context.Background()).Key(key).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaApi.MarkUnplayed``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiMarkUnplayedRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| key | interface{} | The media key to mark as Unplayed |
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]
UpdatePlayProgress
UpdatePlayProgress(ctx).Key(key).Time(time).State(state).Execute()
Update Media Play Progress
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
key := TODO // interface{} | the media key
time := TODO // interface{} | The time, in milliseconds, used to set the media playback progress.
state := TODO // interface{} | The playback state of the media item.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MediaApi.UpdatePlayProgress(context.Background()).Key(key).Time(time).State(state).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MediaApi.UpdatePlayProgress``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiUpdatePlayProgressRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| key | interface{} | the media key | |
| time | interface{} | The time, in milliseconds, used to set the media playback progress. | |
| state | interface{} | The playback state of the media item. |
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]