Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Ekta Nandwani: Adding TODOist Provider

The first milestone of the project – writing a TODOist Provider for gnome-online-accounts. This provider will be used for authentication of user and providing authorization to read/write todo-lists from Recipes to TODOist.

The API documentation for TODOist is available here.

    • The process started from registering Recipes and getting the client_id and client_secret from the TODOist.
    • Then comes coding the GoaTodoistProvider that implements GoaOAuth2Provider. Subclasses must implement these methods from GoaOAuth2ProviderClass:
      • GoaOAuth2ProviderClass.get_authorization_uri: getting the authorization url
      • GoaOAuth2ProviderClass.get_token_uri : getting the token url
      • GoaOAuth2ProviderClass.get_redirect_uri : getting the redirection url (which is https://localhost/ for Desktop Clients)
      • GoaOAuth2ProviderClass.get_scope : decides the level of access to ask from the user
      • GoaOAuth2ProviderClass.get_client_id : getting the client_id obtained from TODOist.
      • GoaOAuth2ProviderClass.get_client_secret : getting the client_secret obtained from TODOist
      • GoaOAuth2ProviderClass.get_identity_sync : to obtain the presentation_id (email id in this case) from the json object returned using REST API by reading user’s properties
    • Additionally, the GoaProviderClass methods (that should chain up to its parent class) must be implemented: GoaProviderClass.get_provider_type, GoaProviderClass.get_provider_name , GoaProviderClass.build_object

The final view of how the provider looks like this:

LOGIN INTO TODOIST

 

TODOIST ACCOUNT IN GOA

Don't be the product, buy the product!

Schweinderl