Skip to content

Change notifications #58

Answered by olsh
Heiinz asked this question in Q&A
Discussion options

You must be logged in to vote

There is no such feature, but you can achieve something similar using the GetResourcesAsync method. Here is a simple implementation:

var client = new TodoistClient(Util.GetPassword("todoist.api.key"));

 // Set the initial sync token to "*" to fetch all items in the first request.
var syncToken = "*";

// Perform the initial synchronization to get all items and store the new sync token.
var initialResponse = await client.GetResourcesAsync(syncToken, ResourceType.Items);
syncToken = initialResponse.SyncToken;

while (true)
{
    await Task.Delay(TimeSpan.FromSeconds(10));
    
    // Fetch incremental updates for items using the latest sync token.
    var incrementalResponse = await client.G…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by olsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants