allocUserNotifications
Some tooltip text!
• 1 minute to read
• 1 minute to read
Description
To avoid that several clients receive user notifications (new request, new chat message, new message on an existing request, and so on) a subscription system is introduced. If you supply a valid session key to this method, you will receive a notification key that you need to supply when requesting new notifications. This key will only be valid for 5 minutes and is renewed every time it is used.
In parameters
| Parameter | Description |
|---|---|
| sessionKey | A valid session key |
| source | A string identifying your client ("MySoapClient") |
Out parameters
| Parameter | Description |
|---|---|
| errorCode | See list of codes |
| notificationKey | A notification key to be used in getUserNotfications() and similar |
Example
ticket.ticketService ticketService = new ticket.ticketService();
string sessionKey;
string errorCode = ticketService.login("egon", "norges bank", out sessionKey);
if (errorCode.Equals("0"))
{
string notifyKey;
allocUserNotifications(sessionKey, "MyClient",out notifyKey);
ticket.NotificationStruct[] notifications;
getUserNotfications(sessionKey, notifyKey, out notifications);
}