Skip to content

Commit 9569b3c

Browse files
Merge branch 'main' into EFRS-1236-URL-malfuntioning
2 parents 99536c5 + c3884f3 commit 9569b3c

File tree

3 files changed

+308
-274
lines changed

3 files changed

+308
-274
lines changed

compreface.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2020 the original author or authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13+
* or implied. See the License for the specific language governing
14+
* permissions and limitations under the License.
15+
*/
16+
117
declare interface Options {
218
limit: number,
319
prediction_count?: number,

endpoints/recognition_endpoints.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,35 @@ const recognition_endpoints = {
5353
}
5454
})
5555

56+
resolve(response)
57+
} catch (error) {
58+
reject(error)
59+
}
60+
})
61+
},
62+
63+
/**
64+
* Delete multiple images
65+
* @param {String} url
66+
* @param {String} api_key
67+
* @returns {Promise}
68+
*/
69+
async delete_multiple(url, api_key, image_ids){
70+
return new Promise( async (resolve, reject) => {
71+
try {
72+
const response = await axios.post(url, image_ids, {
73+
headers: {
74+
"x-api-key": api_key
75+
}
76+
})
77+
5678
resolve(response)
5779
} catch (error) {
5880
reject(error)
5981
}
6082
})
6183
}
84+
6285
}
6386

6487
export { recognition_endpoints };

0 commit comments

Comments
 (0)