Betting.WebApi

<back to all web services

GetUserNotifications

Requires Authentication
The following routes are available for this service:
All Verbs/qry/users/notifications
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Betting.WebApi.ServiceModel
Imports Betting.ReadModel
Imports Betting.Common
Imports Starnet.Common

Namespace Global

    Namespace Betting.Common

        Public Partial Class Notification
            Public Overridable Property Severity As Severity
            Public Overridable Property Type As NotificationType
            Public Overridable Property Data As RecordDictionary(Of String, String)
        End Class

        Public Enum NotificationType
            [Default] = 0
            SlipDeliveryConfirmationRequest = 1
            SlipDeliveryIssueResolved = 2
        End Enum

        Public Enum Severity
            Success = 0
            Info = 1
            Warning = 2
            [Error] = 3
        End Enum
    End Namespace

    Namespace Betting.ReadModel

        Public Partial Class UserNotifications
            Public Overridable Property Id As String
            Public Overridable Property N As Integer
            Public Overridable Property S As Integer
            Public Overridable Property I As Integer
            Public Overridable Property W As Integer
            Public Overridable Property E As Integer
            Public Overridable Property Notifications As Dictionary(Of String, UserNotification)

            Public Partial Class UserNotification
                Public Overridable Property Id As String
                Public Overridable Property Notification As Notification
                Public Overridable Property DispatchedAt As Date
            End Class
        End Class
    End Namespace

    Namespace Betting.WebApi.ServiceModel

        Public Partial Class GetUserNotifications
            Public Overridable Property Id As String
        End Class
    End Namespace

    Namespace Starnet.Common

        Public Partial Class RecordDictionary(Of TKey, TVal)
            Inherits Dictionary(Of TKey, TVal)
        End Class
    End Namespace
End Namespace

VB.NET GetUserNotifications DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
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-01T00:00:00.0000000Z"}}}