mrstebo / ekm-php
我们的新API允许合作伙伴构建与EKM平台显著更好的集成。要尝试以下端点,或查看请求/响应模型的最新完整表示,请参阅[swagger页面](https://api.ekm.net/swagger/index.html)。(我们在此处显示示例,但swagger页面保证显示完整的模型。)
0.0.4
2021-12-22 16:10 UTC
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
README
我们的新API允许合作伙伴构建与EKM平台显著更好的集成。
要尝试以下端点,或查看请求/响应模型的最新完整表示,请参阅swagger页面。(我们在此处显示示例,但swagger页面保证显示完整的模型。)
有关更多信息,请访问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
模型
- CountryCodeModel
- CurrencySettings
- DeliveryTax
- Plan
- PlanRestriction
- ShopInformation
- TaxRateModel
- TaxSettings
- TempestLink
- TempestResponseCurrencySettings
- TempestResponseListPlan
- TempestResponseListTaxRateModel
- TempestResponseListV1Category
- TempestResponseListV1Customer
- TempestResponseListV1CustomerAddress
- TempestResponseListV1Product
- TempestResponseListV1ProductAttribute
- TempestResponseListV1ProductAttributeItem
- TempestResponseListV1ProductOption
- TempestResponseListV1ProductVariant
- TempestResponseListV1SubCategory
- TempestResponseListV1WebPage
- TempestResponseListV1WebPageGroup
- TempestResponseListV2Order
- TempestResponseListV2OrderCustomField
- TempestResponseListV2OrderItem
- TempestResponseListV2ProductMedia
- TempestResponseListV2WebhookSubscription
- TempestResponsePlan
- TempestResponseShopInformation
- TempestResponseTaxRateModel
- TempestResponseTaxSettings
- TempestResponseTempestValidationError
- TempestResponseV1Category
- TempestResponseV1CategoryFilters
- TempestResponseV1Customer
- TempestResponseV1CustomerAddress
- TempestResponseV1DomainName
- TempestResponseV1OrderStatuses
- TempestResponseV1Product
- TempestResponseV1ProductAttribute
- TempestResponseV1ProductAttributeItem
- TempestResponseV1ProductCategory
- TempestResponseV1ProductImages
- TempestResponseV1ProductOption
- TempestResponseV1ProductOptionItem
- TempestResponseV1ProductStock
- TempestResponseV1ProductVariant
- TempestResponseV1ProductVariantStock
- TempestResponseV1SubCategory
- TempestResponseV1WebPage
- TempestResponseV1WebPageGroup
- TempestResponseV2Order
- TempestResponseV2OrderItem
- TempestResponseV2WebhookSubscription
- TempestValidationError
- V1AddCategory
- V1AddCustomer
- V1AddProduct
- V1AddProductOption
- V1AddWebPage
- V1AddWebPageGroup
- V1Category
- V1CategoryFilters
- V1Customer
- V1CustomerAddress
- V1DomainName
- V1OrderCustomerDetails
- V1OrderDeliveryTracking
- V1OrderStatus
- V1OrderStatusSetting
- V1OrderStatuses
- V1Product
- V1ProductAttribute
- V1ProductAttributeItem
- V1ProductCategory
- V1ProductImage
- 产品图片V1
- 产品选项V1
- 产品选项项V1
- 产品库存V1
- 产品变体V1
- 产品变体库存V1
- 发货地址V1
- 子类别V1
- 更新类别V1
- 更新客户V1
- 更新产品V1
- 更新产品选项V1
- 更新网页V1
- 更新网页组V1
- 变体组合V1
- 网页V1
- 网页组V1
- 添加产品媒体图片V2
- 添加Webhook订阅V2
- 订单V2
- 订单自定义字段V2
- 订单自定义字段内容V2
- 订单内部备注V2
- 订单项目V2
- 产品媒体V2
- 产品媒体图片V2
- 产品媒体视频V2
- 更新Webhook订阅V2
- Webhook订阅V2
授权
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
作者
关于本包
此PHP包是由OpenAPI Generator项目自动生成的。
- API版本:
最新版
- 包版本:
0.0.4
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen