Giter Site home page Giter Site logo

antonioalmeida / ditado-api Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 21.0 1000 KB

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

Home Page: https://ditado-api.fly.dev/ditados/random

License: MIT License

JavaScript 92.84% Dockerfile 4.82% Shell 2.35%
flyio github-actions hacktoberfest nodejs

ditado-api's People

Contributors

andcamargo avatar anontyro avatar antonioalmeida avatar brunoromeiro avatar c137santos avatar cmagallon1 avatar creativenull avatar cyrilico avatar dani-jardim avatar dependabot[bot] avatar edgaracarneiro avatar enzomzaocv avatar gabriela-ac avatar henriquetguedes avatar joao-conde avatar luigieai avatar luizhap avatar mihmilicio avatar mlg404 avatar msramalho avatar openseabrus avatar pedromcunha avatar pedrv avatar theguilhermealmeida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ditado-api's Issues

Github Actions/Heroku Deployment

Hello this is not an issue actually, I just read on your README this:

Github Actions had just came out and I wanted to learn all about it, namely how to automate deployments via Heroku. Fetching ditados seemed like the perfect excuse. Also inspired by this.

I just want to let you know that you can actually create automatic deployments in heroku even without github actions. That would be more way convenient. If you want to learn more about github action I suggest you can make some automated test, or some sort of thank you message for every issue. :)

Create /generate endpoint

Ditados are cool, but we need more. Let's create some!

Introducing /generate:

  • Returns a made up ditado
  • Made by stitching up two halves of known ditados
    • Example: "[Ladrão que rouba a ladrão] [todo o buraco é trincheira]"
  • Essentially a blatant copy of @henriquetguedes' ditado-generator functionality (with consent)

We can copy his data and go from there.

Later I'm thinking of building a bot that publishes a generated ditado per day to Mastodon

Add your own ditado

Add your own ditado to the collection!

As per the project's README.me:

  • 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 🎉

Add endpoint to retrieve random entry

At the moment only the entire document can be fetched, but retrieving a random entry would be way more interesting.

I'm leaving this issue open on purpose because it it quite simple and a beginner might try and have a go at it.

Create test directory

Test files shouldn't be in the main repository folder, but have a proper directory, e.g., __tests__

Find another free host

Heroku deployment no longer works because free tier was decommissioned. Find an alternative and setup deployment via Github Actions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.