Yash Gajjar
Yash Gajjar

Reputation: 1

Realtime firebase update event in C#

I am stuck in middle, I am having a console application in which it is connecting my firebase database and checking continuously that is there any update in firebase database.

Now is there any kind of event in firesharp nuget to get the database event? (Which means the moment I make a change in firebase realtime database my so called function will hit.)

Upvotes: 0

Views: 1334

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599101

FireSharp seems to implement the REST Streaming API of the Firebase Realtime Database. I recommend reading its documentation on listening to the streaming REST API and starting from the sample code there:

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

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

Upvotes: 1

Related Questions