| All Verbs | /qry/users/notifications |
|---|
package dtos
import (
"time"
)
type Severity int
const (
SeveritySuccess Severity = 0
SeverityInfo Severity = 1
SeverityWarning Severity = 2
SeverityError Severity = 3
)
type NotificationType int
const (
NotificationTypeDefault NotificationType = 0
NotificationTypeSlipDeliveryConfirmationRequest NotificationType = 1
NotificationTypeSlipDeliveryIssueResolved NotificationType = 2
)
type Notification struct {
Severity Severity `json:"severity,omitempty"`
Type NotificationType `json:"type,omitempty"`
Data *RecordDictionary[string, string] `json:"data,omitempty"`
}
type UserNotification struct {
Id *string `json:"id,omitempty"`
Notification *Notification `json:"notification,omitempty"`
DispatchedAt time.Time `json:"dispatchedAt,omitempty"`
}
type UserNotifications struct {
IsOverflown bool `json:"isOverflown,omitempty"`
Id *string `json:"id,omitempty"`
N int `json:"n,omitempty"`
S int `json:"s,omitempty"`
I int `json:"i,omitempty"`
W int `json:"w,omitempty"`
E int `json:"e,omitempty"`
Notifications map[string]UserNotification `json:"notifications,omitempty"`
}
type GetUserNotifications struct {
Id *string `json:"id,omitempty"`
}
type RecordDictionary[TKey any, TVal any] map[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.bettor.webhop.biz
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>