nikserg / itcom-public-api
此软件包最新版本(1.1.16)没有可用的许可信息。
阿йтиком公共API
1.1.16
2022-10-06 14:20 UTC
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^7.4
- dev-main
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- 0.02
- 0.01
- dev-add_container
- dev-add_unionhead
- dev-add_certificate_template_sequence
- dev-is_ip
- dev-add_status_head_sign
- dev-crt_osnovanie
- dev-safety_policy
- dev-blank_osnovanie
- dev-new_status
- dev-template_null
- dev-change_status_id
- dev-add_stats_key_prolongation
- dev-new_status_key_prolongation
- dev-add_revocation_field
- dev-add_is_key_prolongation_method
- dev-certificate_not_found
- dev-exception
This package is auto-updated.
Last update: 2024-09-14 21:51:16 UTC
README
阿йтикомCRM操作的公共API
安装
composer require nikserg/itcom-public-api
使用方法
API有两种授权模式
- 作为用户,使用用户bearer令牌。在这种情况下,API可以访问用户有权限访问的所有申请。
- 仅访问一个申请,使用其ID和访问令牌。在这种情况下,将无法创建新的申请,并且只能访问一个申请。
第一种模式使用UserClient
类,第二种模式使用IndividualRequestClient
类。
用户授权示例使用
$client = new \nikserg\ItcomPublicApi\BaseClient('<bearer token>'); $createdCertificate = $client->createOrUpdate(['EPGU']); echo $createdCertificate->id; //ID созданной заявки $client->createOrUpdate(['EPGU'], $createdCertificate->id, 'new name'); //Обновление заявки
测试
为了系统不发送真实请求,可以替换为\nikserg\ItcomPublicApi\UserClient
类使用\nikserg\ItcomPublicApi\MockUserClient
类。
@todo 为IndividualRequestClient
类也实现类似的操作。