<?php
namespace Mango\Controllers\Api;

use Mango\Core\Api\BasicApi;
use Rakit\Validation\Validator;


class TasksApi extends BasicApi {
    const MAX_API_LIMIT = 10;  
    public function create(\WP_REST_Request $request)
    {
        self::$request = $request;        

        $response = $this->random_lorem_ipsum();
        sleep(2);

        return $this->response($response);
    } 

    /**
     * Get a list of all the tasks
     *
     * @return mixed
     */
    public function list(\WP_REST_Request $request)
    {
        self::$request = $request;

        $totalRecords = 'Hello, API!';

        return $this->response($totalRecords);
    }    
}
