An object-oriented API for business analytics