mrstebo / ekm-php

我们的新API允许合作伙伴构建与EKM平台显著更好的集成。要尝试以下端点,或查看请求/响应模型的最新完整表示,请参阅[swagger页面](https://api.ekm.net/swagger/index.html)。(我们在此处显示示例,但swagger页面保证显示完整的模型。)

0.0.4 2021-12-22 16:10 UTC

This package is auto-updated.

Last update: 2024-09-22 21:52:23 UTC


README

我们的新API允许合作伙伴构建与EKM平台显著更好的集成。

要尝试以下端点,或查看请求/响应模型的最新完整表示,请参阅swagger页面。(我们在此处显示示例,但swagger页面保证显示完整的模型。)

要了解最新更新,请参阅我们的RSS源合作伙伴仪表板

有关更多信息,请访问https://ekm.com

安装与使用

要求

PHP 7.3及更高版本。也应在PHP 8.0上工作,但尚未测试。

Composer

要使用Composer安装绑定,请将以下内容添加到composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mrstebo/ekm-php.git"
    }
  ],
  "require": {
    "mrstebo/ekm-php": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/ekm-php/vendor/autoload.php');

入门

请按照安装过程进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: Bearer
$config = EkmPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new EkmPHP\Api\CategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$v1AddCategory = new \EkmPHP\Models\V1AddCategory(); // \EkmPHP\Models\V1AddCategory

try {
    $result = $apiInstance->categoriesCreate($v1AddCategory);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoriesApi->categoriesCreate: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI均相对于https://api.ekm.net

模型

授权

Bearer

  • 类型: OAuth
  • 流程: accessCode
  • 授权URL: https://api.ekm.net/connect/authorize
  • 作用域:
    • openid: 访问商店的身份令牌。
    • profile: 读取用户的详细信息。(姓名,电子邮件等)
    • tempest.internal.orders.read: 内部 - 读取商店的订单。
    • tempest.customers.read: 读取商店的客户。
    • tempest.customers.write: 修改商店的客户。
    • tempest.Guests.read: 读取商店的访客。
    • tempest.Guests.write: 修改商店的访客。
    • tempest.orders.read: 读取商店的订单。
    • tempest.orders.write: 修改商店的订单。
    • tempest.orders.customers.notes.read: 读取商店的订单客户备注。
    • tempest.orders.customers.notes.write: 修改商店的订单客户备注。
    • tempest.products.read: 读取商店的产品。
    • tempest.products.write: 修改商店的产品。
    • tempest.categories.read: 读取商店的类别。
    • tempest.categories.write: 修改商店的类别。
    • tempest.settings.orderstatuses.read: 读取商店的订单状态。
    • tempest.settings.domains.read: 读取商店的域名。
    • tempest.settings.accountdetails.read: 读取商店的账户详情。
    • tempest.settings.tax.read: 读取商店的税设置。
    • tempest.settings.tax.write: 写入商店的税设置。
    • tempest.settings.currency.read: 读取商店的货币设置。
    • tempest.cartsessions.read: 读取商店的购物车会话。
    • tempest.cartsessions.write: 修改商店的购物车会话。
    • tempest.cart.read: 读取商店的购物车。
    • tempest.cart.write: 修改商店的购物车。

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

api-support@ekm.com

关于本包

此PHP包是由OpenAPI Generator项目自动生成的。

  • API版本: 最新版
    • 包版本: 0.0.4
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen