icuk/api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

icuk/api-php

Composer 安装命令:

composer require icuk/api-php

包简介

The ICUK API provides an interface to the reseller control panel which can be used to control the provisioning and configuration of facilities remotely

README 文档

README

The ICUK API provides an interface to the reseller control panel which can be used to control the provisioning and configuration of facilities remotely

For more information, please visit https://control.icuk.net.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?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 Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
BroadbandAddressApi broadbandAddressPostcodeGet GET /broadband/address/{postcode} Search for your postcode and it will return a list of BT address search results
BroadbandAddressApi broadbandAddressSearchPostcodeGet GET /broadband/address_search/{postcode} Search for your postcode and it will return a list of BT address search results
BroadbandAuthenticationLogsApi broadbandAuthenticationLogsUsernameGet GET /broadband/authentication_logs/{username} Retrieves the past 50 authentication attempts for a broadband user
BroadbandAvailabilityApi broadbandAvailabilityCliOrPostcodeGet GET /broadband/availability/{cli_or_postcode} Search for your phone number or postcode and return a list of available broadband products with the speeds available
BroadbandAvailabilityApi broadbandAvailabilityPost POST /broadband/availability Search with your exact BT address match and return a list of available broadband products with the speeds available
BroadbandBanApi broadbandBanPut PUT /broadband/ban Updates the ban status for a broadband user
BroadbandBanApi broadbandBanStatusUsernameGet GET /broadband/ban/status/{username} Retrieves the ban status for a broadband user
BroadbandContactDetailsApi broadbandUserContactUsernameGet GET /broadband/user/contact/{username} Retrieves the contact details for a broadband user
BroadbandContactDetailsApi broadbandUserContactUsernamePut PUT /broadband/user/contact/username Changes a broadband users contact
BroadbandDataTransferApi broadbandDataTransferDailyUsernameGet GET /broadband/data_transfer/daily/{username} Retrieves the daily data transfer usage for a broadband user for the current month
BroadbandDataTransferApi broadbandDataTransferDailyUsernameYearMonthGet GET /broadband/data_transfer/daily/{username}/{year}/{month} Retrieves the daily data transfer usage for a broadband user for the specified month and year
BroadbandDataTransferApi broadbandDataTransferHourlyUsernameGet GET /broadband/data_transfer/hourly/{username} Retrieves the hourly data transfer usage for a broadband user for the current day
BroadbandDataTransferApi broadbandDataTransferHourlyUsernameYearMonthDayGet GET /broadband/data_transfer/hourly/{username}/{year}/{month}/{day} Retrieves the hourly data transfer usage for a broadband user for the specified day, month and year
BroadbandDataTransferApi broadbandDataTransferMonthlyGet GET /broadband/data_transfer/monthly Retrieves the monthly data transfer usage for all users for the current month
BroadbandDataTransferApi broadbandDataTransferMonthlyUsernameGet GET /broadband/data_transfer/monthly/{username} Retrieves the monthly data transfer usage for a broadband user for the current month
BroadbandDataTransferApi broadbandDataTransferMonthlyUsernameYearMonthGet GET /broadband/data_transfer/monthly/{username}/{year}/{month} Retrieves the monthly data transfer usage for a broadband user for the specified month and year
BroadbandDataTransferApi broadbandDataTransferMonthlyYearMonthGet GET /broadband/data_transfer/monthly/{year}/{month} Retrieves the monthly data transfer usage for all users for the specified month and year
BroadbandDiagnosticsApi broadbandDiagnosticsResultsUsernameTestIdGet GET /broadband/diagnostics/results/{username}/{test_id} Gets the results of complete diagnostics test for a certain user and test ID for a TTB line
BroadbandDiagnosticsApi broadbandDiagnosticsUsernameGet GET /broadband/diagnostics/{username} Carry out a TalkTalk diagnostics test on the user line
BroadbandDiagnosticsApi broadbandKbdPost POST /broadband/kbd Carry out a Knowledge Based Diagnostics test on a BT Openreach line
BroadbandDiagnosticsApi broadbandKbdResultUsernameGet GET /broadband/kbd/result/{username} Gets the results of complete KBD's for a certain user
BroadbandIPApi broadbandIpRdnsUsernameGet GET /broadband/ip/rdns/{username} Retrieves the broadband Reverse DNS information of a static, routed and Ipv6 addresses of a broadband user
BroadbandIPApi broadbandIpRdnsUsernamePost POST /broadband/ip/rdns/{username} Assigns a Reverse DNS records to a static or routed IP address
BroadbandIPApi broadbandIpRoutedUsernameDelete DELETE /broadband/ip/routed/{username} Removes a routed subnet from a broadband user
BroadbandIPApi broadbandIpRoutedUsernamePost POST /broadband/ip/routed/{username} Assigns a routed IPv4 address of the supplied size to a broadband user and updates the RIPE database with the supplied RIPE NIC handle. If the current allocation is dynamic a static IP will also be created
BroadbandIPApi broadbandIpStaticUsernameDelete DELETE /broadband/ip/static/{username} Removes a static IP address and all routed subnets from a broadband user
BroadbandIPApi broadbandIpStaticUsernamePost POST /broadband/ip/static/{username} Assigns a static IPv4 address to a broadband user
BroadbandIPApi broadbandIpUsernameGet GET /broadband/ip/{username} Retrieves the static, routed and Ipv6 information of a broadband user
BroadbandIPApi broadbandIpv6UsernameDelete DELETE /broadband/ipv6/{username} Removes a IPv6 address from a broadband user
BroadbandIPApi broadbandIpv6UsernamePost POST /broadband/ipv6/{username} Assigns a IPv6 address to a broadband user
BroadbandNotificationsApi broadbandNotificationsGetGet GET /broadband/notifications/get Returns all broadband notifications for the reseller
BroadbandNotificationsApi broadbandNotificationsQueryPost POST /broadband/notifications/query Queries for broadband notifications
BroadbandNotificationsApi broadbandNotificationsUsernameAllGet GET /broadband/notifications/{username}/{all} Queries for broadband notifications for user@realm
BroadbandOnlineStatusApi broadbandOnlineStatusGet GET /broadband/online_status Retrieves the online statuses for all broadband users
BroadbandOnlineStatusApi broadbandOnlineStatusUsernameDelete DELETE /broadband/online_status/{username} Terminates a user's session if they are online
BroadbandOnlineStatusApi broadbandOnlineStatusUsernameGet GET /broadband/online_status/{username} Retrieves the online status of a broadband user
BroadbandOrderApi broadbandOrderCeaseUsernamePost POST /broadband/order/cease/{username} Places a cease order for an existing broadband connection for a specific date
BroadbandOrderApi broadbandOrderGet GET /broadband/order Retrieves the broadband order summary for all users
BroadbandOrderApi broadbandOrderMigratePost POST /broadband/order/migrate Orders a migration of an existing broadband connection for a telephone line or address
BroadbandOrderApi broadbandOrderOrderIdGet GET /broadband/order/{order_id} Retrieves the broadband order details for a broadband order ID
BroadbandOrderApi broadbandOrderOrderTypeOrderStatusGet GET /broadband/order/{order_type}/{order_status} Retrieves the broadband order summary for all users for the specified order type and status
BroadbandOrderApi broadbandOrderProvidePost POST /broadband/order/provide Orders a new broadband product for a telephone line or address
BroadbandOrderApi broadbandOrderUpdatesOrderIdStartDateEndDateGet GET /broadband/order/updates/{order_id}/{start_date}/{end_date} Retrieves a specific broadband order which has been updated within a datetime range
BroadbandOrderApi broadbandOrderUpdatesStartDateEndDateGet GET /broadband/order/updates/{start_date}/{end_date} Retrieves the broadband orders which have been updated within a datetime range
BroadbandProductsApi broadbandProductsAdslProductIdGet GET /broadband/products/adsl/{product_id} Retrieves the reseller's broadband product details for a specific product ID
BroadbandProductsApi broadbandProductsCareCurrentUsernameGet GET /broadband/products/care/current/{username} Gets the current care level of the broadband product
BroadbandProductsApi broadbandProductsCarePut PUT /broadband/products/care Updates the care level of the broadband product
BroadbandProductsApi broadbandProductsGet GET /broadband/products Retrieves the reseller's available broadband products that can be ordered and their costs
BroadbandProductsApi broadbandProductsQuotaCurrentUsernameGet GET /broadband/products/quota/current/{username} Gets the default action to be taken in future if the account exceeds its quota
BroadbandProductsApi broadbandProductsQuotaPut PUT /broadband/products/quota Choose a default action to be taken in future if the account exceeds its quota
BroadbandProductsApi broadbandProductsSpeedCurrentUsernameGet GET /broadband/products/speed/current/{username} Gets the current speed limit of a broadband product
BroadbandProductsApi broadbandProductsSpeedPut PUT /broadband/products/speed Adjust the speed limit for this connection
BroadbandRIPEApi broadbandRipePersonGet GET /broadband/ripe/person Retrieves the RIPE person contacts that have been created for broadband accounts assigned to the reseller
BroadbandRIPEApi broadbandRipePersonPost POST /broadband/ripe/person Creates a RIPE person contact assigned to the reseller
BroadbandRIPEApi broadbandRipePersonRipeNicHandleDelete DELETE /broadband/ripe/person/{ripe_nic_handle} Deletes the RIPE person contact details for a nic-handle
BroadbandRIPEApi broadbandRipePersonRipeNicHandleGet GET /broadband/ripe/person/{ripe_nic_handle} Retrieves a RIPE person contact for a specific nic-handle that has been created for a broadband account assigned to the reseller
BroadbandRIPEApi broadbandRipePersonRipeNicHandlePut PUT /broadband/ripe/person/{ripe_nic_handle} Changes the RIPE person contact details for a nic-handle
BroadbandRadiusApi broadbandCarrierRadiusGet GET /broadband/carrier_radius Retrieves the carrier RADIUS logs of a broadband user. [TTB only]
BroadbandSNRApi broadbandInterleavingCurrentUsernameGet GET /broadband/interleaving/current/{username} Retrieves the current interleaving option. Only available for users with BT Wholesale products
BroadbandSNRApi broadbandInterleavingPut PUT /broadband/interleaving Updates the interleaving profile. Only available for users with BT Wholesale broadband products
BroadbandSNRApi broadbandProfileCurrentUsernameGet GET /broadband/profile/current/{username} Gets the current SNR and interleaving profile. Only available for users with TalkTalk products
BroadbandSNRApi broadbandProfilePut PUT /broadband/profile Updates SNR and interleaving profile. Only available for users with TalkTalk products
BroadbandSNRApi broadbandSnrLogsUsernameGet GET /broadband/snr/logs/{username} Gets SNR logs for a user. Only available for users with BT Wholesale products
BroadbandSNRApi broadbandSnrUsernameGet GET /broadband/snr/{username} Reset the SNR of the user line. Only available for users with BT Wholesale products
BroadbandSessionHistoryApi broadbandSessionHistoryUsernameGet GET /broadband/session_history/{username} Retrieves the past 50 session history of a broadband user
BroadbandStabilityApi broadbandStabilityCurrentUsernameGet GET /broadband/stability/current/{username} Gets the current stability option of the line. The stability option will change once the order is complete
BroadbandStabilityApi broadbandStabilityPut PUT /broadband/stability Updates the stability of the line
BroadbandSyncProfileApi broadbandSyncProfileUsernameGet GET /broadband/sync_profile/{username} View the current and past sync profile for this connection
BroadbandTariffApi broadbandTariffDeleteTariffIdDelete DELETE /broadband/tariff/delete/{tariff_id} Deletes a broadband tariff
BroadbandTariffApi broadbandTariffGet GET /broadband/tariff Retrieves the broadband tariffs
BroadbandTariffApi broadbandTariffNewPost POST /broadband/tariff/new Creates a new broadband tariff
BroadbandUserApi broadbandUserGet GET /broadband/user Retrieves all the broadband users belonging to the API user
BroadbandUserApi broadbandUserPasswordUsernamePut PUT /broadband/user/password/{username} Updates password of a broadband user
BroadbandUserApi broadbandUserUsernameDelete DELETE /broadband/user/{username} Deletes a broadband user belonging to the API user
BroadbandUserApi broadbandUserUsernameGet GET /broadband/user/{username} Retrieves a broadband user belonging to the API user
EchoApi echoGet GET /echo Test Echo API request
OAuthApi oauthTokenPost POST /oauth/token Retrieve OAuth 2.0 Authorization token.

Models

Authorization

oauth2

  • Type: OAuth
  • Flow: application
  • Authorization URL: ``
  • Scopes: N/A

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

icuk/api-php 适用场景与选型建议

icuk/api-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 30 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 01 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「openapitools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 icuk/api-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 icuk/api-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 icuk/api-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 17
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: unlicense
  • 更新时间: 2024-01-05