infracorp/api-client-extranet

未提供描述(由 Openapi Generator 生成 https://github.com/openapitools/openapi-generator)

v1.1.91 2024-09-29 14:27 UTC

README

未提供描述(由 Openapi Generator 生成 https://github.com/openapitools/openapi-generator

安装与使用

要求

PHP 7.4 及以上版本。也应适用于 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 API key authorization: tokenAuth
$config = Infracorp\Extranet\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Infracorp\Extranet\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = Infracorp\Extranet\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Infracorp\Extranet\Client\Api\DefaultApi(
    // 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
);
$id = 56; // int | service pack identifier
$add_service_contract_comment = new \Infracorp\Extranet\Client\Model\AddServiceContractComment(); // \Infracorp\Extranet\Client\Model\AddServiceContractComment

try {
    $result = $apiInstance->addServiceContractComment($id, $add_service_contract_comment);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->addServiceContractComment: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都是相对于 https://my.tests.prizz-telecom.fr

模型

授权

API 定义的认证方案

tokenAuth

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

bearerAuth

  • 类型: Bearer 认证

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

  • API 版本: 2.0
    • 生成器版本: 7.9.0-SNAPSHOT
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen