• A Weenie function that returns a named API client.

    Since there may be multiple API clients in an application, using this function may not be as straightforward as other weenie functions. Below is a typical example:

    import { Weenie, apiClient, logger } from '@wymp/weenie-framework';
    import { config } from './config';

    const deps = Weenie({ config })
    .and(logger)
    .and((d) => apiClient({
    log: d.log,
    config: {
    name: 'myApi' as const,
    env: d.config.env,
    ...d.config.myApi,
    },
    }))
    .done((d) => d);

    Type Parameters

    • Name extends string

    Parameters

    Returns {}

    Generated using TypeDoc