Skip to content

Commit

Permalink
Merge pull request #57 from singlesly/feat-client-id
Browse files Browse the repository at this point in the history
Feat client
  • Loading branch information
singlesly authored Oct 30, 2023
2 parents 48ffdbe + 2a52353 commit e599210
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"author": "",
"private": false,
"files": [
"dist/**"
"**"
],
"types": "dist/index.d.ts",
"main": "dist/index.js",
"types": "index.d.ts",
"main": "index.js",
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
Expand All @@ -24,7 +24,7 @@
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"semantic-release": "semantic-release",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build && cp -r ./dist/** ./"
},
"dependencies": {
"@nestjs/axios": "^3.0.0",
Expand Down
35 changes: 35 additions & 0 deletions src/bingx/endpoints/bingx-extend-listen-key-endpoint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import {
AccountInterface,
DefaultSignatureParameters,
Endpoint,
EndpointInterface,
SignatureParametersInterface,
} from 'bingx-api/bingx';

export class BingxExtendListenKeyEndpoint<R = void>
extends Endpoint
implements EndpointInterface<R>
{
constructor(
private readonly listenKey: string,
account: AccountInterface,
) {
super(account);
}

method(): 'get' | 'post' | 'put' | 'patch' | 'delete' {
return 'put';
}

parameters(): SignatureParametersInterface {
return new DefaultSignatureParameters({
listenKey: this.listenKey,
});
}

path(): string {
return '/openApi/user/auth/userDataStream';
}

readonly t!: R;
}

0 comments on commit e599210

Please sign in to comment.