signifly/shopify-php-sdk
最新稳定版本:v0.4.1
Composer 安装命令:
composer require signifly/shopify-php-sdk
包简介
Shopify PHP SDK
README 文档
README
The signifly/shopify-php-sdk package allows you to easily make requests to the Shopify API.
Below is a small example of how to use it with the CredentialsProfile.
use Signifly\Shopify\Shopify; use Signifly\Shopify\Profiles\CredentialsProfile; $shopify = new Shopify( new CredentialsProfile( env('SHOPIFY_API_KEY'), env('SHOPIFY_PASSWORD'), env('SHOPIFY_DOMAIN'), env('SHOPIFY_API_VERSION') ) ); // Retrieve a list of products $shopify->products()->all(); // returns a collection of ProductResource // Count all products $shopify->products()->count(); // Find a product $resource = $shopify->products()->find($id); // returns a ProductResource // Update a product $shopify->products()->update($id, $data); // returns a ProductResource // Delete a product $shopify->products()->destroy($id);
Documentation
To get started follow the installation instructions below.
Installation
You can install the package via composer:
$ composer require signifly/shopify-php-sdk
Reference
A list of the available methods on the Shopify API client. The examples below assumes you have knowledge of how to make valid requests to the Shopify API.
If you want to learn more about what options are available when making a request, please refer to Shopify's documentation.
Products
Retrieve a list of products
$shopify->products()->all([ 'page' => 1, 'limit' => 250, ]); // returns a collection of ProductResource
NOTE: There's a max limit of 250 items per request.
Retrieve a count of products
$shopify->products()->count(); // returns an integer
Retrieve a single product
$shopify->products()->find(123456789); // returns a ProductResource
Create a new product
$shopify->products()->create([ 'title' => 'Burton Custom Freestyle 151', 'body_html' => '<strong>Good snowboard!</strong>', 'vendor' => 'Burton', 'product_type' => 'Snowboard', 'tags' => 'Barnes & Noble, John\'s Fav, "Big Air"', ]); // returns a ProductResource
Update a product
$shopify->products()->update(123456789, [ 'title' => 'An updated title', ]); // returns a ProductResource
Delete a product
$shopify->products()->destroy(123456789); // returns void
Testing
$ composer test
Security
If you discover any security issues, please email dev@signifly.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
signifly/shopify-php-sdk 适用场景与选型建议
signifly/shopify-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.24k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2018 年 01 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 signifly/shopify-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 signifly/shopify-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-29