Code Monkey home page Code Monkey logo

firesharp's Introduction

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.

firesharp's People

Contributors

abutler avatar aupp avatar awsomewyatt avatar brunobritodev avatar bugthesystem avatar csotomon avatar davidrieman avatar ernestopedrosa avatar ishmael-moreno avatar iurmsepol avatar jazpearson avatar kernel32uiuc avatar kevindfs avatar lablabla avatar lamboj avatar lucasratske avatar makzee avatar moonpyk avatar pjhuck avatar shibuya246 avatar tillerstarredwards avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firesharp's Issues

Where Clause

Is there a way to set a where clause when requesting data from Firebase

Failed to validate MAC

UWP
Using: var firebaseConfig = new FirebaseConfig { AuthSecret = id_token, BasePath = FirebaseBaseURL } and calling PutAsync() throws exception with Message : "Failed to validate MAC"

id_token:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3NpbXBsZXNvY2lhbG1lZGlhLmF1dGgwLmNvbS8iLCJzdWIiOiJmYWNlYm9va3wxMzkyNTM5Nzk3NDQyODcwIiwiYXVkIjoiVldqU1hvOUY0eFBMbEFtMktNeXJMb0s4bVd3c2hYYjQiLCJleHAiOjE0NzMyMDQ0NzQsImlhdCI6MTQ3MzE2ODQ3NCwidiI6MCwiZCI6eyJmYl9pZCI6ImZhY2Vib29rfDEzOTI1Mzk3OTc0NDI4NzAifSwiYXpwIjoiVldqU1hvOUY0eFBMbEFtMktNeXJMb0s4bVd3c2hYYjQifQ.2fsK1YWNycT3iJvFncprEcoUNr2WIEwz9ZCKFHYTFOg"

Gotten from Auth0: auth0.GetDelegationToken()

What is wrong?

using FireSharp

The only function from the FireSharp namespace seen is the FirebaseClient class. Maybe it is a problem with the nuget package, because compiling from source worked fine.

Xamarin Android (SetAsync; UpdateAsync) : Java.Net.ProtocolException: unexpected end of stream

SetAsync; UpdateAsync not worked on Android but work well on iOS (Xamarin)
GetAsync worked well both (Android and iOS Xamarin)

Trace :
Java.Net.ProtocolException: unexpected end of stream
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00085] in /Users/builder/data/lanes/3204/804c6cb7/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11484
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualInt32Method (System.String encodedMember, IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00031] in /Users/builder/data/lanes/3204/804c6cb7/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:206
at Java.Net.HttpURLConnection.get_ResponseCode () [0x00000] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/platforms/android-24/src/generated/Java.Net.HttpURLConnection.cs:505
at Xamarin.Android.Net.AndroidClientHandler.DoProcessRequest (System.Net.Http.HttpRequestMessage request, Java.Net.HttpURLConnection httpConnection, CancellationToken cancellationToken) [0x000a0] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/src/Xamarin.Android.Net/AndroidClientHandler.cs:228
at Xamarin.Android.Net.AndroidClientHandler+c__async1+c__AnonStorey2.<>m__0 () [0x00000] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/src/Xamarin.Android.Net/AndroidClientHandler.cs:207
at System.Threading.Tasks.Task1[TResult].InnerInvoke () [0x00012] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Future.cs:680 at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2502 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at Xamarin.Android.Net.AndroidClientHandler+c__async1.MoveNext () [0x000b3] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/src/Xamarin.Android.Net/AndroidClientHandler.cs:207
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 at Xamarin.Android.Net.AndroidClientHandler+<SendAsync>c__async0.MoveNext () [0x000c4] in /Users/builder/data/lanes/3204/804c6cb7/source/monodroid/src/Mono.Android/src/Xamarin.Android.Net/AndroidClientHandler.cs:195 --- End of stack trace from previous location where exception was thrown --- at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00042] in <filename unknown>:0 at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess (System.Threading.Tasks.Task task) [0x0001c] in <filename unknown>:0 at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00009] in <filename unknown>:0 at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in :0
at FireSharp.FirebaseClient+d__131[T].MoveNext () [0x0009a] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/1196/3e934261/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at fireee.MyPage+c__async3.MoveNext () [0x0008b] in /Users/eric/Projects/fireee/fireee/MyPage.cs:117
--- End of managed exception stack trace ---
java.net.ProtocolException: unexpected end of stream
at com.android.okhttp.internal.http.HttpConnection$FixedLengthSink.close(HttpConnection.java:303)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:619)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:388)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:332)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:500)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)

