Closed Skeeww closed 6 years ago
You need to include this class in your code : https://github.com/alecgorge/jsonapi/blob/master/sdk/php/JSONAPI.php
And in your php code you can put something like :
//Create a new JSONAPI Object
$api = new JSONAPI($host, $port, $uname, $pword);
//Use this method to get the consolelogs in array form
$console = $api->call("getLatestConsoleLogs");
$console = $console["success"];
//Parse the array
foreach($console as $value) {
$ligne = $value['line'];
//Do whatever u want
}
Yes I know that but I want to have only the tchat not the logs ^^'
C'est pour ça que dieu a inventé la documentation, elle est faite pour être lue et les développeurs doivent normalement la lire avant d'utiliser une API
Tu retrouves toutes les méthodes que tu peux appeller ici : https://github.com/alecgorge/jsonapi/blob/master/src/resources/methods.json
Celle qui t'intéresse serait donc sûrement celle-ci
{
"name": "getLatestChats",
"desc": "Gets up to the last 50 lines in chat. Returned as an array of JSON stream objects.",
"returns": ["Object[]", "The array of objects"],
"call": "this.getChatLogs()"
}
Merci ^^
@Skeeww Merci de fermer l'issue si il n'y a plus de problème 💃
Hey, I want to receive the chat stream over the PHP SDK but I don't know how can I do that, I see there is chat_view but I do what with that ? Thanks