wip: finish converting some more projects
This commit is contained in:
12
Habittodo.Model/Habitica/ChecklistItem.cs
Normal file
12
Habittodo.Model/Habitica/ChecklistItem.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Habittodo.Model.Habitica
|
||||
{
|
||||
public class ChecklistItem
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("text")]
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
||||
8
Habittodo.Model/Habitica/Enums/ScoreAction.cs
Normal file
8
Habittodo.Model/Habitica/Enums/ScoreAction.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Habittodo.Model.Habitica.Enums
|
||||
{
|
||||
public enum ScoreAction
|
||||
{
|
||||
Up = 0,
|
||||
Down = 1
|
||||
}
|
||||
}
|
||||
10
Habittodo.Model/Habitica/Enums/TaskType.cs
Normal file
10
Habittodo.Model/Habitica/Enums/TaskType.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Habittodo.Model.Habitica.Enums
|
||||
{
|
||||
public enum TaskType
|
||||
{
|
||||
Habit = 0,
|
||||
Daily = 1,
|
||||
Todo = 2,
|
||||
Reward = 3
|
||||
}
|
||||
}
|
||||
14
Habittodo.Model/Habitica/Responses/HabiticaResponse.cs
Normal file
14
Habittodo.Model/Habitica/Responses/HabiticaResponse.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Habittodo.Model.Habitica.Responses
|
||||
{
|
||||
public class HabiticaReponse<T>
|
||||
{
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
[JsonProperty("data")]
|
||||
public T Data { get; set; }
|
||||
[JsonProperty("notifications")]
|
||||
public object Notifications { get; set; }
|
||||
}
|
||||
}
|
||||
21
Habittodo.Model/Habitica/Task.cs
Normal file
21
Habittodo.Model/Habitica/Task.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Habittodo.Model.Habitica
|
||||
{
|
||||
public class Task
|
||||
{
|
||||
[JsonProperty("text")]
|
||||
public string Text { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
[JsonProperty("date")]
|
||||
public string Date { get; set; }
|
||||
[JsonProperty("priority")]
|
||||
public string Priority { get; set; }
|
||||
[JsonProperty("checklist", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public List<ChecklistItem> Checklist { get; set; }
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user