Class Firebase

Index

Constructor methods

Methods

Constructor methods

constructor(firebaseURL: string): Firebase

Parameters

  • firebaseURL: string

Returns

Firebase

Methods

public auth(authToken: string, onComplete?: (error: any, result: IFirebaseAuthResult) => void, onCancel?: (error: any) => void)

Parameters

  • authToken: string
  • onComplete?: (error: any, result: IFirebaseAuthResult) => void optional
  • onCancel?: (error: any) => void optional

public child(childPath: string): Firebase

Parameters

  • childPath: string

Returns

Firebase

public endAt(priority?: string, name?: string): IFirebaseQuery

Parameters

  • priority?: string optional
  • name?: string optional

Returns

IFirebaseQuery

public endAt(priority?: number, name?: string): IFirebaseQuery

Parameters

  • priority?: number optional
  • name?: string optional

Returns

IFirebaseQuery

public goOffline()

public goOnline()

public limit(limit: number): IFirebaseQuery

Parameters

  • limit: number

Returns

IFirebaseQuery

public name(): string

Returns

string

public off(eventType?: string, callback?: (dataSnapshot: IFirebaseDataSnapshot, prevChildName?: string) => void, context?: Object)

Parameters

  • eventType?: string optional
  • callback?: (dataSnapshot: IFirebaseDataSnapshot, prevChildName?: string) => void optional
  • context?: Object optional

public on(eventType: string, callback: (dataSnapshot: IFirebaseDataSnapshot, prevChildName?: string) => void, cancelCallback?: () => void, context?: Object): (dataSnapshot: IFirebaseDataSnapshot, prevChildName?: string) => void

Parameters

  • eventType: string
  • callback: (dataSnapshot: IFirebaseDataSnapshot, prevChildName?: string) => void
  • cancelCallback?: () => void optional
  • context?: Object optional

Returns

(dataSnapshot: IFirebaseDataSnapshot, prevChildName?: string) => void

public onDisconnect(): IFirebaseOnDisconnect

Returns

IFirebaseOnDisconnect

public once(eventType: string, successCallback: (dataSnapshot: IFirebaseDataSnapshot) => void, failureCallback?: () => void, context?: Object)

Parameters

  • eventType: string
  • successCallback: (dataSnapshot: IFirebaseDataSnapshot) => void
  • failureCallback?: () => void optional
  • context?: Object optional

public parent(): Firebase

Returns

Firebase

public push(value: any, onComplete?: (error: any) => void): Firebase

Parameters

  • value: any
  • onComplete?: (error: any) => void optional

Returns

Firebase

public ref(): Firebase

Returns

Firebase

public remove(onComplete?: (error: any) => void)

Parameters

  • onComplete?: (error: any) => void optional

public root(): Firebase

Returns

Firebase

public set(value: any, onComplete?: (error: any) => void)

Parameters

  • value: any
  • onComplete?: (error: any) => void optional

public setPriority(priority: string, onComplete?: (error: any) => void)

Parameters

  • priority: string
  • onComplete?: (error: any) => void optional

public setPriority(priority: number, onComplete?: (error: any) => void)

Parameters

  • priority: number
  • onComplete?: (error: any) => void optional

public setWithPriority(value: any, priority: string, onComplete?: (error: any) => void)

Parameters

  • value: any
  • priority: string
  • onComplete?: (error: any) => void optional

public setWithPriority(value: any, priority: number, onComplete?: (error: any) => void)

Parameters

  • value: any
  • priority: number
  • onComplete?: (error: any) => void optional

public startAt(priority?: string, name?: string): IFirebaseQuery

Parameters

  • priority?: string optional
  • name?: string optional

Returns

IFirebaseQuery

public startAt(priority?: number, name?: string): IFirebaseQuery

Parameters

  • priority?: number optional
  • name?: string optional

Returns

IFirebaseQuery

public toString(): string

Returns

string

public transaction(updateFunction: (currentData: any) => any, onComplete?: (error: any, committed: boolean, snapshot: IFirebaseDataSnapshot) => void, applyLocally?: boolean)

Parameters

  • updateFunction: (currentData: any) => any
  • onComplete?: (error: any, committed: boolean, snapshot: IFirebaseDataSnapshot) => void optional
  • applyLocally?: boolean optional

public unauth()

public update(value: any, onComplete?: (error: any) => void)

Parameters

  • value: any
  • onComplete?: (error: any) => void optional