Lumen Studio

Par Louis Berg

Calling an outside API from a page

The weather block shows the pattern: a server fetch with a timeout, a cache lifetime and its own tag.

Read in English

A gradient from night blue to evening orange

The weather block calls Open-Meteo from the server. The answer is cached for thirty minutes with its own tag, so the page stays fast and the API is called rarely.

Big Buck Bunny on VimeoLue depuis un service externe, qui peut déposer des cookies.

When the API is slow or down, the block shows a short note and the page still renders.