seperated todoist and habitica api calls into services

This commit is contained in:
2020-03-19 00:10:12 -04:00
parent b45b2d80b0
commit 59377a7749
19 changed files with 246 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
@@ -7,8 +8,11 @@ namespace Habitica.Todoist.Integration.Model.Todoist
{
public class Due
{
[JsonProperty("date")]
public string Date { get; set; }
[JsonProperty("timezone")]
public string Timezone { get; set; }
[JsonProperty("string")]
public string @String { get; set; }
public string ToJavaScriptDateStr()

View File

@@ -1,14 +1,20 @@
using System;
using Newtonsoft.Json;
using System;
using System.Linq;
namespace Habitica.Todoist.Integration.Model.Todoist
{
public class Item
{
[JsonProperty("content")]
public string Content { get; set; }
[JsonProperty("Id")]
public string Id { get; set; }
[JsonProperty("due")]
public Due Due { get; set; }
[JsonProperty("is_deleted")]
public int Is_deleted { get; set; }
[JsonProperty("date_completed")]
public string Date_completed { get; set; }
public int? GetDifficulty()

View File

@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
@@ -6,8 +7,11 @@ namespace Habitica.Todoist.Integration.Model.Todoist
{
public class SyncResponse
{
[JsonProperty("sync_token")]
public string Sync_token { get; set; }
[JsonProperty("full_sync")]
public bool Full_sync { get; set; }
[JsonProperty("itmes")]
public List<Item> Items { get; set; }
}
}