priceparrot / priceparrot
Price Parrot 是一种竞争对手价格监控服务。
v1.3.3
2024-06-09 19:57 UTC
Requires
- php: >=7.1.0
- ext-curl: *
README
关于API
我们认为自动化对于任何现代企业都至关重要。因此,我们为提供的每个包都包括免费的API访问。我们的Web API基于REST(表示状态传输)协议和JSON(JavaScript对象表示法)对象。您可以将Price Parrot的竞争对手价格和价格建议简单地集成到您的电子商务软件中,例如Shopify、Magento、Opencart或CSCart。
为什么你可能需要它
在电子商务中,保持价格变动与市场同步至关重要。定价过高可能导致客户流失到竞争对手,而定价过低可能导致收入损失。我们的价格监控器确保您的定价始终与市场保持最新。
订阅免费试用
订阅 现在可享受14天的免费试用。请访问我们的网站获取更多信息。
安装与加载
代码也通过Composer提供,这是安装Price Parrot API的推荐方式。只需将以下行添加到您的composer.json
文件中
"priceparrot/priceparrot": "^1"
或运行
composer require priceparrot/priceparrot
请注意,vendor
文件夹和vendor/autoload.php
脚本是由Composer生成的;它们不是Price Parrot的一部分。
一个简单的示例
<?php //Import Price Parrot classes into the global namespace //These must be at the top of your script, not inside a function use PriceParrot\PriceParrotClient; //Load Composer's autoloader require 'vendor/autoload.php'; //Create an instance with api key and secret (find these here https://backend.priceparrot.io/api) $priceparrot = new PriceParrotClient($apikey, $secret); try { $product = $priceparrot->FetchProduct('123'); echo '<pre>' . print_r($product, true) . '</pre>'; } catch (Exception $e) { echo "There was a problem loading the product"; }