From 241bb3b94059ac4edfcc3b66e907dbf493dd8b4a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 23 Oct 2014 19:33:47 -0700 Subject: API: xchan get/create --- include/api.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/api.php') 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) { -- cgit v1.2.3