定制 dagar/convoy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dagar/convoy

最新稳定版本:v1.0.0

Composer 安装命令:

composer require dagar/convoy

包简介

php plugin for convoy api

README 文档

README

The Convoy Webhook Platform PHP SDK is a powerful tool that allows developers to easily integrate Convoy's webhook functionality into their PHP applications. With this SDK, you can effortlessly send and receive webhooks, handle events, and manage subscriptions.

Features

  • Easy Integration: The SDK provides a simple and intuitive interface for integrating Convoy's webhook functionality into your PHP applications.

  • Webhook Management: With the SDK, you can easily send webhooks to external services and receive webhooks from Convoy.

  • Event Handling: The SDK allows you to handle incoming webhook events and perform custom actions based on the event data.

  • Subscription Management: You can manage your webhook subscriptions, including creating, updating, and deleting subscriptions.

Installation

To install the Convoy Webhook Platform PHP SDK, simply run the following command:

composer require dagar/convoy

Usage

To get started with the SDK, follow these steps:

  1. Import the SDK into your PHP file:
require_once 'vendor/autoload.php';
use Dagar\Convoy\Api;
  1. Initialize the API class:
$authToken = 'CO.yjkKPKAa4FYGJNqo.81uZ3tWu7cLHv6twgkNFZKWmnyCMfa4b7i58Z48FVJTX0WGR9mNfX878Ps1BsoHm';
$url = "https://api.convoy.com";
$orgID = "01J6Y7JN7JEAE8X94RW4W5SDPE";
$projectId = "01J6Y8RZAKBAH4D2Y8CQP6305G";

$api = new Api($authToken, $url);
  1. Start sending and receiving webhooks:
$resp = $api->Project()->Create('project_name', $orgID);
print_r($resp);

$resp = $api->Project()->List($orgID);
print_r($resp);

$resp = $api->Project($projectId)->Source()->List();
print_r($resp);

$resp = $api->Project($projectId)->Source()->Create('source_name');
print_r($resp);

$resp = $api->Project($projectId)->Endpoint()->List();
print_r($resp);

$resp = $api->Project($projectId)->Endpoint()->Create('webhook', "https://webhook.site/");
print_r($resp);

$resp = $api->Project($projectId)->Subscription()->List();
print_r($resp);

$resp = $api->Project($projectId)->Subscription()->Create('test', '01J6Y8RZAKBAH4D2Y8CQP6305G', '01J6Y8RZAKBAH4D2Y8CQP6305G');
print_r($resp);

For more detailed usage instructions and examples, please refer to the documentation.

Contributing

We welcome contributions from the community! If you have any suggestions, bug reports, or feature requests, please open an issue on our GitHub repository.

License

This SDK is released under the MIT License.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-05