func(live)

Mental Model

Let's ditch APIs

APIs exist to allow you to turn inputs into outputs. You make a request, you get a response. It's that straight forward.

But then enters the 👹 with the detail:

  1. Where do you put your inputs?

    • Are they supplied as JSON? XML? YAML? Something else entirely?
    • Do they go in the body? Are they query parameters?
    • Which parameters appear in the URL path?
  2. What type of request are we making?

    • is it a GET request? Cause I want output? Maybe, unless I have a lot of inputs...
    • is it a POST request? Should be POST if I create something, but I'm updating, so PUT?
  3. How do I authenticate?

    • is it a Bearer token?
    • API_KEY?
    • BASIC auth with username and password?
    • Custom header?
    • How do I refresh my auth_token?
  4. Are there any required headers?

    • Just content-type?
    • Charset?
    • Content-Length?
    • Custom headers for this platform?

There's (finally) some standardisation going on thanks to RESTful principles and OpenAPI documentation.

But you still have to check.

It feels like all of that devil's details are just unnecessary implementation choices that developers shouldn't have to be confronted with.

Afterall, I just want to turn input into output.

Isn't there a better approach for that?

Mental Model

A better Developer Experience

Every programming language under the sun has come up with the same pattern to achieve this: the function.

So why is it, that we created this hugely complex abstraction of that simple pattern?

Shouldn't it be as simple as function(input) = output?

We think it should.

That's why we've created func(live)

The Alternative

func(live) is a list of functions that you can use like functions. Feels obvious.

Under the hood they're implemented with HTTP requests, but our wrapper packages allow you to think of them, and use them, like a normal function.

Just function(input) = output

And you can use those functions anywhere: in your code, in our CLI, via API, and on our website.

To give it a go: just search for a function you need on func(live)

Let's chat 💬

I hope you find that useful, and would love to hear your thoughts. What bugs you about working with APIs? Email me on andi@wakeflow.io or whatsapp me on +447500172268.

All the best, Andi

P.S.

I made those images with Dalle3, using the func(live) command line tool like so:


> npm i func-live-cli -g
> func dalle3 "black box turning input into output"
> _

That's also why our frustrated programmer only has four fingers.

Now you try!

awakeflow logoservice
v1.0.1
Having trouble? Try our
whatsapp logo
Whatsapp Support