Fail response push function

Response at push function fail in "response.Result.Name"
Probably "Name" must be change by "name"

Response of push function using postman:
image

Analytics support

As far as I can tell FireSharp does not support Firebase analytics. Is there plans to add this?

Incorrect Path in ValueAddedEventArgs using Client.OnAsync

I have a program that writes a number of objects to the database, and a listener that dumps the path of each change to the database. When the database is "clean", the program functions as expected. (See FirstRun.txt). However, Subsequent runs return a collection of increasingly large, incorrect paths when the current content of the database is enumerated. (See SecondRun.txt). The data in the database is correct.

I'm a little new at this, but this seems like incorrect behavior.
FirstRun.txt.txt
SecondRun.txt.txt

authWithPassword API

Hello there,
I am using your library since today and is wonderful.
I was looking also to use the custom authentication protocol from my client as they show in the javascript library:

var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
ref.authWithPassword({
  email    : "[email protected]",
  password : "correcthorsebatterystaple"
}, function(error, authData) {
  if (error) {
    console.log("Login Failed!", error);
  } else {
    console.log("Authenticated successfully with payload:", authData);
  }
});

Are you planning to implement this?

Redirect on SetAsyn or Update Async

Firebase for Nest forces redirects. This works just fine on GetAsync and OnAsync.

However, it errors out on SetAsync and UpdateAsync, returning the following error:

The text associated with this error code could not be found.

The HTTP redirect request must be confirmed by the user

This seems to be in error. Has this bug shown up in the past? Any help with resolution would be greatly appreciated.

Whindows Phone 8.1

is not possible install this packge in Windows phone 8.1.

Error Could not install package 'FireSharp 2.0.0'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0

Nuget installs several versions of the library

I am using Nuget to add the library to a class library, which runs .NET 4.5. But Nuget installs a lot more than just the 4.5 versions (see the list below). Is there any way to control which version Nuget downloads?

