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,13 +9,15 @@ namespace Habitica.Todoist.Integration.Model.Storage
{
public HabitTodoLink() { }
public HabitTodoLink(string userId, string habiticaId, string todoistId)
public HabitTodoLink(string userId, string habiticaId, string todoistId, string habiticaParentId = null)
{
PartitionKey = userId;
RowKey = habiticaId;
HabiticaParentId = habiticaParentId;
TodoistId = todoistId;
}
public string HabiticaParentId { get; set; }
public string TodoistId { get; set; }
public TodoHabitLink Reverse()

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);
}
}
}