mennen-online / shopware5-api-connector
A Shopware 5 API Connector for Laravel Applications
Fund package maintenance!
hmennen90
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.4
- illuminate/support: ^9.17
- mennen-online/laravel-response-models: ^2.0
Requires (Dev)
- brianium/paratest: ^6.6
- nunomaduro/collision: ^6.2
- orchestra/testbench: ^7.11
- dev-master
- 1.2.0
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- dev-19-map-models-also-when-accessing-through-endpoint
- dev-15-prevent-fatal-error-on-non-existing-total-property-in-response
- dev-13-initialization-with-url-username-and-password-doesnt-work
- dev-11-remove-update-change-log-workflow
- dev-9-add-changelog
- dev-4-implement-models-for-each-type-of-endpoint
- dev-5-implement-endpoints-as-facades-for-better-accessibility
- dev-3-get-method-has-to-use-integer-or-string-as-parameter
- dev-1-upgrade-laravel-response-models-dependency
This package is auto-updated.
Last update: 2024-12-20 00:21:59 UTC
README
Description
A Connector for Shopware 5 API in Laravel Applications.
Installation
Install it through composer:
composer require mennen-online/shopware5-api-connector
Run:
php artisan vendor:publish --provider=Shopware5ApiConnectorServiceProvider
Usage
To connect a single Shop, add to your .env the following Keys:
SW5_HOST=<URL TO SHOP>
SW5_USERNAME=<USERNAME>
SW5_PASSWORD=<PASSWORD>
It is also Possible to call the connector with following scheme e.g. authentication:
use MennenOnline\Shopware5ApiConnector\Endpoints\Endpoint; use MennenOnline\Shopware5ApiConnector\Enums\EndpointEnum; $instance = new Endpoint( url: 'http://your-shop.url', username: 'your-username', password: 'your-password', endpoint: EndpointEnum::ARTICLES );
For more flexible usage, it is now possible, to use Facades:
use MennenOnline\Shopware5ApiConnector\Facades\AddressFacade; $instance = AddressFacade::initialize( url: 'http://your-shop.url', username: 'your-username', password: 'your-password' )
This will return a Instance of Shopware5ApiConnector with loaded Address Endpoint.
Endpoints
case ADDRESSES; case ARTICLES; case CACHE; case CATEGORIES; case COUNTRIES; case CUSTOMERS; case CUSTOMER_GROUPS; case GENERATE_ARTICLE_IMAGES; case MANUFACTURERS; case MEDIA; case ORDERS; case PAYMENT_METHODS; case PROPERTY_GROUPS; case SHOPS; case TRANSLATIONS; case USERS; case VARIANTS; case VERSION;
Facades
use MennenOnline\Shopware5ApiConnector\Facades\AddressFacade; use MennenOnline\Shopware5ApiConnector\Facades\ArticleFacade; use MennenOnline\Shopware5ApiConnector\Facades\CacheFacade; use MennenOnline\Shopware5ApiConnector\Facades\CountryFacade; use MennenOnline\Shopware5ApiConnector\Facades\CustomerFacade; use MennenOnline\Shopware5ApiConnector\Facades\CustomerGroupFacade; use MennenOnline\Shopware5ApiConnector\Facades\GenerateArticleImageFacade; use MennenOnline\Shopware5ApiConnector\Facades\ManufacturerFacade; use MennenOnline\Shopware5ApiConnector\Facades\OrderFacade; use MennenOnline\Shopware5ApiConnector\Facades\PaymentMethodFacade; use MennenOnline\Shopware5ApiConnector\Facades\PropertyGroupFacade; use MennenOnline\Shopware5ApiConnector\Facades\ShopFacade; use MennenOnline\Shopware5ApiConnector\Facades\VariantFacade; use MennenOnline\Shopware5ApiConnector\Facades\VersionFacade;