rothrauff-consulting / laravel-shopify
A Laravel wrapper for the Shopify API.
Requires
- php: ^7.1
- illuminate/support: ^5.7|^5.8|^6.0|^7.0
- rothrauff-consulting/shopify: ^1.0.0
Requires (Dev)
- orchestra/testbench: 3.8.*
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2023-05-12 00:14:51 UTC
README
Currently supports versions 2019-10, 2020-01, and 2020-04 of the REST Admin API, and will support all released versions.
Installation
You can install the package via composer:
composer require rothrauff-consulting/laravel-shopify
Usage
Setup the environmental variables:
SHOPIFY_SHOP= SHOPIFY_APP_API_KEY= SHOPIFY_APP_PASSWORD=
Optionally:
SHOPIFY_API_VERSION=
There is a retry mechanism that allows you to set how many retries, and how long to wait before retrying:
SHOPIFY_RETRY_COUNT=
SHOPIFY_TIMEOUT_SECONDS=
Use Shopify; Shopify::get('products'); Shopify::get('products', ['fields' => 'id,title']); Shopify::post('products', [ 'product' => [ //new product ] ]); Shopify::put('products/{id}', [ 'product' => [ //update product ] ]); Shopify::delete('products/{id}');
Some delete requests require parameters, e.g., themes:
Shopify::delete('themes/{theme_id}/assets', ['asset[key]' => 'asset_key']);
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email developers@rothrauffconsulting.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.