packages/FireSharp.2.0.3/FireSharp.2.0.3.nupkg
packages/FireSharp.2.0.3/lib/portable-net45+sl5+wp8+win8/FireSharp.dll
packages/Microsoft.Bcl.1.1.9/License-Stable.rtf
packages/Microsoft.Bcl.1.1.9/Microsoft.Bcl.1.1.9.nupkg
packages/Microsoft.Bcl.1.1.9/content/monoandroid/.
packages/Microsoft.Bcl.1.1.9/content/monotouch/.
packages/Microsoft.Bcl.1.1.9/content/net45/.
packages/Microsoft.Bcl.1.1.9/content/portable-net45+win8+wp8+wpa81/.
packages/Microsoft.Bcl.1.1.9/content/portable-net45+win8+wpa81/.
packages/Microsoft.Bcl.1.1.9/content/portable-net451+win81+wpa81/.
packages/Microsoft.Bcl.1.1.9/content/portable-net451+win81/.
packages/Microsoft.Bcl.1.1.9/content/portable-win81+wp81+wpa81/.
packages/Microsoft.Bcl.1.1.9/content/sl4/.
packages/Microsoft.Bcl.1.1.9/content/sl5/.
packages/Microsoft.Bcl.1.1.9/content/win8/.
packages/Microsoft.Bcl.1.1.9/content/wp8/.
packages/Microsoft.Bcl.1.1.9/content/wpa81/.
packages/Microsoft.Bcl.1.1.9/lib/monoandroid/.
packages/Microsoft.Bcl.1.1.9/lib/monotouch/.
packages/Microsoft.Bcl.1.1.9/lib/net40/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/net40/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/net40/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/net40/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/net40/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/net40/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/net40/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/net45/.
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp71+wpa81/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8+wp8+wpa81/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl4+win8/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+sl5+win8+wp8+wpa81/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8+wp8+wpa81/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net40+win8/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/portable-net45+win8+wp8+wpa81/.
packages/Microsoft.Bcl.1.1.9/lib/portable-net45+win8+wpa81/.
packages/Microsoft.Bcl.1.1.9/lib/portable-net451+win81+wpa81/.
packages/Microsoft.Bcl.1.1.9/lib/portable-net451+win81/.
packages/Microsoft.Bcl.1.1.9/lib/portable-win81+wp81+wpa81/.
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/sl4-windowsphone71/ensureRedirect.xml
packages/Microsoft.Bcl.1.1.9/lib/sl4/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/sl4/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/sl4/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/sl4/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/sl4/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/sl4/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/sl5/System.IO.dll
packages/Microsoft.Bcl.1.1.9/lib/sl5/System.IO.xml
packages/Microsoft.Bcl.1.1.9/lib/sl5/System.Runtime.dll
packages/Microsoft.Bcl.1.1.9/lib/sl5/System.Runtime.xml
packages/Microsoft.Bcl.1.1.9/lib/sl5/System.Threading.Tasks.dll
packages/Microsoft.Bcl.1.1.9/lib/sl5/System.Threading.Tasks.xml
packages/Microsoft.Bcl.1.1.9/lib/win8/.
packages/Microsoft.Bcl.1.1.9/lib/wp8/.
packages/Microsoft.Bcl.1.1.9/lib/wpa81/.
packages/Microsoft.Bcl.Async.1.0.168/License-Stable.rtf
packages/Microsoft.Bcl.Async.1.0.168/Microsoft.Bcl.Async.1.0.168.nupkg
packages/Microsoft.Bcl.Async.1.0.168/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/net40/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/net40/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/net40/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/net40/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/sl4/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/win8/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/win8/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/win8/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/win8/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/wp8/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/wp8/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/wp8/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/wpa81/Microsoft.Threading.Tasks.Extensions.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/wpa81/Microsoft.Threading.Tasks.Extensions.xml
packages/Microsoft.Bcl.Async.1.0.168/lib/wpa81/Microsoft.Threading.Tasks.dll
packages/Microsoft.Bcl.Async.1.0.168/lib/wpa81/Microsoft.Threading.Tasks.xml
packages/Microsoft.Bcl.Build.1.0.14/License-Stable.rtf
packages/Microsoft.Bcl.Build.1.0.14/Microsoft.Bcl.Build.1.0.14.nupkg
packages/Microsoft.Bcl.Build.1.0.14/content/net40/.
packages/Microsoft.Bcl.Build.1.0.14/content/netcore45/.
packages/Microsoft.Bcl.Build.1.0.14/content/portable-net40+win8+sl4+wp71+wpa81/.
packages/Microsoft.Bcl.Build.1.0.14/content/sl4-windowsphone71/.
packages/Microsoft.Bcl.Build.1.0.14/content/sl4/.
packages/Microsoft.Bcl.Build.1.0.14/tools/Install.ps1
packages/Microsoft.Bcl.Build.1.0.14/tools/Microsoft.Bcl.Build.Tasks.dll
packages/Microsoft.Bcl.Build.1.0.14/tools/Microsoft.Bcl.Build.targets
packages/Microsoft.Bcl.Build.1.0.14/tools/Uninstall.ps1
packages/Microsoft.Net.Http.2.2.28/License-Stable.rtf
packages/Microsoft.Net.Http.2.2.28/Microsoft.Net.Http.2.2.28.nupkg
packages/Microsoft.Net.Http.2.2.28/lib/monoandroid/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/monoandroid/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/monoandroid/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/monoandroid/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/monotouch/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/monotouch/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/monotouch/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/monotouch/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.WebRequest.dll
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.WebRequest.xml
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.dll
packages/Microsoft.Net.Http.2.2.28/lib/net40/System.Net.Http.xml
packages/Microsoft.Net.Http.2.2.28/lib/net40/ensureRedirect.xml
packages/Microsoft.Net.Http.2.2.28/lib/net45/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/net45/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/net45/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/net45/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/net45/ensureRedirect.xml
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/System.Net.Http.Primitives.XML
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/System.Net.Http.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/System.Net.Http.xml
packages/Microsoft.Net.Http.2.2.28/lib/portable-net40+sl4+win8+wp71+wpa81/ensureRedirect.xml
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8+wpa81/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8+wpa81/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8+wpa81/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8+wpa81/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8+wpa81/ensureRedirect.xml
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/portable-net45+win8/ensureRedirect.xml
packages/Microsoft.Net.Http.2.2.28/lib/sl4-windowsphone71/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/sl4-windowsphone71/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/sl4-windowsphone71/System.Net.Http.Primitives.XML
packages/Microsoft.Net.Http.2.2.28/lib/sl4-windowsphone71/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/sl4-windowsphone71/System.Net.Http.dll
packages/Microsoft.Net.Http.2.2.28/lib/sl4-windowsphone71/System.Net.Http.xml
packages/Microsoft.Net.Http.2.2.28/lib/win8/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/win8/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/win8/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/win8/System.Net.Http.Primitives.xml
packages/Microsoft.Net.Http.2.2.28/lib/wpa81/System.Net.Http.Extensions.XML
packages/Microsoft.Net.Http.2.2.28/lib/wpa81/System.Net.Http.Extensions.dll
packages/Microsoft.Net.Http.2.2.28/lib/wpa81/System.Net.Http.Primitives.dll
packages/Microsoft.Net.Http.2.2.28/lib/wpa81/System.Net.Http.Primitives.xml
packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg
packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll
packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml
packages/Newtonsoft.Json.6.0.4/tools/install.ps1

