सन्दर्भ · प्लेलिस्टहरू

एउटा प्लेलिस्ट हेर्नुहोस्

GET /v1/playlists/{uid}

uid अनुसार एउटा प्लेलिस्ट देखाउँछ, साथमा प्रदर्शन क्रममा त्यसका आइटमहरू र त्यो प्लेलिस्ट प्रयोग गर्ने टिभीहरू।

पाथ प्यारामिटर

नामप्रकारविवरण
uidstringप्लेलिस्टको uid।

प्रतिक्रियाका फिल्डहरू

uid string
प्लेलिस्टको पहिचानकर्ता।
name string
प्लेलिस्टको नाम।
organization object
प्लेलिस्टको संस्था: uid र name।
total_time integer
प्लेलिस्टको कुल समय, सेकेन्डमा।
total_time_is_approximate boolean
कुल समय अनुमानित भए true।
items array
प्लेलिस्टका आइटमहरू, प्रदर्शन क्रममा।
items[].position integer
प्लेलिस्टमा आइटमको स्थान।
items[].type string
फाइलका लागि file वा मनोरञ्जन सामग्रीका लागि entertainment। अन्य प्रकारहरू पनि आउन सक्छन्।
items[].uid string
फाइल वा मनोरञ्जन सामग्रीको पहिचानकर्ता।
items[].display_time integer | null
आइटममा तोकिएको प्रदर्शन समय, सेकेन्डमा, वा नतोकिएको भए null।
items[].file object | null
फाइलको डेटा, “फाइलहरूको सूची” मा भएकै फिल्डहरूसहित, वा आइटम फाइल होइन भने वा प्रयोगकर्ताले त्यसको संस्थाका फाइलहरू हेर्न पाउँदैन भने null।
tvs array
यो प्लेलिस्ट प्रयोग गर्ने टिभीहरू (uid, name र organization)। प्रयोगकर्ताले हेर्न पाउने टिभीहरू मात्र देखिन्छन्।

सम्भावित त्रुटिहरू

  • 404 not_found एन्डप्वाइन्ट अवस्थित छैन, वा आइटम अवस्थित छैन वा प्रयोगकर्ताले हेर्न नपाउने संस्थाको हो।
  • कुञ्जी र सीमासम्बन्धी त्रुटिहरू सबै एन्डप्वाइन्टमा लागू हुन्छन्। सबै त्रुटिहरू हेर्नुहोस्
अनुरोध
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();
प्रतिक्रिया200
{
  "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"
        }
      }
    ]
  }
}
अवस्थित नभएको वा पहुँच नभएको आइटम404
{
  "error": {
    "code": "not_found",
    "message": "Item not found or you do not have access to it."
  }
}