Extract response exceptions
[smsapi-csharp.git] / smsapi / ProxyAddress.cs
blob99d86a9f3bf4898f1cd24c130989c36fa7c461dd
1 namespace SMSApi.Api
3 public enum ProxyAddress
5 SmsApiIo,
6 SmsApiPl,
7 BackupSmsApiPl,
8 SmsApiCom,
9 BackupSmsApiCom
12 public static class ProxyAddressExtensions
14 public static string GetUrl(this ProxyAddress proxy)
16 switch (proxy)
18 case ProxyAddress.SmsApiIo:
19 return "https://smsapi.io/";
21 case ProxyAddress.SmsApiPl:
22 return "https://api.smsapi.pl/";
24 case ProxyAddress.BackupSmsApiPl:
25 return "https://api2.smsapi.pl/";
27 case ProxyAddress.SmsApiCom:
28 return "https://api.smsapi.com/";
30 case ProxyAddress.BackupSmsApiCom:
31 return "https://api2.smsapi.com/";
34 throw new ProxyException("Proxy address does not exist.");