GitHub

DaffInMemoryProductService

The product inmemory driver to mock the product backend service.

import { DaffInMemoryProductService } from '@daffodil/product/driver/in-memory'
@Injectable()
class DaffInMemoryProductService extends DaffInMemoryDriverBase implements DaffProductServiceInterface {
  getAll(): Observable<DaffProduct[]>
  getBestSellers(): Observable<DaffProduct[]>
  get(productId: string): Observable<DaffProductDriverResponse>
  getByUrl(url: string): Observable<DaffProductDriverResponse>
}

Properties

Name Type Description
getAll Observable<DaffProduct[]>

Get all products.

getBestSellers Observable<DaffProduct[]>

Get best selling products.

get Observable<DaffProductDriverResponse>

Get a product by Id.

getByUrl Observable<DaffProductDriverResponse>

Get a product by URL.