C# Класс GA_Submit, TheUnseen

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Categories string>.Dictionary

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetUrlStart ( ) : string

Описание методов

CheckServerReply() публичный Метод

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 ///
Результат bool

CreateMD5Hash() публичный Метод

Encodes the input as a MD5 hash
public CreateMD5Hash ( string input ) : string
input string /// The input we want encoded ///
Результат string

CreateSha1Hash() публичный Метод

Encodes the input as a sha1 hash
public CreateSha1Hash ( string input ) : string
input string /// The input we want to encoded ///
Результат string

DictToJson() публичный статический Метод

Dicts to json. This function is 35% faster than the LitJson library.
public static DictToJson ( List list ) : string
list List /// List. ///
Результат string

GetBaseURL() публичный Метод

Gets the base url to the GA server
public GetBaseURL ( bool inclVersion ) : string
inclVersion bool /// Should the version be included? ///
Результат string

GetPrivateKey() публичный Метод

public GetPrivateKey ( ) : string
Результат string

GetURL() публичный Метод

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
Результат string

SetupKeys() публичный Метод

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 ///
Результат void

Submit() публичный Метод

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
Результат IEnumerator

SubmitQueue() публичный Метод

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
Результат void

Описание свойств

Categories публичное свойство

All the different types of GA services
public Dictionary Categories
Результат string>.Dictionary