I want to use this in an ASP.NET application, so don't I need all the win8, WP, etc.

Sorry if this is the wrong place to post something like this :)

OnAsync Call back

Hi,

var response = await client.client.OnAsync ("Todo/", (sender, args) => {
Debug.WriteLine ("Hello");
Debug.WriteLine (args);
});

Im trying to implement FireBase in my application(XF). I am facing an issue, When i Push "Todo" object in FireBase it comes to "OnAsync" call back and in "args" i m not receiving full Todo object. For example if Todo consits three attributes and i push Todo then OnAsync will be called three time, one attribute each time. So my question is, is there anyway to get snapshot object or something
Pardon my english

Thanks.

Nuget clean installed 2.0.4. But Xamarin.iOS app looking for 2.0.3

As noted, Nuget clean installed 2.0.4, and i added it to a clean new project that has never had FireSharp before.

But when i run the simple Xamarin.iOS app , it fails due to "Could not load file or assembly 'FireSharp, Versuon=2.0.3.0, ..."

Is there some place where "2.0.3.0" was referenced?

OnAsync incorrect if multiple children exist

UPDATE: It would seem that the following line in TemporaryCache.UpdateChildren solves the problem. Please verify and incorporate into source code if correct..

case JsonToken.EndObject: return;

END UPDATE.

Start with a Firebase where multiple children already exist:
{
"todos" : {
"push" : {
"-Jq6BpBSCa3zmrWVSIj8" : {
"name" : "Execute PUSH",
"priority" : 2
},
"-Jq6CBIN1B0Xx5X0rzbJ" : {
"name" : "Execute PUSH",
"priority" : 2
},
"-Jq6CG_MtbJDssasD2jp" : {
"name" : "Execute PUSH",
"priority" : 2
}
}
}
}

