anubhavpsit/aniphp-shopify
最新稳定版本:v1.0.0
Composer 安装命令:
composer require anubhavpsit/aniphp-shopify
包简介
PHP library for the Shopify API
README 文档
README
Getting started
<?php require 'vendor/autoload.php'; use Shopify\ShopifyClient; $client = new ShopifyClient($access_token, "yourshop.myshopify.com"); $products = $client->products->readList();
Creating orders
$newOrder = ['line_items' => [['title' => 'cool', 'price' => 4]]]; $response = $client->orders->create($newOrder);
Reading orders
$response = $client->orders->read($orderId); $object = $response->parsedResponse();
$orders = $client->orders->readList(); foreach ($order in $orders->parsedResponse()) { var_dump($order->id); }
Updating orders
$response = $client->orders->update($orderId, ["note" => "cool order"]);
Counting open orders
$response = $client->orders->readCount(["status" => "open"]);
Deleting orders
$response = $client->orders->delete($orderId);
Testing phpunit
phpunit
Running PHP CodeSniffer
./vendor/bin/phpcs ./src/ --standard=PSR2 ./vendor/bin/phpcs ./test/ --standard=PSR2
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-02