rogergerecke / shopware-6-php-swagger-client
此端点参考包含Shopware Admin API所有端点的概述。为了更好的概览,默认隐藏所有CRUD端点。如果您想显示CRUD端点,请添加查询参数 `type=jsonapi`。
dev-main
2022-01-27 16:11 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
This package is auto-updated.
Last update: 2022-02-09 16:20:34 UTC
README
此端点参考包含Shopware Admin API所有端点的概述。
为了更好的概览,默认隐藏所有CRUD端点。如果您想显示CRUD端点,请添加查询参数 type=jsonapi
。
安装与使用
要求
PHP 7.3及更高版本。也应与PHP 8.0兼容,但尚未测试。
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
然后运行 composer install
手动安装
下载文件并包含 autoload.php
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
入门指南
请按照安装步骤进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: oAuth $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); // Configure OAuth2 access token for authorization: oAuth $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\Client\Api\AssetManagementApi( // 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 ); $media_id = 'media_id_example'; // string | Identifier of the media entity. $extension = 'extension_example'; // string | Extension of the uploaded file. For example `png` $file_name = 'file_name_example'; // string | Name of the uploaded file. If not provided the media identifier will be used as name $body = "/path/to/file.txt"; // \SplFileObject try { $apiInstance->upload($media_id, $extension, $file_name, $body); } catch (Exception $e) { echo 'Exception when calling AssetManagementApi->upload: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI均相对于 https://redkitty.de/api
类 | 方法 | HTTP请求 | 描述 |
---|---|---|---|
AssetManagementApi | upload | POST /_action/media/{mediaId}/upload | 将文件上传到媒体实体 |
AuthorizationAuthenticationApi | token | POST /oauth/token | 获取访问令牌 |
BulkOperationsApi | sync | POST /_action/sync | 批量编辑实体 |
DatabaseMigrationsApi | migrate | POST /_action/database/migrate | 执行迁移 |
DatabaseMigrationsApi | migrateDestructive | POST /_action/database/migrate-destructive | 执行破坏性迁移 |
DatabaseMigrationsApi | syncMigrations | POST /_action/database/sync-migration | 将迁移同步到数据库 |
DocumentManagementApi | createDocument | POST /_action/order/{orderId}/document/{documentTypeName} | 为订单创建文档 |
DocumentManagementApi | downloadDocument | GET /_action/document/{documentId}/{deepLinkCode} | 下载文档 |
DocumentManagementApi | numberRangeReserve | GET /_action/number-range/reserve/{type}/{saleschannel?} | 预留或预览文档编号 |
DocumentManagementApi | uploadToDocument | POST /_action/document/{documentId}/upload | 为文档上传文件 |
MailOperationsApi | build | POST /_action/mail-template/build | 预览邮件模板 |
MailOperationsApi | send | POST /_action/mail-template/send | 发送邮件 |
MailOperationsApi | validate | POST /_action/mail-template/validate | 验证邮件内容 |
OrderManagementApi | orderDeliveryStateTransition | POST /_action/order_delivery/{orderDeliveryId}/state/{transition} | 将订单交付过渡到新状态 |
OrderManagementApi | orderStateTransition | POST /_action/order/{orderId}/state/{transition} | 将订单过渡到新状态 |
OrderManagementApi | orderTransactionStateTransition | POST /_action/order_transaction/{orderTransactionId}/state/{transition} | 将订单交易过渡到新状态 |
SystemInfoHealthcheckApi | apiInfo | GET /_info/openapi3.json | 获取OpenAPI规范 |
SystemInfoHealthcheckApi | businessEvents | GET /_info/events.json | 获取业务事件 |
SystemInfoHealthcheckApi | config | GET /_info/config | 获取API信息 |
SystemInfoHealthcheckApi | flowActions | GET /_info/flow-actions.json | 获取流程构建器的动作 |
SystemInfoHealthcheckApi | infoShopwareVersion | GET /_info/version | 获取Shopware版本 |
SystemOperationsApi | clearCache | DELETE /_action/cache | 清除缓存 |
SystemOperationsApi | clearCacheAndScheduleWarmUp | DELETE /_action/cache_warmup | 清除并预热缓存 |
SystemOperationsApi | clearContainerCache | DELETE /_action/container_cache | 清除容器缓存 |
SystemOperationsApi | clearOldCacheFolders | DELETE /_action/cleanup | 清除旧缓存文件夹 |
SystemOperationsApi | consumeMessages | POST /_action/message-queue/consume | 从消息队列中消费消息。 |
SystemOperationsApi | getMinRunInterval | GET /_action/scheduled-task/min-run-interval | 获取最小计划任务间隔 |
SystemOperationsApi | index | POST /_action/index | 运行索引器 |
SystemOperationsApi | indexing | POST /_action/indexing | 运行索引器 |
SystemOperationsApi | indexing_0 | POST /_action/indexing/products | 发送产品索引消息 |
SystemOperationsApi | info | GET /_action/cache_info | 获取缓存信息 |
SystemOperationsApi | iterate | POST /_action/indexing/{indexer} | 迭代索引器 |
SystemOperationsApi | runScheduledTasks | POST /_action/scheduled-task/run | 运行计划任务。 |
模型
- AclRole
- AclUserRole
- ActionMailTemplateBuildMailTemplate
- ActionMailTemplateBuildMailTemplateType
- ActionMailTemplateSendBinAttachments
- App
- AppActionButton
- AppCmsBlock
- AppPaymentMethod
- AppTemplate
- BfCategoryMapping
- BfConfig
- BfMarketplace
- BfMarketplaceSalesChannel
- BfMarketplaceSettings
- BfProductToDelete
- BfSupport
- Category
- CategoryTag
- CmsBlock
- CmsPage
- CmsPageConfig
- CmsSection
- CmsSlot
- Country
- CountryCustomerTax
- CountryState
- Currency
- CurrencyCountryRounding
- CurrencyItemRounding
- CustomField
- CustomFieldSet
- CustomFieldSetRelation
- Customer
- CustomerAddress
- CustomerGroup
- CustomerGroupRegistrationSalesChannels
- CustomerRecovery
- CustomerTag
- CustomerWishlist
- CustomerWishlistProduct
- Data
- DeadMessage
- DeliveryTime
- Document
- DocumentBaseConfig
- DocumentBaseConfigSalesChannel
- DocumentType
- Error
- ErrorSource
- EventAction
- EventActionRule
- EventActionSalesChannel
- Failure
- Flow
- FlowSequence
- ImportExportFile
- ImportExportLog
- ImportExportProfile
- Info
- InfoConfigResponse
- InfoConfigResponseAdminWorker
- InfoConfigResponseBundles
- InfoConfigResponseSettings
- InlineObject
- InlineObject1
- InlineObject10
- InlineObject11
- InlineObject12
- InlineObject13
- InlineObject2
- InlineObject3
- InlineObject4
- InlineObject5
- InlineObject6
- InlineObject7
- InlineObject8
- InlineObject9
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- Integration
- IntegrationRole
- Jsonapi
- LandingPage
- LandingPageSalesChannel
- LandingPageTag
- Language
- Link
- LinkOneOf
- Linkage
- Locale
- LogEntry
- MailHeaderFooter
- MailTemplate
- MailTemplateMedia
- MailTemplateType
- MainCategory
- Media
- MediaDefaultFolder
- MediaFolder
- MediaFolderConfiguration
- 媒体文件夹配置媒体缩略图大小
- 媒体标签
- 媒体缩略图
- 媒体缩略图大小
- 消息队列统计
- 新闻通讯收件人
- 新闻通讯收件人标签
- 通知
- 数字范围
- 数字范围销售渠道
- 数字范围状态
- 数字范围类型
- 订单
- 订单地址
- 订单客户
- 订单配送
- 订单配送位置
- 订单行项目
- 订单价格
- 订单运费
- 订单运费列表价格
- 订单标签
- 订单交易
- 分页
- 支付方式
- 插件
- 产品
- 产品分类
- 产品分类树
- 产品配置器设置
- 产品交叉销售
- 产品交叉销售分配产品
- 产品自定义字段集
- 产品导出
- 产品特性集
- 产品关键词字典
- 产品制造商
- 产品媒体
- 产品选项
- 产品价格
- 产品属性
- 产品评论
- 产品搜索配置
- 产品搜索配置字段
- 产品搜索关键词
- 产品排序
- 产品流
- 产品流过滤器
- 产品流映射
- 产品标签
- 产品可见性
- 促销
- 促销购物车规则
- 促销折扣
- 促销折扣价格
- 促销折扣规则
- 促销个人代码
- 促销订单规则
- 促销人物客户
- 促销人物规则
- 促销销售渠道
- 促销分组
- 促销分组规则
- 属性组
- 属性组选项
- 关系链接
- 一对一关系
- 关系
- 关系任意之一
- 资源
- 规则
- 规则条件
- 销售渠道
- 销售渠道分析
- 销售渠道国家
- 销售渠道货币
- 销售渠道域名
- 销售渠道语言
- 销售渠道支付方式
- 销售渠道运费方式
- 销售渠道类型
- 问候语
- 计划任务
- 脚本
- SEO URL
- SEO URL 模板
- 运费方式
- 运费方式价格
- 运费方式标签
- 片段
- 片段集
- 状态机
- 状态机历史
- 状态机状态
- 状态机转换
- 成功
- 系统配置
- 系统配置配置值
- 标签
- 税
- 税规则
- 税规则数据
- 税规则类型
- 主题
- 主题媒体
- 主题销售渠道
- 单位
- 用户
- 用户访问密钥
- 用户配置
- 用户恢复
- Webhook
- Webhook 事件日志
授权
OAuth
- 类型:
OAuth
- 流程:
password
- 授权 URL: ``
- 作用域:
- write: 完全写入访问
OAuth
- 类型:
OAuth
- 流程:
application
- 授权 URL: ``
- 作用域:
- write: 完全写入访问
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此 PHP 包由 OpenAPI Generator 项目自动生成
- API 版本:
6.4.8.0
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen