Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.54 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.54 KB

GitHub Actions status Release Status

elonmu.sh

MaaS is a free public API for fetching random news articles which mention our Lord and Savior...Elon Musk /s

Usage

# Retrieve a random article
$ curl --request GET \
       --url 'https://elonmu.sh/api' \
       --header 'accept: application/json'

Example 200 response:

{
  "source": "Business Insider",
  "title": "Wizards, horses, flip phones and AI: Elon Musk's 10 most colorful quotes from Tesla's investor day",
  "description": "Musk joked about charging mishaps, hailed the complexity of the human brain, and voiced his fears about the rise of artificial intelligence.",
  "url": "https://markets.businessinsider.com/news/stocks/elon-musk-tesla-investor-day-ai-electric-vehicles-self-driving-2023-3",
  "urlImage": "https://i.insider.com/64007dd7ce4a630019955630?width=1200&format=jpeg",
  "publishDate": "2023-03-02T11:37:41Z"
}

Example 400 response:

{
  "error": "There was an error with NewsAPI. Please try again later."
}

Why?

For fun 🤡...and to ramp up on TypeScript/Node/ExpressJS. This API is bascially a thin wrapper around NewsAPI, and deployed using DigitalOceans App Platform.

Enjoy