From aac6a96579b30dfe549eb4220f376522f512d4c7 Mon Sep 17 00:00:00 2001 From: Myrotvorets Date: Sat, 9 Sep 2023 02:30:57 +0300 Subject: [PATCH] Add support for minimum similarity --- src/client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client.ts b/src/client.ts index 7c5ecea..b2152de 100644 --- a/src/client.ts +++ b/src/client.ts @@ -20,11 +20,17 @@ export class Client extends ClientBase { photo: PhotoType, priority: 'A' | 'B' | 'C' = 'C', comment = '', + minSimialrity = 0, ): Promise { + if (minSimialrity < 0 || minSimialrity > 1000) { + minSimialrity = 0; + } + const builder = await this._requestBuilder .reset(Commands.UPLOAD_SRCH) .setComment(comment) .setClientID(priority) + .setParams(minSimialrity, 0) .setPhoto(photo); return this._sendRequest(await builder.get());