kiblee / tod0

A Terminal Client for Microsoft To-Do
MIT License
124 stars 19 forks source link

Added explicit Task and TodoList classes #23

Closed devzeb closed 3 years ago

devzeb commented 3 years ago

The new "Task" and "TodoList" objects can be created from the API Rest result dictionary.

Before, when querying data from the REST API, a dict was returned which contained all the response data. Now, this API response can be converted to an explicit object ("TodoList" or "Task").

The explicit conversion prevents the application from breaking through typos when extracting data from a response object.