Skip to content

Commit

Permalink
Add support for minimum similarity
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Sep 8, 2023
1 parent 1e60465 commit aac6a96
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ export class Client extends ClientBase {
photo: PhotoType,
priority: 'A' | 'B' | 'C' = 'C',
comment = '',
minSimialrity = 0,
): Promise<R.SearchUploadAck | R.SearchUploadError> {
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());
Expand Down

0 comments on commit aac6a96

Please sign in to comment.