alekseon/yuppim-api-v1-php-sdk
Composer 安装命令:
composer require alekseon/yuppim-api-v1-php-sdk
包简介
Yuppim Api PHP SDK
README 文档
README
It is an official PHP SDK for Yuppim PHP API v1.
Getting started
In order to use this library you need to have at least PHP 7.0 version.
Use Composer
You will need to download Yuppim PHP SDK using Composer:
composer require alekseon/yuppim-api-v1-php-sdk
If you are not familiar with Composer, learn about it here.
Usage examples
In the given example you will see how to initiate selected API and a actions which are available:
- Get single product by ID
- Get array of products
- Get array of manufacturers
- Get array of suppliers
// get single product $productApi = (new \YuppimApi\Yuppim('your-token'))->product(); $product = $productApi->get($productId); // get all of products, deafult limit is 100 products in one response $productsApi = (new \YuppimApi\Yuppim('your-token'))->products(); $products = $productsApi->get(); // get products with pagination $productsApi = (new \YuppimApi\Yuppim('your-token'))->products(); $productsApi->setLimit($limit); $productsApi->setPage($page); $products = $productsApi->get(); // get products filtered $productsApi = (new \YuppimApi\Yuppim('your-token'))->products(); $productsApi->addFilter($field, $operator, $value); $products = $productsApi->get(); // get manufacturers list $manufacturersApi = (new \YuppimApi\Yuppim('your-token'))->manufacturers(); $manufactreres = $manufacturersApi->get(); // get suppliers list $suppliersApi = (new \YuppimApi\Yuppim('your-token'))->suppliers(); $suppliers = $suppliersApi->get();
Product filters
Fields allowed to filter are:
- Nazwa
- Nazwa_lub_identyfikator
- Numer_katalogowy
- Cena_obowiazuje_od
- Data_dodania
- Data_modyfikacji
- Producent
- Dostawca
The supported operators are:
- "="
- ">"
- "<"
- "!="
- "IN"
- "CONTAINS"
- "STARTS WITH"
- "MATCH"
Note: Not all operators are available for all reference fileds.
// get products filtered example $productsApi = (new \YuppimApi\Yuppim('your-token'))->products(); $productsApi->addFilter('Data_dodania', '>', '2020-01-01 00:00:00'); $productsApi->addFilter('Dostawca', 'IN', ['Dostawca_X', 'Dostawca_Y']); $product = $productsApi->get();
Support and Feedback
In case you find any bugs, submit an issue directly here in GitHub.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-21