I found an API library for Woocommerce and trying to integrate it in Angular.
for fetching categories it looks like this line is needed.
const json = await WooWorker.getCategories();
My service looks like this:
import { WooWorker } from "api-ecommerce";
GetAllUsers(): Observable<any> {
return this.http.get(`${BASEURL}/categories`);
}
I need to replace this part return this.http.get(
${BASEURL}/categories);
with this const json = await WooWorker.getCategories();
since API uses the second way. How will be correct to do it with observable?