test_jellystat_api.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>JellyStat API Test</title>
  5. </head>
  6. <body>
  7. <h1>JellyStat Metadata API Test</h1>
  8. <button onclick="testMetadata()">Test Metadata API</button>
  9. <pre id="result"></pre>
  10. <script>
  11. async function testMetadata() {
  12. const token = '4wr9yn1z30k57hnsczpu';
  13. const testKey = '123456'; // Replace with actual item ID
  14. try {
  15. const response = await fetch('https://media.glassnetworks.net/api/v2/homepage/jellystat/metadata', {
  16. method: 'POST',
  17. headers: {
  18. 'Content-Type': 'application/json',
  19. 'Token': token
  20. },
  21. body: JSON.stringify({ key: testKey })
  22. });
  23. const data = await response.json();
  24. document.getElementById('result').textContent = JSON.stringify(data, null, 2);
  25. } catch (error) {
  26. document.getElementById('result').textContent = 'Error: ' + error.message;
  27. }
  28. }
  29. // Auto-run on load
  30. window.onload = testMetadata;
  31. </script>
  32. </body>
  33. </html>