• Stars
    star
    695
  • Rank 65,093 (Top 2 %)
  • Language
    C#
  • License
    The Unlicense
  • Created about 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An asynchronous cross-platform .Net library for Firebase

Fire#

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.

AppVeyor Build status Coverage Status

IMPORTANT : v1 docs moved here.

Installation (NuGet)

//**Install v2**
Install-Package FireSharp

//**Install v1**
Install-Package FireSharp -Version 1.1.0

Usage

FirebaseClient uses Newtonsoft.Json by default.

How can I configure FireSharp?


  IFirebaseConfig config = new FirebaseConfig
  {
     AuthSecret = "your_firebase_secret",
     BasePath = "https://yourfirebase.firebaseio.com/"
  };
IFirebaseClient  client = new FirebaseClient(config);

So far, supported methods are :

Set

var todo = new Todo {
                name = "Execute SET",
                priority = 2
            };
SetResponse response = await _client.SetAsync("todos/set", todo);
Todo result = response.ResultAs<Todo>(); //The response will contain the data written

Push

 var todo = new Todo {
                name = "Execute PUSH",
                priority = 2
            };
PushResponse response =await  _client.PushAsync("todos/push", todo);
response.Result.name //The result will contain the child name of the new data that was added

Get

 FirebaseResponse response = await _client.GetAsync("todos/set");
 Todo todo=response.ResultAs<Todo>(); //The response will contain the data being retreived

Update

var todo = new Todo {
                name = "Execute UPDATE!",
                priority = 1
            };

FirebaseResponse response =await  _client.UpdateAsync("todos/set", todo);
Todo todo = response.ResultAs<Todo>(); //The response will contain the data written

Delete

FirebaseResponse response =await  _client.DeleteAsync("todos"); //Deletes todos collection
Console.WriteLine(response.StatusCode);

Listen Streaming from the REST API

EventStreamResponse response = await _client.OnAsync("chat", (sender, args, context) => {
       System.Console.WriteLine(args.Data);
});

//Call dispose to stop listening for events
response.Dispose();

Release Notes

5.0

  • Firesharp now supports .NET5

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.

More Repositories

1

scientist.js

🔬 A JavaScript interpretation of the Ruby library Scientist, a library for carefully refactoring critical paths.
JavaScript
606
star
2

design-patterns-and-idioms-in-es6

Design patterns and idioms in JS(ES6) /w traceur
HTML
341
star
3

vscode-open-in-github

Extension for Visual Studio Code which can be used to jump to a source code line in Github, Bitbucket, GitLab and Visualstudio.com
JavaScript
193
star
4

rdash-angular2

RDash admin dashboard theme /w AngularJS2 & TypeScript
HTML
182
star
5

InfluxDB.Net

Cross-platform .NET library for InfluxDB distributed time-series database.
C#
165
star
6

pyley

Python package for an open-source graph database Cayley
Python
159
star
7

hapijs-status-monitor

🚀 Realtime Monitoring solution for Hapi.js apps
JavaScript
137
star
8

Caliburn.Metro

A library that combines MahApps.Metro with Caliburn.Micro for Metro UI styled WPF applications.
C#
110
star
9

socket.io-python-emitter

Python implementation of socket.io-emitter that provides a hook point to easily allow you to emit events to browsers from anywhere 🚀
Python
74
star
10

reducio

❱ 🐇 URL shortener service is written in Scala using Akka-Http and Redis ❰
Scala
69
star
11

natura

A simple, efficient spring animation library for smooth, natural motion in Rust
Rust
67
star
12

Disque.Net

.Net library for the Disque distributed, in-memory message broker (i.e Redis as a job queue)
C#
56
star
13

Autofac.Extras.NLog

An Autofac module to integrate Autofac and NLog, it supports both constructor and property injection.
C#
50
star
14

Httwrap

General purpose, simple but useful HttpClient wrapper for .NET & Xamarin/Mono
C#
45
star
15

distrox

A fast thread-safe in-memory cache (storage) library and server that supports a big number of entries in Go
Go
37
star
16

angular-es6-webpack-boilerplate

AngularJS 1.4x and ES6 application boilerplate /w testing practices using Webpack
JavaScript
36
star
17

socket.io-go-emitter

Go implementation of socket.io-emitter
Go
24
star
18

AspNetWebApi-OutputCache-Redis

Redis cache for AspNetWebApi-OutputCache
C#
22
star
19

AspNet.Mvc.Theming

Enables implementing themes for ASP.NET MVC.
C#
21
star
20

