唯一标识的供应商 / strings
3.9.7
2023-03-08 12:50 UTC
Requires
- php: >=7.2 <8.2
- ext-json: *
- apimatic/core: ~0.1.0
- apimatic/core-interfaces: ~0.1.0
- apimatic/unirest-php: ^4.0.0
Requires (Dev)
- phan/phan: 5.3.1
- squizlabs/php_codesniffer: ^3.5
This package is not auto-updated.
Last update: 2024-10-02 20:13:57 UTC
README
介绍
APIMATIC上托管的基础计算器API
安装包
运行以下命令安装包并自动将依赖添加到您的 composer.json 文件中
composer require "strings/strings:8.3.9"
或手动添加到 composer.json 文件,如下所示
"require": {
"strings/strings": "8.3.9"
}
您还可以在此查看包: https://packagist.org.cn/packages/strings/strings#8.3.9
初始化API客户端
注意:客户端的文档可以在这里找到。
API客户端可配置的以下参数
参数 | 类型 | 描述 |
---|---|---|
environment | 环境 | API环境。 默认值: Environment.PRODUCTION |
timeout | int | API调用超时时间(秒)。 默认值: 0 |
enableRetries | bool | 是否启用重试和回退功能。 默认值: false |
numberOfRetries | int | 重试次数。 默认值: 0 |
retryInterval | float | 端点调用之间的重试时间间隔。 默认值: 1 |
backOffFactor | float | 指数回退因子,用于增加重试间隔。 默认值: 2 |
maximumRetryWaitTime | int | 整体重试请求的最大等待时间(秒)。 默认值: 0 |
retryOnTimeout | bool | 是否在请求超时时重试。 默认值: true |
httpStatusCodesToRetry | array | 要重试的HTTP状态码。 默认值: 408, 413, 429, 500, 502, 503, 504, 521, 522, 524 |
httpMethodsToRetry | array | Http方法要重试。 默认值: 'GET', 'PUT' |
API客户端可以按以下方式初始化
$client = APIMATICCalculatorLib\APIMATICCalculatorClientBuilder::init()
->environment('production')
->build();