public async Task<_2CaptchaResult> GetBalance()
{
var getData = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("key", _apiKey),
new KeyValuePair<string, string>("action", "getbalance"),
new KeyValuePair<string, string>("json", "1")
};
var inResponse = await _httpClient.PostAsync(_apiUrl + "res.php", new FormUrlEncodedContent(getData));
var inJson = await inResponse.Content.ReadAsStringAsync();
var @in = JsonConvert.DeserializeObject<_2CaptchaResultInternal>(inJson);
if (@in.Status == 0)
{
return new _2CaptchaResult(false, @in.Request);
}
return new _2CaptchaResult(true, @in.Request);
}