geographic module¶
-
class
shellbot.plugins.geographic.setup.Geographic(*args, **kwargs)¶ Utility plugin (weather, time, geographic information, …)
-
coroutine
cityinfo(ctx, *, city, code=None)¶ Implement the
cityinfocommand.Parameters:
-
coroutine
isocode(ctx, *, expr)¶ Implement the
isocodecommand.Parameters: Raise: NotFound– No data can be fetched.
-
coroutine
time(ctx, *, city=None, code=None)¶ Implement the
timecommand.Parameters:
-
coroutine
Geographic API module¶
-
class
shellbot.plugins.geographic.lib.http.APIClient(geonames, timezonedb, openweathermap)¶ A Geoname API Client.
-
coroutine
city_info(city, code=None)¶ Fetch a city info view for the given parameters.
-
coroutine
coordinates(city, code=None)¶ Fetch geographic coordinates for the given parameters and return a pair consisting of the response and a formatted string describing the query.
Parameters: Raise: NotFound– Empty response.See also
-
coroutine
time_info(city, code=None)¶ Fetch a time info view for the given parameters.
-
coroutine
weather_info(city, code=None)¶ Fetch a weather info view for the given parameters.
-
coroutine
-
shellbot.plugins.geographic.lib.formatters.city_info(entry, query)¶ A city info view.
Parameters: - coords (
GeonamesEntry) – A Geoname data. - query (str) – The query for this request.
- coords (
-
shellbot.plugins.geographic.lib.formatters.weather_info(response)¶ An object containing weather data.