icuk/api-php

ICUK API 提供了一个接口,用于访问经销商控制面板,可用于远程控制设施配置和供应

dev-master 2024-01-05 10:30 UTC

This package is auto-updated.

Last update: 2024-09-05 13:39:21 UTC


README

ICUK API 提供了一个接口,用于访问经销商控制面板,可用于远程控制设施配置和供应

如需更多信息,请访问 https://control.icuk.net

安装与使用

要求

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 OAuth2 access token for authorization: oauth2
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\BroadbandAddressApi(
    // 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
);
$postcode = 'postcode_example'; // string | Postcode of address
$api_platform = 'api_platform_example'; // string | The API provides access to two separate platforms: test and live. The test platform allows you to experiment with the API without incurring charges or affecting customer orders. The live platform allows you to make real world changes.

try {
    $result = $apiInstance->broadbandAddressPostcodeGet($postcode, $api_platform);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BroadbandAddressApi->broadbandAddressPostcodeGet: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都相对于 https://

模型

授权

oauth2

  • 类型: OAuth
  • 流程: application
  • 授权URL: ``
  • 作用域: N/A

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

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