Sending the Ingredient List to Todoist

A milestone. After placing the UI elements in place, came the real functionality which was to send the ingredients list from Recipes to Todoist.

We’re using REST Apis of Todoist with Librest  to make calls from Recipes. The responses are processed using JsonGlib. In the process that has a description that small, I hit problems and got different error codes : Error code 401: Accidentally sending another provider’s access token with an api call, Error 400: caused by missing parameters / trying to add a JsonArray as a parameter to a RestProxyCall. Before these error codes came RestProxyCall throwing errors in terminal saying RestProxyCall can’t be reused which was caused by an attempt to make various calls using a single instance of RestProxyCall . Well getting past all these silly tiny things was fun. 😀

Here is the result to the fun and the work…  This is how it looks like …


The UI elements to the TODOist Integration with Recipes

Control Center…

Before starting the project, there was a question as how to deal with TODOist account showing  up in control center and serving no purpose when Recipes and gnome-TODO aren’t installed, both of them being non-core apps.

So, what we did is hide Provider i.e. TODOist from the control center from the providers list and only show it if account is already configured. This hiding is done using a property in gnome-online-accounts that control center respects so as to display todoist or not. But how would that account get added if the provider isn’t visible in the control-center. Solution for this is letting the app itself, be it Recipes or gnome-todo add an account for TODOist. We use an AddAccount method written by Rohit Kaushik (GSoCer with gnome-todo).



This is about the user interface to share the ingredients list to TODOist. A dialog with primary things in it : providers list that have integration with Recipes to add new accounts (it’s is just TODOist at the moment) and the accounts (already once configured) to send ingredients. And this is how it looks like