raditzfarhan/realm-chat

1.0.1 2023-02-20 22:42 UTC

This package is auto-updated.

Last update: 2024-12-21 02:32:46 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

This is Realm Chat SDK.

Installation

You can install the package via composer:

composer require raditzfarhan/realm-chat

Available Methods

  • addDevice(string $name)
  • sendMessage(string $number, string $message, ?string $fileUrl, ?string $fileName)
  • sendButtonMessage(string $number, array $buttons, ?string $message, ?string $fileUrl)
  • sendTemplateMessage(string $number, array $templates, string $message, ?string $fileUrl)
  • recentChat()
  • getContact()
  • checkNumber(string $number)

Usage

use RaditzFarhan\RealmChat\RealmChat;


$realmChat = new RealmChat($apiKey);

$addDevice = $realmChat->addDevice('device name'); 

$realmChat->setDeviceId('deviceId');

$sendMessage = $realmChat->sendMessage(
    number: '6012XXXXXXX',
    message: 'Hello!'
);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email raditzfarhan@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.