Class RealtimeRequest

Base class for real-time notification (browser notification) requests.

Implements
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsNotifications
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public abstract class RealtimeRequest : IRealtimeRequest

Properties

Gets or sets the target when the notification is clicked.

Declaration
RequestResponse
public Uri Link { get; set; }
Property Value
TypeDescription
Uri

NotificationLevel

Gets or sets the notification level.

Declaration
RequestResponse
public NotificationLevel NotificationLevel { get; set; }
Property Value
TypeDescription
NotificationLevel

Options

Gets or sets the notification options. This directly maps to the notification API standard used by browsers. See https://developer.mozilla.org/en-US/docs/Web/API/notification for more information.

Declaration
RequestResponse
public JObject Options { get; set; }
Property Value
TypeDescription
JObject

Title

Gets or sets the title of the notification.

Declaration
RequestResponse
public string Title { get; set; }
Property Value
TypeDescription
string

Methods

GetBody()

Gets the notification body from the Options object.

Declaration
RequestResponse
public string GetBody()
Returns
TypeDescription
string

The notification body.

GetIcon()

Gets the notification icon from the Options object.

Declaration
RequestResponse
public string GetIcon()
Returns
TypeDescription
string

The notification icon.

SetBody(string)

Sets the notification body on the Options object.

Declaration
RequestResponse
public void SetBody(string body)
Parameters
TypeNameDescription
stringbody

The notification body.

SetIcon(string)

Sets the notification icon on the Options object.

Declaration
RequestResponse
public void SetIcon(string icon)
Parameters
TypeNameDescription
stringicon

The notification icon.

Validate()

Validates the real-time request.

Declaration
RequestResponse
public abstract void Validate()
Exceptions
TypeCondition
ValidationException

When the request has invalid properties.

Implements

Do you have some feedback for us?

If you have suggestions for improving this article,