Skip to content

Commit

Permalink
TESTING THE API
Browse files Browse the repository at this point in the history
  • Loading branch information
kurniawanrzk committed Sep 27, 2023
1 parent 376d922 commit b13732d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"workbench.colorCustomizations": {
"minimap.background": "#00000000",
"scrollbar.shadow": "#00000000"
}
}
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

<div class="container-fluid p-0">
<div class="col-12">
<!-- TESTING -->
<ul style="color:white" id="Assets">

</ul>
</div>
</div>

Expand All @@ -26,4 +29,26 @@

<script>
AOS.init();

function GetAllTheRelease(){
fetch('https://api.github.com/repos/brotherzhafif/SMERB/releases')
.then((res) => {
return res.json()
}).then((data) => {
console.log(data[0].assets)
data[0].assets.forEach((elm, idx) => {
document.getElementById("Assets").innerHTML +=
`
<li><a href='${elm.browser_download_url}'>${elm.name}</a></li>
`
});
}).catch(function (err) {
// There was an error
console.warn('Something went wrong.', err);
});
}

window.addEventListener("load", () => {
GetAllTheRelease()
})
</script>

0 comments on commit b13732d

Please sign in to comment.