diff options
author | friendica <info@friendica.com> | 2014-10-23 19:33:47 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-10-23 19:33:47 -0700 |
commit | 241bb3b94059ac4edfcc3b66e907dbf493dd8b4a (patch) | |
tree | bb02f0b30b3fb400a52b7fc9378bb2c18f4b231b /include/api.php | |
parent | 1c4bbbd13e35e164c7da96674b3678bb1011b817 (diff) | |
download | volse-hubzilla-241bb3b94059ac4edfcc3b66e907dbf493dd8b4a.tar.gz volse-hubzilla-241bb3b94059ac4edfcc3b66e907dbf493dd8b4a.tar.bz2 volse-hubzilla-241bb3b94059ac4edfcc3b66e907dbf493dd8b4a.zip |
API: xchan get/create
Diffstat (limited to 'include/api.php')
-rw-r--r-- | include/api.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/api.php b/include/api.php index 8b52253dd..9fe2ef47d 100644 --- a/include/api.php +++ b/include/api.php @@ -621,7 +621,19 @@ require_once('include/items.php'); api_register_func('api/red/group','api_group', true); + function api_red_xchan(&$a,$type) { + if(api_user() === false) + return false; + require_once('include/hubloc.php'); + if($_SERVER['request_method'] === 'POST') { + $r = xchan_store($_REQUEST); + } + $r = xchan_fetch($_REQUEST); + json_return_and_die($r); + }; + api_register_func('api/red/xchan','api_red_xchan',true); + function api_statuses_mediap(&$a, $type) { if (api_user() === false) { |