C# Class Senseix.Message.Request

Inheritance: UnityEngine.MonoBehaviour
Exibir arquivo Open project: senseix/thinksy_unity_plugin Class Usage Examples

Public Methods

Method Description
BugReport ( string deviceID, string report ) : IEnumerator
CoroutinePostRequest ( ProtoBuf serializableRequest, ResponseHandlerDelegate responseHandler, string url, bool isGet ) : IEnumerator
CoroutinePostRequest ( WWW recvResult, ProtoBuf serializableRequest, ResponseHandlerDelegate responseHandler, string url ) : IEnumerator
CoroutinePostRequest ( object parametersObject ) : IEnumerator
GetEncouragements ( string player_id ) : IEnumerator
GetEnrollGameURL ( ) : string
GetPlayerRank ( string PlayerId ) : IEnumerator

Stores a Players rank and Players surrounding it based on the call preferences. By default we only return the Players rank and score.

GetProblems ( string player_id, UInt32 count ) : IEnumerator
GetSingletonInstance ( ) : Request
GetSpecifiedProblems ( string player_id, LearningAction specifyingLearningAction, UInt32 count ) : IEnumerator
HandleResult ( WWW recvResult, ResponseHandlerDelegate resultHandler ) : void
IsInSecretStagingMode ( ) : bool
LeaderboardPage ( UInt32 pageNumber, Leaderboard sortBy, UInt32 pageSize ) : void

Returns a page from the Leaderboard with the request parameters, by default 25 entries are are returned per page.

ListPlayerItems ( string playerId ) : IEnumerator
ListPlayers ( ) : IEnumerator
NetworkErrorChecking ( WWW recvResult ) : bool

Returns false for an error, or true for no errors.

PostProblems ( string PlayerId, Queue problems ) : IEnumerator

Posts a list of Problems that have been answered or skipped by the Player to the server. This is mainly for internal use/developers should not have to worry about this.

RegisterDevice ( ) : IEnumerator

Registers the device with the Senseix server, allows a temporary account to be created and the Player to begin playing without logging in. Once an account is registered or created the temporary account is transitioned into a permanent one.

RegisterPlayer ( string player_id ) : IEnumerator

This should be called each time a new Player is selected. It will add this game to a list of played games for the Player and add them to things like the game's Leaderboard.

SecretStagingSwap ( int tapOrder ) : void
SendParentEmail ( string recruitmentEmail ) : IEnumerator
SetUpRecvResult ( ProtoBuf serializableRequest, string url, bool isGet ) : WWW
SubmitProblemPostCache ( ) : IEnumerator
UpdatePlayerScore ( string playerId, UInt32 score ) : IEnumerator

Pushes a Players score to the Leaderboard, this is dependent on the developer to take care of what "score" really means in their application.

VerifyGame ( string verificationCode ) : IEnumerator

Adds the temporary verification code to the server. When the user enters the verificationCode on the Senseix website now, it will be able to link this game with the user's account.

Private Methods

Method Description
HandleNonerrorResponse ( byte responseBytes, ResponseHandlerDelegate resultHandler ) : void
SetPlayerForProblemIfNeeded ( Senseix &problemPostBuilder ) : void
WaitForRequest ( WWW recvResult ) : IEnumerator
WriteRequestToCache ( PostRequestParameters parameters ) : void

Method Details

BugReport() public static method

public static BugReport ( string deviceID, string report ) : IEnumerator
deviceID string
report string
return IEnumerator

CoroutinePostRequest() public static method

public static CoroutinePostRequest ( ProtoBuf serializableRequest, ResponseHandlerDelegate responseHandler, string url, bool isGet ) : IEnumerator
serializableRequest ProtoBuf
responseHandler ResponseHandlerDelegate
url string
isGet bool
return IEnumerator

CoroutinePostRequest() public static method

public static CoroutinePostRequest ( WWW recvResult, ProtoBuf serializableRequest, ResponseHandlerDelegate responseHandler, string url ) : IEnumerator
recvResult UnityEngine.WWW
serializableRequest ProtoBuf
responseHandler ResponseHandlerDelegate
url string
return IEnumerator

