Esempio n. 1
0
     // returns null or exception
     break;
 case 'addChat':
     BLAM::checkLogged();
     $response = BLAM::addChat($_POST['text'], $_POST['role'], $_SESSION['user']['id']);
     // returns ChatId or exception
     break;
 case 'getChats':
     BLAM::checkLogged();
     $response = BLAM::getChats($_POST['first_id'], $_POST['role'], $_POST['timestamp_last_update']);
     //last_id is mandatory, id or 'all'
     // returns array(int MessageID, string Text, string Username, string Avatar, Datetime created) chats or exception
     break;
 case 'getTicketDetail':
     BLAM::checkLogged();
     $response = BLAM::getTicketDetail($_POST['id']);
     // returns integer Id, string Status, string Titel, string UserId, string Text, string Locatie, array time(Hours,Minutes), integer MessageId, string MessageUserId, string MessageText or exception
     break;
 case 'searchTickets':
     BLAM::checkLogged();
     $response = BLAM::searchTickets($_POST['keyword']);
     //returns array () tickets or exception
     break;
 case 'getUpdates':
     BLAM::checkLogged();
     $response = BLAM::getUpdates($_POST['id'], $_POST['ticket_id'], $_POST['type']);
     // returns returns array (id, type, ticket_id, title, message, handlename, called, called_by, created)
     break;
 case 'closeTicket':
     BLAM::checkLogged();
     $response = BLAM::closeTicket($_POST['id']);