https://github.com/zerosdev/kirimwa-php-client
Client SDK Library for Kirimwa.cloud
https://github.com/zerosdev/kirimwa-php-client
Last synced: 6 months ago
JSON representation
Client SDK Library for Kirimwa.cloud
- Host: GitHub
- URL: https://github.com/zerosdev/kirimwa-php-client
- Owner: zerosdev
- License: mit
- Created: 2021-05-29T13:50:08.000Z (almost 5 years ago)
- Default Branch: 1.x
- Last Pushed: 2021-08-18T17:10:04.000Z (over 4 years ago)
- Last Synced: 2025-10-03T13:20:07.139Z (6 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KirimWA PHP Client
Client SDK Library for Kirimwa.cloud Server Application
## Requirements
- PHP 5.6+
- PHP JSON Extension
- [Guzzle, PHP HTTP Client](https://github.com/guzzle/guzzle)
## Installation
1. Run command
composer require zerosdev/kirimwa-php-client
### The following steps only needed if you are using Laravel
> For installation on Laravel 5.5+, **SKIP steps 2 & 3** because we have used the Package Discovery feature, Laravel will automatically register the Service Provider and Alias during installation.
2. Open your **config/app.php** and add this code to the providers array, it will looks like:
'providers' => [
// other providers
ZerosDev\KirimWA\Laravel\ServiceProvider::class,
],
3. Add this code to your class aliases array
'aliases' => [
// other aliases
'KirimWA' => ZerosDev\KirimWA\Laravel\Facade::class,
],
4. Run command
composer dump-autoload
5. Then
php artisan vendor:publish --provider="ZerosDev\KirimWA\Laravel\ServiceProvider"
6. Edit **config/kirimwa.php** and put your KirimWA Server information like API host and sender list
## Basic Usage
### Laravel Usage
```php
'http://yourwaserver.com',
'senders' => [
'6281234567890' => [
'host' => ':3001', // just place port number to follow 'default_host'
'key' => 'your api key here'
],
'6280987654321' => [
'host' => 'http://youranotherwaserver.com:3002', // or place full API host with port to use different host than the 'default_host'
'key' => 'your api key here'
],
]
]);
$kirimwa = new Client();
$kirimwa->sendText('6281234567890', 'This is message to be sent');
if( $kirimwa->hasError() ) {
echo $kirimwa->error();
}
else {
echo $kirimwa->response();
}
```