Skip to content

Latest commit

 

History

History
173 lines (125 loc) · 8.58 KB

APIs.md

File metadata and controls

173 lines (125 loc) · 8.58 KB

APIs are Hard

API -- Application Programming Interface

Some APIs (or Web Services) provide completely public data, that requires no authentication. Others, like the Github API, have some public data and some protected by authentication. Some are only accessible by authenticating, and most require authentication so that we can create resources. One particular library that can help us do that is hello.js.

When accessing APIs, we need to be aware of Cross-Origin Resource Sharing (CORS) limitations that might be enforced by the API provider. A hacky workaround to CORS limitations is a request method called JSONP that exploits <script> tags. Some APIs require secure keys that should never be exposed and thus require some kind of backend proxy service.

While hello.js can get us access to lots of authenticated APIs, the following is a large list of APIs that provide a mix of public, JSONP-able, or proxy-able services:

Social APIs

Food-related APIs

Government and Civil APIs

Weather APIs

Google APIs

Using the Google SDK (a .js file) may be necessary and the easiest way to get started with Google APIs

- https://developers.google.com/api-client-library/javascript/start/start-js
- https://developers.google.com/apis-explorer/#p/

Music and Video APIs

Image APIs

File and Data Storage APIs

Payments, Credit Card Processing, and Shopping Carts

Other / HackerNews / Startup-y APIs

Dictionary / Words / Thesaurus APIs

GIFs

Real Estate APIs

Job APIs

Transportation APIs

Real Devices

Browser APIs (from previous Notes)

This last section is all about Browser APIs available to us. We've encountered a few already, such as the requestAnimationFrame() function that syncs our drawing and DOM manipulation code to the computer's 60Hz refresh rate.

These are great to explore and build on-top of, because they are what create truly immersive applications.