mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:35:12 +00:00
start on item feed structures
This commit is contained in:
parent
5fee78b215
commit
ef192a3c14
1 changed files with 24 additions and 2 deletions
|
@ -470,11 +470,33 @@ function get_item_elements($j) {
|
|||
|
||||
|
||||
function encode_item($item) {
|
||||
$x = array();
|
||||
|
||||
$x['message_id'] = $item['uri'];
|
||||
$x['message_top'] = $item['parent_uri'];
|
||||
$x['message_parent'] = $item['thr_parent'];
|
||||
$x['created'] = $item['created'];
|
||||
$x['edited'] = $item['edited'];
|
||||
$x['title'] = $item['title'];
|
||||
$x['body'] = $item['body'];
|
||||
$x['app'] = $item['app'];
|
||||
$x['verb'] = $item['verb'];
|
||||
$x['object_type'] = $item['obj_type'];
|
||||
$x['target_type'] = $item['tgt_type'];
|
||||
$x['permalink'] = $item['plink'];
|
||||
$x['location'] = $item['location'];
|
||||
$x['longlat'] = $item['coord'];
|
||||
|
||||
$x['owner'] = array();
|
||||
$x['author'] = array();
|
||||
$x['object'] = array();
|
||||
$x['target'] = array();
|
||||
$x['attach'] = array();
|
||||
$x['restrictions'] = array();
|
||||
$x['flags'] = array();
|
||||
$x['tags'] = array();
|
||||
|
||||
|
||||
return json_encode($item);
|
||||
return $x;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue