@edirect/dynamics
v9.0.3
Published
Dynamics Module
Downloads
119
Maintainers
Keywords
Readme
@edirect/dynamics
The EDirectInsure Dynamics Module.
Installation
$ npm i --save @edirect/dynamics
Usage
# .YOUR_ENVIRONMENT.env
DYNAMICS_TOKEN_URL="https://login.windows.net/YOUR_TENANT/oauth2/token"
DYNAMICS_CLIENT_ID="YOUR_CLIENT_ID"
DYNAMICS_USER_NAME="YOUR_USER_NAME"
DYNAMICS_PASSWORD="YOUR_DYNAMICS_PASSWORD"
DYNAMICS_RESOURCE="YOUR_RESOURCE_URL"
DYNAMICS_ENABLED="true/false"
// app.module.ts
import { Module } from '@nestjs/common';
import { DynamicsModule } from '@edirect/dynamics';
@Module({
imports: [DynamicsModule],
...
})
export class AppModule {}
// cats.controller.ts
import { Controller } from '@nestjs/common';
import { DynamicsService } from '@edirect/dynamics';
@Controller('cats')
export class CatsController {
constructor(private readonly dynamicsService: DynamicsService) {}
postSomethingToDynamics(): Promise<any> {
return this.dynamicsService
.post('YOUR_URL', { YOUR_ATTRIBUTE: 'YOUR_VALUE' })
}
}