Referans · Playlist yo

Wè yon playlist

GET /v1/playlists/{uid}

Montre yon playlist dapre uid li, ak eleman li yo nan lòd afichaj la ak TV ki itilize playlist la.

Paramèt nan adrès la

NonTipDeskripsyon
uidstringuid playlist la.

Chan repons lan

uid string
Idantifyan playlist la.
name string
Non playlist la.
organization object
Òganizasyon playlist la: uid ak name.
total_time integer
Tan total playlist la, an segonn.
total_time_is_approximate boolean
true si tan total la se yon estimasyon.
items array
Eleman playlist la, nan lòd afichaj la.
items[].position integer
Pozisyon eleman an nan playlist la.
items[].type string
file pou yon fichye oswa entertainment pou kontni divètisman. Lòt tip ka parèt tou.
items[].uid string
Idantifyan fichye a oswa kontni divètisman an.
items[].display_time integer | null
Tan afichaj yo defini pou eleman an, an segonn, oswa null si pa genyen.
items[].file object | null
Done fichye a, ak menm chan yo ki nan “Lis fichye yo”, oswa null si eleman an pa yon fichye oswa si itilizatè a pa ka wè fichye òganizasyon eleman an.
tvs array
TV ki itilize playlist la (uid, name ak organization). Se sèlman TV itilizatè a ka wè yo ki parèt.

Erè ki posib

  • 404 not_found Endpoint la pa egziste, oswa eleman an pa egziste oswa li fè pati yon òganizasyon itilizatè a pa ka wè.
  • Erè kle ak erè limit yo aplike pou tout endpoint yo. Wè tout erè yo
Demann
curl "https://api.on-cloud.live/v1/playlists/e4da3b7fbbce2345d7772b0674a318d5" \
  -H "X-API-Key: $API_KEY"
<?php
$ch = curl_init('https://api.on-cloud.live/v1/playlists/e4da3b7fbbce2345d7772b0674a318d5');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('API_KEY')],
]);
$response = json_decode(curl_exec($ch), true);
const res = await fetch('https://api.on-cloud.live/v1/playlists/e4da3b7fbbce2345d7772b0674a318d5', {
  headers: { 'X-API-Key': process.env.API_KEY }
});
const { data } = await res.json();
Repons200
{
  "data": {
    "uid": "e4da3b7fbbce2345d7772b0674a318d5",
    "name": "Lista principal",
    "organization": {
      "uid": "8f14e45fceea167a5a36dedd4bea2543",
      "name": "Loja Centro"
    },
    "total_time": 85,
    "total_time_is_approximate": true,
    "items": [
      {
        "position": 1,
        "type": "file",
        "uid": "a87ff679a2f3e71d9181a67b7542122c",
        "display_time": null,
        "file": {
          "uid": "a87ff679a2f3e71d9181a67b7542122c",
          "name": "Promoção de verão",
          "type": "video",
          "duration": 30,
          "archived": false,
          "organization": {
            "uid": "8f14e45fceea167a5a36dedd4bea2543",
            "name": "Loja Centro"
          }
        }
      },
      {
        "position": 2,
        "type": "entertainment",
        "uid": "noticias",
        "display_time": 15,
        "file": null
      },
      {
        "position": 3,
        "type": "file",
        "uid": "6512bd43d9caa6e02c990b0a82652dca",
        "display_time": 10,
        "file": {
          "uid": "6512bd43d9caa6e02c990b0a82652dca",
          "name": "Cardápio do dia",
          "type": "image",
          "duration": 10,
          "archived": false,
          "organization": {
            "uid": "8f14e45fceea167a5a36dedd4bea2543",
            "name": "Loja Centro"
          }
        }
      }
    ],
    "tvs": [
      {
        "uid": "c98cb8f9cc62887d1f6cf5693df9219c",
        "name": "Recepção",
        "organization": {
          "uid": "8f14e45fceea167a5a36dedd4bea2543",
          "name": "Loja Centro"
        }
      },
      {
        "uid": "45c48cce2e2d7fbdea1afc51c7c6ad26",
        "name": "Vitrine",
        "organization": {
          "uid": "8f14e45fceea167a5a36dedd4bea2543",
          "name": "Loja Centro"
        }
      }
    ]
  }
}
Eleman ki pa egziste oswa san aksè404
{
  "error": {
    "code": "not_found",
    "message": "Item not found or you do not have access to it."
  }
}