kavenegar-ts
v1.0.5
Published
Kavenegar API implementation in TypeScript.
Downloads
18
Readme
Kavenegar-TS
A Simple async/await implementation of Kavenegar API using Typescript.
Caution: This is not an official library
Please refer to This Repo for the official library.
If you need further information about API documentation Please visit Kavenegar RESTful API Document
Installation
npm install kavenegar-ts
Usage
Simple Send:
import Kavenegar from 'kavenegar-ts';
const api = new Kavenegar('your apikey here');
const response = await api.Send({
message: "خدمات پیام کوتاه کاوه نگار",
sender: "10004346",
receptor: "09123456789,09367891011"
});
/*
sample output
{
"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
}
]
}
*/
Verify Lookup:
import Kavenegar from 'kavenegar-ts';
const api = new Kavenegar('your apikey here');
const response = await api.VerifyLookup({
receptor: "09361234567",
token: "852596",
template: "registerverify"
});
/*
sample output
{
"return":
{
"status":200,
"message":"تایید شد"
},
"entries": {
"messageid":8792343,
"message": "ممنون از ثبت نام شما کد تایید عضویت : 852596",
"status":5,
"statustext":"ارسال به مخابرات",
"sender":"10004346",
"receptor":"09361234567",
"date":1356619709,
"cost":120
}
}
*/
Send Array:
import Kavenegar from 'kavenegar-ts';
const api = new Kavenegar('your apikey here');
const response = await api.SendArray(
{
message: '["کاوه نگار", "وب سرویس کاوه نگار"]',
sender: '["10008445","10008445"]',
receptor: '["09123456789","09123456781"]'
});
راهنما
معرفی سرویس کاوه نگار
کاوه نگار یک وب سرویس ارسال و دریافت پیامک و تماس صوتی است که به راحتی میتوانید از آن استفاده نمایید.
ساخت حساب کاربری
اگر در وب سرویس کاوه نگار عضو نیستید میتوانید از لینک عضویت ثبت نام و اکانت آزمایشی برای تست API دریافت نمایید.
مستندات
برای مشاهده اطلاعات کامل مستندات وب سرویس پیامک به صفحه مستندات وب سرویس مراجعه نمایید.
راهنمای فارسی
در صورتی که مایل هستید راهنمای فارسی کیت توسعه کاوه نگار را مطالعه کنید به صفحه کد ارسال پیامک مراجعه نمایید.
اطالاعات بیشتر
برای مطالعه بیشتر به صفحه معرفی وب سرویس اس ام اس کاوه نگار مراجعه نمایید .
License
Licensed under the APLv2. See the LICENSE file for details.