Skip to content

Commit

Permalink
feat: add new v3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
ziqiangai committed Nov 24, 2023
1 parent 9204ecd commit 8a1789f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: |
yarn
yarn publish --access public
yarn publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions lib/apitable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,8 @@ export class Vika {
space(spaceId: string) {
return new SpaceManager(this, spaceId);
}

public isV3() {
return true;
}
}
2 changes: 1 addition & 1 deletion lib/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const MIN_TIME_GAP = 1000 / QPS; // Maximum concurrency, 5 requests per s
export const DST_MAX_RECORDS = 50000; // Maximum number of records in a single datasheet.
export const DEFAULT_HOST = 'https://api.vika.cn';
export const FUSION_PATH_PREFIX = '/fusion';
export const DEFAULT_VERSION_PREFIX = '/fusion/v1';
export const DEFAULT_VERSION_PREFIX = '/fusion/v3';
export const DEFAULT_REQUEST_TIMEOUT = 60000;
export const MAX_WRITE_SIZE_PER_REQ = 10;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vikadata/vika",
"version": "1.4.0",
"version": "2.0.0-beta.1",
"description": "维格表官方 JavaScript SDK",
"main": "./es/index.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ describe('full pipeline', () => {
host,
fieldKey: 'id',
});

console.log('api version is v3 ', apitable.isV3());
const datasheet = apitable.datasheet(datasheetId);
console.time('list records');
const result = await datasheet.records.query();
Expand Down

0 comments on commit 8a1789f

Please sign in to comment.