- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 29, 2019 01:57 PM
I’m struggling to find anything on the web to teach me how to builds outputs from the API from scratch.
Is it a prerequisite that I am already accomplished with Javascript? [I know programming concepts and am a beginner]
Youtube and Google have a few sparse videos but nothing like a course I can take that will bring me up to speed quickly.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 29, 2019 03:24 PM
If you have no experience with APIs whatsoever, I’d recommend starting with this course by Zapier: https://zapier.com/learn/apis/
And once ready, I’d suggest playing with Airtable’s official javascript client https://github.com/Airtable/airtable.js
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 29, 2019 04:46 PM
No, but some experience is helpful. Here’s one approach to learning -
- Create a base and a simple table with ten records and a single field called “Name”.
- Create a Google spreadsheet
- Open a script project (see
Tools | Script Editor
) - Paste the code into the script
- Change the
baseName
,baseID
,tableName
, andairtableAPIKey
- Save the script file (see disk button in top menu)
- Run the script function (see >
play button
in the top menu) - Select
View | Logs
in the top menu - you should see ten record numbers and names listed.
Now you’re an API programmer. :winking_face:
//
// static vars
//
var baseName = "<base name>";
var baseID = "<base id>";
var tableName = "<table name>";
var airtableAPIKey = "<api key>";
var airtableAPIEndpoint = "https://api.airtable.com/v0/";
//
// get my table (first 100 records only)
//
function testGetMyTable()
{
// fetch the
var results = atGetMyTable_(tableName);
// parse the api results from airtable
var aRecords = JSON.parse(results).records;
// enumerate the records
for (var i in aRecords)
{
// log the record id's
Logger.log(aRecords[i].id + " :: " + aRecords[i].fields["Name"]);
}
return(true);
}
function atGetMyTable_(tableName)
{
const options = {
method: 'GET',
headers: {
'Authorization' : 'Bearer ' + airtableAPIKey,
'Content-type': 'application/json'
},
muteHttpExceptions : true
};
var response = UrlFetchApp.fetch(airtableAPIEndpoint + baseID + "/" + encodeURIComponent(tableName), options).getContentText();
return(response);
}
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 30, 2019 12:27 PM
I’m not sure what you are trying to achieve or what level you want to start at but I have a few tutorials on my blog about getting started with the Airtable API. You can start with this one first:
Getting Started with the Airtable API | Chinara James
Airtable is an easy way to get a database up and running for a side project or to quickly prototype an idea for app. I have used it to manage projects, expenses, client contacts and more.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 30, 2019 02:29 PM
Thanks all, these are great! I’m going to work my way through them a learn more.
I see Airpress does a lot of what I want, but I also want to know how to custom create my display and search on sites, thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 18, 2021 09:55 AM
Hi - Do you have an example of how you might upload something to GitHub or a basic backend like Bluehost to host as a webpage?
Also, to hide the AIrtable direct API?