Added documentation

This commit is contained in:
Alexander Munch-Hansen 2019-04-06 16:45:10 +02:00
parent 39bb45c866
commit 0fbf9ed9e4
2 changed files with 7 additions and 1 deletions

View file

@ -3,7 +3,10 @@ import requests
from ..util import Prediction, Context from ..util import Prediction, Context
def scrape_traffic(context: Context) -> Prediction: def cars_in_traffic(context: Context) -> Prediction:
"""
How many cars are currently driving around Aarhus?
"""
r = requests.get('https://portal.opendata.dk/api/3/action/datastore_search?resource_id=b3eeb0ff-c8a8-4824-99d6-e0a3747c8b0d') r = requests.get('https://portal.opendata.dk/api/3/action/datastore_search?resource_id=b3eeb0ff-c8a8-4824-99d6-e0a3747c8b0d')
night_avr = 3.38 night_avr = 3.38
day_avr = 6.98 day_avr = 6.98

View file

@ -10,6 +10,9 @@ def update():
def check_games(context: Context) -> Prediction: def check_games(context: Context) -> Prediction:
"""
Is Alexanders upstairs neighbour currently playing League of Legends?
"""
update() update()
r = requests.get('https://euw.op.gg/summoner/userName=Im+Eating+Pros') r = requests.get('https://euw.op.gg/summoner/userName=Im+Eating+Pros')