Betting.WebApi

<back to all web services

GetUserNotifications

Requires Authentication
The following routes are available for this service:
All Verbs/qry/users/notifications

export enum Severity
{
    Success = 0,
    Info = 1,
    Warning = 2,
    Error = 3,
}

export enum NotificationType
{
    Default = 0,
    SlipDeliveryConfirmationRequest = 1,
    SlipDeliveryIssueResolved = 2,
}

export class Notification
{
    public severity: Severity;
    public type: NotificationType;
    public data: RecordDictionary<string, string>;

    public constructor(init?: Partial<Notification>) { (Object as any).assign(this, init); }
}

export class UserNotification
{
    public id: string;
    public notification: Notification;
    public dispatchedAt: string;

    public constructor(init?: Partial<UserNotification>) { (Object as any).assign(this, init); }
}

export class UserNotifications
{
    public id: string;
    public n: number;
    public s: number;
    public i: number;
    public w: number;
    public e: number;
    public notifications: { [index:string]: UserNotification; };

    public constructor(init?: Partial<UserNotifications>) { (Object as any).assign(this, init); }
}

export class GetUserNotifications
{
    public id: string;

    public constructor(init?: Partial<GetUserNotifications>) { (Object as any).assign(this, init); }
}

export class Dictionary<T> { [Key: string]: T; }

export class RecordDictionary<TKey, TVal> extends Dictionary<TVal>
{

    public constructor(init?: Partial<RecordDictionary<TKey, TVal>>) { super(); (Object as any).assign(this, init); }
}

TypeScript GetUserNotifications DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	n: 1,
	s: 1,
	i: 0,
	w: 0,
	e: 0,
	notifications: 
	{
		String: 
		{
			id: String,
			notification: 
			{
				severity: 0,
				type: 0,
				data: 
				{
					String: String
				}
			},
			dispatchedAt: 0001-01-01
		}
	}
}