Add getItemData
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
ff4eb296ff
commit
584a1514ac
@ -55,6 +55,14 @@ export class ItemService {
|
|||||||
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getItemData(code: string,limit?:number): Observable<ArrayBuffer> {
|
||||||
|
var params = new HttpParams();
|
||||||
|
if(limit) {
|
||||||
|
params.append("limit", limit.toFixed(0));
|
||||||
|
}
|
||||||
|
return this.httpClient.get<ArrayBuffer>(`${this.ApiEndpoint()}/api/v1/items/${code}/data`,{ params: params });
|
||||||
|
}
|
||||||
|
|
||||||
getItemByCodeAndType(code: string, itemType: string): Observable<IItem> {
|
getItemByCodeAndType(code: string, itemType: string): Observable<IItem> {
|
||||||
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user