Exemplo n.º 1
0
        public bool RemoveOldFile(string fileName)
        {
            //Boolean for whether the old file was removed
            bool success;

            //Tries to remove the file
            try
            {
                //Tries to remove the file
                response = uploadService.RemoveFileByName(fileName);

                //Stores whether the file was removed or not
                success = response.IsResponseSuccess();
            }
            //If there are any exceptions
            catch (Exception ex)
            {
                //If the exception message contains the text in the brackets
                if (ex.Message.Contains("The file with the name '" + fileName + "' does not exist."))
                {
                    //Set the file to removed because it never existed in the first place
                    success = true;
                }
                //If the exception message was anything else
                else
                {
                    //Sets the file to not removed
                    success = false;
                }
            }

            //Returns whether the file was removed
            return(success);
        }
Exemplo n.º 2
0
    public void SaveUserScore(string pLeaderBoardName, string pUserName, double pScore,
                              App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);

        scoreBoardService.SaveUserScore(pLeaderBoardName, pUserName, pScore, response);
    }
Exemplo n.º 3
0
    public void RequestUsersByGroup(IList <string> pUsersList, App42Response.OnSuccessDelegate pOnSuccess,
                                    App42Response.OnExceptionDelegate pOnException)
    {
        App42Response response = new App42Response(pOnSuccess, pOnException);

        userService.GetUsersByGroup(pUsersList, response);
    }
Exemplo n.º 4
0
    public void LinkFacebookAccount(string pUserName, string pAccessToken,
                                    App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);

        socialService.LinkUserFacebookAccount(pUserName, pAccessToken, response);
    }
Exemplo n.º 5
0
    public void RequestUser(string pUserName, App42Response.OnSuccessDelegate pOnSuccess,
                            App42Response.OnExceptionDelegate pOnException)
    {
        App42Response response = new App42Response(pOnSuccess, pOnException);

        userService.GetUser(pUserName, response);
    }
Exemplo n.º 6
0
    public void GetTopNRankersFromFacebook(string pGameName, int pMax, string pFBToken,
                                           App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);

        scoreBoardService.GetTopNRankersFromFacebook(pGameName, pFBToken, pMax, response);
    }
Exemplo n.º 7
0
    public void CreateUserWithProfile(string pName, string pPassword, string pEmail, User.Profile pProfile,
                                      App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);

        userService.CreateUserWithProfile(pName, pPassword, pEmail, pProfile, response);
    }
        public void OnSuccess(object response)
        {
            albumRemoving = false;
            Debug.Log("AlbumRemoved");
            App42Response app42Response = (App42Response)response;

            App42Log.Console("app42Response is :" + app42Response.ToString());
        }
    public void SaveUserScore(string pLeaderBoardName, string pUserName, double pScore, 
	                          App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response (pSuccess, pException);
        scoreBoardService.SaveUserScore (pLeaderBoardName, pUserName, pScore, response);

        //		scoreBoardService.GetTopNRankers
    }
Exemplo n.º 10
0
        public void OnSuccess(object response)
        {
            App42Response app42response = (App42Response)response;

            Debug.Log("App42Response is : " + app42response);

            bool success = app42response.IsResponseSuccess();

            Debug.Log(success);
        }
