/** @format */
import { Method } from './Method';
export class Resource {
    api;
    resourceName;
    env;
    constructor(api, resourceName, env) {
        this.api = api;
        this.resourceName = resourceName;
        this.env = env;
    }
    setResource(resources) {
        Object.keys(resources).forEach((key) => {
            this[key] = (params = {}) => Method(resources[key], this.api, params, this.env);
        });
    }
}
