diff --git a/bot.py b/bot.py index ad556b7..081be22 100644 --- a/bot.py +++ b/bot.py @@ -53,7 +53,7 @@ def inline_station_search(update, context): if len(query) < 5 or not query: return results = list() - for station in get_stations_by_search_query(query): + for station in get_station_id_list(query): results.append( InlineQueryResultArticle( id=station['stationId'], @@ -64,7 +64,7 @@ def inline_station_search(update, context): context.bot.answer_inline_query(update.inline_query.id, results) -def get_stations_by_search_query(name): +def get_station_id_list(name): request = requests.get("https://efa-api.asw.io/api/v1/station/?search=" + name) return request.json()