C# Class GA_Submit, TheUnseen

Mostra file Open project: henryj41043/TheUnseen Class Usage Examples

Public Properties

Property Type Description
Categories string>.Dictionary

Public Methods

Method Description
CheckServerReply ( WWW www ) : bool

Check if a reply from the server was accepted. All response codes from 200 to 299 are accepted.

CreateMD5Hash ( string input ) : string

Encodes the input as a MD5 hash

CreateSha1Hash ( string input ) : string

Encodes the input as a sha1 hash

DictToJson ( List list ) : string

Dicts to json. This function is 35% faster than the LitJson library.

GetBaseURL ( bool inclVersion ) : string

Gets the base url to the GA server

GetPrivateKey ( ) : string
GetURL ( string category, string pubKey ) : string

Gets the url on the GA server matching the specific service we are interested in

SetupKeys ( string publicKey, string privateKey ) : void

Sets the users public and private keys for the GA server

Submit ( Dictionary categories, SubmitSuccessHandler successEvent, SubmitErrorHandler errorEvent, bool gaTracking, string pubKey, string priKey ) : IEnumerator

Takes a dictionary with a item list for each category type. All items in each category are submitted together to the GA server.

SubmitQueue ( List queue, SubmitSuccessHandler successEvent, SubmitErrorHandler errorEvent, bool gaTracking, string pubKey, string priKey ) : void

Devides a list of messages into categories and calls Submit to send the messages to the GA servers.

Private Methods

Method Description
GetUrlStart ( ) : string

Method Details

CheckServerReply() public method

Check if a reply from the server was accepted. All response codes from 200 to 299 are accepted.
public CheckServerReply ( WWW www ) : bool
www WWW /// The www object which contains response headers ///
return bool

CreateMD5Hash() public method

Encodes the input as a MD5 hash
public CreateMD5Hash ( string input ) : string
input string /// The input we want encoded ///
return string

CreateSha1Hash() public method

Encodes the input as a sha1 hash
public CreateSha1Hash ( string input ) : string
input string /// The input we want to encoded ///
return string

DictToJson() public static method

Dicts to json. This function is 35% faster than the LitJson library.
public static DictToJson ( List list ) : string
list List /// List. ///
return string

GetBaseURL() public method

Gets the base url to the GA server
public GetBaseURL ( bool inclVersion ) : string
inclVersion bool /// Should the version be included? ///
return string

GetPrivateKey() public method

public GetPrivateKey ( ) : string
return string

GetURL() public method

Gets the url on the GA server matching the specific service we are interested in
public GetURL ( string category, string pubKey ) : string
category string /// Determines the GA service/category ///
pubKey string
return string

SetupKeys() public method

Sets the users public and private keys for the GA server
public SetupKeys ( string publicKey, string privateKey ) : void
publicKey string /// The public key which identifies this users game ///
privateKey string /// The private key used to encode messages ///
return void

Submit() public method

Takes a dictionary with a item list for each category type. All items in each category are submitted together to the GA server.
public Submit ( Dictionary categories, SubmitSuccessHandler successEvent, SubmitErrorHandler errorEvent, bool gaTracking, string pubKey, string priKey ) : IEnumerator
categories Dictionary
successEvent SubmitSuccessHandler /// If successful this will be fired ///
errorEvent SubmitErrorHandler /// If an error occurs this will be fired ///
gaTracking bool
pubKey string
priKey string
return IEnumerator

SubmitQueue() public method

Devides a list of messages into categories and calls Submit to send the messages to the GA servers.
public SubmitQueue ( List queue, SubmitSuccessHandler successEvent, SubmitErrorHandler errorEvent, bool gaTracking, string pubKey, string priKey ) : void
queue List
successEvent SubmitSuccessHandler /// If successful this will be fired ///
errorEvent SubmitErrorHandler /// If an error occurs this will be fired ///
gaTracking bool
pubKey string
priKey string
return void

Property Details

Categories public_oe property

All the different types of GA services
public Dictionary Categories
return string>.Dictionary