Stark-Mountain / meetup-facebook-bot

An easy-to-setup bot that helps you to communicate with your meetup attendees.
MIT License
1 stars 1 forks source link

Move api version to settings #6

Closed kapybarin closed 7 years ago

kapybarin commented 7 years ago

Move api version from hardcoded places to one place in settings

vergeev commented 7 years ago

The config can be stored in a separate python script and then imported to app.config as in http://flask.pocoo.org/docs/0.12/config/.

(Also see the "Configuration" part here: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iii-web-forms)

vergeev commented 7 years ago

The config file I'd talked about last time was created: https://github.com/Stark-Mountain/meetup-facebook-bot/blob/master/app/config.py

vergeev commented 7 years ago

Actually, we don't need to factor out the version of the API into a separate place.

Firstly, there's only one place the API version resides in: the messaging module. The messaging_profile module contains it too, but it's more of a standalone script.

Secondly, doing so will add more mess to the code. It would force us to pass the app object to messenger module which essentially doesn't need it.

That's why this issue is invalid.