Firebase REST API wrapper for the .NET & Xamarin.
Changes are sent to all subscribed clients automatically, so you can update your clients in realtime from the backend.
IMPORTANT :v1 docs moved here.
//**Install v2**Install-Package FireSharp
//**Install v1**
Install-Package FireSharp -Version 1.1.0FirebaseClient uses Newtonsoft.Json by default.
IFirebaseConfigconfig=newFirebaseConfig{AuthSecret="your_firebase_secret",BasePath="https://yourfirebase.firebaseio.com/"};IFirebaseClientclient=newFirebaseClient(config);So far, supported methods are :
vartodo=newTodo{name="Execute SET",priority=2};SetResponseresponse=await_client.SetAsync("todos/set",todo);Todoresult=response.ResultAs<Todo>();//The response will contain the data writtenvartodo=newTodo{name="Execute PUSH",priority=2};PushResponseresponse=await_client.PushAsync("todos/push",todo);response.Result.name//The result will contain the child name of the new data that was addedFirebaseResponseresponse=await_client.GetAsync("todos/set");Todotodo=response.ResultAs<Todo>();//The response will contain the data being retreivedvartodo=newTodo{name="Execute UPDATE!",priority=1};FirebaseResponseresponse=await_client.UpdateAsync("todos/set",todo);Todotodo=response.ResultAs<Todo>();//The response will contain the data writtenFirebaseResponseresponse=await_client.DeleteAsync("todos");//Deletes todos collectionConsole.WriteLine(response.StatusCode);EventStreamResponseresponse=await_client.OnAsync("chat",(sender,args)=>{System.Console.WriteLine(args.Data);});//Call dispose to stop listening for eventsresponse.Dispose();2.1
- Firesharp now is a Net Standard library, so it's available for every platform.
2.0
- Use Microsoft HTTP Client Libraries instead of RestSharp
- FireSharp is now Portable Library
- Supports Streaming from the REST API (Firebase REST endpoints support the EventSource / Server-Sent Events protocol.)
- It is fully asynchronous and designed to be non-blocking
More information about Firebase and the Firebase API is available at the official website.
Code and documentation are available according to the MIT License (see LICENSE).
