finished creating second level todos in todoist as checklists in habitica

This commit is contained in:
2020-04-10 23:02:02 -04:00
parent 49275681fd
commit 0aaf15a89d
9 changed files with 125 additions and 59 deletions

View File

@@ -9,18 +9,20 @@ namespace Habitica.Todoist.Integration.Model.Storage
{
public TodoHabitLink() { }
public TodoHabitLink(string userId, string todoistId, string habiticaId)
public TodoHabitLink(string userId, string todoistId, string habiticaId, string todoistParentId = null)
{
PartitionKey = userId;
RowKey = todoistId;
TodoistParentId = todoistParentId;
HabiticaId = habiticaId;
}
public string TodoistParentId { get; set; }
public string HabiticaId { get; set; }
public HabitTodoLink Reverse()
public HabitTodoLink Reverse(string habiticaParentId = null)
{
return new HabitTodoLink(PartitionKey, HabiticaId, RowKey);
return new HabitTodoLink(PartitionKey, HabiticaId, RowKey, habiticaParentId);
}
}
}