Dynamic Medal Clips for index lul

This commit is contained in:
awex
2021-05-22 04:33:42 -04:00
parent 37019189b6
commit f96c6e2d05
2 changed files with 21 additions and 4 deletions
+15
View File
@@ -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
}