~/talk

You’re probably making an API client

Talkat OdessaJS 2018 · on Sunday, 2018-07-08· [api-design, developer-experience]

An API client for Algolia exposes one-line wrappers over fetch, handles credentials via a client object, and uses objects-as-named-arguments so adding options stays backward compatible. It separates a single request function (injectable per environment) from higher-level methods, avoids CORS preflight by minimizing headers and methods, and provides an escape hatch as request options. Usage is measured with a tiny usage beacon image endpoint, tests mock the network layer and reserve a few functional tests against the real public API.

AI-written summary · about

  1. 0:00Intro
  2. 1:59What is an API?
  3. 6:34Minimum Viable Product
  4. 7:31What I've learned
  5. 8:18Handle credentials
  6. 9:42Use "named" arguments
  7. 10:22Use the same names as your API
  8. 11:25Fill the gaps in the API
  9. 13:10Allow overriding
  10. 15:00Separate request from wrappers
  11. 16:51Everything is async
  12. 17:48Know one layer of abstraction lower
  13. 19:05SimpleRequests
  14. 20:28Removing code!
  15. 25:28Testing
  16. 27:55You can cheat
  17. 28:15Overview
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.