Pages

Tuesday 25 February 2020

Access Numbers API for maths fact

The following Google Apps Script is my first look at accessing an API and handling the data that comes back. I am using Numbers API to return a random maths fact and append it to a Google Sheet.

API Url: http://numbersapi.com/random/math

We use the 'UrlFetchApp' to then call the API and 'getContentText' to store the returned data. From there we can simple 'appendRow' in the spreadsheet to build up a list each time we run the function.

Access Numbers API for maths fact

No comments:

Post a Comment