qualityunit/liveagent-internal-api-server

1.0.13 2024-04-11 20:50 UTC

This package is auto-updated.

Last update: 2024-09-11 21:43:39 UTC


README

此API用于异步事件通信

Symfony 包是由 OpenAPI Generator 项目自动生成的

  • API版本:1.0.0
  • 包版本:1.0.5
  • 构建包:org.openapitools.codegen.languages.PhpSymfonyServerCodegen

要求

PHP 8.0 及以上

安装与使用

要使用 Composer 安装依赖项,请将以下仓库添加到您的 Symfony 项目的 composer.json

{
    "repositories": [{
        "type": "path",
        "url": "//Path to your generated openapi bundle"
    }],
}

然后运行

composer require qualityunit/liveagent-internal-api-server:dev-master

以将生成的 openapi 包作为依赖项添加。

测试

要运行生成的包的单元测试,请首先导航到包含代码的目录,然后运行以下命令

composer install
./vendor/bin/phpunit

入门

步骤1:请首先遵循安装流程

步骤2:在包配置中启用包

// app/config/bundles.php
return [
    // ...
    Qu\LaInternalApiServer\LiveAgentInternalApiServerBundle::class => ['all' => true],
];

步骤3:注册路由

# app/config/routes.yaml
live_agent_internal_api_server:
    resource: "@LiveAgentInternalApiServerBundle/Resources/config/routing.yaml"

步骤4:实现API调用

<?php
// src/Acme/MyBundle/Api/EventsApiInterface.php

namespace Acme\MyBundle\Api;

use Qu\LaInternalApiServer\Api\EventsApiInterface;

class EventsApi implements EventsApiInterface // An interface is autogenerated
{

    // Other operation methods ...
}

步骤5:标记API实现

# config/services.yaml
services:
    # ...
    Acme\MyBundle\Api\EventsApi:
        tags:
            - { name: "live_agent_internal_api_server.api", api: "events" }
    # ...

现在您可以开始使用此包了!

API端点文档

所有URI都相对于 https:///public/api/internal

模型文档

授权文档

bearerAuth

  • 类型:HTTP基本认证

作者

mcivan@qualityunit.com