Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.28 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.28 KB

ditado-api

Public API to serve ditados, i.e., popular Portuguese sayings.

Why?

Github Actions had just come out and I wanted to learn all about it, namely how to automate deployments via Heroku.

Fetching ditados is an easy enough use case. Also inspired by this.

Update: since the original release Heroku has decomissioned their free tier (we're now using fly.io and Github Actions has considerably matured. I now use this to play around

API

Public REST API available at https://ditado-api.fly.dev

  • GET /ditados - Fetch all entries
  • GET /ditados?q=pequenino - Search for a ditado matching a particular word
  • GET /ditados/random - Fetch a random ditado.
  • GET /ditados/generate - 🆕 Create a new ditado! Inspired by ditado-generator

Contribute

  • Fork this repo and edit ditados.json;
  • Add a ditado, including what it means under the meaning field:
{
   "ditados":[
      (...)
      {
         "content":"Your ditado",
         "meaning":"What it means"
      }
   ]
}
  • Submit a PR and celebrate 🎉