KiiAnalyticsSDK : KiiCorp.Cloud.Analytics Namespace

KiiAnalytics Class

Provides API of Kii analytics.

Syntax

public class KiiAnalytics

Remarks

Please call Initialize first.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0

Members

See Also: Inherited members from object.

Public Properties

[write-only]
static
Logger IKiiLogger . Sets the logger.

Public Methods

static
GetResult (string, ResultCondition) : GroupedResult
Gets the result of analytics.
static
Initialize (string, string, KiiAnalytics.Site, string)
Initialize the specified appId, appKey, site and deviceID.
static
Initialize (string, string, string, string)
Initialize the specified appId, appKey, serverUrl and deviceId.
static
NewEvent (string) : KiiEvent
Instantiate new event.
static
Upload (params KiiEvent[])
Upload events to KiiCloud.

Member Details

GetResult Method

Gets the result of analytics.

Syntax

public static GroupedResult GetResult (string ruleId, ResultCondition condition)

Parameters

ruleId
Rule identifier. Must not be null.
condition
Condition.

Returns

The grouped result.

Exceptions

Type Reason
ArgumentException Is thrown when ruleId is null or empty.
KiiCorp.Cloud.Analytics.CloudException Is thrown when KiiCloud sends error response.

Remarks

This API will send a request to Kii Cloud.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0

Initialize Method

Initialize the specified appId, appKey, site and deviceID.

Syntax

public static void Initialize (string appID, string appKey, KiiAnalytics.Site site, string deviceID)

Parameters

appID
App ID
appKey
App key.
site
Site.
deviceID
Device ID.

Exceptions

Type Reason
ArgumentException Is thrown when
  • appId/appKey/deviceID is empty
  • site is neither Site.JP nor Site.US

Remarks

Please call this method first.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0

Initialize Method

Initialize the specified appId, appKey, serverUrl and deviceId.

Syntax

public static void Initialize (string appID, string appKey, string serverUrl, string deviceID)

Parameters

appID
App ID
appKey
App key.
serverUrl
Server URL.
deviceID
Device identifier.

Exceptions

Type Reason
ArgumentException Is thrown when appId/appKey/serverUrl/deviceID is empty

Remarks

Please call this method first.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0

Logger Property

Sets the logger.

Syntax

public static IKiiLogger Logger { set; }

Value

The logger.

Remarks

Developer can use this property for debugging.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0

NewEvent Method

Instantiate new event.

Syntax

public static KiiEvent NewEvent (string type)

Parameters

type
Event type. Must be matched with "^\\S.{0,127}"

Returns

KiiEvent instance.

Exceptions

Type Reason
ArgumentException Is thrown when type is invalid.

Remarks

After setting key-value pairs, developer must pass this instance to KiiAnalytics.Upload(KiiEvent[])

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0

Upload Method

Upload events to KiiCloud.

Syntax

public static void Upload (params KiiEvent[] eventList)

Parameters

eventList
Event list.

Exceptions

Type Reason
ArgumentException Is thrown when
  • argument is null.
  • argument is alredy sent to KiiCloud.
  • argument has more than 50 KiiEvent
KiiCorp.Cloud.Analytics.EventUploadException Is thrown when event uploading is failed.
KiiCorp.Cloud.Analytics.NetworkException Is thrown when network related exception occurs.

Remarks

This API will send a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiAnalyticsSDK (in KiiAnalyticsSDK.dll)
Assembly Versions: 1.2.0.0