[!WARNING] Deprecated. This package is deprecated. Look out for the new project Showpare Composable Frontends.
Direct replacement of this package is @shopware/api-client package
See compatibility with Shopware 6 in our docs
Using yarn:
$ yarn add @shopware-pwa/shopware-6-client
A simple example of how to use API client to connect with your Shopware instance.
In main project file setup connection informations.
import { setup } from "@shopware-pwa/shopware-6-client";
setup({
endpoint: "https://address-to-my-shopware-instance.com",
accessToken: "myaccesstoken",
});
And then anywhere in your project, you can use API Client methods:
import { getCategories } from "@shopware-pwa/shopware-6-client"
// later in component
async mounted() {
this.categories = await getCategories();
}