@dataset.sh/client
Version:
TypeScript client library for dataset.sh - A powerful dataset management system supporting both local and remote storage with seamless transfer capabilities.
23 lines • 871 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoteNamespace = void 0;
const RemoteDataset_1 = require("./RemoteDataset");
class RemoteNamespace {
constructor(client, namespace) {
this.client = client;
this.namespace = namespace;
// Initialize endpoints object
this.endpoints = {
listDatasets: (page) => this.client.endpoints.listNamespaceDatasets(this.namespace, page),
};
}
async datasets(page) {
const result = await this.client.listNamespaceDatasets(this.namespace, page);
return result.datasets.map(d => new RemoteDataset_1.RemoteDataset(this.client, this.namespace, d.datasetName || d.name));
}
getNamespace() {
return this.namespace;
}
}
exports.RemoteNamespace = RemoteNamespace;
//# sourceMappingURL=RemoteNamespace.js.map