Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        firebase = Firebase.CreateNew("https://incandescent-torch-2575.firebaseio.com/testing");
        firebase.AuthWithPassword("*****@*****.**", "password", (AuthData auth) => {
            Debug.Log("auth success!!" + auth.Uid);
        }, (FirebaseError e) => {
            Debug.Log("auth failure!!");
        });

        firebase.ChildAdded += (object sender, FirebaseChangedEventArgs e) => {
            Debug.Log("Child added!");
        };

        firebase.ChildRemoved += (object sender, FirebaseChangedEventArgs e) => {
            Debug.Log("Child removed!");
        };

        firebase.SetValue("SetValue working?");
        firebase.Remove();
        firebase.SetJsonValue("{\"example_child\":{\"child_working\" : true}}");
    }