Clink2 OpenAPI CLI (AK-SK, IVR queries)
Project description
Clink2 命令行客户端,封装 OpenAPI 接口,与 智慧服务平台开发者中心 中参数与响应一致,适合脚本化集成与 Agent 调用。
当前版本: 0.0.1
PyPI: https://pypi.org/project/tinet-clink2-cli/
功能概览
| 子命令 | 说明 |
|---|---|
config |
本地凭证管理(AccessKeyId / AccessKeySecret / 接入地址 / Expires) |
ivr |
语音导航查询:列表、节点列表 |
所有出站 HTTP 请求自动附加:
X-Trace-Id: {UUID}(每次请求新生成,不参与签名)
本地默认写入 JSON Lines 日志:~/.clink2/logs/clink2.log(单文件最大 10MB,滚动保留 5 个)。
环境要求
- Python ≥ 3.9
- 运行时需访问公有云接入地址,例如
https://api-bj.clink.cn/https://api-sh.clink.cn - 需在管理后台获取 AccessKeyId / AccessKeySecret(系统管理 → 安全设置 → 接口密钥)
安装
从 PyPI 安装(推荐):
pip install tinet-clink2-cli
tinet-clink2-cli --version # 0.0.1
tinet-clink2-cli --help
指定版本或升级:
pip install 'tinet-clink2-cli==0.0.1'
pip install --upgrade tinet-clink2-cli
macOS 等受限环境可使用 pipx:
pipx install tinet-clink2-cli
配置凭证
配置文件: ~/.clink2/config.json
入参名称与 OpenAPI 公共参数一致:
tinet-clink2-cli config set \
--AccessKeyId your_access_key_id \
--AccessKeySecret your_access_key_secret \
--endpoint https://api-bj.clink.cn \
--Expires 60
tinet-clink2-cli config show
默认接入地址为北京:https://api-bj.clink.cn。config show 会对 AccessKeySecret 脱敏。
快速示例
顺序与上方「功能概览」一致。完整取值见各子命令 --help 或 开发者中心。
# config
tinet-clink2-cli config show
# ivr
tinet-clink2-cli ivr list
tinet-clink2-cli ivr nodes --ivrName your_ivr_name
tinet-clink2-cli --json ivr list
tinet-clink2-cli --json ivr nodes --ivrName your_ivr_name
# dry-run:仅校验入参与配置,不调用服务端,但仍写本地日志
tinet-clink2-cli --dry-run ivr list
tinet-clink2-cli --dry-run ivr nodes --ivrName your_ivr_name
全局 --json 输出 OpenAPI 原始 JSON。--dry-run 做本地校验与预览(不发请求),详见 --help。
帮助与 API 文档
安装后通过 --help 查看一级子命令:
tinet-clink2-cli --help
tinet-clink2-cli config --help
tinet-clink2-cli ivr --help
OpenAPI 契约与字段说明见 智慧服务平台开发者中心。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinet_clink2_cli-0.0.1.tar.gz.
File metadata
- Download URL: tinet_clink2_cli-0.0.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
094365fb397d1d39d9f188e7b4f1632944fda39d49cf07740e038c9e10d406b8
|
|
| MD5 |
d7bebb93bed178e4181c5df7bfddee56
|
|
| BLAKE2b-256 |
e772bd0aefb6f5948157ff143c02a5e2873cd151082ae53041806eeed1e64ca2
|
File details
Details for the file tinet_clink2_cli-0.0.1-py3-none-any.whl.
File metadata
- Download URL: tinet_clink2_cli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8291bf380b4da2facd58a0436b68623e1c944cd3fb52fabebf3caec67becae2e
|
|
| MD5 |
58ffb67cd7bf2deb5674685b63405e78
|
|
| BLAKE2b-256 |
c2593fa4d5760b7fc780ef47dc51ef9ecd86fe28b4eb2b5317305f2e404d4090
|