| All Verbs | /qry/users/notifications |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Betting.WebApi.ServiceModel;
using Betting.ReadModel;
using Betting.Common;
using Starnet.Common;
namespace Betting.Common
{
public partial class Notification
{
public virtual Severity Severity { get; set; }
public virtual NotificationType Type { get; set; }
public virtual RecordDictionary<string, string> Data { get; set; }
}
public enum NotificationType
{
Default = 0,
SlipDeliveryConfirmationRequest = 1,
SlipDeliveryIssueResolved = 2,
}
public enum Severity
{
Success = 0,
Info = 1,
Warning = 2,
Error = 3,
}
}
namespace Betting.ReadModel
{
public partial class UserNotifications
{
public virtual string Id { get; set; }
public virtual int N { get; set; }
public virtual int S { get; set; }
public virtual int I { get; set; }
public virtual int W { get; set; }
public virtual int E { get; set; }
public virtual Dictionary<string, UserNotification> Notifications { get; set; }
public partial class UserNotification
{
public virtual string Id { get; set; }
public virtual Notification Notification { get; set; }
public virtual DateTime DispatchedAt { get; set; }
}
}
}
namespace Betting.WebApi.ServiceModel
{
public partial class GetUserNotifications
{
public virtual string Id { get; set; }
}
}
namespace Starnet.Common
{
public partial class RecordDictionary<TKey, TVal>
: Dictionary<TKey, TVal>
{
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/users/notifications HTTP/1.1
Host: api.sbbet.ath.cx
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetUserNotifications xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.WebApi.ServiceModel">
<Id>String</Id>
</GetUserNotifications>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<UserNotifications xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.ReadModel">
<Id>String</Id>
<Notifications xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringUserNotifications.UserNotificationICRnA2uO>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>
<DispatchedAt>0001-01-01T00:00:00</DispatchedAt>
<Id>String</Id>
<Notification xmlns:d5p1="http://schemas.datacontract.org/2004/07/Betting.Common">
<d5p1:Data>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</d5p1:Data>
<d5p1:Severity>Success</d5p1:Severity>
<d5p1:Type>Default</d5p1:Type>
</Notification>
</d2p1:Value>
</d2p1:KeyValueOfstringUserNotifications.UserNotificationICRnA2uO>
</Notifications>
</UserNotifications>