feat: add version to nodejs sdk
This commit is contained in:
parent
c7ece40bf7
commit
3593796993
3
index.ts
3
index.ts
|
@ -33,6 +33,9 @@ import {
|
||||||
import { SDKConfig } from "./base";
|
import { SDKConfig } from "./base";
|
||||||
|
|
||||||
export class IDMeshAPI {
|
export class IDMeshAPI {
|
||||||
|
public static version() {
|
||||||
|
return '1.4.6'
|
||||||
|
}
|
||||||
|
|
||||||
protected app: AppApi;
|
protected app: AppApi;
|
||||||
|
|
||||||
|
|
1
test.js
1
test.js
|
@ -8,6 +8,7 @@ const test = async () => {
|
||||||
sk: 'ev1g39d3oiu41uE8taPg1zL0CcpifX15',
|
sk: 'ev1g39d3oiu41uE8taPg1zL0CcpifX15',
|
||||||
});
|
});
|
||||||
const resp = await api.user.get({ id: '100124' });
|
const resp = await api.user.get({ id: '100124' });
|
||||||
|
console.assert(IDMeshAPI.version() === '1.4.6');
|
||||||
console.assert(resp.data.id === '100124');
|
console.assert(resp.data.id === '100124');
|
||||||
console.assert(resp.data.username === 'wanghaifeng1');
|
console.assert(resp.data.username === 'wanghaifeng1');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue