Restructured the project structure back to the way it was, there's no reasonable way to split the modules

This commit is contained in:
Kwoth
2024-04-26 22:26:24 +00:00
parent 6c9c8bf63e
commit e0819f760c
768 changed files with 192 additions and 1047 deletions

View File

@@ -0,0 +1,8 @@
namespace NadekoBot.Modules.Searches;
public record CandleData(
decimal Open,
decimal Close,
decimal High,
decimal Low,
long Volume);

View File

@@ -0,0 +1,7 @@
namespace NadekoBot.Modules.Searches;
public record ImageData(string Extension, Stream FileData) : IAsyncDisposable
{
public ValueTask DisposeAsync()
=> FileData.DisposeAsync();
}

View File

@@ -0,0 +1,43 @@
#nullable disable
using System.Text.Json.Serialization;
namespace NadekoBot.Modules.Searches;
public class QuoteResponse
{
public class ResultModel
{
[JsonPropertyName("longName")]
public string LongName { get; set; }
[JsonPropertyName("regularMarketPrice")]
public double RegularMarketPrice { get; set; }
[JsonPropertyName("regularMarketPreviousClose")]
public double RegularMarketPreviousClose { get; set; }
[JsonPropertyName("fullExchangeName")]
public string FullExchangeName { get; set; }
[JsonPropertyName("averageDailyVolume10Day")]
public int AverageDailyVolume10Day { get; set; }
[JsonPropertyName("fiftyDayAverageChangePercent")]
public double FiftyDayAverageChangePercent { get; set; }
[JsonPropertyName("twoHundredDayAverageChangePercent")]
public double TwoHundredDayAverageChangePercent { get; set; }
[JsonPropertyName("marketCap")]
public long MarketCap { get; set; }
[JsonPropertyName("symbol")]
public string Symbol { get; set; }
}
[JsonPropertyName("result")]
public List<ResultModel> Result { get; set; }
[JsonPropertyName("error")]
public object Error { get; set; }
}

View File

@@ -0,0 +1,15 @@
#nullable disable
namespace NadekoBot.Modules.Searches;
public class StockData
{
public string Name { get; set; }
public string Symbol { get; set; }
public double Price { get; set; }
public string MarketCap { get; set; }
public double Close { get; set; }
public double Change50d { get; set; }
public double Change200d { get; set; }
public long DailyVolume { get; set; }
public string Exchange { get; set; }
}

View File

@@ -0,0 +1,3 @@
namespace NadekoBot.Modules.Searches;
public record SymbolData(string Symbol, string Description);

View File

@@ -0,0 +1,12 @@
namespace NadekoBot.Modules.Searches;
public class YahooFinanceCandleData
{
public DateTime Date { get; set; }
public decimal Open { get; set; }
public decimal High { get; set; }
public decimal Low { get; set; }
public decimal Close { get; set; }
public decimal AdjClose { get; set; }
public long Volume { get; set; }
}

View File

@@ -0,0 +1,19 @@
#nullable disable
using System.Text.Json.Serialization;
namespace NadekoBot.Modules.Searches;
public class YahooFinanceSearchResponse
{
[JsonPropertyName("suggestionTitleAccessor")]
public string SuggestionTitleAccessor { get; set; }
[JsonPropertyName("suggestionMeta")]
public List<string> SuggestionMeta { get; set; }
[JsonPropertyName("hiConf")]
public bool HiConf { get; set; }
[JsonPropertyName("items")]
public List<YahooFinanceSearchResponseItem> Items { get; set; }
}

View File

@@ -0,0 +1,25 @@
#nullable disable
using System.Text.Json.Serialization;
namespace NadekoBot.Modules.Searches;
public class YahooFinanceSearchResponseItem
{
[JsonPropertyName("symbol")]
public string Symbol { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("exch")]
public string Exch { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("exchDisp")]
public string ExchDisp { get; set; }
[JsonPropertyName("typeDisp")]
public string TypeDisp { get; set; }
}

View File

@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace NadekoBot.Modules.Searches;
public class YahooQueryModel
{
[JsonPropertyName("quoteResponse")]
public QuoteResponse QuoteResponse { get; set; } = null!;
}