🚧Setup

To use this library, you can choose between two methods. If your project supports NestJs injection, you can choose to inject the client or simply use it via a classic import in a project without injection.

With NestJs injection

In the desired module, you must import VidalModule and configure it

// for example : app.module.ts

import { VidalModule } from '@monordo/json-vidal-client';

@Module({
    imports: [VidalModule.forRoot({
        auth: {
            clientId: "*******",
            clientSecret: "*********"
        }
    })]
})
export class AppModule {}

Now you can use VidalClient in desired module providers

Without NestJs injection

import { vidalClient } from '@monordo/json-vidal-client';

(async () => {
    const { client } = await vidalClient({
        auth: {
            clientId: '*********',
            clientSecret: '********************',
        }
    });
})();

Last updated