Function callDonationAlertsApiRaw

  • Makes a raw HTTP call to the Donation Alerts API with the given options and returns the raw Response object.

    Parameters

    • options: DonationAlertsApiCallOptions

      The configuration of the API call, such as URL, method, query parameters, and body.

    • OptionalaccessToken: string

      The OAuth access token to authorize the request. If not provided, the request may fail unless the endpoint does not require authentication.

    • fetchOptions: DonationAlertsCallFetchOptions = {}

      Additional configuration for the Fetch API, such as credentials, cache, etc.

    Returns Promise<Response>

    A promise resolving to the raw Response object from the Fetch API.

    This function is a low-level utility for interacting with the Donation Alerts API. It constructs the request, appends query parameters and headers (including authorization), and sends the request using the Fetch API. Use this function if you need access to the full response object, including headers, status, etc.

    const response = await callDonationAlertsApiRaw(
    { url: 'user/oauth', type: 'api' },
    'your-access-token'
    );
    console.log(await response.json()); // Logs the response body