JavaScript Required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Pack Building Roadmap - Maker Stories Webinar
Share
Explore
Pack Building Roadmap - Maker Stories Webinar
Webinar Outline
Roadmap
Travel Brief App
App Highlights
Pack Makers' Checklist
Pack Builder Interface
Pack Types
Pack Details & Code
TBCountries Code
TravelBriefData Code
Pack Data & Formulas
API Data
My Pack Formulas
Daylight | Weather Formulas
Wikipedia Pack
Data Tables
Getting Started with Packs
Build your Pack
Improve your Pack
Hello Fetcher Sample Code
Questions | Feedback
All Comments
Notes
Pack Data & Formulas
API Data
Notes:
Understanding the API results with www.postman.com was one of my biggest challenges. Postman is software that help you work with API data.
The API link -
https://travelbriefing.org/api
- does not require authentication
.
RESULTS for two URLs
(in JSON) from Postman.com, using the "GET" command:
URL 1
:
https://travelbriefing.org/countries.json
{
"name"
:
"Afghanistan"
,
"url"
:
"https://travelbriefing.org/Afghanistan?format=json"
},
{
"name"
:
"Aland Islands"
,
"url"
:
"https://travelbriefing.org/Aland_Islands?format=json"}
,
{
"name"
:
"Albania"
,
"url"
:
"https://travelbriefing.org/Albania?format=json"
},
In the Coda doc:
Extract the
COUNTRY NAMES
with the ParseJSON formula from the TBCountries() results:
Formula Name: SELECTCOUNTRY
Formula Text:
FormulaMap(TBCountries,ParseJSON(CurrentValue,"$.name"))
URL 2
:
https://travelbriefing.org/Netherlands?format=json
The desired results | data are presented in the Coda doc as columns in the main data table.
{
"names"
: {
"name"
:
"Netherlands"
,
"full"
:
"Kingdom of the Netherlands"
,
"iso2"
:
"NL"
,
"iso3"
:
"NLD"
,
"continent"
:
"EU"
},
"maps"
: {
"lat"
:
"52.2129919"
,
"long"
:
"5.2793703"
,
"zoom"
:
"7"
},
"timezone"
: {
"name"
:
"Europe/Amsterdam"
},
"language"
: [{
"language"
:
"Dutch"
,
"official"
:
"Yes"
}],
"electricity"
: {
"voltage"
:
"230"
,
"frequency"
:
"50"
,
"plugs"
: [
"C"
,
"F"
]},
"telephone"
: {
"calling_code"
:
"31"
,
"police"
:
"112"
,
"ambulance"
:
"112"
,
"fire"
:
"112"
},
"water"
: {
"short"
:
"safe"
,
"full"
:
""
},
"currency"
: {
"name"
:
"Euro"
,
"code"
:
"EUR"
,
Pack Makers' Checklist
Gallery
Share
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.