filipsedivy/dropshippingcz

Dropshipping.cz - PHP客户端

0.2 2018-09-01 13:08 UTC

This package is auto-updated.

Last update: 2024-08-27 15:02:52 UTC


README

Dropshipping

简介

这是一个映射Dropshipping.cz API的库。

安装

推荐通过Composer进行安装。

composer require filipsedivy/dropshippingcz

它需要PHP版本7.1,并支持PHP 7.2及更高版本。

使用

$apiConfig = new FilipSedivy\DropshippingCz\Model\ApiConfig('token');
$client = new FilipSedivy\DropshippingCz\Client($apiConfig);

服务

所有服务都位于src/Services文件夹中

$client->getEshops()
$client->getProducts()
$client->getPayments()
$client->getDeliveries()
$client->getOrder()
$client->getOrders()

HttpResponse对象

HttpResponse对象负责从API返回数据。允许

  • 对数据进行集合和实体操作
  • 处理原始数据
  • 转换为数组

HttpResponse对象方法列表

示例

获取网店列表

$arrayList = $client->getEshops()->getList()->toArray();
$collection = $client->getEshops()->getList()->toCollection();

待办事项

  • HttpResponse
    • 多级映射/创建子实体、集合
    • 映射POST响应
  • Services/Orders
    • 完成sendOrder(...)方法
  • Entity/Services/...
    • 完整的PHPDoc
    • 创建实体注解
    • 严格的数据类型
    • 完成IEntity->toArray()方法:(

捐赠

有库帮助您或使您的工作更轻松吗?如果您贡献PR或甚至财务支持,我将非常高兴。多亏了这些帖子,这个库可以成长并简化工作。