Esempio n. 1
0
    //IEnumerator PostRequest(string eventId, UpLoadBuryData upLoadBuryData)
    //{
    //    var uwr = new UnityWebRequest(Config.UpLoadBuryUrl, "POST");

    //    string data = upLoadBuryData.getJson();

    //    byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes(data);
    //    uwr.uploadHandler = (UploadHandler)new UploadHandlerRaw(jsonToSend);
    //    uwr.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
    //    uwr.SetRequestHeader("Content-Type", "application/json");

    //    //Send the request then wait here until it returns
    //    yield return uwr.SendWebRequest();

    //    if (uwr.isNetworkError)
    //    {
    //        Debug.Log("Error While Sending: " + uwr.error);
    //    }
    //    else
    //    {
    //        Debug.Log("Received: " + uwr.downloadHandler.text);
    //    }
    //}
    #endregion

    public void Test()
    {
        UpLoadBuryStateData upLoadBuryStateData = new UpLoadBuryStateData();

        upLoadBuryStateData.action = "testUploadStart";
        UpLoad(upLoadBuryStateData);

        TestBuryData testBuryData = new TestBuryData();

        testBuryData.action = "test";
        UpLoad(testBuryData);

        LevelStartBuryData levelBuryData = new LevelStartBuryData();

        levelBuryData.action = "testStartLevel";
        UpLoad(levelBuryData);

        ButtonBuryData buttonBuryData = new ButtonBuryData();

        buttonBuryData.action = "testButtonTrigger";
        UpLoad(buttonBuryData);

        ServerIPABuryData serverIPABuryData = new ServerIPABuryData();

        serverIPABuryData.action = "testServerIPA";
        UpLoad(serverIPABuryData);

        ADBuryData aDBuryData = new ADBuryData();

        aDBuryData.action = "testAdPlay";
        UpLoad(aDBuryData);
        // StartCoroutine(PostRequest(test,testBuryData));
    }
Esempio n. 2
0
    public void Init()
    {
        UpLoadBuryStateData upLoadBuryStateData = new UpLoadBuryStateData();

        upLoadBuryStateData.action = initAnalythics;
        UpLoad(upLoadBuryStateData);
    }