pandadoc/php-client
Composer 安装命令:
composer require pandadoc/php-client
包简介
The Official PandaDoc PHP client SDK
README 文档
README
PandaDoc SDK spans a broad range of functionality to help you build incredible documents automation experiences inside your product.
Docs
Requirements
PHP 7.3 and later
Installation
Composer
To install the bindings via Composer, use
composer require pandadoc/php-client
or add the following to composer.json:
{
"require": {
"pandadoc/php-client": "6.2.0"
}
}
Then run composer install
Getting Started
<?php require_once(__DIR__ . '/vendor/autoload.php'); # Defining the host is optional and defaults to https://api.pandadoc.com # See Configuration.php for a list of all supported configuration parameters. $apiKey = 'YOUR_API_KEY'; $config = PandaDoc\Client\Configuration::getDefaultConfiguration() ->setApiKey('Authorization', $apiKey) ->setApiKeyPrefix('Authorization', 'API-Key'); $apiInstance = new PandaDoc\Client\Api\TemplatesApi( // If you want to 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 ); try { $result = $apiInstance->listTemplates(); print_r($result); } catch (Exception $e) { echo 'Exception when calling TemplatesApi->listTemplates: ', $e->getMessage(), PHP_EOL; }
Authorization
apiKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
oauth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://app.pandadoc.com/oauth2/authorize
- Scopes:
- read+write: Use
read+writeto create, send, delete, and download documents, andreadto view templates and document details.
Examples
Docs
Official PandaDoc public API docs
https://developers.pandadoc.com/reference/about
Documentation for API Endpoints
All URIs are relative to https://api.pandadoc.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| APILogsApi | detailsLog | GET /public/v1/logs/{id} | Details API Log |
| APILogsApi | listLogs | GET /public/v1/logs | List API Log |
| ContactsApi | createContact | POST /public/v1/contacts | Create contact |
| ContactsApi | deleteContact | DELETE /public/v1/contacts/{id} | Delete contact by id |
| ContactsApi | detailsContact | GET /public/v1/contacts/{id} | Get contact details by id |
| ContactsApi | listContacts | GET /public/v1/contacts | List contacts |
| ContactsApi | updateContact | PATCH /public/v1/contacts/{id} | Update contact by id |
| ContentLibraryItemsApi | detailsContentLibraryItem | GET /public/v1/content-library-items/{id}/details | Details Content Library Item |
| ContentLibraryItemsApi | listContentLibraryItems | GET /public/v1/content-library-items | List Content Library Item |
| DocumentAttachmentsApi | createDocumentAttachment | POST /public/v1/documents/{id}/attachments | Document Attachment Create |
| DocumentAttachmentsApi | deleteDocumentAttachment | DELETE /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Delete |
| DocumentAttachmentsApi | detailsDocumentAttachment | GET /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Details |
| DocumentAttachmentsApi | downloadDocumentAttachment | GET /public/v1/documents/{id}/attachments/{attachment_id}/download | Document Attachment Download |
| DocumentAttachmentsApi | listDocumentAttachments | GET /public/v1/documents/{id}/attachments | Document Attachment List |
| DocumentRecipientsApi | addDocumentRecipient | POST /public/v1/documents/{id}/recipients | Add Document Recipient |
| DocumentRecipientsApi | deleteDocumentRecipient | DELETE /public/v1/documents/{id}/recipients/{recipient_id} | Delete Document Recipient |
| DocumentRecipientsApi | editDocumentRecipient | PATCH /public/v1/documents/{id}/recipients/recipient/{recipient_id} | Edit Document Recipient |
| DocumentRecipientsApi | reassignDocumentRecipient | POST /public/v1/documents/{id}/recipients/{recipient_id}/reassign | Reassign Document Recipient |
| DocumentsApi | changeDocumentStatus | PATCH /public/v1/documents/{id}/status | Document status change |
| DocumentsApi | createDocument | POST /public/v1/documents | Create document |
| DocumentsApi | createDocumentLink | POST /public/v1/documents/{id}/session | Create a Document Link |
| DocumentsApi | createLinkedObject | POST /public/v1/documents/{id}/linked-objects | Create Linked Object |
| DocumentsApi | deleteDocument | DELETE /public/v1/documents/{id} | Delete document by id |
| DocumentsApi | deleteLinkedObject | DELETE /public/v1/documents/{id}/linked-objects/{linked_object_id} | Delete Linked Object |
| DocumentsApi | detailsDocument | GET /public/v1/documents/{id}/details | Document details |
| DocumentsApi | documentMoveToFolder | POST /public/v1/documents/{id}/move-to-folder/{folder_id} | Document move to folder |
| DocumentsApi | downloadDocument | GET /public/v1/documents/{id}/download | Document download |
| DocumentsApi | downloadProtectedDocument | GET /public/v1/documents/{id}/download-protected | Download document protected |
| DocumentsApi | listDocuments | GET /public/v1/documents | List documents |
| DocumentsApi | listLinkedObjects | GET /public/v1/documents/{id}/linked-objects | List Linked Objects |
| DocumentsApi | sendDocument | POST /public/v1/documents/{id}/send | Send Document |
| DocumentsApi | statusDocument | GET /public/v1/documents/{id} | Document status |
| DocumentsApi | transferAllDocumentsOwnership | PATCH /public/v1/documents/ownership | Transfer all documents ownership |
| DocumentsApi | transferDocumentOwnership | PATCH /public/v1/documents/{id}/ownership | Update document ownership |
| DocumentsApi | updateDocument | PATCH /public/v1/documents/{id} | Update Document only in the draft status |
| FoldersAPIApi | createDocumentFolder | POST /public/v1/documents/folders | Create Documents Folder |
| FoldersAPIApi | createTemplateFolder | POST /public/v1/templates/folders | Create Templates Folder |
| FoldersAPIApi | listDocumentFolders | GET /public/v1/documents/folders | List Documents Folders |
| FoldersAPIApi | listTemplateFolders | GET /public/v1/templates/folders | List Templates Folders |
| FoldersAPIApi | renameDocumentFolder | PUT /public/v1/documents/folders/{id} | Rename Documents Folder |
| FoldersAPIApi | renameTemplateFolder | PUT /public/v1/templates/folders/{id} | Rename Templates Folder |
| FormsApi | listForm | GET /public/v1/forms | Forms |
| MembersApi | detailsCurrentMember | GET /public/v1/members/current | Current member details |
| MembersApi | detailsMember | GET /public/v1/members/{id} | Member details |
| MembersApi | listMembers | GET /public/v1/members | List members |
| OAuth20AuthenticationApi | accessToken | POST /oauth2/access_token | Create/Refresh Access Token |
| QuotesApi | quoteUpdate | PUT /public/v1/documents/{document_id}/quotes/{quote_id} | Quote update |
| SectionsApi | listSections | GET /public/v1/documents/{document_id}/sections | List sections |
| SectionsApi | sectionDetails | GET /public/v1/documents/{document_id}/sections/uploads/{upload_id} | Section details |
| SectionsApi | sectionInfo | GET /public/v1/documents/{document_id}/sections/{section_id} | Section Info |
| SectionsApi | uploadSection | POST /public/v1/documents/{document_id}/sections/uploads | Upload section |
| TemplatesApi | deleteTemplate | DELETE /public/v1/templates/{id} | Delete Template |
| TemplatesApi | detailsTemplate | GET /public/v1/templates/{id}/details | Details Template |
| TemplatesApi | listTemplates | GET /public/v1/templates | List Templates |
| UserAndWorkspaceManagementApi | addMember | POST /public/v1/workspaces/{workspace_id}/members | Add member |
| UserAndWorkspaceManagementApi | createUser | POST /public/v1/users | Create User |
| UserAndWorkspaceManagementApi | createWorkspace | POST /public/v1/workspaces | Create Workspace |
| WebhookEventsApi | detailsWebhookEvent | GET /public/v1/webhook-events/{id} | Get webhook event by uuid |
| WebhookEventsApi | listWebhookEvent | GET /public/v1/webhook-events | Get webhook event page |
| WebhookSubscriptionsApi | createWebhookSubscription | POST /public/v1/webhook-subscriptions | Create webhook subscription |
| WebhookSubscriptionsApi | deleteWebhookSubscription | DELETE /public/v1/webhook-subscriptions/{id} | Delete webhook subscription |
| WebhookSubscriptionsApi | detailsWebhookSubscription | GET /public/v1/webhook-subscriptions/{id} | Get webhook subscription by uuid |
| WebhookSubscriptionsApi | listWebhookSubscriptions | GET /public/v1/webhook-subscriptions | Get all webhook subscriptions |
| WebhookSubscriptionsApi | updateWebhookSubscription | PATCH /public/v1/webhook-subscriptions/{id} | Update webhook subscription |
| WebhookSubscriptionsApi | updateWebhookSubscriptionSharedKey | PATCH /public/v1/webhook-subscriptions/{id}/shared-key | Regenerate webhook subscription shared key |
License
SDK is licensed under the following License.
pandadoc/php-client 适用场景与选型建议
pandadoc/php-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 262.86k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2021 年 12 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pandadoc/php-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pandadoc/php-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pandadoc/php-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Alfabank REST API integration
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
BlockCypher's PHP SDK for REST API
Helper classes for creating cookie headers
统计信息
- 总下载量: 262.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-30