From 584a1514ac5e3924f414b5065546402a3d5c8321 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Tue, 22 Sep 2020 13:58:33 +0200 Subject: [PATCH] Add getItemData --- projects/common/src/fm/services/item.service.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 85ef594..5a8e497 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -55,6 +55,14 @@ export class ItemService { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}`); } + getItemData(code: string,limit?:number): Observable { + var params = new HttpParams(); + if(limit) { + params.append("limit", limit.toFixed(0)); + } + return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}/data`,{ params: params }); + } + getItemByCodeAndType(code: string, itemType: string): Observable { return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`); }