mrstebo/ekm-php
Composer 安装命令:
composer require mrstebo/ekm-php
包简介
Our new API allows partners to build significantly better integrations with the EKM platform. To try out the below endpoints, or for full up to date representations of the request / response models, please see the [swagger page](https://api.ekm.net/swagger/index.html). (We display examples here,
README 文档
README
Our new API allows partners to build significantly better integrations with the EKM platform.
To try out the below endpoints, or for full up to date representations of the request / response models, please see the swagger page. (We display examples here, but the swagger page is guaranteed to show the complete model.)
To keep up to date with the latest updates, please see our RSS feed or the partner dashboard.
For more information, please visit https://ekm.com.
Installation & Usage
Requirements
PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mrstebo/ekm-php.git"
}
],
"require": {
"mrstebo/ekm-php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/ekm-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?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 Endpoints
All URIs are relative to https://api.ekm.net
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CategoriesApi | categoriesCreate | POST /api/v1/categories | Add a category |
| CategoriesApi | categoriesDelete | DELETE /api/v1/categories/{id} | Delete a category |
| CategoriesApi | categoriesDeleteCategoryManaged | DELETE /api/v1/categories/{id}/categorymanaged/{childCategoryId} | Stops a category from being managed by another category |
| CategoriesApi | categoriesGet | GET /api/v1/categories/{id} | Get a category |
| CategoriesApi | categoriesGetAll | GET /api/v1/categories | Get a paginated set of categories |
| CategoriesApi | categoriesGetCategoryFilters | GET /api/v1/categories/{id}/filters | |
| CategoriesApi | categoriesSearch | GET /api/v1/categories/search | Searches categories based on search criteria |
| CategoriesApi | categoriesSetCategoryManaged | POST /api/v1/categories/{id}/categorymanaged/{childCategoryId} | Set a category to be managed by another category |
| CategoriesApi | categoriesSubcategories | GET /api/v1/categories/{id}/subcategories | Get a paginated set of subcategories |
| CategoriesApi | categoriesUpdate | PUT /api/v1/categories/{id} | Update a category |
| CategoriesApi | categoriesUpdateCategoryFilters | PUT /api/v1/categories/{id}/filters | |
| CurrencyApi | currencyGetCurrency | GET /api/v1/settings/currency | Gets the current Currency Settings |
| CustomerAddressesApi | customerAddressesCreate | POST /api/v1/customers/{customerId}/addresses | Add a Customer Address |
| CustomerAddressesApi | customerAddressesDelete | DELETE /api/v1/customers/{customerId}/addresses/{addressId} | Delete a Customer Address |
| CustomerAddressesApi | customerAddressesGetAll | GET /api/v1/customers/{customerId}/addresses | Get a paginated set of Customer Addresses |
| CustomerAddressesApi | customerAddressesGetById | GET /api/v1/customers/{customerId}/addresses/{addressId} | Get a single Customer Address by Id |
| CustomerAddressesApi | customerAddressesSearch | GET /api/v1/customers/{customerId}/addresses/search | Searches customer addresses based on search criteria |
| CustomerAddressesApi | customerAddressesUpdate | PUT /api/v1/customers/{customerId}/addresses/{addressId} | Update a Customer Address |
| CustomersApi | customersCreate | POST /api/v1/customers | Add a customer |
| CustomersApi | customersDelete | DELETE /api/v1/customers/{id} | Delete a Customer |
| CustomersApi | customersGetAll | GET /api/v1/customers | Get a paginated set of Customers |
| CustomersApi | customersGetById | GET /api/v1/customers/{id} | Get a single Customer by Id |
| CustomersApi | customersSearch | GET /api/v1/customers/search | Searches customers based on search criteria |
| CustomersApi | customersUpdate | PUT /api/v1/customers/{id} | Update a Customer |
| DomainsApi | domainsGetPrimaryDomain | GET /api/v1/settings/domains | Get the current Primary Domain |
| OrderStatusesApi | orderStatusesGetOrderStatuses | GET /api/v1/settings/orderstatuses | Get the current Order Statuses |
| OrdersApi | ordersGetAll | GET /api/v2/orders | Get a paginated set of orders |
| OrdersApi | ordersGetById | GET /api/v2/orders/{id} | Get an order by ID |
| OrdersApi | ordersGetCustomFields | GET /api/v2/orders/{id}/customFields | Get custom fields for an order |
| OrdersApi | ordersGetItems | GET /api/v2/orders/{id}/items | Get an order's items |
| OrdersApi | ordersGetOrderItemById | GET /api/v2/orders/{id}/items/{itemId} | Get a specific item from an order |
| OrdersApi | ordersSearch | GET /api/v2/orders/search | Searches orders based on search criteria |
| OrdersApi | ordersUpdateDeliveryTracking | PUT /api/v2/orders/{id}/deliveryTracking | Updates delivery tracking info for an order |
| OrdersApi | ordersUpdateInternalNotes | PUT /api/v2/orders/{id}/internalNotes | Updates internal notes for an order |
| OrdersApi | ordersUpdateStatus | PUT /api/v2/orders/{id}/status | Updates the status of an order |
| PlansApi | plansGetAll | GET /api/v1/settings/plans | Get all plans |
| PlansApi | plansGetById | GET /api/v1/settings/plans/{id} | Get a plan by id |
| PlansApi | plansGetCurrent | GET /api/v1/settings/plans/current | Get the current users plan |
| ProductAttributeItemsApi | productAttributeItemsCreate | POST /api/v1/products/{id}/attributes | Add a attribute item to a product |
| ProductAttributeItemsApi | productAttributeItemsGet | GET /api/v1/products/{id}/attributes/{attribute_id} | Get a product attribute item |
| ProductAttributeItemsApi | productAttributeItemsGetAll | GET /api/v1/products/{id}/attributes | Get all of a products attribute items |
| ProductAttributeItemsApi | productAttributeItemsUpdate | PUT /api/v1/products/{id}/attributes/{attribute_id} | Update a product attribute item |
| ProductAttributesApi | productAttributesCreate | POST /api/v1/settings/productattributes | Add a product attribute |
| ProductAttributesApi | productAttributesDelete | DELETE /api/v1/settings/productattributes/{attribute_key} | Delete a product attribute |
| ProductAttributesApi | productAttributesGet | GET /api/v1/settings/productattributes/{attribute_key} | Get a product attribute |
| ProductAttributesApi | productAttributesGetAll | GET /api/v1/settings/productattributes | Get all product attributes |
| ProductAttributesApi | productAttributesUpdate | PUT /api/v1/settings/productattributes/{attribute_key} | Update a product attribute |
| ProductMediaApi | productMediaDelete | DELETE /api/v2/products/{id}/media/{position} | Delete a product's media by position |
| ProductMediaApi | productMediaGetProductMedia | GET /api/v2/products/{id}/media | Get all of a product's associated media |
| ProductMediaApi | productMediaUpdateProductMedia | POST /api/v2/products/{id}/media/{position} | Update a product's media by position |
| ProductOptionItemsApi | productOptionItemsCreate | POST /api/v1/products/{id}/options/{optionId}/items | Add an item to a product option |
| ProductOptionItemsApi | productOptionItemsDelete | DELETE /api/v1/products/{id}/options/{optionId}/items/{optionItemId} | Delete an option item |
| ProductOptionItemsApi | productOptionItemsUpdate | PUT /api/v1/products/{id}/options/{optionId}/items/{optionItemId} | Update a product option item |
| ProductOptionsApi | productOptionsCreate | POST /api/v1/products/{id}/options | Add an option to a product |
| ProductOptionsApi | productOptionsDelete | DELETE /api/v1/products/{id}/options/{optionId} | Delete an option |
| ProductOptionsApi | productOptionsGet | GET /api/v1/products/{id}/options/{optionId} | Get a product option |
| ProductOptionsApi | productOptionsGetAll | GET /api/v1/products/{id}/options | Get a products options |
| ProductOptionsApi | productOptionsUpdate | PUT /api/v1/products/{id}/options/{optionId} | Update a product option |
| ProductStockApi | productStockGet | GET /api/v1/products/{id}/stock | Get the stock for a product |
| ProductStockApi | productStockUpdate | PUT /api/v1/products/{id}/stock | Set the stock for a product |
| ProductVariantStockApi | productVariantStockGet | GET /api/v1/products/{id}/variants/{variantId}/stock | Get a product variant stock |
| ProductVariantStockApi | productVariantStockUpdate | PUT /api/v1/products/{id}/variants/{variantId}/stock | Update a product variant stock |
| ProductVariantsApi | productVariantsAssignImageByUrlToProduct | POST /api/v1/products/{id}/variants/{variantId}/images/{imageNumber} | Set a variants image to a URL |
| ProductVariantsApi | productVariantsCreate | POST /api/v1/products/{id}/variants | Add a variant to a product |
| ProductVariantsApi | productVariantsDelete | DELETE /api/v1/products/{id}/variants/{variantId} | Delete a variant |
| ProductVariantsApi | productVariantsGet | GET /api/v1/products/variants/{variantId} | Get a product variant |
| ProductVariantsApi | productVariantsGetAll | GET /api/v1/products/{id}/variants | Get a products variants |
| ProductVariantsApi | productVariantsGetProductImages | GET /api/v1/products/{id}/variants/{variantId}/images | Get a variant's images. |
| ProductVariantsApi | productVariantsGetProductVariant | GET /api/v1/products/{id}/variants/{variantId} | Get a product variant |
| ProductVariantsApi | productVariantsSearch | GET /api/v1/variants/search | Searches variants based on search criteria |
| ProductVariantsApi | productVariantsUpdate | PUT /api/v1/products/{id}/variants/{variantId} | Update a product variant |
| ProductsApi | productsAssignImageByUrlToProduct | POST /api/v1/products/{id}/images/{imageNumber} | Assign an image by Url to a product |
| ProductsApi | productsCreate | POST /api/v1/products | Add a Product |
| ProductsApi | productsDelete | DELETE /api/v1/products/{id} | Delete a Product |
| ProductsApi | productsDeleteCategoryManaged | DELETE /api/v1/products/{id}/categorymanaged/{categoryId} | Stops a product from being managed by another category |
| ProductsApi | productsGet | GET /api/v1/products/{id} | Get a product |
| ProductsApi | productsGetAll | GET /api/v1/products | Get a paginated set of products |
| ProductsApi | productsGetProductImages | GET /api/v1/products/{id}/images | Get a product's images. |
| ProductsApi | productsSearch | GET /api/v1/products/search | Searches products based on search criteria |
| ProductsApi | productsSetCategoryManaged | POST /api/v1/products/{id}/categorymanaged/{categoryId} | Set a product to be managed by another category |
| ProductsApi | productsUpdate | PUT /api/v1/products/{id} | Update a Product |
| ShopInformationApi | shopInformationGet | GET /api/v1/settings/shop_information | Get information about the shop |
| TaxApi | taxCreateTaxRate | POST /api/v1/settings/tax/rates | Add a Tax Rate |
| TaxApi | taxDeleteTaxRate | DELETE /api/v1/settings/tax/rates/{id} | Delete a Tax Rate |
| TaxApi | taxGetTaxRate | GET /api/v1/settings/tax/rates/{id} | Get a specific Tax Rate |
| TaxApi | taxGetTaxRates | GET /api/v1/settings/tax/rates | Get a list of Tax Rates |
| TaxApi | taxGetTaxSettings | GET /api/v1/settings/tax | Get the current Tax Settings |
| TaxApi | taxUpdateTaxRate | PUT /api/v1/settings/tax/rates/{id} | Update a Tax Rate |
| TaxApi | taxUpdateTaxSettings | PUT /api/v1/settings/tax | Update the current Tax Settings |
| WebPageGroupsApi | webPageGroupsCreate | POST /api/v1/web_page_groups | Create a web page group |
| WebPageGroupsApi | webPageGroupsDelete | DELETE /api/v1/web_page_groups/{id} | Delete a web page group |
| WebPageGroupsApi | webPageGroupsGet | GET /api/v1/web_page_groups/{id} | Get a web page group |
| WebPageGroupsApi | webPageGroupsGetAll | GET /api/v1/web_page_groups | Get a paginated set of web page groups |
| WebPageGroupsApi | webPageGroupsUpdate | PUT /api/v1/web_page_groups/{id} | Update a specified web page group |
| WebPagesApi | webPagesCreate | POST /api/v1/web_pages | Create a web page |
| WebPagesApi | webPagesDelete | DELETE /api/v1/web_pages/{id} | Delete a web page by ID |
| WebPagesApi | webPagesGet | GET /api/v1/web_pages/{id} | Get a web page |
| WebPagesApi | webPagesGetAll | GET /api/v1/web_pages | Get a paginated set of web pages |
| WebPagesApi | webPagesUpdate | PUT /api/v1/web_pages/{id} | Update a specified web page |
| WebhooksApi | webhooksDelete | DELETE /api/v2/Webhooks/{id} | Unsubscribe from a webhook |
| WebhooksApi | webhooksGet | GET /api/v2/Webhooks/{id} | Get a specific subscription |
| WebhooksApi | webhooksGetAll | GET /api/v2/Webhooks/webhooks | Get list of existing subscriptions |
| WebhooksApi | webhooksPost | POST /api/v2/Webhooks | Subscribe to a webhook |
| WebhooksApi | webhooksPut | PUT /api/v2/Webhooks/{id} | Update a webhook subscription |
Models
- 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
- V1ProductImages
- V1ProductOption
- V1ProductOptionItem
- V1ProductStock
- V1ProductVariant
- V1ProductVariantStock
- V1ShippingAddress
- V1SubCategory
- V1UpdateCategory
- V1UpdateCustomer
- V1UpdateProduct
- V1UpdateProductOption
- V1UpdateWebPage
- V1UpdateWebPageGroup
- V1VariantCombination
- V1WebPage
- V1WebPageGroup
- V2AddProductMediaImage
- V2AddWebhookSubscription
- V2Order
- V2OrderCustomField
- V2OrderCustomFieldContent
- V2OrderInternalNotes
- V2OrderItem
- V2ProductMedia
- V2ProductMediaImage
- V2ProductMediaVideo
- V2UpdateWebhookSubscription
- V2WebhookSubscription
Authorization
Bearer
- Type:
OAuth - Flow:
accessCode - Authorization URL:
https://api.ekm.net/connect/authorize - Scopes:
- openid: Access a shops identity token.
- profile: Read a user's details. (name, email, etc)
- tempest.internal.orders.read: Internal - Read a shop's orders.
- tempest.customers.read: Read a shop's customers.
- tempest.customers.write: Modify a shop's customers.
- tempest.Guests.read: Read a shop's Guests.
- tempest.Guests.write: Modify a shop's Guests.
- tempest.orders.read: Read a shop's orders.
- tempest.orders.write: Modify a shop's orders.
- tempest.orders.customers.notes.read: Read a shop's order customer notes.
- tempest.orders.customers.notes.write: Modify a shop's order customer notes.
- tempest.products.read: Read a shop's products.
- tempest.products.write: Modify a shop's products.
- tempest.categories.read: Read a shop's categories.
- tempest.categories.write: Modify a shop's categories.
- tempest.settings.orderstatuses.read: Read a shop's order statuses.
- tempest.settings.domains.read: Read a shop's domains.
- tempest.settings.accountdetails.read: Read a shop's account details.
- tempest.settings.tax.read: Read a shop's tax settings.
- tempest.settings.tax.write: Write a shop's tax settings.
- tempest.settings.currency.read: Read a shop's currency settings.
- tempest.cartsessions.read: Read a shop's cart sessions.
- tempest.cartsessions.write: Modify a shop's cart sessions.
- tempest.cart.read: Read a shop's cart
- tempest.cart.write: Modify a shop's cart.
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
Latest- Package version:
0.0.4
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen
mrstebo/ekm-php 适用场景与选型建议
mrstebo/ekm-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 378 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 04 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「openapitools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mrstebo/ekm-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mrstebo/ekm-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mrstebo/ekm-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Alfabank REST API integration
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
BlockCypher's PHP SDK for REST API
Helper classes for creating cookie headers
统计信息
- 总下载量: 378
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: unlicense
- 更新时间: 2021-04-03