cdma-numiscorner/shopware-admin-api-client

本端点参考包含了Shopware Admin API的所有端点的概览。为了更好的概览,默认隐藏了所有CRUD端点。如果您想显示CRUD端点,请添加查询参数`type=jsonapi`。

1.0 2024-01-18 13:55 UTC

This package is auto-updated.

Last update: 2024-09-18 15:17:51 UTC


README

本端点参考包含了Shopware Admin API的所有端点的概览。

为了更好的概览,默认隐藏了所有CRUD端点。如果您想显示CRUD端点,请添加查询参数type=jsonapi

安装与使用

要求

PHP 7.2及更高版本。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/cdma-numiscorner/shopware-admin-api-client.git"
    }
  ],
  "require": {
    "cdma-numiscorner/shopware-admin-api-client": "*@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\ShopwareAdminApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

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


$apiInstance = new OpenAPI\ShopwareAdminApiClient\Api\AclRoleApi(
    // 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
);
$_response = '_response_example'; // string | Data format for response. Empty if none is provided.
$inline_object = new \OpenAPI\ShopwareAdminApiClient\Model\InlineObject(); // \OpenAPI\ShopwareAdminApiClient\Model\InlineObject

try {
    $result = $apiInstance->createAclRole($_response, $inline_object);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AclRoleApi->createAclRole: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI相对于https://:8000/api

模型

授权

OAuth

  • 类型: OAuth
  • 流程: password
  • 授权URL: ``
  • 作用域:
    • write: 完全写访问权限

OAuth

  • 类型: OAuth
  • 流程: application
  • 授权URL: ``
  • 作用域:
    • write: 完全写访问权限

测试

要运行测试,使用

composer install
vendor/bin/phpunit

作者

关于此包

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

  • API版本: 6.5.8.0
    • 包版本: 1.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen