Skip to content

Commit

Permalink
feat: enhance output of recent conversation list
Browse files Browse the repository at this point in the history
  • Loading branch information
markkimsal committed Sep 1, 2018
1 parent e1be7f1 commit a197021
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/cli_get_conversations.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@
$client = new HWP\Client($session, $config);
$client->connect();

$x = HWP\Conversation::loadConversationList($client);
$response = HWP\Conversation::loadConversationList($client);
//display recent conversations
foreach ($response->values[3] as $conversationState) {
echo "Conversation ID: ".$conversationState->values[1]->values[1]." ";
echo "with : ";
foreach($conversationState->values[2]->values[14] as $participant) {
echo $participant->values[2] ." | ";
}
echo "\n";
}
} catch (Exception $e) {
echo "E/". get_class($e).": ".$e->getMessage()."\n";
die(1);
Expand Down

0 comments on commit a197021

Please sign in to comment.