← Back300 APIs integrated in minutes, not daysu11g.com
1/30/2023

300 APIs integrated in minutes, not days

const config = nao<Auth0.CreateUser>({ 
  kind: "auth0.users.create", 
  "auth:Authorization": "token", 
  "subdomain:tenant": "tenant", 
  "body:email": "email", 
  "body:family_name": "last", 
  "body:given_name": "first", 
});

The config object contains everything you need to fire the request against the API endpoint: method, url, headers, body. Now you can use your favorite http client to execute the real call (mine is fetch since it’s available in both envs: browser and server).

The flethy connectors package is fully typed: you don’t need to know how the payload is structured, what the URL for the specific use case is and which method has to be used. Get started with flethy by just installing the package and then, yeah, select your favorite service to integrate!

npm i @flethy/connectors 
# or 
yarn add @flethy/connectors 
# or 
pnpm add @flethy/connectors

Try it out with webhook.site:

import { nao, WebhookSite } from "@flethy/connectors"; 
const config = nao<WebhookSite.CoreGet>({ 
  kind: "webhooksite.core.get", 
  "param:uuid": "your-individual-uuid", 
  "header:x-test-header": "flethy", 
}); 
console.log(config);

For me, that was not all. As a rule, it doesn’t stay with just one step. I usually have several steps that have to be executed partly sequentially and partly in parallel. So why not merge the configurations together into one flow? Let’s take the Auth0 Management API. I first need to get an access token to then interact with the API. What if it could then look like this?

[ 
  { 
    "id": "token", 
    "config": { "namespace": "token" }, 
    "next": [ { "id": "createUser" } ], 
    "kind": "auth0.auth.accesstoken", 
    "body:audience": "==>env==>AUTH0_AUDIENCE", 
    "body:grant_type": "client_credentials", 
    "body:client_id": "==>secrets==>AUTH0_CLIENT_ID", 
    "body:client_secret": "==>secrets==>AUTH0_CLIENT_SECRET", 
    "subdomain:tenant": "==>env==>AUTH0_TENANT" 
  }, 
  { 
    "id": "createUser", 
    "config": { "namespace": "createUser" }, 
    "kind": "auth0.users.create", 
    "auth:Authorization": "->context.token.access_token->string", 
    "subdomain:tenant": "==>env==>AUTH0_TENANT", 
    "body:email": "->context.input.email->string", 
    "body:family_name": "->context.input.last->string", 
    "body:given_name": "->context.input.first->string" 
  } 
]

Two steps are executed one after the other, the result from the first step is used in the second step. And as you can see, the description is a simple JSON. That means I’m programming language agnostic (what a word). Wohoo! So now how about just deploying this description to the cloud, and it will be executed there, and you don’t have to worry about it yourself. And that’s exactly what I’m working on right now. A first version is ready, a little fine-tuning is missing and then we can start.

The nice thing for me about this approach is that I can try everything out locally without any further dependencies before I deploy it to the cloud. I’m looking forward to your feedback! And if you want to stay up to date, sign up at flethy.com and get regular news! And write to me if you are missing an integration!

Home
Projects
Newsletter
Blog
Me
Philosophy
Gen Art
Work
Setup
CV
Machine
Dynamic Pong: Territory Conquest Meets Classic Physics
Introducing Camunda Directory
Getting Started with AIME Directory Collections in 5 Minutes
How to use a proxy in a nodejs environment
Introducing weeklyfoo
Create your own epaper calendar with Canvas
Codespaces can become a game changer
Cloudflare pages direct upload with stable preview urls
Building your own Twitter Thread Generator
300 APIs integrated in minutes, not days
Be an orchestration hero
Cut a few braids - new NPM package
ETHme - your chic web3 identity
Automatically update data and commit
Aren't the standard actions going too far for you? Write your own one!
Screenshots - a perfect task to automate!
Send messages to Slack from Camunda Cloud
5 Steps how to track your Team's Mood
Automate your manual tasks with Camunda and Trello!
Go beyond the basics
Is there an alternative to spaghetti?
Play with node-canvas and build something useful
How do I implement a command line tool?
Aime Directory
Boring Dev Tools
Camunda Directory
Data Democracy
Dev Pulse
Dynamic Pong
Lifosy
Art u11g
dapphuntr
DiyPunks
flethy
Maker Oracles
SwagTime
EthME
fcheat
Find the next victim
Generative Arts
MakerDAO Delegates
SkunkWorks NFT
Trees of Life NFT
zukuNFT
RestZeebe
Websiteshot
Zeebetron: How to Manage Multiple Zeebe Profiles with Electron
dot calendar
Sharu
Switch Interface (theme)
LINKEDIN
X
GITHUB