lakefs-ts 1.0.3
Install from the command line:
Learn more about npm packages
$ npm install @quannadev/lakefs-ts@1.0.3
Install via package.json:
"@quannadev/lakefs-ts": "1.0.3"
About this version
This is a Node.js client for lakeFS. It is generated from the api spec using openapi-generator
npm install lakefs-tsimport {Branch, getConfigFromEnv, QueryParams} from "../dist";
async function main() {
const config = getConfigFromEnv();
const branch = new Branch(config);
const params: QueryParams = {
amount: 100,
}
const branches = await branch.getBranches(params);
console.log("branches", branches)
}
main().catch(err => {
console.log("err", err)
process.exit(1);
})- Use a client directly
import {newClient, getConfigFromEnv} from "../dist";
const config = getConfigFromEnv();
const client = newClient(config);
// get branches
const branches = await client.getBranches();
// get commits
const commits = await client.getCommits();