Implements all API methods.