Source code for pyfl.accident
# local imports
from .errors import *
from .helper import Helper
[docs]class Accident():
""" Accident class"""
def __init__(self):
""" Initialise the Accident class """
pass
[docs] def get_accident_stats(self, year:int):
"""
Returns the accident statistics for a given year
:param kind: Year for the stats to get.
:type kind: str
:return: The stats for that year.
:rtype: dict
"""
endpoint = f"/AccidentStats/{year}"
return Helper.parse(Helper.make_raw_api_call(endpoint))