When connecting OnAsync to a Firebase where multiple children already exist, Notifications coming back to the Added event handler are incorrect.

Example:
JSON initially streamed from Firebase upon connection:
{
"path":"/",
"data":{
"-Jq6BpBSCa3zmrWVSIj8":{"name":"Execute PUSH","priority":2},
"-Jq6CBIN1B0Xx5X0rzbJ":{"name":"Execute PUSH","priority":2},
"-Jq6CG_MtbJDssasD2jp":{"name":"Execute PUSH","priority":2}
}
}

Expected at Added:
/-Jq6BpBSCa3zmrWVSIj8/name, Execute PUSH
/-Jq6BpBSCa3zmrWVSIj8/priority, 2
/-Jq6CBIN1B0Xx5X0rzbJ/name, Execute PUSH
/-Jq6CBIN1B0Xx5X0rzbJ/priority, 2
/-Jq6CG_MtbJDssasD2jp/name, Execute PUSH
/-Jq6CG_MtbJDssasD2jp/priority, 2

Actually received at Added:
/-Jq6BpBSCa3zmrWVSIj8/name, Execute PUSH
/-Jq6BpBSCa3zmrWVSIj8/priority, 2
/-Jq6BpBSCa3zmrWVSIj8/-Jq6CBIN1B0Xx5X0rzbJ/name, Execute PUSH
/-Jq6BpBSCa3zmrWVSIj8/-Jq6CBIN1B0Xx5X0rzbJ/priority, 2
/-Jq6BpBSCa3zmrWVSIj8/-Jq6CBIN1B0Xx5X0rzbJ/-Jq6CG_MtbJDssasD2jp/name, Execute PUSH
/-Jq6BpBSCa3zmrWVSIj8/-Jq6CBIN1B0Xx5X0rzbJ/-Jq6CG_MtbJDssasD2jp/priority, 2

I have traced the problem down to TemporaryCache.UpdateChildren - my guess is the switch on JsonToken ignores JsonToken.EndObject where it needs to go up the tree one level.
However I do not know this code well enough to confidently propose a solution.

Thanks,
Lars

Cancel OnAsync()

I am using the "OnAsync" method. Is there a way to stop the listening for events? In my case the user can disable the tracking of changes and then I would like to cancel the OnAsync.

There is a cancel implemented internally, but it is not implemented to client.

Thanks.

Incompatible with .Net Core

Package FireSharp 2.0.4 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package FireSharp 2.0.4

Will there be compatiblity with the new .Net core?

The request was aborted

Hello!

Sometimes, the Firesharp throw an exception like this: "The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)"

There are any way to ignore the certificate?

Thank you so much!

Unclear which Target Frameworks are supported.

I'm using Visual Studio 2010 Premium. I had to use the NuGet commandline to try to install it as directed by the readme, since it wasn't showing up in the normal Extension Manager Online Gallery.

With a brand new project, I've tried retargeting .NET 3, .NET 4 Client Profile, and .NET 4, and always getting errors like the following:

Install-Package : Could not install package 'FireSharp 2.0.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0,Profile=Client', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

If there's something major I'm missing, it would be nice to get that in the readme. Or perhaps the nuget package is broken?

FirebaseClient does not verify response status codes

The FirebaseClient never verifies that it receives a 200 or 204 response code for all of its requests. Instead, it assumes that any response is successful. Even worse, the status code is never exposed to the caller's, so it's impossible to verify that the response was successful unless you parse the FirebaseResponse.Body, which is not very practical.

This can be verified by doing the following:

 var response = await _client.UpdateAsync("todos", true);

The response is a 400 Bad Request with the following body:

