Added code pretty printing to API documentation

Added code pretty printing to API documentation.