python-discord / quackstack

An on-demand procedural ducky delivery service. An infinite stack of duckies!
MIT License
7 stars 1 forks source link

Bulk generating duckies #71

Open vcokltfre opened 3 years ago

vcokltfre commented 3 years ago

This proposal is to create an endpoint to allow many duckies to be generated at once, rather than requiring a large number of requests for someone (me) who sometimes wants a large(ish) quantity of ducks at once.

How the endpoint would work

Seeded

POST /duck/bulk
Content-Type: application/json

{
  "seeds": [
    1234,
    5678
  ]
}

Unseeded

GET /duck/bulk?amount=5

Return value

The return value would be an array of objects containing a seed and URL:

[
  {
    "seed": 1234,
    "url": "https://..."
  },
  {
    "seed": 5678,
    "url": "https://..."
  }
]

This format is also related to #70 except it is an array, rather than a single object, but the object schema remains the same.

Kronifer commented 2 years ago

this seems like it could be pretty useful

Kronifer commented 2 years ago

but do we generate seeds for unseeded ducks? i dont know much about the internals of quackstack