GET /playlists/{playlistId}/songs

Vrací všechny skladby přiřazené k danému playlistu.

Path parameters

  • playlistId string Required

    Unikátní ID playlistu

Query parameters

  • page integer

    Číslo stránky (od 1)

    Minimum value is 1. Default value is 1.

  • limit integer

    Počet záznamů na stránku

    Minimum value is 1, maximum value is 100. Default value is 20.

Responses

  • 200 application/json

    Seznam skladeb načten.

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes object
      • id
      • title string
      • duration integer
      • artistIds array[string]
      • genre string
    • pagination object
      Hide pagination attributes Show pagination attributes object
      • page integer
      • limit integer
      • total integer
  • 401 application/json

    Chyba autentizace

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 403 application/json

    Nedostatečná oprávnění

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 404 application/json

    Zdroj nenalezen

    Hide response attributes Show response attributes object
    • code string
    • message string
  • 500 application/json

    Chyba serveru

    Hide response attributes Show response attributes object
    • code string
    • message string
GET /playlists/{playlistId}/songs
curl \
 --request GET 'https://api.mstonjek.cz/v1/playlists/playlist_001/songs' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "id": "song_123",
      "title": "Losing It",
      "duration": 245
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1
  }
}
Response examples (401)
{
  "code": "UNAUTHORIZED",
  "message": "Token není platný"
}
Response examples (403)
{
  "code": "FORBIDDEN",
  "message": "Nemáte oprávnění"
}
Response examples (404)
{
  "code": "NOT_FOUND",
  "message": "Zdroj uživatel 'user_123' nebyl nalezen."
}
Response examples (500)
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Server momentálně nedostupný"
}