Table of Contents
Table of Contents
Introduction
What is Google Sheets?
How to create API using Google Sheets?
Step 1
Step 2
Step 3
...
For further actions, you may consider blocking this person and/or reporting abuse
Hello! Google Sheet isn't for that 🫣
Indeed, but to quote myself when I used Google Sheets as a CMS:
Doesn't mean it's a pretty sight though 😂
😂Great
It feels like illegal 😂
Very good job and an interesting approach for non-developers or to create a prototype very fast.
However, I think that you may mention in your title "static API" and adding at least one of these tags to be more accurante : #sheet #googleworkspaces #google #appscript
Regards
😅Yeah sorry for it
No problem, it's also for your visibility 😉
But it will be a static api...
Then you can also write some json and host it... That's also an api then!
but you can do live writing and reading using some appscript in the google console so even if it is static in some you can update add delete very easily and it's very easy to contain also
Okay, I was unaware of that we can update the content of google sheets using some script.
Yup 👍
This is great! Thanks for sharing.
I might try integrating this into my github pages somehow 😋
Yeah you can if you do please send me the link love to see your projects. 🎉
WOW! This is actually so cool! Actually quite useful for a mock API even.
Yeah i even created website so everyone can track the placement information 😅. Varshithvhegde.github.io/placements
A complementary reading :)
medium.com/@eric_koleda/why-you-sh...
Wow I thought to cover the disadvantages in my next post. And I think for small applications or if you are competing in a hackathon and you need faster way to generate api i think this would be great.
Ok now this comment made my day🥺. Happy to know that this helped.
That's quiet original and may definitely fit with some use cases -- e.g. interfacing with Google forms' results. Caution with the term API which might be excessive though. Thanks for sharing
I dont know about google forms but you can use it as server for your contact form i have made it you can check it here
Step 4: Should be "Apps Script". I found the option under the Extensions menu.
Yes there are multiple ways to get there and this also ne of them .Thanks for noting it
Hi, recently I discovered DevApiService. It's online tool for mockup API. You can make HTTP requests (GET, POST, PUT and DELETE) without limits and with token authorization than generate the platform.
Hello Varshith,
I followed the same but wasn't able to print the table.
Please check this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>HTML + CSS</title>
</head>
<body></body>
<script>
const api =
"https://script.google.com/macros/s/AKfycbxctkTYq0JxZVkTpXVES5FJtSA5_dWeZyTWMKOcOdo/dev";
fetch(api)
.then((respons) => respons.json())
.then((characters) => showCharacters.data());
showCharacters = (characters) => {
document.write(
"<table class='tab'><tr class='tab'><th class='tab'><h2>Name</h2></th><th class='tab'><h2>USN</h2></th><th>"
);
characters.forEach((character) => {
if (character.Name != "Name") {
document.write(
"<tr style='color:black;font-weight: bold;'><td>" +
character.Name +
"</td><td class='tab'>" +
character.Location +
"</td><td>"
);
}
});
};
</script>
</html>