From 80c2fb4b9d3dcd0c6262c5448af38e337105692c Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Tue, 15 Oct 2019 19:17:57 +0200 Subject: [PATCH] Renamed function 'get_stations_by_search_query' renamed to 'get_station_id_list' --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()