diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-04-30 06:59:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-04-30 06:59:19 +0000 |
commit | 7c34a3676d294c9a1acc69f71ab3061074509160 (patch) | |
tree | ad04cef0d545c5e5e24e76060b6c32d65363d48e /doc/en/api/api_posting.bb | |
parent | 48cec945051d259a06871d937ad998a1bd3e22ec (diff) | |
download | volse-hubzilla-7c34a3676d294c9a1acc69f71ab3061074509160.tar.gz volse-hubzilla-7c34a3676d294c9a1acc69f71ab3061074509160.tar.bz2 volse-hubzilla-7c34a3676d294c9a1acc69f71ab3061074509160.zip |
Rework Help module + begin tests for Setup module
Diffstat (limited to 'doc/en/api/api_posting.bb')
-rw-r--r-- | doc/en/api/api_posting.bb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/en/api/api_posting.bb b/doc/en/api/api_posting.bb new file mode 100644 index 000000000..c708ad143 --- /dev/null +++ b/doc/en/api/api_posting.bb @@ -0,0 +1,24 @@ +[b][size=xx-large]Posting to the Matrix via the API[/size][/b] + +The API allows you to post to the red# by HTTP POST request. Below you see an example using the command line tool cURL: + +[code]curl -ssl -u [color=blue]$E-Mail[/color]:[color=blue]$Password[/color] -d "[color=blue]$Parameters[/color]" [url][observer=1][observer.baseurl][/observer][observer=0]example.com[/observer]/api/statuses/update +[/url][/code] +[table][tr][td]$E-Mail:[/td][td]The E-Mail Address you use to login, or the channel nickname (without the hostname)[/td][/tr] +[tr][td]$Password:[/td][td]The Password you use to login[/td][/tr] +[tr][td]$Parameters:[/td][td]That's the interesting part, here you insert the content you want to send using the following parameters:[/td][/tr][/table] + +[ul] +[*]title: the title of the posting +[*]channel: the channel you want to post to (do not use this parameter with HTTP Basic auth) +[*]category: a comma-seperated list of categories for the posting +[*]status: the content of the posting, formatted with BBCode + OR +[*]htmlstatus:the content of the posting, formatted in HTML. +[/ul] + +To post to a specific channel, replace the email address with the channel nickname. If you supply the channel parameter, it has to match the "email", but is superfluous anyway. + +Instead of calling [observer=1][observer.baseurl][/observer][observer=0]example.com[/observer]/api/statuses/update which returns a json (you could also add .json on the end to clarify) output, you can use [observer.baseurl]/api/statuses/update.xml to get an xml formatted return. + +Instead of Basic HTTP Authentification you could also use oAuth. |