Show / Hide Table of Contents

Class KongregateWeb

Interface to the Kongregate web API.

Inheritance
System.Object
KongregateWeb
Namespace: Kongregate.Web
Assembly: cs.temp.dll.dll
Syntax
public class KongregateWeb : MonoBehaviour
Remarks

The bindings to the JavaScript API are defined in KongregateWeb.jslib, which must be included in the project for this class to work.

Properties

AdsAvailable

Declaration
public static bool AdsAvailable { get; }
Property Value
Type Description
System.Boolean

GameAuthToken

Declaration
public static string GameAuthToken { get; }
Property Value
Type Description
System.String

IsAdOpen

Declaration
public static bool IsAdOpen { get; }
Property Value
Type Description
System.Boolean

IsGuest

Declaration
public static bool IsGuest { get; }
Property Value
Type Description
System.Boolean

IsReady

Declaration
public static bool IsReady { get; }
Property Value
Type Description
System.Boolean

Status

Declaration
public static ApiStatus Status { get; }
Property Value
Type Description
ApiStatus

UserId

Declaration
public static int UserId { get; }
Property Value
Type Description
System.Int32

Username

Declaration
public static string Username { get; }
Property Value
Type Description
System.String

Methods

InitializeIncentivizedAds()

Declaration
public static void InitializeIncentivizedAds()

PrivateMessage(String)

Declaration
public static void PrivateMessage(string message)
Parameters
Type Name Description
System.String message

PurchaseItems(String[])

Declaration
public static void PurchaseItems(string[] items)
Parameters
Type Name Description
System.String[] items

RequestItemList(String[])

Declaration
public static void RequestItemList(string[] tags = null)
Parameters
Type Name Description
System.String[] tags

RequestUserItemList(String)

Declaration
public static void RequestUserItemList(string username = null)
Parameters
Type Name Description
System.String username

ResizeGame(Int32, Int32)

Declaration
public static void ResizeGame(int width, int height)
Parameters
Type Name Description
System.Int32 width
System.Int32 height

ShowIncentivizedAd()

Declaration
public static void ShowIncentivizedAd()

ShowKredPurchaseDialog(KredPurchaseType)

Declaration
public static void ShowKredPurchaseDialog(KredPurchaseType type = KredPurchaseType.Default)
Parameters
Type Name Description
KredPurchaseType type

ShowRegistrationBox()

Declaration
public static void ShowRegistrationBox()

SubmitStats(String, Int32)

Declaration
public static void SubmitStats(string statisticName, int value)
Parameters
Type Name Description
System.String statisticName
System.Int32 value

Events

AdAvailabilityChanged

Declaration
public static event Action<bool> AdAvailabilityChanged
Event Type
Type Description
Action<System.Boolean>

AdClosed

Declaration
public static event Action<bool> AdClosed
Event Type
Type Description
Action<System.Boolean>

AdOpened

Declaration
public static event Action AdOpened
Event Type
Type Description
Action

BecameReady

Event broadcast when the web API becomes ready.

Declaration
public static event Action BecameReady
Event Type
Type Description
Action
Remarks

If the web API is already ready, then the registered callback will be invoked immediately.

LoggedIn

Declaration
public static event Action LoggedIn
Event Type
Type Description
Action

PurchaseFailed

Declaration
public static event Action<string[]> PurchaseFailed
Event Type
Type Description
Action<System.String[]>

PurchaseSucceeded

Declaration
public static event Action<string[]> PurchaseSucceeded
Event Type
Type Description
Action<System.String[]>

StoreItemsReceived

Declaration
public static event Action<StoreItem[]> StoreItemsReceived
Event Type
Type Description
Action<StoreItem[]>

UserItemsReceived

Declaration
public static event Action<UserItem[]> UserItemsReceived
Event Type
Type Description
Action<UserItem[]>
Back to top Generated by DocFX