renamed format => filetype; line => format (fixes #230)

pull/234/head
Igor Chubin 6 years ago
parent efac9abc9e
commit 7303ae86ba

@ -120,7 +120,7 @@ def wttr_line(location, query):
in format `line_format`
"""
format_line = query.get('line', '')
format_line = query.get('format', '')
if format_line in PRECONFIGURED_FORMAT:
format_line = PRECONFIGURED_FORMAT[format_line]

@ -183,7 +183,7 @@ def wttr(location, request):
# We are ready to return the answer
try:
if 'line' in query:
if 'format' in query:
return wttr_line(location, query)
if png_filename:

@ -270,7 +270,7 @@ def make_wttrin_query(parsed):
for key, val in parsed.items():
args.append('%s=%s' % (key, val))
args.append('format=png')
args.append('filetype=png')
url = "http://wttr.in/%s" % location
if args != []:

Loading…
Cancel
Save