public static string PrepareQueryParameter(this GetBy getby, string value) { string queryParameter = ""; switch (getby) { case GetBy.CityName: queryParameter = ReqestFor.City(value); break; case GetBy.Zip: queryParameter = ReqestFor.Zip(value); break; case GetBy.PostCode: queryParameter = ReqestFor.PostCode(value); break; case GetBy.PostalCode: queryParameter = ReqestFor.PostalCode(value); break; case GetBy.Metar: queryParameter = ReqestFor.Metar(value); break; case GetBy.iata: queryParameter = ReqestFor.iata(value); break; case GetBy.IPAddress: queryParameter = ReqestFor.IPAddress(value); break; } return(queryParameter); }
public static string PrepareRequestByAutoIP(MethodType methodType, string key, DateTime date) { return(string.Concat(methodType.GetParameters(), "?key=", key, "&", ReqestFor.AutoIP(), "&", ReqestFor.Date(date))); }
public static string PrepareRequestByAutoIP(MethodType methodType, string key, Days ofDays) { return(string.Concat(methodType.GetParameters(), "?key=", key, "&", ReqestFor.AutoIP(), "&", ofDays.PrepareDays())); }
public static string PrepareRequestByLatLong(MethodType methodType, string key, string latitude, string longitude, DateTime date) { return(string.Concat(methodType.GetParameters(), "?key=", key, "&", ReqestFor.LatLong(latitude, longitude), "&", ReqestFor.Date(date))); }
public static string PrepareRequest(MethodType methodType, string key, GetBy getBy, string value, DateTime date) { return(string.Concat(methodType.GetParameters(), "?key=", key, "&", getBy.PrepareQueryParameter(value), "&", ReqestFor.Date(date))); }