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.Epg.GetCountries(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Country": [
{
"code": "<string>",
"example": "<string>",
"flavor": 0,
"key": "<string>",
"language": "<string>",
"languageTitle": "<string>",
"title": "<string>",
"type": "<string>"
}
]
}
}This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the flavor attribute
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.Epg.GetCountries(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Country": [
{
"code": "<string>",
"example": "<string>",
"flavor": 0,
"key": "<string>",
"language": "<string>",
"languageTitle": "<string>",
"title": "<string>",
"type": "<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
The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header.
The total size of objects available. Also provided in the X-Plex-Container-Total-Size header.
Show child attributes
Three letter code
0: The country is divided into regions, and following the key will lead to a list of regions.1: The county is divided by postal codes, and an example code is returned in example.2: The country has a single postal code, returned in example.0, 1, 2 Three letter language code
The title of the language
Was this page helpful?