From 058e52ac6008feb7d163e987cd03a7d52dd01855 Mon Sep 17 00:00:00 2001 From: ByronAP Date: Thu, 30 Jun 2016 13:35:11 -0400 Subject: [PATCH] add method Signatures_Fee() --- Lisk.API.csproj | 1 + LiskAPI.cs | 11 +++++++++++ Responses/signatures_fee_response.cs | 10 ++++++++++ 3 files changed, 22 insertions(+) create mode 100644 Responses/signatures_fee_response.cs diff --git a/Lisk.API.csproj b/Lisk.API.csproj index 2aa1faf..8a3d4d1 100644 --- a/Lisk.API.csproj +++ b/Lisk.API.csproj @@ -100,6 +100,7 @@ + diff --git a/LiskAPI.cs b/LiskAPI.cs index 7c90739..71b1963 100644 --- a/LiskAPI.cs +++ b/LiskAPI.cs @@ -532,6 +532,17 @@ public async Task Signatures_Add(string secret, string return pr.StartsWith("ERROR") ? new signatures_add_response {error = pr, success = false} : JsonConvert.DeserializeObject(pr); } + /// + /// Get the fee for a signature. + /// + /// + public async Task Signatures_Fee() + { + const string url = "/api/signatures/fee"; + var gr = await HttpGetRequestAsync(url, User_Agent); + return gr.StartsWith("ERROR") ? new signatures_fee_response { error = gr, success = false } : JsonConvert.DeserializeObject(gr); + } + /// /// Get the total number of registered delegates. /// diff --git a/Responses/signatures_fee_response.cs b/Responses/signatures_fee_response.cs new file mode 100644 index 0000000..a785652 --- /dev/null +++ b/Responses/signatures_fee_response.cs @@ -0,0 +1,10 @@ +using Newtonsoft.Json; + +namespace Lisk.API.Responses +{ + [JsonObject(MemberSerialization = MemberSerialization.Fields)] + public class signatures_fee_response : BaseResponse + { + public long fee; + } +}