omnismith-sdk/php
最新稳定版本:1.0.10
Composer 安装命令:
composer require omnismith-sdk/php
包简介
API Documentation for Omnismith
README 文档
README
The Omnismith PHP SDK is generated from the central OpenAPI contract for the Omnismith platform, a flexible data management system built around templates, entities, and attribute-driven schemas. Use it to automate workflows against the Omnismith API and pair it with the web app at app.omnismith.io.
Quick Start
<?php require_once __DIR__ . '/vendor/autoload.php'; use GuzzleHttp\Client; use Omnismith\Sdk\Api\EntityApi; use Omnismith\Sdk\Api\TemplatesApi; use Omnismith\Sdk\Configuration; use Omnismith\Sdk\Model\CreateEntityRequest; $configuration = Configuration::getDefaultConfiguration() ->setHost('https://api.omnismith.io/v1') ->setAccessToken(getenv('OMNISMITH_ACCESS_TOKEN')); $httpClient = new Client(); $templatesApi = new TemplatesApi($httpClient, $configuration); $entityApi = new EntityApi($httpClient, $configuration); $templateId = 'your-template-id'; $template = $templatesApi->getTemplate($templateId); $entity = $entityApi->createEntity( new CreateEntityRequest([ 'template_id' => $template->getId(), 'attribute_values' => [ [ 'attribute_id' => $template->getAttributeIds()[0], 'value' => 'SKU-1001', ], ], ]) ); printf("%s %s\n", $template->getName(), $entity->getId());
Set OMNISMITH_ACCESS_TOKEN to an access token created in Omnismith before running the snippet.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: unlicense
- 更新时间: 2026-04-19