diff --git a/assets/js/medalclips.js b/assets/js/medalclips.js new file mode 100644 index 0000000..0842ca6 --- /dev/null +++ b/assets/js/medalclips.js @@ -0,0 +1,15 @@ +/////////////////////////////////// +// Fetch Script for Awex Clips // +// Medal.tv API // +/////////////////////////////////// + +const medalapi = 'https://developers.medal.tv/v1/latest?userId=215577&limit=1' + + async function medalClips() { + const { contentObjects } = await fetch(medalapi, { + method: 'GET', + headers: { 'Authorization': 'pub_x9mjeQnqk07tEK1ge7w2xHYxTpTEbKwN', 'Content-Type': 'application/json' } + }).then(response => response.json()) + + document.querySelector("#clip").innerHTML = contentObjects[0].embedIframeCode + } \ No newline at end of file diff --git a/index.html b/index.html index 2833773..af743f5 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ + @@ -20,7 +21,7 @@ -
+