Fleshed out the table storage service and started syncing logic
This commit is contained in:
@@ -6,27 +6,17 @@ namespace Habitica.Todoist.Integration.Model.Todoist
|
||||
{
|
||||
public class Item
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("content")]
|
||||
public string Content { get; set; }
|
||||
[JsonProperty("Id")]
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("due")]
|
||||
public Due Due { get; set; }
|
||||
[JsonProperty("priority")]
|
||||
public int Priority { get; set; }
|
||||
[JsonProperty("is_deleted")]
|
||||
public int Is_deleted { get; set; }
|
||||
[JsonProperty("date_completed")]
|
||||
public string Date_completed { get; set; }
|
||||
|
||||
public int? GetDifficulty()
|
||||
{
|
||||
try { return int.Parse(Content.Split('-').Last().Last().ToString()); } catch { }
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetCleanContent()
|
||||
{
|
||||
try { return Content.Split('-').First(); } catch { }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Habitica.Todoist.Integration.Model.Todoist
|
||||
namespace Habitica.Todoist.Integration.Model.Todoist.Responses
|
||||
{
|
||||
public class SyncResponse
|
||||
{
|
||||
@@ -11,7 +11,7 @@ namespace Habitica.Todoist.Integration.Model.Todoist
|
||||
public string Sync_token { get; set; }
|
||||
[JsonProperty("full_sync")]
|
||||
public bool Full_sync { get; set; }
|
||||
[JsonProperty("itmes")]
|
||||
[JsonProperty("items")]
|
||||
public List<Item> Items { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user