Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static string PrepareRequestByAutoIP(MethodType methodType, string key, DateTime date)
 {
     return(string.Concat(methodType.GetParameters(), "?key=", key, "&", ReqestFor.AutoIP(), "&", ReqestFor.Date(date)));
 }
Exemplo n.º 3
0
 public static string PrepareRequestByAutoIP(MethodType methodType, string key, Days ofDays)
 {
     return(string.Concat(methodType.GetParameters(), "?key=", key, "&", ReqestFor.AutoIP(), "&", ofDays.PrepareDays()));
 }
Exemplo n.º 4
0
 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)));
 }
Exemplo n.º 5
0
 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)));
 }