Пример #1
0
        public CurrencyItem GetCurrencies()
        {
            var client = new WebClient();

            client.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
            var ls = CurrencyItem.FromJson(
                client.DownloadString($"https://api.paybear.io/v2/currencies?token={_apiToken}"));

            return(ls);
        }
Пример #2
0
 public static string ToJson(this CurrencyItem self) => JsonConvert.SerializeObject(self, Converter.Settings);