-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add Get Daily Block Count and Rewards
- Loading branch information
Showing
7 changed files
with
122 additions
and
40 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
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
43 changes: 3 additions & 40 deletions
43
src/BscScan.NetCore/Models/Request/Blocks/DailyAverageBlockSizeRequest.cs
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 |
---|---|---|
@@ -1,47 +1,10 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace BscScan.NetCore.Models.Request.Blocks | ||
namespace BscScan.NetCore.Models.Request.Blocks | ||
{ | ||
/// <summary> | ||
/// DailyAverageBlockSize Request Model | ||
/// </summary> | ||
public class DailyAverageBlockSizeRequest | ||
public class DailyAverageBlockSizeRequest :DailyBlockRequest | ||
{ | ||
/// <summary> | ||
/// the starting date in yyyy-MM-dd format, eg. 2021-08-01 | ||
/// </summary> | ||
[JsonIgnore] | ||
public DateOnly StartDate { get; set; } | ||
|
||
/// <summary> | ||
/// the starting date in yyyy-MM-dd format, eg. 2021-08-01 | ||
/// </summary> | ||
[JsonPropertyName("startdate")] | ||
public string StartDateParam => StartDate.ToString("yyyy-MM-dd"); | ||
|
||
/// <summary> | ||
/// the ending date in yyyy-MM-dd format, eg. 2021-08-31 | ||
/// </summary> | ||
[JsonIgnore] | ||
public DateOnly EndDate { get; set; } | ||
|
||
/// <summary> | ||
/// the ending date in yyyy-MM-dd format, eg. 2021-08-31 | ||
/// </summary> | ||
[JsonPropertyName("enddate")] | ||
public string EndDateParam => EndDate.ToString("yyyy-MM-dd"); | ||
|
||
/// <summary> | ||
/// the sorting preference, use asc to sort by ascending and desc to sort by descending | ||
/// </summary> | ||
[JsonIgnore] | ||
public Sort Sort { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// the sorting preference, use asc to sort by ascending and desc to sort by descending | ||
/// </summary> | ||
[JsonPropertyName("sort")] | ||
public string SortParam => Sort.ToString().ToLower(); | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/BscScan.NetCore/Models/Request/Blocks/DailyBlockCountAndRewardRequest.cs
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,9 @@ | ||
namespace BscScan.NetCore.Models.Request.Blocks | ||
{ | ||
/// <summary> | ||
/// DailyBlockCountAndRewardRequest Model | ||
/// </summary> | ||
public class DailyBlockCountAndRewardRequest: DailyBlockRequest | ||
{ | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/BscScan.NetCore/Models/Request/Blocks/DailyBlockRequest.cs
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,47 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace BscScan.NetCore.Models.Request.Blocks | ||
{ | ||
/// <summary> | ||
/// DailyBlockRequest Base Request | ||
/// </summary> | ||
public class DailyBlockRequest | ||
{ | ||
/// <summary> | ||
/// the starting date in yyyy-MM-dd format, eg. 2021-08-01 | ||
/// </summary> | ||
[JsonIgnore] | ||
public DateOnly StartDate { get; set; } | ||
|
||
/// <summary> | ||
/// the starting date in yyyy-MM-dd format, eg. 2021-08-01 | ||
/// </summary> | ||
[JsonPropertyName("startdate")] | ||
public string StartDateParam => StartDate.ToString("yyyy-MM-dd"); | ||
|
||
/// <summary> | ||
/// the ending date in yyyy-MM-dd format, eg. 2021-08-31 | ||
/// </summary> | ||
[JsonIgnore] | ||
public DateOnly EndDate { get; set; } | ||
|
||
/// <summary> | ||
/// the ending date in yyyy-MM-dd format, eg. 2021-08-31 | ||
/// </summary> | ||
[JsonPropertyName("enddate")] | ||
public string EndDateParam => EndDate.ToString("yyyy-MM-dd"); | ||
|
||
/// <summary> | ||
/// the sorting preference, use asc to sort by ascending and desc to sort by descending | ||
/// </summary> | ||
[JsonIgnore] | ||
public Sort Sort { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// the sorting preference, use asc to sort by ascending and desc to sort by descending | ||
/// </summary> | ||
[JsonPropertyName("sort")] | ||
public string SortParam => Sort.ToString().ToLower(); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/BscScan.NetCore/Models/Response/Blocks/DailyBlockCountAndRewards.cs
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,40 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace BscScan.NetCore.Models.Response.Blocks | ||
{ | ||
/// <summary> | ||
/// DailyBlockCountAndRewards | ||
/// </summary> | ||
public class DailyBlockCountAndRewards : BaseResponse | ||
{ | ||
/// <summary> | ||
/// List of DailyBlockCountAndRewardsData | ||
/// </summary> | ||
[JsonPropertyName("result")] | ||
public IEnumerable<DailyBlockCountAndRewardsData>? Result { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// DailyBlockCountAndRewardsData | ||
/// </summary> | ||
public class DailyBlockCountAndRewardsData | ||
{ | ||
/// <summary> | ||
/// UTCDate | ||
/// </summary> | ||
[JsonPropertyName("UTCDate")] | ||
public string? UtcDate { get; set; } | ||
|
||
/// <summary> | ||
/// UnixTimeStamp | ||
/// </summary> | ||
[JsonPropertyName("unixTimeStamp")] | ||
public string? UnixTimeStamp { get; set; } | ||
|
||
/// <summary> | ||
/// BlockTimeSec | ||
/// </summary> | ||
[JsonPropertyName("blockTime_sec")] | ||
public string? BlockTimeSec { get; set; } | ||
} | ||
} |
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