aboutsummaryrefslogtreecommitdiffstats
path: root/doc/api_posting.bb
diff options
context:
space:
mode:
authortonnerkiller <Benny@debenny.de>2014-08-16 13:13:57 +0200
committertonnerkiller <Benny@debenny.de>2014-08-16 13:13:57 +0200
commit03678716fe657cb9498073f7fc7f74b5883f7faf (patch)
tree888a8edda1d88be163dcd981bd5b0de9bf40451e /doc/api_posting.bb
parentba0bf596b58440c0e50142565d7ec77838be95cc (diff)
downloadvolse-hubzilla-03678716fe657cb9498073f7fc7f74b5883f7faf.tar.gz
volse-hubzilla-03678716fe657cb9498073f7fc7f74b5883f7faf.tar.bz2
volse-hubzilla-03678716fe657cb9498073f7fc7f74b5883f7faf.zip
api_posting.bb is a new doco file that explains posting to the redmatrix from an external program by exampple of command line tool curl
main.bb is an updated version of the doco main site with a link to api_posting.bb
Diffstat (limited to 'doc/api_posting.bb')
-rw-r--r--doc/api_posting.bb23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/api_posting.bb b/doc/api_posting.bb
new file mode 100644
index 000000000..eeb7127fd
--- /dev/null
+++ b/doc/api_posting.bb
@@ -0,0 +1,23 @@
+[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.baseurl]/api/statuses/update
+[/url][/code]
+[table][tr][td]$E-Mail:[/td][td]The E-Mail Adress you use to login[/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
+[*]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]
+
+
+Instead of calling [observer.baseurl]/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. \ No newline at end of file