Added support for API class methods to take options as well.