1.0.0 • Published 11 months ago
ng-rebrickable v1.0.0
NgRebrickable
NgRebrickable is a TypeScript library to use Rebrickable API for Angular
Installation
Use npm
or yarn
to install in your project
npm install ng-rebrickable
or
yarn add ng-rebrickable
Usage
- Add module to your app module
import {RebrickableModule} from 'ng-rebrickable';
@NgModule({
imports: [
RebrickableModule.forRoot({
apiKey: 'your-rebrickable-api-key', // mandatory
debug: true, // optional (need to change console level to verbose)
})
]
})
export class AppModule {
}
- Use service anywhere in your app
import {Component} from '@angular/core';
@Component({...})
export class AppComponent {
constructor(private readonly rebrickableService: RebrickableService) {
}
colors$ = this.rebrickableService.colors({
page: 1,
page_size: 10,
ordering: {
type: 'DESC',
fields: ['array of fields']
}
});
}
1.0.0
11 months ago
0.0.1-alpha
11 months ago