lbss2015 / signrequest-client-guzzle-7
由 SignRequest.com 的官方 PHP 客户端分叉而来 (https://signrequest.com)
dev-master
2023-04-27 19:38 UTC
Requires
- php: ^7.2.5 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-09-27 22:43:30 UTC
README
SignRequest.com 的 API
如何使用此示例
https://github.com/SignRequest/signrequest-php-example
要求
PHP 5.5 及以上版本
安装 & 使用
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{
"require": {
"signrequest/signrequest-client": "1.3.0"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/signrequest-php-client/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
API 文档
完整的 API 文档,包括代码示例,可以在以下地址找到:https://signrequest.com/api/v1/docs/
入门
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: Token $config = SignRequest\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); $config = SignRequest\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token'); $apiInstance = new SignRequest\Api\DocumentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $data = new \SignRequest\Model\Document(); // \SignRequest\Model\Document | $data->setFileFromUrl('https://docs.google.com/document/d/1oI2R1SxfMNZXiz3jCQvorpoklF9xq_dCJnOpkI-zo80/edit?usp=sharing'); try { $result = $apiInstance->documentsCreate($data); print_r($result); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->documentsCreate: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://signrequest.com/api/v1
模型文档
- AuthToken
- Document
- DocumentAttachment
- DocumentSearch
- DocumentSignerTemplateConf
- DocumentSigningLog
- DocumentSignrequest
- DocumentTeam
- Event
- FileFromSf
- InlineDocumentSignerIntegrationData
- InlineIntegrationData
- InlinePrefillTags
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- InlineResponse201
- InlineResponse2011
- InlineSignRequest
- InlineTeam
- InlineTeamMember
- InviteMember
- 占位符
- RequiredAttachment
- SignRequest
- SignRequestQuickCreate
- Signer
- SignerAttachment
- SignerInputs
- SigningLog
- Team
- TeamMember
- Template
- User
- WebhookSubscription
授权文档
令牌
- 类型: API 密钥
- API 密钥参数名称: Authorization
- 位置: HTTP 头部