{
  "error" : "Invalid data; couldn't parse JSON object. Are you sending a JSON object with valid key names?"
}

I'm happy to do a pull request which fixes this, but I'm not sure of your error handling strategy. It seems as if all of the methods in IFirebaseClient are never supposed to throw, and instead all errors are returned via the FirebaseResult.Exception property. I'd suggest removing the Exception property and just throwing a FirebaseException for all errors. All of these methods return a Task which already has an Exception property. There's no there's no real point in hiding the exception in Task.Result.Exception when you could just fault the task instead.

Throwing exceptions (and faulting the task) would make life much easier on the caller. As it stands now the caller needs to examine the Response.Exception property for each request. Throwing an exception allows them to just put their operations in a try/catch. For example:

try  {
    _client.PushAsync("todos", todo);
    _client.Update("todos/id", todo);
} catch (FirebaseException e) {
    // handle failure ...
}

as opposed to

var response = _client.PushAsync("todos", todo);
if (response.Exception != null)
     // handle failure
var response2 = _client.UpdateAsync("todos/id", todo);
if (response2.Exception != null)
     // handle failure

Vb.net responses

Hello trying to read from firebase via vb.net ("writing is doing fine")
Class requests.vb:

Public Class Requests
    Private _id As String
    Private _name As String
    Public Property Name As String
       Get
            Return _name
        End Get
        Set(value As String)
            _name = value
        End Set
    End Property
    Public Property id As String
        Get
            Return _id
        End Get
        Set(value As String)
            _id = value
        End Set
    End Property
  End Class

Data on Firebase:

Requests  
 -KHPHazxNKUOFWG4bkrh
 Name: 
"Albert"
 id: 
"9e8436045511e793"

Vb.net request:

firebaseclient = New FireSharp.FirebaseClient(conf)


        Dim res As New Requests

        response = Await firebaseclient.GetAsync("Requests")
        res = response.ResultAs(Of Requests)()
        MsgBox(res.Name)

