This commit is contained in:
yawaflua
2024-04-18 18:38:00 +03:00
parent 2a1317d393
commit 2df80a4c4b
14 changed files with 324 additions and 83 deletions

14
Types/Card.cs Normal file
View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace spworlds.Types
{
public class Card
{
public int Balance { get; set; }
public string Webhook { get; set; }
}
}

View File

@@ -1,8 +1,15 @@
namespace spworlds.Types;
public class Item
{
public string Name { get; set; }
public int Count { get; set; }
public int Price { get; set; }
public string? Comment { get; set; } = null;
}
public class PaymentData
{
public int Amount;
public Item[] Items;
public string RedirectUrl;
public string WebHookUrl;
public string Data;

41
Types/UserAccount.cs Normal file
View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace spworlds.Types
{
// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
public class UserCard
{
public string id { get; set; }
public string name { get; set; }
public string number { get; set; }
public int color { get; set; }
}
public class City
{
public string id { get; set; }
public string name { get; set; }
public string description { get; set; }
public int x { get; set; }
public int z { get; set; }
public bool isMayor { get; set; }
}
public class UserAccount
{
public string id { get; set; }
public string username { get; set; }
public string minecraftUUID { get; set; }
public string status { get; set; }
public List<object> roles { get; set; }
public City city { get; set; }
public List<UserCard> cards { get; set; }
public DateTime createdAt { get; set; }
}
}

14
Types/UserCard.cs Normal file
View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace spworlds.Types
{
public class UserCard
{
public string Name { get; set; }
public int Number { get; set; }
}
}

14
Types/WebhookResponse.cs Normal file
View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace spworlds.Types
{
public class WebhookResponse
{
public int Id { get; set; }
public string Webhook { get; set; }
}
}