0.0.4 • Published 7 years ago
ngx-snelstart-b2b-client v0.0.4
Angular library for connecting with the SnelStart B2B API.
Usage
- Add to your project
$ npm install ngx-snelstart-b2b-client --save
- Add to the imports of your root (app) module:
imports: [
...
B2bClientModule.forRoot(),
...
]
- Inject the service:
private client: B2bClientService
- Configure:
let config = new B2bConfig(this.subscriptionKey, this.koppelSleutel);
this.client = new B2bClientService(config);
Get your subscription key by applying for the SnelStart B2B API. Remember! Your subscription key is a secret, so make sure you're not storing this in a public place. Ideally you are running this web application server side with Angular Universal. 5. Authorize koppelingSleutels:
this.client.authorize()
.subscribe(() => {});
- Start using:
this.relaties = this.client.get("/relaties")
.map((res: Response) => res.json())