Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2020-04-08 19:49:41 +0300
committerBadlop <badlop@process-one.net>2020-04-08 19:49:41 +0300
commit2febd1c220616d3b17fa982a303968ae80299adc (patch)
tree39d183870bf9d19f352425ab969147efa4ed5344 /src/mod_http_api.erl
parentaa0ed370348c37e3f3186f4b36d0a19db02cf888 (diff)
Copy more option explanations from ejabberd Docs site
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r--src/mod_http_api.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl
index 912299e45..3a1b22034 100644
--- a/src/mod_http_api.erl
+++ b/src/mod_http_api.erl
@@ -524,5 +524,13 @@ mod_options(_) ->
mod_doc() ->
#{desc =>
- ?T("This module provides a ReST API to call "
- "ejabberd commands using JSON data.")}.
+ [?T("This module provides a ReST API to call ejabberd commands "
+ "using JSON data."), "",
+ ?T("To use this module, in addition to adding it to the 'modules' "
+ "section, you must also add it to 'request_handlers' of some "
+ "listener."), "",
+ ?T("To use a specific API version N, when defining the URL path "
+ "in the request_handlers, add a 'vN'. "
+ "For example: '/api/v2: mod_http_api'"), "",
+ ?T("To run a command, send a POST request to the corresponding "
+ "URL: 'http://localhost:5280/api/<command_name>'")]}.