Betting.WebApi

<back to all web services

GetUserNotifications

Requires Authentication
The following routes are available for this service:
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>
    {
    }

}

C# 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
		}
	}
}