Exemplo n.º 11
0
        public void OnSuccess(object response)
        {
            myGO = GameObject.FindGameObjectWithTag("resetPassTag");
            ResetScript rs = myGO.GetComponent <ResetScript>();

            rs.userCheckText.text = "Password reset information has been sent to -" + rs.userNameText.text + "-'s email address";

            App42Response app42response = (App42Response)response;

            Debug.Log("app42Response is : " + app42response);
        }
 /// <summary>
 /// Finaliza o rastreamento de uma atividade registrada.
 /// </summary>
 /// <param name="p_activityName">P_activity name.</param>
 /// <param name="p_properties">P_properties.</param>
 /// <param name="p_callBack">P_call back.</param>
 /// <example>
 /// String activityName = "Level1";  
 /// Dictionary<String,object> properties = new Dictionary<string, object> ();  
 /// properties.Add ("Name", "Level1");  
 /// properties.Add ("State", "Ended");  
 /// properties.Add ("Score", 40000);  
 /// properties.Add ("Difficulty", "Easy");  
 /// properties.Add ("IsCompletedSecretMission", true);  
 /// eventService.EndActivity(activityName, properties, new UnityCallBack());  
 /// </example>
 public static void EndTrackingUserActivity(string p_activityName, Dictionary<string,object> p_properties, App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
 {
     App42Response response = new App42Response(pSuccess, pException);
     eventService.EndActivity(p_activityName, p_properties, response);
 }
 /// <summary>
 /// Registra o acontecimento de um evento na aplicaçao.
 /// </summary>
 /// <param name="p_eventname">O nome do evento, ja cadastrado no dashboard .</param>
 /// <param name="p_properties">Propriedade dos eventos.</param>
 /// <param name="p_callBack">Funçao de retorno da solicitaçao.</param>
 /// <example>
 /// String eventName = "Purchase";  
 /// Dictionary<String,object> properties = new Dictionary<string, object> ();  
 /// properties.Add ("Name", "Nick");  
 /// properties.Add ("Revenue", 5000);  
 /// eventService.TrackEvent(eventName, properties, new UnityCallBack());   
 /// </example>
 public static void TrackEvent(string p_eventname, Dictionary<string,object> p_properties, App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
 {
     App42Response response = new App42Response(pSuccess, pException);
     eventService.TrackEvent(p_eventname, p_properties, response);
 }
Exemplo n.º 14
0
    /// <summary>
    /// Registra o tempo total gasto por um usuario	para completar um tarefa especifica.
    /// </summary>
    /// <param name="p_activityName">Nome da atividade.</param>
    /// <param name="p_properties">Propriedade da atividade.</param>
    /// <param name="p_callBack">Funçao de retorno da solicitaçao.</param>
    /// <example>
    /// String activityName = "Level1";
    /// Dictionary<String,object> properties = new Dictionary<string, object> ();
    /// properties.Add ("Name", "Level1");
    /// properties.Add ("State", "Started");
    /// properties.Add ("Score", 0);
    /// properties.Add ("Difficulty", "Easy");
    /// properties.Add ("IsCompletedSecretMission", false);
    /// eventService.StartActivity(activityName, properties, new UnityCallBack());
    /// </example>
    public static void StartTrackingUserActivity(string p_activityName, Dictionary <string, object> p_properties, App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);

        eventService.StartActivity(p_activityName, p_properties, response);
    }
Exemplo n.º 15
0
    /// <summary>
    /// Registra o acontecimento de um evento na aplicaçao.
    /// </summary>
    /// <param name="p_eventname">O nome do evento, ja cadastrado no dashboard .</param>
    /// <param name="p_properties">Propriedade dos eventos.</param>
    /// <param name="p_callBack">Funçao de retorno da solicitaçao.</param>
    /// <example>
    /// String eventName = "Purchase";
    /// Dictionary<String,object> properties = new Dictionary<string, object> ();
    /// properties.Add ("Name", "Nick");
    /// properties.Add ("Revenue", 5000);
    /// eventService.TrackEvent(eventName, properties, new UnityCallBack());
    /// </example>
    public static void TrackEvent(string p_eventname, Dictionary <string, object> p_properties, App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);

        eventService.TrackEvent(p_eventname, p_properties, response);
    }
    public void RequestUser(string pUserName, App42Response.OnSuccessDelegate pOnSuccess,
		App42Response.OnExceptionDelegate pOnException)
    {
        App42Response response = new App42Response(pOnSuccess, pOnException);
        userService.GetUser (pUserName, response);
    }
    public void CreateUser(string pName, string pPassword, string pEmail, 
		App42Response.OnSuccessDelegate pSuccess, App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response(pSuccess, pException);
        userService.CreateUser (pName, pPassword, pEmail, response);
    }
    public void GetTopNRankers(string pGameName, int pMax, App42Response.OnSuccessDelegate pSuccess,
	                           App42Response.OnExceptionDelegate pException)
    {
        App42Response response = new App42Response (pSuccess, pException);
        scoreBoardService.GetTopNRankers (pGameName, pMax, response);
    }