LootLocker Unity SDK 8.0.0
Game backend SDK for Unity
Loading...
Searching...
No Matches
LootLocker.Requests.LootLockerNotificationContent Class Reference

The content of a notification, including context key-value pairs and the reward body. More...

Public Member Functions

bool TryGetContentBodyAsString (out string output)
 Get the body as a String.
 
bool TryGetContentBodyAsDouble (out double output)
 Get the body as a double.
 
bool TryGetContentBodyAsInteger (out int output)
 Get the body as an integer.
 
bool TryGetContentBodyAsBool (out bool output)
 Get the body as a boolean.
 
bool TryGetContentBodyAsType< T > (out T output)
 Get the body as the specified type.
 
bool TryGetContentBodyAsRewardNotification (out LootLockerNotificationContentRewardBody output)
 Get the body as a LootLockerNotificationContentRewardBody object.
 
bool TryGetContentBodyAsStringArray (out string[] output)
 Get the body as a String array.
 
bool TryGetContentBodyAsDoubleArray (out double[] output)
 Get the body as a double array.
 
bool TryGetContentBodyAsIntegerArray (out int[] output)
 Get the body as an integer array.
 
bool TryGetContentBodyAsBoolArray (out bool[] output)
 Get the body as a boolean array.
 
bool TryGetContentBodyAsTypeArray< T > (out T[] output)
 Get the body as an array of the specified type.
 

Properties

LootLockerNotificationContextEntry[] Context [get, set]
 The context for this content.
 
Dictionary< string, string > ContextAsDictionary [get, set]
 The context for this content.
 
object Body [get, set]
 The body for this notification content, use the kind variable to know which field will be filled with data.
 

Detailed Description

The content of a notification, including context key-value pairs and the reward body.

Member Function Documentation

◆ TryGetContentBodyAsBool()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsBool ( out bool  output)
inline

Get the body as a boolean.

Returns true if body could be parsed in which case Output contains the bool, returns false if parsing failed which can happen if the string is not a convertible to a boolean (those are for example "0", "1", "true", "False", "yes", "NO", etc).

◆ TryGetContentBodyAsBoolArray()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsBoolArray ( out bool[]  output)
inline

Get the body as a boolean array.

Returns true if body could be parsed in which case Output contains the bool array, returns false if parsing failed which can happen if the string is not a convertible to a boolean (those are for example "0", "1", "true", "False", "yes", "NO", etc).

◆ TryGetContentBodyAsDouble()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsDouble ( out double  output)
inline

Get the body as a double.

Returns true if body could be parsed in which case Output contains the double, returns false if parsing failed which can happen if the body is not numeric, the conversion under or overflows, or the string body precision is larger than can be dealt within a double.

◆ TryGetContentBodyAsDoubleArray()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsDoubleArray ( out double[]  output)
inline

Get the body as a double array.

Returns true if body could be parsed in which case Output contains the double array, returns false if parsing failed which can happen if the body is not numeric, the conversion under or overflows, or the string body precision is larger than can be dealt within a double.

◆ TryGetContentBodyAsInteger()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsInteger ( out int  output)
inline

Get the body as an integer.

Returns true if body could be parsed in which case Output contains the int, returns false if parsing failed which can happen if

◆ TryGetContentBodyAsIntegerArray()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsIntegerArray ( out int[]  output)
inline

Get the body as an integer array.

Returns true if body could be parsed in which case Output contains the int array, returns false if parsing failed which can happen if

◆ TryGetContentBodyAsRewardNotification()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsRewardNotification ( out LootLockerNotificationContentRewardBody  output)
inline

Get the body as a LootLockerNotificationContentRewardBody object.

Returns true if body could be parsed in which case Output contains the LootLockerNotificationContentRewardBody, returns false if parsing failed.

◆ TryGetContentBodyAsString()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsString ( out string  output)
inline

Get the body as a String.

Returns true if body could be parsed in which case Output contains the string body, returns false if parsing failed.

◆ TryGetContentBodyAsStringArray()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsStringArray ( out string[]  output)
inline

Get the body as a String array.

Returns true if body could be parsed in which case Output contains the string array body, returns false if parsing failed.

◆ TryGetContentBodyAsType< T >()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsType< T > ( out T  output)
inline

Get the body as the specified type.

Returns true if value could be parsed in which case output contains the parsed object, returns false if parsing failed which can happen if the value is not a valid json object string convertible to the specified object. /summary>

◆ TryGetContentBodyAsTypeArray< T >()

bool LootLocker.Requests.LootLockerNotificationContent.TryGetContentBodyAsTypeArray< T > ( out T[]  output)
inline

Get the body as an array of the specified type.

Returns true if body could be parsed in which case Output contains the type array, returns false if parsing failed.

Property Documentation

◆ Context

LootLockerNotificationContextEntry [] LootLocker.Requests.LootLockerNotificationContent.Context
getset

The context for this content.

This is a set of key value pairs that hold additional context information about this notification. Use the static defines in LootLockerStaticStrings.LootLockerStandardContextKeys know what standard values will be in the context depending on the type and source.

◆ ContextAsDictionary

Dictionary<string, string> LootLocker.Requests.LootLockerNotificationContent.ContextAsDictionary
getset

The context for this content.

This is a set of key value pairs that hold additional context information about this notification. Use the static defines in LootLockerStaticStrings.LootLockerStandardContextKeys know what standard values will be in the context depending on the type and source.