<?php

namespace api\v2\dashboards_v2;
use api\v2\Base;
use Exception;

use function api\v2\import_common;
import_common();

/**
 * Allows for the retrieval of all V1 dashlets.
 */
class classicdashlets extends Base {

    /**
     * Auth function for get request method on api/v2/account/dashboards 
     * All necessary auth is done in check_authentication so this just returns true.
     */
    public function authorized_for_get() {
        return true;
    }

    /**
     * Retrieves all dashlets as an array.
     * @return array The dashlet data or an error message if not found.
     */
    public function get() {
        global $dashlets;
        return $dashlets;
    }
}