-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Price data is now using https://nwmp.gaming.tools instead of https://…
- Loading branch information
1 parent
63eba09
commit c6cd57f
Showing
10 changed files
with
208 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Text.Json; | ||
using System.Text.Json.Nodes; | ||
using System.Text.Json.Serialization; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace NewWorldCompanion.Entities | ||
{ | ||
public class Nwmarketprice | ||
{ | ||
public string ItemId { get; set; } = string.Empty; | ||
public string ItemName { get; set; } = string.Empty; | ||
|
||
public int Days { get; set; } = 0; | ||
public DateTime LastUpdated { get; set; } = DateTime.MinValue; | ||
public string LastUpdatedString | ||
{ | ||
get | ||
{ | ||
return LastUpdated.ToString(); | ||
} | ||
} | ||
/// <summary> | ||
/// Lowest price seen in the most recent scan compared to the lowest price seen the previous day | ||
/// </summary> | ||
public int PriceChange { get; set; } | ||
public double RecentLowestPrice { get; set; } = 0.0; | ||
/// <summary> | ||
/// RollingAverage | ||
/// </summary> | ||
public double RecentLowestPriceAvg { get; set; } = 0.0; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
using System.Threading.Tasks; | ||
|
||
namespace NewWorldCompanion.Entities | ||
{ | ||
public class ServerPriceData | ||
{ | ||
[JsonPropertyName("server_id")] | ||
public string ServerId { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("daily")] | ||
public Dictionary<string, List<PriceData>> Daily { get; set; } = new(); | ||
|
||
[JsonPropertyName("hourly")] | ||
public Dictionary<string, List<PriceData>> Hourly { get; set; } = new(); | ||
} | ||
|
||
public class PriceData | ||
{ | ||
[JsonPropertyName("timestamp")] | ||
public int Timestamp { get; set; } = 0; | ||
|
||
[JsonPropertyName("min_price")] | ||
public int MinPrice { get; set; } = 0; | ||
|
||
[JsonPropertyName("max_price")] | ||
public int MaxPrice { get; set; } = 0; | ||
|
||
[JsonPropertyName("mean_price")] | ||
public int MeanPrice { get; set; } = 0; | ||
|
||
[JsonPropertyName("median_price")] | ||
public int MedianPrice { get; set; } = 0; | ||
|
||
[JsonPropertyName("quantity")] | ||
public int Quantity { get; set; } = 0; | ||
|
||
[JsonPropertyName("means")] | ||
public List<List<double>> Means { get; set; } = new(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.