samuelbryant / sjb-tools

A simple CLI program to create, maintain and edit todo lists
MIT License
0 stars 0 forks source link

Switch to JSON update paradigm #61

Open samuelbryant opened 6 years ago

samuelbryant commented 6 years ago

Instead of having classes.py expose methods like add_item(item) or update_item(item), we should have add_item(text) and update_item(update_dict).

This hides the item constructor from external stuff. It also is closer to how an actual server works. add_item can return the newly constructed object. This ensures that whatever is returned by add, uses the values as they are after the add.

Also with update, this unifies a bunch of different things