** IMPORTANT: Do not update this file directly, update files within the Docs folder and run Cloud Mate to generate this README.md file. **
A .Net client to retrieve Countries, Languages, and Currencies information.The .Net client is built on .Net Standard so it supports Windows, Windows Store, Windows Phone, Mono, and Xamarin, also it has implemented an integrated caching so developers don't have to. Backend API is deployed on Microsoft Azure latest technology services. .Net client and backend API are both built using best practices as lead developers would expect.
//gets all countries
CloudGeographyClient client = new();
List<Country> country = client.Countries.Get();//gets all currencies
CloudGeographyClient client = new();
List<Currency> Currencies = client.Currencies.Get();//gets all languages
CloudGeographyClient client = new();
List<Language> languages = client.Languages.Get();Install-Package AngryMonkey.Cloud.Geographydotnet add package AngryMonkey.Cloud.Geography
using AngryMonkey.Cloud;
using AngryMonkey.Cloud.Geography;CloudGeographyClient cloudGeography = new CloudGeographyClient();List<Country> countries = client.Countries.Get();// by 2 letters code
Country country = client.Countries.Get("US");
// by 3 letters code
Country country = client.Countries.Get("USA");//by 2 letters code
string [] twoLettersCountryCodes = new {"CA", "US"};
List<Country> countries = client.Countries.Get(twoLettersCountryCodes);
//by 3 letters code
string [] threeLettersCountryCodes = new {"CAN", "USA"};
List<Country> countries = client.Countries.Get(threeLettersCountryCodes);Country country = client.Countries.GetByCallingCode(1);
//returns USA and Canada because they share the same phone codeList<Currency> Currencies = client.Currencies.Get();Currency Currency = client.Currencies.Get("USD");string[] currencyCodes = new(){"AFN", "USD"};
List<Currency> Currencies = client.Currencies.Get(new[] {currencyCodes});// by 2 letter country code
List<CountryCurrency> Currencies = client.Currencies.GetByCountry("US");
// by 3 letter country code
List<CountryCurrency> Currencies = client.Currencies.GetByCountry("USA");
//Note: A country can have multiple currenciesList<Language> languages = client.Languages.Get();string[] languageCodes = new(){"USA","CA"};
List<Language> languages = client.Languages.Get(languageCodes);//by 2 letters code
List<CountryLanguage> languages = client.Languages.GetByCountry("US");
//by 3 letters code
List<CountryLanguage> languages = client.Languages.GetByCountry("USA");//by 2 letter code
Language ?language = client.Languages.Get("EN");
//by 3 letter code
Language? language = client.Languages.Get("ENG");List<Subdivision> subdivisions = client.Subdivisions.Get("US");string [] subdivisionCodes = new(){"AL", "AK", "AZ" };
List<Subdivision> subdivisions = client.Subdivisions.Get("US", subdivisionCodes);List<Subdivision> subdivisions = client.Subdivisions.Get("US", "AL");List<TimeZoneInfo> timeZones = client.TimeZones.Get();string[] timeZonesIds = new[] {"Hawaiian Standard Time", "Middle East Standard Time", "Greenland Standard Time"};
List<TimeZoneInfo> timeZones = client.TimeZones.Get(timeZonesIds);List<CountryTimeZone> timeZones = client.TimeZones.GetByCountry("LB");string toTimeZone = "Eastern Standard Time";
DateTime convertedTime = client.TimeZones.GetTime(toTimeZone);string toTimeZone = "Eastern Standard Time";
DateTime UTCTime = DateTime.Parse("2022-11-09 10:00:00 AM");
DateTime convertedTime = client.TimeZones.GetTime(toTimeZone , UTCTime);string toTimeZone = "Afghanistan Standard Time";
string fromTimeZone = "Middle East Standard Time";
DateTime timeToConvert = DateTime.Parse("2022-11-08 12:00:00 PM")
DateTime convertedTime = client.TimeZones.GetTime(toTimeZone, timeToConvert, fromTimeZone);//Positive Addition
Money moneyA = new("USD", 1.2m);
Money moneyB = new("USD", 1.4m);
//2.6m
Money sum = moneyA.Add(moneyB);
//Negatice Addition
Money moneyA = new("USD", -1.2m);
Money moneyB = new("USD", -1.4m);
//-2.6m
Money sum = moneyA.Add(moneyB);//Positive Subtraction
Money moneyA = new("USD", 1.2m);
Money moneyB = new("USD", 1.4m);
//-.2m
Money sum = moneyA.Subtract(moneyB);
//Negatice Subtraction
Money moneyA = new("USD", -1.2m);
Money moneyB = new("USD", -1.4m);
//.2m
Money sum = moneyA.Subtract(moneyB);//Positive Number
Money money = new("USD", 50.3m);
int decimalPart = money.DecimalNumberAsInteger;
// decimalPart = 3
//Negative Number
Money money = new("USD", -50.3m);
int decimalPart = money.DecimalNumberAsInteger;
// decimalPart = -3PhoneNumber number = client.PhoneNumbers.Get("+16265895784");
string countryCode = number?.CountryCode;
//USPhoneNumber number = client.PhoneNumbers.Get("+16265895784");
string countryCallingCode = number?.CountryCallingCode;
//1PhoneNumber number = client.PhoneNumbers.Get("+16265895784");
string countryCallingCode = number?.Number;
//6265895784