API endpoint to fetch latest statuses?

Author Topic
grrgyle

Posted 2025-02-27 21:52:29

I'm trying to make a little kind of news ticker for polybar to show the latest status every few minutes.

I know I can do like:

GET https://status.cafe/users/grrgyle/status.json

to get my status, but is there an endpoint like (just an example):

GET https://status.cafe/status.json

where I could just get the last status submitted, like what appears at the top of the page when visiting https://status.cafe/ ?

grrgyle

Posted 2025-02-27 22:28:50
curl https://status.cafe/users/$(curl https://status.cafe -o - |htmlq 'article > div'|& head -1|sed -nE 's/<div class="status-username"><a href="\/users\/(.*)".*/\1/p')/status.json

What am I even doing with my life... 🙈 this uses https://github.com/mgdm/htmlq#readme paired with my absolute lack of shame. Will delete if this kind of scraping is against policy.