Example #1
0
 /// <summary>
 /// Appends print=silent to save bandwidth.
 /// </summary>
 /// <param name="node"> The child. </param>
 /// <returns> The <see cref="SilentQuery"/>. </returns>
 internal static SilentQuery Silent(this FirebaseQuery node)
 {
     return(new SilentQuery(node, node.Client));
 }
Example #2
0
        public static async Task <FirebaseObject <T> > PostAsync <T>(this FirebaseQuery query, T obj, bool generateKeyOffline = true)
        {
            var result = await query.PostAsync(JsonConvert.SerializeObject(obj, query.Client.Options.JsonSerializerSettings), generateKeyOffline);

            return(new FirebaseObject <T>(result.Key, obj));
        }
Example #3
0
 public static Task PatchAsync <T>(this FirebaseQuery query, T obj)
 {
     return(query.PatchAsync(JsonConvert.SerializeObject(obj, query.Client.Options.JsonSerializerSettings)));
 }
Example #4
0
 /// <summary>
 /// Adds an auth parameter to the query.
 /// </summary>
 /// <param name="node"> The child. </param>
 /// <param name="token"> The auth token. </param>
 /// <returns> The <see cref="AuthQuery"/>. </returns>
 internal static AuthQuery WithAuth(this FirebaseQuery node, string token)
 {
     return(node.WithAuth(() => token));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FirebaseQuery"/> class.
 /// </summary>
 /// <param name="parent"> The parent of this query. </param>
 /// <param name="client"> The owning client. </param>
 protected FirebaseQuery(FirebaseQuery parent, FirebaseClient client)
 {
     this.Client = client;
     this.Parent = parent;
 }
 /// <summary>
 /// Build the url segment of this child.
 /// </summary>
 /// <param name="child"> The child of this query. </param>
 /// <returns> The <see cref="string"/>. </returns>
 protected abstract string BuildUrlSegment(FirebaseQuery child);