A Light Weight and easy to use .NET Standard Wrapper for Rest calls API for the Firebase RealTime Database! Somebody had to do it :)
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
//Download DLL
Download the SharpFireStarter.dll file in the debug folder and reference it to your project.
//Build on your Machine
Download the project add reference it to your project
A Visual Studio .NET Project.
A computer
.NET Framework 4.5.0+
.NET Core 2.0+
.NET Standard 2.0+
Newtonsoft.Json
- Add project to Nuget Repo
- Better Error Handling
- Add Delete Data Functionality
public string userID { get; set; }
public string email { get; set; }
public string displayName { get; set; }
public string oauthAccessToken { get; set; }
public string photoUrl { get; set; }
public float oauthExpireIn { get; set; }
public bool registered { get; set; }
public string idToken { get; set; }
public string refreshToken { get; set; }
public string localId { get; set; }
public string instanceId { get; set; }
//Init Database Connection
//Get your appID from the Firebase Console
//Get your database URL from the Firebase Console
//Get your apiKey from the Firebase Console
SharpFireStarter.FireBaseDB db = new SharpFireStarter.FireBaseDB(appID, databaseURL apiKey);
//Authenticate with Firebase DB. Returns a user object
var userObject = db.Authenticate(email, password);
//Create a new firebase user and returns a user object
var userObject = db.SignUp(name, email, password);
//Signs out any signed in users
db.SignOut();
//Changes the password of signed in users
var userObject = ChangePassword(email, oldpassword, newpassword);
//Get Data from Firebase DB as JSON
string data = db.GetFromDB("firebase/path/to/yourdata");
//Write Data to Firebase DB
var obj = new {
random = "yup",
thisToo = "Okay"
};
db.WriteToDB("firebase/path/to/yourdata", obj);
Licensees may copy, distribute, display and perform the work and make derivative works and remixes based on it only if they give the author or licensor the credits (attribution) in the manner specified by these.