This document discusses APIs and how they can help make programming more accessible to improve literacy. It notes that while programming is becoming an essential literacy, enrollment in STEM fields is stagnating. The document advocates for improving the accessibility of APIs and helping more people learn to code in order to address this problem and ensure ideas don't die. It provides examples of the JavaScript DOM API, jQuery API, and Twilio API to illustrate what APIs are and how they can be used.
18. WHAT IS AN API?
Find the boxes that are checked
JavaScript DOM API
jQuery API
var checked = [];
var nodeList = document.getElementsByTagName('input');
for (var i = 0; i < nodeList.length; i++) {
if (nodeList[i].checked) {
checked.push(nodeList[i])
}
}
var checked = $('input:checked');
20. THE TWILIO API
Sending an SMS
Processing an SMS
var twilio = require('twilio')(accountSid, authToken);
twilio.sendSms({
to: "+15555551212",
from: "+19724457263",
body: "Hello " + fname + ", please reply YES to confirm your appointment"
});
<Response>
<Sms>Thank you for confirming your appointment, {{ fname }}</Sms>
</Response>
23. LINKSBret Victor - Inventing on Principle
Computer Programming for All: A New Standard of Literacy
Software People
Why Science Majors Change Their Minds
Calling All Hackers
John Sheehan Wants You to Build APIs that Speak Human
The humble hero How to Tell a Story with Code
Inventing on Principle Secrets of Awesome JavaScript API Design