Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using SDK.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace tDevkit
{
//(3/3)
public partial class DevkitConnectorV3
{
public async Task<ConfigurationContract> GetBranchConfiguration(string key)
{
string subUrl = Address.ConfigurationBranch + key;
var task = await SendGetRequest(subUrl);
var responseString = await ProcessResponse(task);
ConfigurationContract response = new ConfigurationContract
{
Value = responseString
};
return response;
}
public async Task<ConfigurationContract> GetAccountConfiguration(string key)
{
string subUrl = Address.ConfigurationAccount + key;
var task = await SendGetRequest(subUrl);
var responseString = await ProcessResponse(task);
ConfigurationContract response = new ConfigurationContract
{
Value = responseString
};
return response;
}
public async Task<long> GetConfigurationLastChange(string key)
{
string subUrl = Address.Configuration + key + "/last-change/";
var task = await SendGetRequest(subUrl);
var responseString = await ProcessResponse(task);
return Convert.ToInt64(responseString);
}
}
}