iqomp / jubelio
Jubelio API
1.0.0
2021-08-27 05:30 UTC
Requires
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-27 12:22:57 UTC
README
生成的jubelio API。
安装
composer require iqomp/jubelio
使用
您可以使用类 Iqomp\Jubelio\Jubelio
来与Jubelio API交互。
<?php use Iqomp\Jubelio\Jubelio; $jubelio = new Jubelio('email@host', 'account-password'); // get login token // special method, no need to provide body $token = $jubelio->Authentication->Login(); // get all products // https://docs.jubelio.com/#operation/getInventoryItems // first args is the query string $products = $jubelio->Product->GetAllProductGroups([ 'page' => 1, 'pageSize' => 12, // ... ]); // get single product variant // https://api.jubelio.com/inventory/items/{id} // first argument is URL parameter. $variant = $jublio->Product->GetProduct(1);
对于方法 Authentication->Login
,无需添加任何参数。
每个 collection->method
函数接受以下参数
- URL参数 仅在 URL需要某些参数时使用。
- PUT/POST/DELETE方法的请求体。是的,Jubelio接受
DELETE
方法的请求体。并且 仅在 请求期望某些请求体时使用。 - 请求查询字符串 仅在 操作期望某些查询字符串时使用。