Really rough bart implementation

This commit is contained in:
2022-10-16 00:21:28 -07:00
parent ac9f37487e
commit e85241c998
3 changed files with 140 additions and 9 deletions

View File

@@ -15,8 +15,7 @@ proc format_predictions*(prd: JSONNode): string =
else:
prd["prd"].getElems.map(time => time["prdctdn"].getStr).join(", ")
proc home_predictions*: string =
let client = newHttpClient()
proc home_predictions*(client: HTTPClient): string =
const home_nl = "51067"
const home_12 = "58995"
const home_29 = "56557"
@@ -27,7 +26,7 @@ proc home_predictions*: string =
&"Home\nNL: {nl_predictions}\n12: {twelve_predictions}\n29: {twenty_nine_predictions}"
proc office_predictions*: string =
proc office_predictions*(client: HTTPClient): string =
let client = newHttpClient()
const office_nl = "56565"
const office_12 = "57111"