Skip to content

Commit c1e1f42

Browse files
authored
updated docstring (#475)
1 parent 8e4610a commit c1e1f42

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

lib-es5/uploader.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,19 @@ exports.explode = function explode(public_id, callback) {
312312
});
313313
};
314314

315-
// options may include 'exclusive' (boolean) which causes clearing this tag from all other resources
315+
/**
316+
*
317+
* @param {String} tag The tag or tags to assign. Can specify multiple
318+
* tags in a single string, separated by commas - "t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11".
319+
*
320+
* @param {Array} public_ids A list of public IDs (up to 1000) of assets uploaded to Cloudinary.
321+
*
322+
* @param {Function} callback Callback function
323+
*
324+
* @param {Object} options Configuration options may include 'exclusive' (boolean) which causes
325+
* clearing this tag from all other resources
326+
* @return {Object}
327+
*/
316328
exports.add_tag = function add_tag(tag) {
317329
var public_ids = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
318330
var callback = arguments[2];
@@ -323,6 +335,18 @@ exports.add_tag = function add_tag(tag) {
323335
return call_tags_api(tag, command, public_ids, callback, options);
324336
};
325337

338+
/**
339+
* @param {String} tag The tag or tags to remove. Can specify multiple
340+
* tags in a single string, separated by commas - "t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11".
341+
*
342+
* @param {Array} public_ids A list of public IDs (up to 1000) of assets uploaded to Cloudinary.
343+
*
344+
* @param {Function} callback Callback function
345+
*
346+
* @param {Object} options Configuration options may include 'exclusive' (boolean) which causes
347+
* clearing this tag from all other resources
348+
* @return {Object}
349+
*/
326350
exports.remove_tag = function remove_tag(tag) {
327351
var public_ids = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
328352
var callback = arguments[2];

lib/uploader.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,38 @@ exports.explode = function explode(public_id, callback, options = {}) {
259259
});
260260
};
261261

262-
// options may include 'exclusive' (boolean) which causes clearing this tag from all other resources
262+
/**
263+
*
264+
* @param {String} tag The tag or tags to assign. Can specify multiple
265+
* tags in a single string, separated by commas - "t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11".
266+
*
267+
* @param {Array} public_ids A list of public IDs (up to 1000) of assets uploaded to Cloudinary.
268+
*
269+
* @param {Function} callback Callback function
270+
*
271+
* @param {Object} options Configuration options may include 'exclusive' (boolean) which causes
272+
* clearing this tag from all other resources
273+
* @return {Object}
274+
*/
263275
exports.add_tag = function add_tag(tag, public_ids = [], callback, options = {}) {
264276
const exclusive = utils.option_consume("exclusive", options);
265277
const command = exclusive ? "set_exclusive" : "add";
266278
return call_tags_api(tag, command, public_ids, callback, options);
267279
};
268280

281+
282+
/**
283+
* @param {String} tag The tag or tags to remove. Can specify multiple
284+
* tags in a single string, separated by commas - "t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11".
285+
*
286+
* @param {Array} public_ids A list of public IDs (up to 1000) of assets uploaded to Cloudinary.
287+
*
288+
* @param {Function} callback Callback function
289+
*
290+
* @param {Object} options Configuration options may include 'exclusive' (boolean) which causes
291+
* clearing this tag from all other resources
292+
* @return {Object}
293+
*/
269294
exports.remove_tag = function remove_tag(tag, public_ids = [], callback, options = {}) {
270295
return call_tags_api(tag, "remove", public_ids, callback, options);
271296
};

0 commit comments

Comments
 (0)