api should be a param here for consistency, I wonder if it makes sense to turn it into a class, but just fixing this is fine for now