ng-rebrickable
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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']
    }
  });
}

Package Sidebar

Install

npm i ng-rebrickable

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

222 kB

Total Files

116

Last publish

Collaborators

  • christianopaets