phpevo/phpevo

Uma SDK em PHP para integração simplificada com a Evolution API.

Maintainers

Details

github.com/phpevo/phpevo

Source

Fund package maintenance!
mariolucasdev

v1.0.0-beta4 2025-01-18 19:46 UTC

This package is auto-updated.

Last update: 2025-05-24 19:25:10 UTC


README

Using PHPEvo

installing package:

composer require phpevo/phpevo

load Evolution class:

Resouces

Instances

$phpevo = (new PHPEvo($apiKey, $apiBaseUrl))->instance;

$phpevo->setName('phpevo');

create instance

/**
 * @return array with key qrcode with base64 image
 */
$phpevo->create();

get instances

/**
 * @return array with all instances
 */
$phpevo->getAll();

connect instance

/**
 * @return array with key qrcode with base64 image
 */
$phpevo->connect();

connection state

/**
 * @return array with state key
 */
$phpevo->getState();

disconnect instance

/**
 * @return bool
 */
$phpevo->disconnect();
destroy instance
/**
 * @return bool
 */
$phpevo->destroy();

Media

$phpevo = (new PHPEvo($apiKey, $apiBaseUrl))->send;

$phpevo
    ->instance($instance)
    ->to($phone);

send text:

/**
 * @return array
 */
$phpevo->text($message, $params);

send media:

/**
 * @return array
 */
$phpevo->sendImage($imagePath);

/**
 * @return array
 */
$phpevo->sendAudio($audioPath);

/**
 * @return array
 */
$phpevo->sendDocument($documentPath);

/**
 * @return array
 */
$phpevo->sendVideo($videoPath);

/**
 * @return array
 */
$phpevo->sendContact(new ContactMessage($phone, $nonStylizedPhone), $options);

/**
 * @return array
 */
$phpevo->sendLocation(new LocationMessage($lat, $long, $address), $options);

/**
 * @return array
 */
$phpevo->sendReaction(new ReactionMessage($key, '🧬'));

/**
 * @return array
 */
$phpevo->sendPoll(new PollMessage($title, $selectableCount, $values), $options);

Events

WebSockets

$phpevo = (new PHPEvo($apiKey, $apiBaseUrl))->websocket;

$phpevo->instance($instance);

Set WebSockets:

/**
 * @param bool $enabled
 * @param array $events (See [all valid events](./src/Services/Enums/ValidEvents.php))
 * @return array
 */
$phpevo->set($enabled, $events);

Get WebSockets:

/**
 * @return array
 */
$phpevo->find();

SQS

$phpevo = (new PHPEvo($apiKey, $apiBaseUrl))->sqs;

$phpevo->instance($instance);

Set SQS:

/**
 * @param bool $enabled
 * @param array $events (See [all valid events](./src/Services/Enums/ValidEvents.php))
 * @return array
 */
$phpevo->set($enabled, $events);

Get SQS:

/**
 * @return array
 */
$phpevo->find();

RabbitMQ

$phpevo = (new PHPEvo($apiKey, $apiBaseUrl))->rabbit;

$phpevo->instance($instance);

Set RabbitMQ:

/**
 * @param bool $enabled
 * @param array $events (See [all valid events](./src/Services/Enums/ValidEvents.php))
 * @return array
 */
$phpevo->set($enabled, $events);

Get RabbitMQ:

/**
 * @return array
 */
$phpevo->find();

Roadmap

Instances

  • ✅ Create Instance
  • ✅ Fetch Instances
  • ✅ Instance Connect
  • ✅ Connection State
  • ✅ Logout Instance
  • ✅ Delete Instance
  • Restart Instance
  • Set Presence

Send

  • ✅ Send plain text
  • ✅ Send image
  • ✅ Send document
  • ✅ Send audio
  • ✅ Send video
  • ✅ Send reaction
  • ✅ Send Location
  • ✅ Send Contact
  • ✅ Send Poll
  • check status
  • Send List
  • Send Buttons

🌟 Contribuindo

Contribuições são muito bem-vindas! Para começar:

  • Faça um fork do projeto.
  • Crie uma branch para sua feature (git checkout -b feature/new-feature).
  • Faça commit das alterações (git commit -m 'feat: added a new feature').
  • Envie sua branch (git push origin feature/new-feature).
  • Abra um pull request para análise.

📄 Licença

Este projeto está licenciado sob a MIT License. Consulte o arquivo LICENSE para mais detalhes.

🤝 Contato

💻 GitHub: mariolucasdev

📧 Email: mariolucasdev@gmail.com

☕ Buy me a coffee

Sponsor me