Skip to content

Commit

Permalink
Update composer.json and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Duda committed Apr 19, 2016
1 parent 8c52fc7 commit 83511b7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
# smsapi-bundle
# kch/smsapi-bundle
Symfony 2 Bundle for SMSApi PHP Client library.

Symfony 2 Bundle dla biblioteki SMSApi PHP Client.

## Installation:
`composer require kch/smsapi-bundle`

## Configuration - config.yml:
```
kch_sms_api:
clients:
default:
client_login: TEST
client_password_hash: TEST
```

## Usage - sending one SMS:
Based on original library code: [https://github.com/smsapi/smsapi-php-client/wiki/Examples](https://github.com/smsapi/smsapi-php-client/wiki/Examples)
```
$smsFactory = $this->get('kch_sms_api.sms_factory.default');
try {
$actionSend = $smsFactory->actionSend();
$actionSend->setTo('600xxxxxx');
$actionSend->setText('Hello World!!');
$actionSend->setSender('Info'); //Pole nadawcy, lub typ wiadomości: 'ECO', '2Way'
$response = $actionSend->execute();
foreach ($response->getList() as $status) {
echo $status->getNumber() . ' ' . $status->getPoints() . ' ' . $status->getStatus();
}
} catch (SmsapiException $exception) {
echo 'ERROR: ' . $exception->getMessage();
}
```
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"description" : "Symfony 2 Bundle for SMSApi PHP Client library.",
"type" : "symfony-bundle",
"authors" : [{
"name" : "",
"email" : ""
"name" : "KredytyChwilowkiProgrammer",
"email" : "[email protected]"
}],
"keywords" : ["sms", "mms", "vms", "bundle"],
"license" : [
""
"MIT"
],
"require" : {
"php": ">=5.3.0",
Expand Down

0 comments on commit 83511b7

Please sign in to comment.