Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 861 Bytes

README.md

File metadata and controls

48 lines (35 loc) · 861 Bytes

Documents (Pósthólf)

About

This library implements a client to use Documents APIs

Import into other NestJS modules

Add the service to your module imports:

import {
  DocumentsClientModule,
} from '@island.is/clients/documents'

@Module({
  imports: [
    DocumentsClientModule.register({
      basePath: BASE_PATH,
      clientId: CLIENT_ID,
      clientSecret: CLIENT_SECRET,
      tokenUrl: TOKEN_URL,
    }),
  ],
})

Then you'll have access to DocumentClient APIs:

import { DocumentClient } from '@island.is/clients/documents'

@Injectable()
export class SomeService {
   constructor(
    @Inject(DocumentClient)
    private readonly documentClient: DocumentClient,
  ) {}

    // ....
  }
}

Code owners and maintainers