python-discord / quackstack

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

Change return type of generators #70

Open vcokltfre opened 3 years ago

vcokltfre commented 3 years ago

This proposes that the return type of generation endpoints be changed to return objects in the structure of:

{
  "seed": 1234,
  "url": "https://..."
}

This would mean that applications are able to access the seed by which a ducky is generated, if it's randomly generated (although this would be included for consistency on seeded ducks too).

Note that this format (returning a URL) relies on quackstack being made to use S3 compatible object storage before it can be implemented.

Akarys42 commented 3 years ago

How would we feel about returning the seed as a header instead so hotlinking the generation endpoint is still possible?

vcokltfre commented 3 years ago

[Discussed in discord] The endpoint already returns a JSON object so that's a non-concern