signrequest / signrequest-client
SignRequest.com (https://signrequest.com) 的官方 PHP 客户端
1.3.0
2020-01-10 08:19 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-28 08:05:28 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
- Placeholder
- RequiredAttachment
- SignRequest
- SignRequestQuickCreate
- Signer
- SignerAttachment
- SignerInputs
- SigningLog
- Team
- TeamMember
- Template
- User
- WebhookSubscription
授权文档
令牌
- 类型: API 密钥
- API 密钥参数名: Authorization
- 位置: HTTP 头部