Skip to main content
GET
/
library
/
sections
/
all
PlexGO
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>"
  }
}

Authorizations

X-Plex-Token
string
header
required

Response

200 - application/json
MediaContainer
object