Class CustomEndPointService

Hierarchy

  • CustomEndPointService

Constructors

Properties

Methods

Constructors

  • A constructor function that takes in an optional parameter of app. If app is passed in, it sets the appRef to the app. If app is not passed in, it sets the appRef to the default app.

    Parameters

    • Optional app: FirebaseApp

      FirebaseApp - This is the FirebaseApp instance that you want to use. If you don't pass one in, it will use the default FirebaseApp instance.

    Returns CustomEndPointService

Properties

appRef: FirebaseApp
response: any

Methods

  • A function that handles errors.

    Returns

    A custom response object that contains the response, message, description and status code.

    Parameters

    • error: any

      any - The error object that was thrown by the service.

    Returns CustomEndPointResponse<any>

  • Calling Cloud functions as custom end point It takes an endpoint, payload and options as arguments and returns a promise that resolves to a custom endpoint response

    Returns

    A promise that resolves to a CustomEndPointResponse

    Parameters

    • endpoint: string

      The name of the endpoint you want to call.

    • payload: any = {}

      This is the data you want to send to the cloud function.

    Returns Promise<CustomEndPointResponse<any>>

  • This method is used to get token.

    Returns

    string

    Returns Promise<undefined | string>

Generated using TypeDoc