onoffice / api-client-cli
基于 CLI 的 onOffice API 客户端
v1.0.0
2021-02-23 15:37 UTC
Requires
- php: ^7.2.0
- ext-json: *
- ext-openssl: *
- symfony/http-client: ^5
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2024-08-23 23:32:42 UTC
README
onOffice API 的测试套件
目录
需求
- PHP >= 7.2
- Linux / OSX
安装
$ git clone $ composer install #dev-mode $ composer install --no-dev #op-mode
ooapi.ini
为了避免不必要的代码配置,此库提供配置文件。
在 config/ooapi.ini
中配置 onOffice-API-URL。
命令行
bin/ooapitest.php
此库可以通过控制台使用。
$ php bin/ooapitest.php -f /path-to-file-with-json -t token -s secret
$ php bin/ooapitest.php -j '{json-string}' -t token -s secret
json-string
必须是完整的动作标记,例如
{"actionid":"urn:onoffice-de-ns:smart:2.5:smartml:action:read","resourceid":"resource-id","resourcetype":"estate","identifier":"","timestamp":1589567897,"hmac":"88462bce11c5c47fb738dba64a36ba00","parameters":{"data":["Id", "kaufpreis", "lage"]}}
更多详细信息,请参阅 官方 API 文档。