CoroutinePostRequest() public static method

public static CoroutinePostRequest ( object parametersObject ) : IEnumerator
parametersObject object
return IEnumerator

GetEncouragements() public static method

public static GetEncouragements ( string player_id ) : IEnumerator
player_id string
return IEnumerator

GetEnrollGameURL() public static method

public static GetEnrollGameURL ( ) : string
return string

GetPlayerRank() public static method

Stores a Players rank and Players surrounding it based on the call preferences. By default we only return the Players rank and score.
public static GetPlayerRank ( string PlayerId ) : IEnumerator
PlayerId string
return IEnumerator

GetProblems() public static method

public static GetProblems ( string player_id, UInt32 count ) : IEnumerator
player_id string
count System.UInt32
return IEnumerator

GetSingletonInstance() public static method

public static GetSingletonInstance ( ) : Request
return Request

GetSpecifiedProblems() public static method

public static GetSpecifiedProblems ( string player_id, LearningAction specifyingLearningAction, UInt32 count ) : IEnumerator
player_id string
specifyingLearningAction LearningAction
count System.UInt32
return IEnumerator

HandleResult() public static method

public static HandleResult ( WWW recvResult, ResponseHandlerDelegate resultHandler ) : void
recvResult UnityEngine.WWW
resultHandler ResponseHandlerDelegate
return void

IsInSecretStagingMode() public static method

public static IsInSecretStagingMode ( ) : bool
return bool

LeaderboardPage() public static method

Returns a page from the Leaderboard with the request parameters, by default 25 entries are are returned per page.
public static LeaderboardPage ( UInt32 pageNumber, Leaderboard sortBy, UInt32 pageSize ) : void
pageNumber System.UInt32
sortBy Leaderboard
pageSize System.UInt32
return void

ListPlayerItems() public static method

public static ListPlayerItems ( string playerId ) : IEnumerator
playerId string
return IEnumerator

ListPlayers() public static method

public static ListPlayers ( ) : IEnumerator
return IEnumerator

NetworkErrorChecking() public static method

Returns false for an error, or true for no errors.
public static NetworkErrorChecking ( WWW recvResult ) : bool
recvResult UnityEngine.WWW
return bool

PostProblems() public static method

Posts a list of Problems that have been answered or skipped by the Player to the server. This is mainly for internal use/developers should not have to worry about this.
public static PostProblems ( string PlayerId, Queue problems ) : IEnumerator
PlayerId string
problems System.Collections.Queue
return IEnumerator

RegisterDevice() public static method

Registers the device with the Senseix server, allows a temporary account to be created and the Player to begin playing without logging in. Once an account is registered or created the temporary account is transitioned into a permanent one.
public static RegisterDevice ( ) : IEnumerator
return IEnumerator

RegisterPlayer() public static method

This should be called each time a new Player is selected. It will add this game to a list of played games for the Player and add them to things like the game's Leaderboard.
public static RegisterPlayer ( string player_id ) : IEnumerator
player_id string
return IEnumerator

SecretStagingSwap() public method

public SecretStagingSwap ( int tapOrder ) : void
tapOrder int
return void

SendParentEmail() public static method

public static SendParentEmail ( string recruitmentEmail ) : IEnumerator
recruitmentEmail string
return IEnumerator

SetUpRecvResult() public static method

public static SetUpRecvResult ( ProtoBuf serializableRequest, string url, bool isGet ) : WWW
serializableRequest ProtoBuf
url string
isGet bool
return UnityEngine.WWW

SubmitProblemPostCache() public static method

public static SubmitProblemPostCache ( ) : IEnumerator
return IEnumerator

UpdatePlayerScore() public static method

Pushes a Players score to the Leaderboard, this is dependent on the developer to take care of what "score" really means in their application.
public static UpdatePlayerScore ( string playerId, UInt32 score ) : IEnumerator
playerId string
score System.UInt32
return IEnumerator

VerifyGame() public static method

Adds the temporary verification code to the server. When the user enters the verificationCode on the Senseix website now, it will be able to link this game with the user's account.
public static VerifyGame ( string verificationCode ) : IEnumerator
verificationCode string
return IEnumerator