summaryrefslogtreecommitdiff
path: root/FireBase/Query/IFirebaseQuery.cs
diff options
context:
space:
mode:
authorTrueKuehli <rctcoaster2000@hotmail.de>2018-09-29 17:19:43 +0200
committerTrueKuehli <rctcoaster2000@hotmail.de>2018-09-29 17:19:43 +0200
commitb83fc90abacc73262e0f8404cebadf6d64eb10ae (patch)
treed63b921c9bcdf8d381fc02ecfb0a1dd425ebb561 /FireBase/Query/IFirebaseQuery.cs
parent586d564f3c4c509c1aae931331e96f0382178f80 (diff)
parent680967aee589e4a8d277044b204de07cbe32f41e (diff)
Merge branch 'WebApi' of https://github.com/TrueDoctor/DiscoBot into WebApi
Merged the stuffs
Diffstat (limited to 'FireBase/Query/IFirebaseQuery.cs')
-rw-r--r--FireBase/Query/IFirebaseQuery.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/FireBase/Query/IFirebaseQuery.cs b/FireBase/Query/IFirebaseQuery.cs
new file mode 100644
index 0000000..2e8c671
--- /dev/null
+++ b/FireBase/Query/IFirebaseQuery.cs
@@ -0,0 +1,43 @@
+namespace Firebase.Database.Query
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
+
+ using Firebase.Database.Streaming;
+
+ /// <summary>
+ /// The FirebaseQuery interface.
+ /// </summary>
+ public interface IFirebaseQuery
+ {
+ /// <summary>
+ /// Gets the owning client of this query.
+ /// </summary>
+ FirebaseClient Client
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Retrieves items which exist on the location specified by this query instance.
+ /// </summary>
+ /// <param name="timeout"> Optional timeout value. </param>
+ /// <typeparam name="T"> Type of the items. </typeparam>
+ /// <returns> Collection of <see cref="FirebaseObject{T}"/>. </returns>
+ Task<IReadOnlyCollection<FirebaseObject<T>>> OnceAsync<T>(TimeSpan? timeout = null);
+
+ /// <summary>
+ /// Returns current location as an observable which allows to real-time listening to events from the firebase server.
+ /// </summary>
+ /// <typeparam name="T"> Type of the items. </typeparam>
+ /// <returns> Cold observable of <see cref="FirebaseEvent{T}"/>. </returns>
+ IObservable<FirebaseEvent<T>> AsObservable<T>(EventHandler<ExceptionEventArgs<FirebaseException>> exceptionHandler, string elementRoot = "");
+
+ /// <summary>
+ /// Builds the actual url of this query.
+ /// </summary>
+ /// <returns> The <see cref="string"/>. </returns>
+ Task<string> BuildUrlAsync();
+ }
+}