anatoly-scherbakov / geopatterns-demo

A demo for `geopatterns` Python library built with AWS Lambda and Terraform, to demonstrate a minimalistic example of a serverless app on Python.
https://anatoly-scherbakov.github.io/geopatterns-demo/
MIT License
1 stars 1 forks source link

Request `GET /methods/` API to fetch the list of methods instead of hardcoding it #8

Open anatoly-scherbakov opened 3 years ago

anatoly-scherbakov commented 3 years ago

On app load, fetch the methods list and use it to render the list of cards in the UI.

At the moment of this writing, the list of available generation methods (like hexagons) is hard-coded in client-side JavaScript code. That is all right but means code duplication between backend and frontend, which should ideally be reduced.

One of the ways to do that is to call a /methods/ API endpoint from front end and thus retrieve the list of the available methods. That's what is expected to be done in this task.

anatoly-scherbakov commented 3 years ago

Depends on: #15

RomanZorkin commented 3 years ago

Maybe in a future, make 2 random parameters (text and method) in GET /generator by default?

RomanZorkin commented 3 years ago

This task is implemented on the frontend side? Using javascript?

anatoly-scherbakov commented 3 years ago

Updating the task description to make it more detailed.