Authorizations
Response
200 - application/json
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.GetSections(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"allowSync": true,
"Directory": [
{
"title": "<string>",
"type": "<string>",
"agent": "<string>",
"allowSync": true,
"art": "<string>",
"composite": "<string>",
"content": true,
"contentChangedAt": 123,
"createdAt": 123,
"directory": true,
"filters": true,
"hidden": true,
"key": "<string>",
"language": "<string>",
"Location": [
{
"id": 123,
"path": "<any>"
}
],
"refreshing": true,
"scannedAt": 123,
"scanner": "<string>",
"thumb": "<string>",
"updatedAt": 123
}
],
"title1": "<string>"
}
}A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
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.GetSections(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"allowSync": true,
"Directory": [
{
"title": "<string>",
"type": "<string>",
"agent": "<string>",
"allowSync": true,
"art": "<string>",
"composite": "<string>",
"content": true,
"contentChangedAt": 123,
"createdAt": 123,
"directory": true,
"filters": true,
"hidden": true,
"key": "<string>",
"language": "<string>",
"Location": [
{
"id": 123,
"path": "<any>"
}
],
"refreshing": true,
"scannedAt": 123,
"scanner": "<string>",
"thumb": "<string>",
"updatedAt": 123
}
],
"title1": "<string>"
}
}Show child attributes
Was this page helpful?