-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDoginal.cs
25 lines (23 loc) · 934 Bytes
/
Doginal.cs
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
using Newtonsoft.Json;
namespace doginals
{
public class Doginal
{
public async Task<DoginalResult> GetItems(int pageNo)
{
var url = $"https://d20-api2.dogeord.io/ticks/list/ranking?size=100&page={pageNo}&filterByTick=";
var httpClient = new HttpClient();
var result = await httpClient.GetStringAsync(url);
var jsonObject = JsonConvert.DeserializeObject<DoginalResult>(result);
return jsonObject;
}
public async Task<List<HolderInfo>> GetHolderInfo(string token, int size=10)
{
var url = $"https://d20-api2.dogeord.io/trading/tokenholderinfo/{token}?size={size}";
var httpClient = new HttpClient();
var result = await httpClient.GetStringAsync(url);
var jsonObject = JsonConvert.DeserializeObject<List<HolderInfo>>(result);
return jsonObject;
}
}
}