{"id":14968298,"url":"https://github.com/bugthesystem/firesharp","last_synced_at":"2025-04-12T21:29:47.304Z","repository":{"id":11819300,"uuid":"14370840","full_name":"bugthesystem/FireSharp","owner":"bugthesystem","description":"An asynchronous cross-platform .Net library for Firebase","archived":false,"fork":false,"pushed_at":"2023-01-26T18:11:52.000Z","size":1219,"stargazers_count":700,"open_issues_count":77,"forks_count":147,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-04-04T01:08:01.821Z","etag":null,"topics":["c-sharp","firebase","mono","streaming","xamarin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugthesystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-13T17:20:26.000Z","updated_at":"2025-01-04T17:35:16.000Z","dependencies_parsed_at":"2023-02-14T20:15:56.139Z","dependency_job_id":null,"html_url":"https://github.com/bugthesystem/FireSharp","commit_stats":null,"previous_names":["bugthesystem/firesharp","ziyasal/firesharp"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2FFireSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2FFireSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2FFireSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugthesystem%2FFireSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugthesystem","download_url":"https://codeload.github.com/bugthesystem/FireSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248634629,"owners_count":21137082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","firebase","mono","streaming","xamarin"],"created_at":"2024-09-24T13:39:40.574Z","updated_at":"2025-04-12T21:29:47.277Z","avatar_url":"https://github.com/bugthesystem.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"#   **Fire#**\n\n![](https://raw.githubusercontent.com/ziyasal/FireSharp/master/misc/logo.png)  \n\nFirebase REST API wrapper for the .NET \u0026 Xamarin.\n\nChanges are sent to all subscribed clients automatically, so you can\nupdate your clients **in realtime** from the backend.\n\n[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bj2sdp2a0w5095sv?svg=true)](https://ci.appveyor.com/project/lablabla/firesharp) [![Coverage Status](https://coveralls.io/repos/github/ziyasal/FireSharp/badge.svg?branch=master)](https://coveralls.io/github/ziyasal/FireSharp?branch=master)  \n\n**IMPORTANT :** [**v1 docs**](https://github.com/ziyasal/FireSharp/wiki/v1-Docs) moved [here](https://github.com/ziyasal/FireSharp/wiki/v1-Docs).\n\n#### Installation (NuGet)\n```csharp\n//**Install v2**\nInstall-Package FireSharp\n\n//**Install v1**\nInstall-Package FireSharp -Version 1.1.0\n```\n### Usage\n[FirebaseClient](https://github.com/ziyasal/FireSharp/blob/master/FireSharp/FirebaseClient.cs) uses [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) by default.\n\n#### How can I configure FireSharp?\n------------------------------\n\n```csharp\n  IFirebaseConfig config = new FirebaseConfig\n  {\n     AuthSecret = \"your_firebase_secret\",\n     BasePath = \"https://yourfirebase.firebaseio.com/\"\n  };\n````\n```csharp\nIFirebaseClient  client = new FirebaseClient(config);\n```\nSo far, supported methods are :\n\n#### Set\n```csharp\n\nvar todo = new Todo {\n                name = \"Execute SET\",\n                priority = 2\n            };\nSetResponse response = await _client.SetAsync(\"todos/set\", todo);\nTodo result = response.ResultAs\u003cTodo\u003e(); //The response will contain the data written\n```\n#### Push\n```csharp\n\n var todo = new Todo {\n                name = \"Execute PUSH\",\n                priority = 2\n            };\nPushResponse response =await  _client.PushAsync(\"todos/push\", todo);\nresponse.Result.name //The result will contain the child name of the new data that was added\n```\n#### Get\n```csharp\n\n FirebaseResponse response = await _client.GetAsync(\"todos/set\");\n Todo todo=response.ResultAs\u003cTodo\u003e(); //The response will contain the data being retreived\n```\n#### Update\n```csharp\nvar todo = new Todo {\n                name = \"Execute UPDATE!\",\n                priority = 1\n            };\n\nFirebaseResponse response =await  _client.UpdateAsync(\"todos/set\", todo);\nTodo todo = response.ResultAs\u003cTodo\u003e(); //The response will contain the data written\n```\n#### Delete\n```csharp\n\nFirebaseResponse response =await  _client.DeleteAsync(\"todos\"); //Deletes todos collection\nConsole.WriteLine(response.StatusCode);\n```\n#### Listen **Streaming from the REST API**\n```csharp\nEventStreamResponse response = await _client.OnAsync(\"chat\", (sender, args, context) =\u003e {\n       System.Console.WriteLine(args.Data);\n});\n\n//Call dispose to stop listening for events\nresponse.Dispose();\n```\n\n## Release Notes\n**5.0**\n- Firesharp now supports .NET5\n\n**2.1**\n- Firesharp now is a Net Standard library, so it's available for every platform.\n\n\n**2.0**\n- Use Microsoft HTTP Client Libraries instead of RestSharp\n- FireSharp is now Portable Library\n- Supports Streaming from the REST API (Firebase REST endpoints support the EventSource / Server-Sent Events protocol.)\n- It is fully asynchronous and designed to be non-blocking \n\nMore information about Firebase and the Firebase API is available at the\n[official website](http://www.firebase.com/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugthesystem%2Ffiresharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugthesystem%2Ffiresharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugthesystem%2Ffiresharp/lists"}