My problem that res object is never filled with the data, another issue how can I get a list of requests in my code (if I have several values under requests on the server")?

Crash under Windows 10 Universal App xaml

I am getting a crash on FirebaseClient(). I am using Visual Studio 2015 RC for Windows 10 Universal App. Could it be that once you add the FireSharp NuGet it is targeted for Windows 8.1?

IFirebaseConfig config = new FirebaseConfig
{
                AuthSecret = FirebaseSecret,
                BasePath = BasePath
 };
_client = new FirebaseClient(config);  // THIS LINE CRASHES

Error:
Message "System.IO.FileNotFoundException: Could not load file or assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.\r\n at FireSharp.FirebaseClient..ctor(IRequestManager requestManager)\r\n at App1FireSharp.MainPage..ctor()\r\n at App1FireSharp.App1FireSharp_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()\r\n at App1FireSharp.App1FireSharp_XamlTypeInfo.XamlUserType.ActivateInstance()" string

Any help is appreciated.

Thanks

Storage support

As far as I can tell FireSharp does not support Firebase Storage. Are there plans to add this?

childByAutoId

Is there support for childByAutoId in order to get the the unique key generated by childByAutoId: is prefixed with a client-generated timestamp so that the resulting list will be chronologically-sorted.

Thanks

Found possible error in PrepareUri, Class RequestManager

When no auth queryStr start with & instead ?

The proposal to fix.....

private Uri PrepareUri(string path, QueryBuilder queryBuilder)
{
var authToken = !string.IsNullOrWhiteSpace(_config.AuthSecret)
? $"{path}.json?auth={_config.AuthSecret}"
: $"{path}.json";

        var queryStr = string.Empty;
        if (queryBuilder != null)
        {
            queryStr = string.IsNullOrWhiteSpace(_config.AuthSecret) 
                ? $"?{queryBuilder.ToQueryString()}" 
                : $"&{queryBuilder.ToQueryString()}";
        }

        var url = $"{_config.BasePath}{authToken}{queryStr}";

        return new Uri(url);
    }

Unity3D support?

I try to nuget to Unity5 project via VS2015 v14 but it throw...

Severity    Code    Description Project File    Line
Error       Could not install package 'Microsoft.Bcl.Build 1.0.14'. You are trying to install this package into a project that targets '.NETFramework,Version=v3.5,Profile=Unity Subset v3.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

So it's not support Unity am I right? Or maybe some magic workaround to make it work?

Thanks

FireSharp Retrieval Concept

Hi Scenario is,

Im new to Firebase, I have Structure my Data on firebase using Indices for maintaining relationshi as described in below articles
https://www.firebase.com/docs/web/guide/structuring-data.html
https://www.firebase.com/blog/2013-04-12-denormalizing-is-normal.html

I just want to clear my retrieval concept on firebase.

as mention in above links
{
links: {
link1: {
title: "Example",
href: "http://example.org",
submitted: "user1",
comments: {
comment1: true
}
}

}
}
when I access link1, response contains link1 data as well as comments: {comment1:true}. Instead of comment1 actual text, accessing link1 gives comment's ID i.e, comment1. its mean when I access link1, it gives me the Ids of comments belongs to that link. so I have to retrieve comments mannually requesting firebase again based on comments ids received in link1 response? Please clear my concept : )

Async Methods

Hi,

Why all methods now are async?

Sometimes we don't need/want to call it in async context, now we are creating Task to do the job.

A solution that I propose is create two FirebaseClient, one async another sync.

I will do that and create a pull request.

Passing Custom Query in Get Method

Hi,
Im new to FireSharp. I have some data on firebase. Data Have some relation with other data

-Books
-HJSSgGGggaggGGArR
-BookName:"Android"
-Pages:"400"
-Editors
-HGYgsyysyyysygggy:true
-HYTRayyYTTtteggErRu
-BookName:"C# Intro"
-Pages:"60"
-Editors
-HGYgsyysyyysygggy
-EditorName:"Zaid"

I want a custom query to pass in Get Method so that I Can get desired data. e.g Where BookName=Android
join Editors where EditorName=Zaid

[Proposal] Firebase 3 compatibility, remove users management functions

Since firebase 3, the way of managing the users definitively changed, the API endpoints have vanished, it seems that the API has never been made public and got reverse engineered from Node SDK source code.

In my humble opinion, we should remove the entry points to those undocumented APIs moreover they won't work for new projects, until Google makes a move on those points Fire# should not give the false impression that user management is available.

What are your thoughts on this ?

Bug - App Looking for System.Net.Http Version=1.5.0.0

All assemblies are imported as necessary. I am getting a runtime error.

IFirebaseClient client = new FirebaseClient (config);

screen shot 2016-06-09 at 10 58 43 am
screen shot 2016-06-09 at 10 58 55 am

Is this dependent on an older version???โ€ฆnot sure how to retrieve that. If so, this needs to be updated.

FirebaseResponse - OnAsync

Hi again!

Now I'm using OnAsync to watch a path. The event handler are sending property by property, why just not send entire object?

Maybe create a T method that convert the Json response to a complex object?

In this case I'm with some problems to undestand all the context to change that, so I'll have some dificulties to create a pull request.

Bug in temporary cache results in malformed tree

I think this is probably causing #62 among others. Paste the below code into your FiresharpTests and see the failure. When you parse the update from the server, you incorrectly construct the SimpleCacheItem tree. The first member of the collection contains the second member, contains the third, etc. Not sure why that results in 4 notifications

            [Test, Category("INTEGRATION"), Category("ASYNC")]
    public async void PushAndListenAsync()
    {
        var todos = new[]
        {
            new Todo { name = "Execute PUSH4", priority = 1 },
            new Todo { name = "Execute PUSH4 twice", priority = 2 },
        };

        var response = await _client.PushAsync("todos/push/pushAndListenAsync", todos[0]);
        Assert.NotNull(response);
        Assert.NotNull(response.Result);
        Assert.NotNull(response.Result.Name); /*Returns pushed data name like -J8LR7PDCdz_i9H41kf7*/
        Console.WriteLine(response.Result.Name);
        response = await _client.PushAsync("todos/push/pushAndListenAsync", todos[1]);
        Assert.NotNull(response);
        Assert.NotNull(response.Result);
        Assert.NotNull(response.Result.Name); /*Returns pushed data name like -J8LR7PDCdz_i9H41kf7*/
        Console.WriteLine(response.Result.Name);

        int onTodosCount = 0;

        var listenResponse = _client.OnAsync("todos/push/pushAndListenAsync",
            //added
            (sender, args, context) =>
            {
                Console.WriteLine(args.ToJson());
                Interlocked.Increment(ref onTodosCount);
            },
            //changed
            (sender, args, context) =>
            {
                Console.WriteLine(args.ToJson());
                Assert.Fail("nothing should have changed yet, only added");
            },
            // removed
            (sender, args, context) =>
            {
                Console.WriteLine(args.ToJson());
                Assert.Fail("nothing should have been removed, only added");
            });

        await Task.Delay(4000);
        Assert.AreEqual(2, onTodosCount);
    }

BasePath must end with a trailing slash

Trailing slashes on configuration URIs are generally expected to be optional. If missing, we get an exception trying to resolve something like "...firebaseio.comfoo.json" instead of the URI being combined correctly.

config.Serializer ArgumentNullException

when creating a new JsonNetSerializer and assigning the config.Serializer = serializer I get argumentNullExecption error.


        public IFirebaseClient GetClientWithSerializer(ISerializer serializer, IFirebaseConfig config)
        {
            config.Serializer = serializer;
            return new FirebaseClient(config);
        }

   at FireSharp.Config.FirebaseConfig.set_Serializer(ISerializer value)
   at Saleify.WPF.Models.BaseFirebaseClient.GetClientWithSerializer(ISerializer serializer, IFirebaseConfig config) in c:\Projects\Git\saleify-app\Saleify\Models\BaseFirebaseClient.cs:line 24
   at Saleify.WPF.Models.FirebaseClientJsonNetSerializer..ctor() in c:\Projects\Git\saleify-app\Saleify\Models\FirebaseClientJsonNetSerializer.cs:line 24
   at Saleify.WPF.ViewModels.CustomerViewModel.LoadCustomers() in c:\Projects\Git\saleify-app\Saleify\ViewModels\CustomerViewModel.cs:line 26
   at Saleify.WPF.NotifyIconViewModel.b__7() in c:\Projects\Git\saleify-app\Saleify\NotifyIconViewModel.cs:line 46
   at Saleify.WPF.DelegateCommand.Execute(Object parameter) in c:\Projects\Git\saleify-app\Saleify\NotifyIconViewModel.cs:line 96
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Saleify.WPF.App.Main() in c:\Projects\Git\saleify-app\Saleify\obj\x86\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Json problem while response.ResultAs<...>()

Hello guys,
When I try to get my data with GetAsync() this message appears

{"Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[NumimaniaUI.DatabaseDiagram]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath '-KNFbTGxLeoPyNjn9fu9', line 1, position 24."}

public static async void Gett()
{
    _client = new FirebaseClient(config);
    FirebaseResponse response = await _client.GetAsync("Numimania");
    List<DatabaseDiagram> data = response.ResultAs<List<DatabaseDiagram>>();
}

And this are my data in Firebase
http://puu.sh/qa7rB/450ca3cbc3.png

So if you could help me, will be great if you have a solution

(Sorry for my bad english :'( )

Facebook and Google authentication?

Is there a way I can use the facebook/google auth for Firebase? I want my app to auth against facebook or google (I don't use email/passwords at all). Any help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.