generated from template/apps-template
update
This commit is contained in:
21
scripts/get-list.ts
Normal file
21
scripts/get-list.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Life, NocoApi } from '../mod.ts';
|
||||
import { generateMultipleRandomItems } from './random-data';
|
||||
import util from 'node:util';
|
||||
|
||||
// const token = 'your'
|
||||
// const baseId = 'your_base_id';
|
||||
|
||||
const token = 'Qd7Xvz6Ui3SlzjdaqONZxHd6Gw_STk4sa4HqDKC5'
|
||||
const baseId = 'paqa769bfeh467p'
|
||||
let tableId = 'mz5hmnw8o6qfccf'
|
||||
const nocoApi = new NocoApi({
|
||||
baseURL: 'http://localhost:8080',
|
||||
token,
|
||||
});
|
||||
|
||||
const life = new Life({ nocoApi, baseId, tableId });
|
||||
|
||||
nocoApi.record.table = tableId;
|
||||
const res = await life.nocoApi.record.list()
|
||||
|
||||
console.log('uitl', util.inspect(res, { depth: 4 }));
|
||||
Reference in New Issue
Block a user