Nookipedia / nookipedia-api

Nookipedia's custom API for querying data from the Animal Crossing video game series.
https://api.nookipedia.com/
MIT License
42 stars 12 forks source link

Boilerplate cleanup #44

Closed Micalobia closed 3 years ago

Micalobia commented 3 years ago

The code has a lot of boilerplate, and I'd like to reduce it some by making helper functions and such

For example:

if request.args.get('excludedetails') and request.args.get('excludedetails') == 'true'

# 'false' could be replaces with just '', or not be there at all, but this is clearer to what's happening
if request.args.get('excludedetails', 'false') == 'true'

I'd be willing to do any or all of these changes, just not sure which ones are wanted, so any feedback would be nice.

Micalobia commented 3 years ago

I have an example branch in my fork here, where it's branched from master.

Edit: Link change, branch update