Return a Bus object from an API response dict.

def fromapi(_class, api, apiresponse):
        """
        Return a Bus object from an API response dict.
        """
        bus = apiresponse
        return _class(
            api = api,
            vid = bus['vid'],
            timeupdated = datetime.strptime(bus['tmstmp'], api.STRPTIME),
            lat = float(bus['lat']),
            lng = float(bus['lon']),
            heading = bus['hdg'],
            pid = bus['pid'],
            intotrip = bus['pdist'],
            route = bus['rt'],
            destination = bus['des'],
            speed = bus['spd'],
            delay = bus.get('dly') or False
        )