Beispiel #1
0
    public bool SendCurrencyListRequest(string inputStr)
    {
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            actionHandler.DisplayError("You need internet connection to use the app!");
            return(false);
        }

        if (inputStr.Length == 0)
        {
            actionHandler.DisplayError("Please enter a valid date!");
            return(false);
        }
        if (currencyListRequestActive)
        {
            return(false);
        }

        var builderUri = new StringBuilder();

        builderUri.Append("https://api.exchangeratesapi.io/");
        builderUri.Append(inputStr);
        StartCoroutine(routine: GetCurrencyList(builderUri.ToString()));
        return(true);
    }