Skip to content

Kavenegar Migration to Ghasedak API Client Writen In Node

Notifications You must be signed in to change notification settings

ghasedakapi/ghasedak-kavenegar-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

ghasedak-kavenegar-node

Installation

For installing Ghasedak-Kavenegar use this command via npm

npm install ghasedakkavenegar

If you don't have npm you can easily install it from npm website

Usage

Well, There is two example to Send SMS by node below.

var Kavenegar = require('ghasedakkavenegar');
var api = Kavenegar.KavenegarApi({
    apikey: 'your apikey here'
});
api.Send({
        message: "وبسرویس قاصدک برای کاربران کاوه‌نگار",
        sender: "10004346",
        receptor: "09123456789,09367891011"
    },
    function(response, status) {
        console.log(response);
        console.log(status);
    });
/*
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
        }
    ]
}
*/
var Kavenegar = require('kavenegar');
var api = Kavenegar.KavenegarApi({
    apikey: 'your apikey here'
});
api.VerifyLookup({
    receptor: "09361234567",
    token: "852596",
    template: "registerverify"
}, function(response, status) {
    console.log(response);
    console.log(status);
});
/*
sample output
{
    "return":
    {
        "status":200,
        "message":"تایید شد"
    },
    "entries": {
            "messageid":8792343,
			"message": "ممنون از ثبت نام شما کد تایید عضویت  : 852596",
            "status":5,
            "statustext":"ارسال به مخابرات",
            "sender":"10004346",
            "receptor":"09361234567",
            "date":1356619709,
            "cost":120
   }    
    
}
*/

Contribution

Bug fixes, docs, and enhancements welcome! Please let us know [email protected]

About

Kavenegar Migration to Ghasedak API Client Writen In Node

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%