gitlab / 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-03 14:12:08 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客户端
| 参数 | 类型 | 描述 |
|---|---|---|
环境 | 环境 | API环境。 默认值: Environment.PRODUCTION |
超时 | int | API调用超时时间(秒)。 默认值: 0 |
启用重试 | bool | 是否启用重试和回退功能。 默认值: false |
重试次数 | int | 要进行的重试次数。 默认值: 0 |
重试间隔 | float | 端点调用之间的重试时间间隔。 默认值: 1 |
回退因子 | float | 指数回退因子,用于增加重试间隔。 默认值: 2 |
最大重试等待时间 | int | 总体重试请求的最大等待时间(秒)。 默认值: 0 |
请求超时重试 | bool | 是否在请求超时时重试。 默认值: true |
重试的HTTP状态码 | array | 要重试的HTTP状态码。 默认值: 408, 413, 429, 500, 502, 503, 504, 521, 522, 524 |
重试的HTTP方法 | array | Http方法要重试。 默认值: 'GET', 'PUT' |
API客户端可以按如下方式初始化
$client = APIMATICCalculatorLib\APIMATICCalculatorClientBuilder::init()
->environment('production')
->build();