C# Класс Carrot, carrot-unity

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

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

Свойство Тип Описание
SDKVersion string

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

Метод Описание
authStatusString ( AuthStatus authStatus ) : string

Return the string value of an AuthStatus value.

popupFeedPost ( string objectInstanceId, object>.Dictionary objectProperties = null, CarrotRequestResponse callback = null ) : void
postAchievement ( string achievementId, CarrotRequestResponse callback = null ) : void

Post an achievement to Carrot.

postAction ( string actionId, IDictionary actionProperties, ViralObject viralObject, CarrotRequestResponse callback = null ) : void

Sends an Open Graph action which will create a new object.

postAction ( string actionId, IDictionary actionProperties, string objectInstanceId, CarrotRequestResponse callback = null ) : void

Sends an Open Graph action which will use an existing object.

postAction ( string actionId, ViralObject viralObject, CarrotRequestResponse callback = null ) : void

Sends an Open Graph action which will create a new object.

postAction ( string actionId, string objectInstanceId, CarrotRequestResponse callback = null ) : void

Sends an Open Graph action which will use an existing object.

postHighScore ( uint score, CarrotRequestResponse callback = null ) : void

Post a high score to Carrot.

postPremiumCurrencyPurchase ( float amount, string currency, CarrotRequestResponse callback = null ) : void

Inform Carrot about a purchase of premium currency for metrics tracking.

signParams ( string hostname, string endpoint, string secret, object>.Dictionary urlParams ) : string
validateUser ( string accessTokenOrFacebookId ) : void

Validate a Facebook user to allow posting of Carrot events.

This method will trigger notification of authentication status using the AuthenticationStatusChanged event.

Защищенные методы

Метод Описание
feedPostCallbackHandler ( object>.Dictionary reply ) : void
javascriptSDKFeedPostCallback ( string message ) : void
unitySDKFeedPostCallback ( object fbResult ) : void

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

Метод Описание
Carrot ( ) : System
CarrotCertValidator ( object sender, X509Certificate, certificate, X509Chain, chain, SslPolicyErrors, sslPolicyErrors ) : bool
OnApplicationPause ( bool isPaused ) : void
OnApplicationQuit ( ) : void
Start ( ) : void
addCommonPayloadFields ( UnityEngine payload, object>.Dictionary urlParams ) : void
assignUnityObject2Instance ( string message ) : void
cachedRequestCoroutine ( ServiceType, serviceType, string endpoint, object>.Dictionary parameters, CarrotRequestResponse callback = null ) : IEnumerator
cachedRequestHandler ( CarrotCache, cachedRequest, CarrotRequestResponse callback ) : CarrotRequestResponse
hostForServiceType ( ServiceType, type ) : string
postAction ( string actionId, IDictionary actionProperties, string objectId, IDictionary objectProperties, string objectInstanceId = null, CarrotRequestResponse callback = null ) : void
postAction ( string actionId, string objectId, IDictionary objectProperties, string objectInstanceId = null, CarrotRequestResponse callback = null ) : void
sendAppOpenedEvent ( ) : IEnumerator
sendInstallMetricIfNeeded ( ) : IEnumerator
servicesDiscoveryCoroutine ( ) : IEnumerator
signedRequestCoroutine ( Request, carrotRequest, CarrotRequestResponse callback = null ) : IEnumerator
validateUserCoroutine ( string accessTokenOrFacebookId ) : IEnumerator

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

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

Return the string value of an AuthStatus value.
public static authStatusString ( AuthStatus authStatus ) : string
authStatus AuthStatus
Результат string

feedPostCallbackHandler() защищенный Метод

protected feedPostCallbackHandler ( object>.Dictionary reply ) : void
reply object>.Dictionary
Результат void

javascriptSDKFeedPostCallback() защищенный Метод

protected javascriptSDKFeedPostCallback ( string message ) : void
message string
Результат void

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

public popupFeedPost ( string objectInstanceId, object>.Dictionary objectProperties = null, CarrotRequestResponse callback = null ) : void
objectInstanceId string
objectProperties object>.Dictionary
callback CarrotRequestResponse
Результат void

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

Post an achievement to Carrot.
public postAchievement ( string achievementId, CarrotRequestResponse callback = null ) : void
achievementId string Carrot achievement id.
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

Sends an Open Graph action which will create a new object.
public postAction ( string actionId, IDictionary actionProperties, ViralObject viralObject, CarrotRequestResponse callback = null ) : void
actionId string Carrot action id.
actionProperties IDictionary Parameters to be submitted with the action.
viralObject ViralObject A describing the object to be created.
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

Sends an Open Graph action which will use an existing object.
public postAction ( string actionId, IDictionary actionProperties, string objectInstanceId, CarrotRequestResponse callback = null ) : void
actionId string Carrot action id.
actionProperties IDictionary Parameters to be submitted with the action.
objectInstanceId string Carrot object instance id.
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

Sends an Open Graph action which will create a new object.
public postAction ( string actionId, ViralObject viralObject, CarrotRequestResponse callback = null ) : void
actionId string Carrot action id.
viralObject ViralObject A describing the object to be created.
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

Sends an Open Graph action which will use an existing object.
public postAction ( string actionId, string objectInstanceId, CarrotRequestResponse callback = null ) : void
actionId string Carrot action id.
objectInstanceId string Carrot object instance id.
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

Post a high score to Carrot.
public postHighScore ( uint score, CarrotRequestResponse callback = null ) : void
score uint Score.
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

Inform Carrot about a purchase of premium currency for metrics tracking.
public postPremiumCurrencyPurchase ( float amount, string currency, CarrotRequestResponse callback = null ) : void
amount float The amount of real money spent.
currency string The type of real money spent (eg. USD).
callback CarrotRequestResponse Optional which will be used to deliver the reply.
Результат void

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

public static signParams ( string hostname, string endpoint, string secret, object>.Dictionary urlParams ) : string
hostname string
endpoint string
secret string
urlParams object>.Dictionary
Результат string

unitySDKFeedPostCallback() защищенный Метод

protected unitySDKFeedPostCallback ( object fbResult ) : void
fbResult object
Результат void

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

Validate a Facebook user to allow posting of Carrot events.
This method will trigger notification of authentication status using the AuthenticationStatusChanged event.
public validateUser ( string accessTokenOrFacebookId ) : void
accessTokenOrFacebookId string Facebook user access token or Facebook User Id.
Результат void

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

SDKVersion публичное статическое свойство

Carrot SDK version.
public static string SDKVersion
Результат string