From 72001cb9dff322944aca40b270229d8f20a52c6f Mon Sep 17 00:00:00 2001 From: JC Brand Date: Fri, 11 May 2018 13:42:35 +0200 Subject: [PATCH] updates #1100 More jsdoc docstrings --- Makefile | 2 +- src/converse-disco.js | 49 +++++++++++++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index b99af5ee4..c187d94f3 100644 --- a/Makefile +++ b/Makefile @@ -239,4 +239,4 @@ html: .PHONY: apidoc apidoc: - $(JSDOC) -d docs/html/api src/converse-disco.js + $(JSDOC) -d docs/html/api src/*.js diff --git a/src/converse-disco.js b/src/converse-disco.js index 67a35b816..40279d8c9 100644 --- a/src/converse-disco.js +++ b/src/converse-disco.js @@ -301,16 +301,6 @@ * @namespace */ 'identities': { - /** - * Clears all previously registered identities. - * @function - * - * @example - * _converse.api.disco.own.identities.clear(); - */ - clear () { - plugin._identities = [] - }, /** * Lets you add new identities for this client (i.e. instance of Converse.js) * @function @@ -334,6 +324,16 @@ } plugin._identities.push({category: category, type: type, name: name, lang: lang}); }, + /** + * Clears all previously registered identities. + * @function + * + * @example + * _converse.api.disco.own.identities.clear(); + */ + clear () { + plugin._identities = [] + }, /** * Returns all of the identities registered for this client * (i.e. instance of Converse.js). @@ -346,17 +346,44 @@ return plugin._identities; } }, - + /** + * The "features" grouping + * @namespace + */ 'features': { + /** + * Lets you register new disco features for this client (i.e. instance of Converse.js) + * @function + * + * @param {String} name - e.g. http://jabber.org/protocol/caps + * + * @example + * _converse.api.disco.own.features.add("http://jabber.org/protocol/caps"); + */ add (name) { for (var i=0; i