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.Library.StopAllRefreshes(ctx)
if err != nil {
log.Fatal(err)
}
if res.LibrarySections != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"allowCameraUpload": true,
"allowChannelAccess": true,
"allowMediaDeletion": true,
"allowSharing": true,
"allowSync": true,
"allowTuners": true,
"backgroundProcessing": true,
"certificate": true,
"companionProxy": true,
"countryCode": "<string>",
"diagnostics": "<string>",
"eventStream": true,
"friendlyName": "<string>",
"hubSearch": true,
"itemClusters": true,
"livetv": 7,
"machineIdentifier": "<unknown>",
"mediaProviders": true,
"multiuser": true,
"musicAnalysis": 2,
"myPlex": true,
"myPlexMappingState": "<unknown>",
"myPlexSigninState": "<unknown>",
"myPlexSubscription": true,
"myPlexUsername": "<string>",
"offlineTranscode": "<unknown>",
"ownerFeatures": "<string>",
"platform": "<string>",
"platformVersion": "<string>",
"pluginHost": true,
"pushNotifications": true,
"readOnlyLibraries": true,
"streamingBrainABRVersion": 123,
"streamingBrainVersion": 123,
"sync": true,
"transcoderActiveVideoSessions": 123,
"transcoderAudio": true,
"transcoderLyrics": true,
"transcoderPhoto": true,
"transcoderSubtitles": true,
"transcoderVideo": true,
"transcoderVideoBitrates": "<unknown>",
"transcoderVideoQualities": "<string>",
"transcoderVideoResolutions": "<unknown>",
"updatedAt": 123,
"updater": true,
"version": "<string>",
"voiceSearch": true,
"Directory": [
{
"count": 123,
"key": "<string>",
"title": "<string>"
}
]
}
}Stop all refreshes across all sections
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.Library.StopAllRefreshes(ctx)
if err != nil {
log.Fatal(err)
}
if res.LibrarySections != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"allowCameraUpload": true,
"allowChannelAccess": true,
"allowMediaDeletion": true,
"allowSharing": true,
"allowSync": true,
"allowTuners": true,
"backgroundProcessing": true,
"certificate": true,
"companionProxy": true,
"countryCode": "<string>",
"diagnostics": "<string>",
"eventStream": true,
"friendlyName": "<string>",
"hubSearch": true,
"itemClusters": true,
"livetv": 7,
"machineIdentifier": "<unknown>",
"mediaProviders": true,
"multiuser": true,
"musicAnalysis": 2,
"myPlex": true,
"myPlexMappingState": "<unknown>",
"myPlexSigninState": "<unknown>",
"myPlexSubscription": true,
"myPlexUsername": "<string>",
"offlineTranscode": "<unknown>",
"ownerFeatures": "<string>",
"platform": "<string>",
"platformVersion": "<string>",
"pluginHost": true,
"pushNotifications": true,
"readOnlyLibraries": true,
"streamingBrainABRVersion": 123,
"streamingBrainVersion": 123,
"sync": true,
"transcoderActiveVideoSessions": 123,
"transcoderAudio": true,
"transcoderLyrics": true,
"transcoderPhoto": true,
"transcoderSubtitles": true,
"transcoderVideo": true,
"transcoderVideoBitrates": "<unknown>",
"transcoderVideoQualities": "<string>",
"transcoderVideoResolutions": "<unknown>",
"updatedAt": 123,
"updater": true,
"version": "<string>",
"voiceSearch": true,
"Directory": [
{
"count": 123,
"key": "<string>",
"title": "<string>"
}
]
}
}The token which identifies the user accessing the PMS. This can be either:
JWT tokens provide better security with:
OK
MediaContainer is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the parentTitle attribute may appear on the MediaContainer rather than being repeated on each track.
Show child attributes
Was this page helpful?