/// <summary>
 /// Returns the currency that matches the CurrencyArt.
 /// <para>Endpoint: https://api.guildwars2.com/v2/currencies/{0}?lang={1}</para>
 /// </summary>
 /// <param name="currencyArt">Represents a known currencies in the wallet.</param>
 /// <param name="requestedLanguage">Represents the language which the API should return. Default english.</param>
 /// <returns>Currency object that matches the CurrencyArt.</returns>
 public Currency GetCurrency(CurrencyArt currencyArt, RequestedLanguage requestedLanguage = RequestedLanguage.en)
 {
     string jsonString = DownloadJsonString(string.Format("https://api.guildwars2.com/v2/currencies/{0}?lang={1}", (int)currencyArt, requestedLanguage));
     return JsonConvert.DeserializeObject<Currency>(jsonString);
 }
Esempio n. 2
0
        /// <summary>
        /// Returns the currency that matches the CurrencyArt.
        /// <para>Endpoint: https://api.guildwars2.com/v2/currencies/{0}?lang={1}</para>
        /// </summary>
        /// <param name="currencyArt">Represents a known currencies in the wallet.</param>
        /// <param name="requestedLanguage">Represents the language which the API should return. Default english.</param>
        /// <returns>Currency object that matches the CurrencyArt.</returns>
        public Currency GetCurrency(CurrencyArt currencyArt, RequestedLanguage requestedLanguage = RequestedLanguage.en)
        {
            string jsonString = DownloadJsonString(string.Format("https://api.guildwars2.com/v2/currencies/{0}?lang={1}", (int)currencyArt, requestedLanguage));

            return(JsonConvert.DeserializeObject <Currency>(jsonString));
        }