crt0/evolution-sdk
Composer 安装命令:
composer require crt0/evolution-sdk
包简介
SDK Para consumir API evolution do WhatsApp
README 文档
README
Minimal SDK to Evolution API | PHP
SDK Usage Documentation
This document provides a simple guide on how to use the EvolutionSDK PHP SDK to interact with the Evolution API.
Installation
To use the EvolutionSDK, you need to include it in your PHP project. You can do this via Composer:
bashcomposer require evolution-sdk/sdk
Initialization
First, you need to initialize the SDK by providing the required configurations.
php<?php use EvolutionSDK\SDK; use EvolutionSDK\util\Config;// Include Composer's autoloader require_once 'vendor/autoload.php';
// Initialize SDK with configuration $config = new Config('YOUR_API_KEY', 'https://api.example.com'); $sdk = new SDK($config);
Creating an Instance
You can create a new instance using the create method.
php$instanceName = 'example_instance';
$qrcode = true; // Optional
$response = $sdk->create($instanceName, $qrcode);
print_r($response);
Sending a Message
Send a message to a specific number on WhatsApp.
php$instance = 'example_instance';
$number = '551234567890'; // WhatsApp number
$message = 'Hello, this is a test message.';
$options = []; // Optional
$response = $sdk->sendMessage($instance, $number, $message, $options);
print_r($response);
Connecting to Instance
Connect to a specific instance by generating a QR code.
php$instance = 'example_instance';
$response = $sdk->connect($instance);
print_r($response);
Checking Instance Status
Check the status of a specific instance.
php$instance = 'example_instance';
$response = $sdk->instanceStatus($instance);
print_r($response);
Error Handling
In case of errors, exceptions will be thrown. You can catch them using standard PHP try-catch blocks.
phptry {
// Perform SDK operations
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
Note
Replace 'YOUR_API_KEY' and 'https://api.example.com' with your actual API key and API base URL respectively.
This documentation covers basic usage of the EvolutionSDK PHP SDK. For more advanced usage and detailed information, refer to the EvolutionSDK documentation or source code.
crt0/evolution-sdk 适用场景与选型建议
crt0/evolution-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 5, 最近一次更新时间为 2025 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 crt0/evolution-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crt0/evolution-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2025-05-08