Packagecom.kiip.extensions
Classpublic class Kiip
InheritanceKiip Inheritance flash.events.EventDispatcher

Kiip



Public Properties
 PropertyDefined By
  kiip : Kiip
[static] [read-only] The current instance of the Kiip singleton.
Kiip
Public Methods
 MethodDefined By
  
Kiip(appId:String, appSecret:String, secondAppId:String = null, secondAppSecret:String = null, logCallback:Function = null)
Do Not call this directly; use Kiip.create() or Kiip.utils to get current instance.
Kiip
  
create(appId:String, appSecret:String, secondAppId:String = null, secondAppSecret:String = null, logCallback:Function = null):Kiip
[static] Initializes the Kiip Extension.
Kiip
  
isSupported():Boolean
[static] Determine if the current platform supports the extension (iOS or Android).
Kiip
  
saveMoment(momentId:String, value:Number = -1):void
Save the given moment.
Kiip
  
setAlias(alias:String):void
Set the alias associated with the user.
Kiip
  
setBirthday(birthday:Date):void
Set the birthday associated with the current user.
Kiip
  
setEmail(email:String):void
Set the email associated with the current user.
Kiip
  
setGender(gender:String):void
Set the gender to associate with the current user.
Kiip
Events
 Event Summary Defined By
  Dispatched when premium content has been receivedKiip
  Dispatched when a modal view has been dismissedKiip
  Dispatched when a modal view has been displayedKiip
  Dispatched when a moment has savedKiip
  Dispatched when a notification has been clickedKiip
  Dispatched when a Notification has been dismissedKiip
  Dispatched hwne a Notification has been displayedKiip
  Dispatched when a Kiip Poptart has been dismissedKiip
  Dispatched when a Kiip Poptart has been displayedKiip
  Called when a branded moment has failed to saveKiip
  Called when the Kiip session has failed to endKiip
  Called when the Kiip session has been endedKiip
  Called when the Kiip session has failed to startKiip
  Called when the Kiip session has been startedKiip
  Dispatched when a swarm has been joined.Kiip
Public Constants
 ConstantDefined By
  VERSION : String = 1.0.0
[static] Version
Kiip
Property Detail
kiipproperty
kiip:Kiip  [read-only]

The current instance of the Kiip singleton. You must call Kiip.create() before this property is available.


Implementation
    public static function get kiip():Kiip

Throws
Error — if Kiip.create() was not called before first accessing this property.
Constructor Detail
Kiip()Constructor
public function Kiip(appId:String, appSecret:String, secondAppId:String = null, secondAppSecret:String = null, logCallback:Function = null)

Do Not call this directly; use Kiip.create() or Kiip.utils to get current instance.

Parameters
appId:String
 
appSecret:String
 
secondAppId:String (default = null)
 
secondAppSecret:String (default = null)
 
logCallback:Function (default = null)
Method Detail
create()method
public static function create(appId:String, appSecret:String, secondAppId:String = null, secondAppSecret:String = null, logCallback:Function = null):Kiip

Initializes the Kiip Extension. You should check Kiip.isSupported() first to ensure the platform is supported (iOS or Android.) If you are targeting iOS only or Android only, pass two parameters: your app ID and secret from the Kiip Dashboard. If you are targeting both iOS and Android from one code base, pass the keys and secrets in this order: iosAppId,iosSecret,androidId,androidAppSecret. Kiip is a Singleton and you may have only one instance. After creation, you may access the instance through the static property Kiip.kiip.

Parameters

appId:String — the app key from the Kiip dashboard
 
appSecret:String — the app secret from the Kiip dashboard
 
secondAppId:String (default = null) — optionally, if targeting iOS and Android, your Android app key
 
secondAppSecret:String (default = null) — optionally, if targeting iOS and Android, your Android app secret
 
logCallback:Function (default = null)

Returns
Kiip — initialized instance of Kiip extension interface.

Throws
Error — if Kiip has already been initialized.
isSupported()method 
public static function isSupported():Boolean

Determine if the current platform supports the extension (iOS or Android).

Returns
Boolean
saveMoment()method 
public function saveMoment(momentId:String, value:Number = -1):void

Save the given moment. After calling saveMoment(), KiipEvent.MOMENT_SAVED or KiipEvent.MOMENT_SAVE_FAILED will be dispatched. Depending on your Kiip dashboard settings, a notification may than be displayed, dispatching KiipEvent.NOTIFICATION_DISPLAYED. After the notification is finished, KiipEvent.NOTIFICATION_DISMISSED will be dispatched. If the user clicks the notification, KiipEvent.NOTIFICATION_CLICKED will be dispatched. If a modal view is subsequently opened, KiipEvent.MODAL_DISPLAYED will be dispatched, followed by KiipEvent.MODAL_DISMISSED on its closing.

Parameters

momentId:String — the momentId to save, set in the Kiip dashboard
 
value:Number (default = -1) — optional value to attach to the moment

See also

setAlias()method 
public function setAlias(alias:String):void

Set the alias associated with the user.

Parameters

alias:String — the user alias to set

setBirthday()method 
public function setBirthday(birthday:Date):void

Set the birthday associated with the current user.

Parameters

birthday:Date — Date object representing the birthday

setEmail()method 
public function setEmail(email:String):void

Set the email associated with the current user.

Parameters

email:String — email address to set

setGender()method 
public function setGender(gender:String):void

Set the gender to associate with the current user.

Parameters

gender:String — one of the KiipGender.MALE or KiipGender.FEMALE constants


Throws
ArgumentError — if gender is not one of KiipGender.MALE or KiipGender.FEMALE

See also

Event Detail
CONTENT_RECEIVED Event
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when premium content has been received

MODAL_DISMISSED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a modal view has been dismissed

MODAL_DISPLAYED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a modal view has been displayed

MOMENT_SAVED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a moment has saved

NOTIFICATION_CLICKED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a notification has been clicked

NOTIFICATION_DISMISSED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a Notification has been dismissed

NOTIFICATION_DISPLAYED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched hwne a Notification has been displayed

POPTART_DISMISSED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a Kiip Poptart has been dismissed

POPTART_DISPLAYED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a Kiip Poptart has been displayed

SAVE_MOMENT_FAILED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Called when a branded moment has failed to save

SESSION_END_FAILED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Called when the Kiip session has failed to end

SESSION_ENDED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Called when the Kiip session has been ended

SESSION_START_FAILED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Called when the Kiip session has failed to start

SESSION_STARTED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Called when the Kiip session has been started

SWARM_JOINED Event  
Event Object Type: com.kiip.extensions.events.KiipEvent

Dispatched when a swarm has been joined.

Constant Detail
VERSIONConstant
public static const VERSION:String = 1.0.0

Version