Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to v2.0 #23

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
.vscode/
.idea/
93 changes: 44 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# kavenegar-PHP
# Kavenegar-PHP
[![Latest Stable Version](https://poser.pugx.org/kavenegar/php/v/stable.svg)](https://packagist.org/packages/kavenegar/php)
[![Total Downloads](https://poser.pugx.org/kavenegar/php/downloads.svg)](https://packagist.org/packages/kavenegar/php)
[![Total Downloads](https://poser.pugx.org/kavenegar/php/downloads.svg)](https://packagist.org/packages/kavenegar/php)

# <a href="http://kavenegar.com/rest.html">Kavenegar RESTful API Document</a>
If you need to future information about API document Please visit RESTful Document

Expand All @@ -15,7 +15,7 @@ After that you just need to pick API-KEY up from <a href="http://panel.kavenegar
</p>
<hr>

Use in these ways :
Use in these ways:

```php
composer require kavenegar/php
Expand All @@ -26,7 +26,7 @@ or add
```php
"kavenegar/php": "*"
```
And run following command to download extension using **composer**
And run following command to download extension using **composer**


```php
Expand All @@ -37,7 +37,7 @@ $ composer update
Usage
-----

Well, There is an example to Send SMS by PHP.
Here is an example to Send SMS by PHP.

```php
require __DIR__ . '/vendor/autoload.php';
Expand All @@ -58,7 +58,7 @@ try{
echo "receptor = $r->receptor";
echo "date = $r->date";
echo "cost = $r->cost";
}
}
}
}
catch(\Kavenegar\Exceptions\ApiException $e){
Expand All @@ -69,51 +69,48 @@ catch(\Kavenegar\Exceptions\HttpException $e){
// در زمانی که مشکلی در برقرای ارتباط با وب سرویس وجود داشته باشد این خطا رخ می دهد
echo $e->errorMessage();
}
```

/*
sample output
Example output:
```json
{
"return":
{
"status":200,
"message":"تایید شد"
},
"entries":
[
{
"messageid":8792343,
"message":"خدمات پیام کوتاه کاوه نگار",
"status":1,
"statustext":"در صف ارسال",
"sender":"10004346",
"receptor":"09123456789",
"date":1356619709,
"cost":120
},
{
"messageid":8792344,
"message":"خدمات پیام کوتاه کاوه نگار",
"status":1,
"statustext":"در صف ارسال",
"sender":"10004346",
"receptor":"09367891011",
"date":1356619709,
"cost":120
}
]
"return": {
"status": 200,
"message": "تایید شد"
},
"entries": [
{
"messageid": 8792343,
"message": "خدمات پیام کوتاه کاوه نگار",
"status": 1,
"statustext": "در صف ارسال",
"sender": "10004346",
"receptor": "09123456789",
"date": 1356619709,
"cost": 120
},
{
"messageid": 8792344,
"message": "خدمات پیام کوتاه کاوه نگار",
"status": 1,
"statustext": "در صف ارسال",
"sender": "10004346",
"receptor": "09367891011",
"date": 1356619709,
"cost": 120
}
]
}
*/
```


## Contribution

Bug fixes, docs, and enhancements welcome! Please let us know <a href="mailto:[email protected]?Subject=SDK" target="_top">[email protected]</a>
Bug fixes, documentation, and enhancements are welcome! Please let us know here: <a href="mailto:[email protected]?Subject=SDK" target="_top">[email protected]</a>

<hr>

<div dir='rtl'>

## راهنما

### معرفی سرویس کاوه نگار
Expand All @@ -122,11 +119,11 @@ Bug fixes, docs, and enhancements welcome! Please let us know <a href="mailto:su

### ساخت حساب کاربری

اگر در وب سرویس کاوه نگار عضو نیستید میتوانید از [لینک عضویت](http://panel.kavenegar.com/client/membership/register) ثبت نام و اکانت آزمایشی برای تست API دریافت نمایید.
اگر در وب سرویس کاوه نگار عضو نیستید میتوانید از [لینک عضویت](http://panel.kavenegar.com/client/membership/register) ثبت نام و اکانت آزمایشی برای تست API دریافت نمایید.

### مستندات

برای مشاهده اطلاعات کامل مستندات [وب سرویس پیامک](http://kavenegar.com/وب-سرویس-پیامک.html) به صفحه [مستندات وب سرویس](http://kavenegar.com/rest.html) مراجعه نمایید.
برای مشاهده اطلاعات کامل مستندات [وب سرویس پیامک](http://kavenegar.com/وب-سرویس-پیامک.html) به صفحه [مستندات وب سرویس](http://kavenegar.com/rest.html) مراجعه نمایید.

### راهنمای فارسی

Expand All @@ -138,13 +135,11 @@ Bug fixes, docs, and enhancements welcome! Please let us know <a href="mailto:su
کاوه نگار
مراجعه نمایید .

اگر در استفاده از کیت های سرویس کاوه نگار مشکلی یا پیشنهادی داشتید ما را با یک Pull Request یا ارسال ایمیل به [email protected] خوشحال کنید.
اگر در استفاده از کیت های سرویس کاوه نگار مشکلی یا پیشنهادی داشتید ما را با یک Pull Request یا ارسال ایمیل به [email protected] خوشحال کنید.

##
![http://kavenegar.com](http://kavenegar.com/public/images/logo.png)
![http://kavenegar.com](http://kavenegar.com/public/images/logo.png)

[http://kavenegar.com](http://kavenegar.com)
[http://kavenegar.com](http://kavenegar.com)

</div>


3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "kavenegar/php",
"type": "library",
"description": "A PHP wrapper for Kavenegar's API",
"version": "2.0.0-dev",
"keywords": ["kavenegar", "sms", "api"],
"homepage": "http://github.com/Kavenegar/kavenegar-php",
"license": "MIT",
Expand All @@ -12,7 +13,7 @@
}
],
"require": {
"php": ">=5.4.0"
"php": ">=8.1"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 13 additions & 0 deletions src/Exceptions/NotProperlyConfiguredException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Kavenegar\Exceptions;

class NotProperlyConfiguredException extends BaseRuntimeException
{
public function getName()
{
return 'NotProperlyConfigured';
}
}

?>
Loading