Helmet

Middlewares to help secure your apps
C#
19
star
21

ProceXSS

ProceXSS is an Asp.NET Http module -tries- to prevent to xss attacks.
C#
15
star
22

neurolog

Go inteface to access `neural-redis`
Go
12
star
23

ioredis-eventemitter

Redis pubsub using an event emitter via ioredis Redis client for Node.js
JavaScript
11
star
24

consulr

Decode Consul KV data into JSON in Node.js and watch for updates
JavaScript
11
star
25

FunnyBus

Simple event aggregator/messenger for .net applications.
C#
10
star
26

Owin.Security.RedisTokenProviders

A RefreshTokenProvider using Redis as token store for Microsoft.Owin
C#
10
star
27

Panteon.Sdk

A distributed scheduled real-time task processing server for .NET
C#
10
star
28

atom-open-conemu-here

Adds a shortcut to Tree View - Open ConEmu Here in the context menu
CoffeeScript
9
star
29

redisetup

Redis setup scripts
Shell
9
star
30

k8splunk

Send kubernetes logs to splunk using fluentd
Smarty
8
star
31

Sentiment

Sentiment analysis using VADER in Scala
Scala
8
star
32

Reserveon

Sample reactive Movie Ticket reservation system written in Scala on akka-http with slick, postgres and redis
Scala
8
star
33

rock-paper-scissors-extended-java

Rock, Paper, Scissors game implementation with additional weapons support.
Java
7
star
34

Panteon.Host

A distributed scheduled real-time task processing server for .NET built on Schyntax, cs-schtick.redis and Redis for locking.
C#
6
star
35

csharp-trampolining-tail-call

C# implement trampolin to tail recursion
C#
6
star
36

arf

Powerful math lib for Vector, Matrix and Quaternion operations
Rust
5
star
37

node-procexss

Middleware to help to prevent xss attacks in your Express/Connect apps
JavaScript
5
star
38

panteon-dashboard

Panteon Web UI
JavaScript
5
star
39

Peximet

Akka cluster sample on Kubernetes
Scala
3
star
40

scream-processing

Playground for Apache Kafka, Apache Flink (CEP & ML), Elasticsearch, Kibana in Scala /w Testing practices
3
star
41

Common.Testing.NUnit

Provides base class with generic methods for testing
C#
3
star
42

AspNet.Mvc.ConfigurationExporter

Makes server side configurations are available on client side
C#
3
star
43

cerebro

Finding The Median In Large Sets Of Numbers Split Across N Servers using zeromq and nodejs (experimental)
JavaScript
3
star
44

bugthesystem

2
star
45

utopia

🚀 ⇴ µtopia
C++
2
star
46

socket.io-rabbitmq

socket.io adapter rabbitmq implementation
JavaScript
2
star
47

wasm-emc2

🚀 C++ Webassembly experiments using Emscripten
C++
2
star
48

statsy

🔥 Calculates the median and average of large stream of data using count sort
JavaScript
2
star
49

pmecs

Poor man's Entity Component System
Rust
2
star
50

socket.io-rabbitmq-emitter

socket.io emitter implementation
JavaScript
2
star
51

dataloader

DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching.
Scala
2
star
52

Exncod

Exncod - fast url encode
C#
2
star
53

Panteon.Realtime.Pusher

Add real-time functionalities to tasks and dashboard using Pusher
C#
2
star
54

rock-paper-scissors-extended-nodejs

Rock, Paper, Scissors game implementation with additional weapons support.
JavaScript
2
star
55

docker-containers

come in!
Puppet
1
star
56

socket.io-rabbitmq-server

socket.io pub-sub server rabbitmq implementation
JavaScript
1
star
57

skala-vert.x

Vert.x sample using scala
Scala
1
star
58

HandyEx

Small handy extensions in C#
C#
1
star
59

Panteon.HistoryStorage

Panteon history storage implementations (sql server, mongodb etc)
C#
1
star
60

autopoco.js

Simple test data creator
JavaScript
1
star
61

ymal

Little command line utility for modifiying YAML files
JavaScript
1
star
62

hodor

An Authorization server based on "Zanzibar: Google’s Consistent, Global Authorization System"
1
star
63

Transformer

Poor man's mapping library - its not AUTO.
C#
1
star
64

polygon-utils

Ray-casting algorithm to determine if point is inside a polygon
Scala
1
star
65

polylabel

A fast algorithm for finding the pole of inaccessibility of a polygon
Scala
1
star