Update API

j 2024-06-22 08:30:50 +00:00
parent 3ede671118
commit 3f8ca2de48

11
API.md

@ -18,6 +18,15 @@ To use the API you can use Ox.App if you use Ox.js, or look at [pandora_client](
<!DOCTYPE html>
<html>
<head>
<style>
div {
clear: both;
}
img {
float: left;
padding: 4px;
}
</style>
<script>
async function api(action, data) {
const url = "https://pad.ma/api/"
@ -46,7 +55,7 @@ To use the API you can use Ox.App if you use Ox.js, or look at [pandora_client](
}).then(result => {
result.data.items.forEach(item => {
const div = document.createElement("div")
div.innerHTML = `<h1><a href="https://pad.ma/${item.id}">${item.title}</a></h1><p>${item.summary}</p>`
div.innerHTML = `<h1><a href="https://pad.ma/${item.id}">${item.title}</a></h1><p><img src="https://pad.ma/${item.id}/128p.jpg">${item.summary}</p>`
document.body.appendChild(div)
})
})