A full, open API for creating note pads and thoughts.
Great for hobbyist and learners.
Request:
// Create a new pad
fetch('https://padit.zoodinkers.com/api/pads', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
}
}).then(async function (response) {
const pad = await response.json();
console.log(pad);
})
Response:
{
"status": "success",
"data": {
"key": "obkG6w2O"
}
}
Request:
// Add a thought to a pad
fetch('https://padit.zoodinkers.com/api/pads/obkG6w2O/thoughts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"thought": "Remember to buid this amazing feature!"
})
}).then(async function (response) {
const thought = await response.json();
console.log(thought);
});
Response:
{
"status": "success",
"data": {
"key": "xpJeufKU",
"thought": "Remember to buid this amazing feature!"
}
}
Request:
// Get thoughts from a pad
fetch('https://padit.zoodinkers.com/api/pads/obkG6w2O/thoughts', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
}).then(async function (response) {
const thoughts = await response.json();
console.log(thoughts);
});
Response:
{
"status": "success",
"data": [
{
"key": "xpJeufKU",
"thought": "Remember to buid this amazing feature!"
},
{
"key": "v7BRSjJy",
"thought": "Don't forget to write the documentation!"
}
]
}