KiiCloudStorageSDK : 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: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from object.

Public Methods

static
GetResult (string, ResultCondition) : GroupedResult
Gets the result of analytics.
static
GetResult (string, ResultCondition, KiiResultCallback)
Asynchronously retrieve analytics result.
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
Initialize (string, string, KiiAnalytics.Site, string, KiiCorp.Cloud.Storage.KiiHttpClientFactory, KiiCorp.Cloud.Storage.KiiHttpClientFactory)
Initialize KiiSDK appID, appKey, deviceID, site and KiiHttpClientFactory.
static
Initialize (string, string, string, string, KiiCorp.Cloud.Storage.KiiHttpClientFactory, KiiCorp.Cloud.Storage.KiiHttpClientFactory)
Initialize KiiSDK appID, appKey, deviceID, serverUrl and KiiHttpClientFactory.
static
NewEvent (string) : KiiEvent
Instantiate new event.
static
Upload (params KiiEvent[])
Upload events to KiiCloud.
static
Upload (KiiEventCallback, params KiiEvent[])
Asynchronously 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.Storage.CloudException Is thrown when KiiCloud sends error response.

Remarks

This API will send a request to Kii Cloud.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetResult Method

Asynchronously retrieve analytics result.

Syntax

public static void GetResult (string ruleId, ResultCondition condition, KiiResultCallback callback)

Parameters

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

Exceptions

Type Reason
ArgumentException Is thrown when ruleId is null or empty.

Remarks

This API will send a request to Kii Cloud.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.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
Application ID found in your Kii developer console.
appKey
Application key found in your Kii developer console.
site
Please set any one of Site.US, Site.JP, Site.CN, Site.CN3 or Site.SG you've chosen when you created application on Kii developer console.
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: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.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: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Initialize Method

Initialize KiiSDK appID, appKey, deviceID, site and KiiHttpClientFactory.

Syntax

public static void Initialize (string appID, string appKey, KiiAnalytics.Site site, string deviceID, KiiCorp.Cloud.Storage.KiiHttpClientFactory syncFactory, KiiCorp.Cloud.Storage.KiiHttpClientFactory asyncFactory)

Parameters

appID
Application ID found in your Kii developer console.
appKey
Application key found in your Kii developer console.
site
Please set any one of Site.US, Site.JP, Site.CN, Site.CN3 or Site.SG you've chosen when you created application on Kii developer console.
deviceID
DeviceID.
syncFactory
Http client factory for blocking api.
asyncFactory
Http client factory for non-blocking api.

Exceptions

Type Reason
ArgumentException Is thrown when an argument passed to a method is invalid.

Remarks

This method is intended for use in internal purposes. Do not use it to initialize your application.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Initialize Method

Initialize KiiSDK appID, appKey, deviceID, serverUrl and KiiHttpClientFactory.

Syntax

public static void Initialize (string appID, string appKey, string serverUrl, string deviceID, KiiCorp.Cloud.Storage.KiiHttpClientFactory syncFactory, KiiCorp.Cloud.Storage.KiiHttpClientFactory asyncFactory)

Parameters

appID
Application ID found in your Kii developer console.
appKey
Application key found in your Kii developer console.
serverUrl
Server URL.
deviceID
Please set any one of Site.US, Site.JP, Site.CN, Site.CN3 or Site.SG you've chosen when you created application on Kii developer console.
syncFactory
Http client factory for blocking api.
asyncFactory
Http client factory for non-blocking api.

Exceptions

Type Reason
ArgumentException Is thrown when an argument passed to a method is invalid.

Remarks

This method is intended for use in internal purposes. Do not use it to initialize your application.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.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: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.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.Storage.NetworkException Is thrown when network related exception occurs.

Remarks

This API will send a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Upload Method

Asynchronously upload events to KiiCloud.

Syntax

public static void Upload (KiiEventCallback callback, params KiiEvent[] eventList)

Parameters

callback
KiiEventCallback.
eventList
Event list to upload.

Exceptions

Type Reason
ArgumentException Is thrown when
  • eventList is null.
  • Any event in the list has alredy sent to KiiCloud.
  • eventList has more than 50 KiiEvent

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Analytics
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0