CotC C# SDK for Unity  v1.4.0.1
Making social games is easy !
Public Member Functions | List of all members
CotcSdk.PushNotification Class Reference

Description

Push notifications can be specified in some API calls to push an OS push notification to inactive users. It is typically a JSON with made of attributes which represent language -> message pairs. Here is an example: new PushNotification().Message("en", "Help me!").Message("fr", "Aidez moi!").

Public Member Functions

 PushNotification ()
 Creates a PushNotification object. More...
 
 PushNotification (string language, string text)
 Creates a PushNotification object with one language/text pair which will be put in the object initially. More...
 
 PushNotification (string language1, string text1, string language2, string text2)
 Creates a PushNotification object with two language/text pairs which will be put in the object initially. More...
 
 PushNotification (string language1, string text1, string language2, string text2, string language3, string text3)
 Creates a PushNotification object with three language/text pairs which will be put in the object initially. More...
 
 PushNotification (params KeyValuePair< string, string >[] languageTextPairs)
 Creates a PushNotification object with many language/text pairs which will be put in the object initially. More...
 
PushNotification Message (string language, string text)
 Adds or replaces a string for a given language. More...
 

Constructor & Destructor Documentation

◆ PushNotification() [1/5]

CotcSdk.PushNotification.PushNotification ( )

Creates a PushNotification object.

Returns
A new PushNotification object.

◆ PushNotification() [2/5]

CotcSdk.PushNotification.PushNotification ( string  language,
string  text 
)

Creates a PushNotification object with one language/text pair which will be put in the object initially.

Returns
A new bundle filled with one language/text pair.

◆ PushNotification() [3/5]

CotcSdk.PushNotification.PushNotification ( string  language1,
string  text1,
string  language2,
string  text2 
)

Creates a PushNotification object with two language/text pairs which will be put in the object initially.

Returns
A new bundle filled with two language/text pairs.

◆ PushNotification() [4/5]

CotcSdk.PushNotification.PushNotification ( string  language1,
string  text1,
string  language2,
string  text2,
string  language3,
string  text3 
)

Creates a PushNotification object with three language/text pairs which will be put in the object initially.

Returns
A new bundle filled with three language/text pairs.

◆ PushNotification() [5/5]

CotcSdk.PushNotification.PushNotification ( params KeyValuePair< string, string > []  languageTextPairs)

Creates a PushNotification object with many language/text pairs which will be put in the object initially.

Returns
A new bundle filled with many language/text pairs.

Member Function Documentation

◆ Message()

PushNotification CotcSdk.PushNotification.Message ( string  language,
string  text 
)

Adds or replaces a string for a given language.

Parameters
languageLanguage code, ex. "en", "ja", etc.
textThe text for this language.