deltacore/voip-api

dev-main 2023-01-25 21:07 UTC

This package is auto-updated.

Last update: 2024-09-26 00:44:58 UTC


README

客户端REST API

此PHP包由Swagger Codegen项目自动生成,该项目的链接为https://github.com/swagger-api/swagger-codegen

  • API版本:2.20.0
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

要求

PHP 5.5及更高版本

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/GroupeOndi/deltacore/voip-api.git"
    }
  ],
  "require": {
    "GroupeOndi/deltacore/voip-api": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请按照安装过程进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: bearer
$config = Delta\Voip\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Delta\Voip\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Delta\Voip\Api\AuthApi(
    // 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
);
$username = "username_example"; // string | 
$password = "password_example"; // string | 

try {
    $apiInstance->postAdminAuthenticate($username, $password);
} catch (Exception $e) {
    echo 'Exception when calling AuthApi->postAdminAuthenticate: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

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

模型文档

授权文档

bearer

  • 类型: API密钥
  • API密钥参数名: 授权
  • 位置: HTTP头

作者