mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Show active lives in the API
This commit is contained in:
parent
e025be82fd
commit
dc8df66e59
1 changed files with 8 additions and 0 deletions
|
@ -652,6 +652,7 @@ class API extends PluginAbstract {
|
|||
$obj->livestream["joinURL"] = Live::getLinkToLiveFromUsers_idAndLiveServer($user->getBdId(), $obj->livestream["live_servers_id"]);
|
||||
|
||||
$obj->livestream["activeLives"] = array();
|
||||
$obj->livestream["latestLives"] = array();
|
||||
|
||||
$rows = LiveTransmitionHistory::getActiveLiveFromUser($parameters['users_id'], '','', 100);
|
||||
|
||||
|
@ -662,6 +663,13 @@ class API extends PluginAbstract {
|
|||
$obj->livestream["activeLives"][] = $value;
|
||||
}
|
||||
|
||||
$rows = LiveTransmitionHistory::getLastsLiveHistoriesFromUser($parameters['users_id'], 100);
|
||||
|
||||
foreach ($rows as $value) {
|
||||
$value['live_transmitions_history_id'] = $value['id'];
|
||||
$obj->livestream["latestLives"][] = $value;
|
||||
}
|
||||
|
||||
return new ApiObject("", false, $obj);
|
||||
} else {
|
||||
return new ApiObject("API Secret is not valid");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue