mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
Restructured the project structure back to the way it was, there's no reasonable way to split the modules
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace NadekoBot.Modules.Searches;
|
||||
|
||||
public record CandleData(
|
||||
decimal Open,
|
||||
decimal Close,
|
||||
decimal High,
|
||||
decimal Low,
|
||||
long Volume);
|
@@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.Modules.Searches;
|
||||
|
||||
public record ImageData(string Extension, Stream FileData) : IAsyncDisposable
|
||||
{
|
||||
public ValueTask DisposeAsync()
|
||||
=> FileData.DisposeAsync();
|
||||
}
|
@@ -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; }
|
||||
}
|
15
src/NadekoBot/Modules/Searches/Crypto/_common/StockData.cs
Normal file
15
src/NadekoBot/Modules/Searches/Crypto/_common/StockData.cs
Normal 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; }
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
namespace NadekoBot.Modules.Searches;
|
||||
|
||||
public record SymbolData(string Symbol, string Description);
|
@@ -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; }
|
||||
}
|
@@ -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; }
|
||||
}
|
@@ -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; }
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NadekoBot.Modules.Searches;
|
||||
|
||||
public class YahooQueryModel
|
||||
{
|
||||
[JsonPropertyName("quoteResponse")]
|
||||
public QuoteResponse QuoteResponse { get; set; } = null!;
|
||||
}
|
Reference in New Issue
Block a user