Skip to content

charifield/SharpFireStarter

Repository files navigation

SharpFireStarter   Tweet  Slack

Price   Building   Author   Version

A Light Weight and easy to use .NET Standard Wrapper for Rest calls API for the Firebase RealTime Database! Somebody had to do it :)

Getting Started

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

Prerequisites

A Visual Studio .NET Project.
A computer

Supported Frameworks

 .NET Framework 4.5.0+
 .NET Core 2.0+
 .NET Standard 2.0+

Dependencies

 Newtonsoft.Json

Todos   ToDos

  • Add project to Nuget Repo
  • Better Error Handling
  • Add Delete Data Functionality

Usage

User Object

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; }

Instantiate

//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

//Authenticate with Firebase DB. Returns a user object
var userObject = db.Authenticate(email, password);

Sign Up New User

//Create a new firebase user and returns a user object
var userObject = db.SignUp(name, email, password);

Sign Out Logged In User

//Signs out any signed in users
db.SignOut();

Change User Password

//Changes the password of signed in users
var userObject = ChangePassword(email, oldpassword, newpassword);

Get Data

//Get Data from Firebase DB as JSON
string data = db.GetFromDB("firebase/path/to/yourdata");

Write Data

//Write Data to Firebase DB
 var obj = new {
    random = "yup",
    thisToo = "Okay"
};
db.WriteToDB("firebase/path/to/yourdata", obj);

Attribution

PassLicensees 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.

About

An .Net client library for Firebase (2019)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages