add comments
This commit is contained in:
@@ -390,4 +390,20 @@ function getDisplayCategories() {
|
||||
|
||||
return $categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupère les commentaires d'une vidéo
|
||||
* @param string $videoId ID de la vidéo
|
||||
* @return array Tableau des commentaires
|
||||
*/
|
||||
function getVideoComments($videoId) {
|
||||
$endpoint = "videos/{$videoId}/comment-threads";
|
||||
$response = callPeerTubeApi($endpoint);
|
||||
|
||||
if (!$response || !isset($response['data'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $response['data'];
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user