Example #1
0
        public async Task ShowDepartures(Chat chat, string shortName, int limit)
        {
            var departures = await _stopService.GetDepartureFromShortName(shortName, limit);

            if (departures.DepartureResultState == DepartureResultState.Ok)
            {
                await HandleSuccess(chat, shortName, departures);
            }
            else if (departures.DepartureResultState == DepartureResultState.StopNotFound)
            {
                await LoadSuggestions(chat, shortName);
            }
            else
            {
                await HandleError(chat, departures);
            }
        }