{"_id":"2972.ir","_rev":"3-6571e27cc14c7387a8fe11b8323649f5","name":"2972.ir","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"2972.ir","version":"1.0.0","keywords":["sms","sms-service","api","sms-api"],"author":{"name":"Hamidreza Mahdavipanah"},"license":"MIT","_id":"2972.ir@1.0.0","maintainers":[{"name":"mahdavipanah","email":"h.mahdavipanah@gmail.com"}],"homepage":"https://github.com/mahdavipanah/2972.ir#readme","bugs":{"url":"https://github.com/mahdavipanah/2972.ir/issues"},"dist":{"shasum":"2e8577642d92b1b3b5425ec23d74c83fbecf4b38","tarball":"https://registry.npmjs.org/2972.ir/-/2972.ir-1.0.0.tgz","integrity":"sha512-fiyFTciB9cDQ6XsiC+6HNDjMiopyKuNDN3EiCg+HrqKCB641LyhC8nl8O/jL2gxNdqXWhwiQByOpKsl3g8au4Q==","signatures":[{"sig":"MEQCIBV0HMDqk2YErOhFPql2IZxlMQRsWc1olq+HfFXMepUBAiA+iLmakvjQDNdmCLo1V89BItskLssu2Woe4/N0ZxcMsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"5066b0b79eba9135e098734764cc0024615f8e04","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mahdavipanah","email":"h.mahdavipanah@gmail.com"},"repository":{"url":"git+https://github.com/mahdavipanah/2972.ir.git","type":"git"},"_npmVersion":"5.3.0","description":"2972.ir SMS service Node.js API library","_nodeVersion":"8.1.4","dependencies":{"request":"^2.81.0"},"_npmOperationalInternal":{"tmp":"tmp/2972.ir-1.0.0.tgz_1500131556081_0.5678878757171333","host":"s3://npm-registry-packages"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.1":{"name":"2972.ir","version":"1.0.1","keywords":["sms","sms-service","api","sms-api"],"author":{"name":"Hamidreza Mahdavipanah"},"license":"MIT","_id":"2972.ir@1.0.1","maintainers":[{"name":"mahdavipanah","email":"h.mahdavipanah@gmail.com"}],"homepage":"https://github.com/mahdavipanah/2972.ir#readme","bugs":{"url":"https://github.com/mahdavipanah/2972.ir/issues"},"dist":{"shasum":"0afacda4241ca3fecfce5a9a9904d7b984e1d9bc","tarball":"https://registry.npmjs.org/2972.ir/-/2972.ir-1.0.1.tgz","integrity":"sha512-ngYpVsSpIKiC3lW5vjCUm6iyAiRDJqUgNert1evV70Cik62CugvneCiK0gSmQRaeibO1PulxuzgbKChoLLaGjw==","signatures":[{"sig":"MEYCIQC8QsxUz6/cR5hs93rU7dgeythpNXiSP0wInFfYyO9VvgIhALBiKiSQV4jw+S9EVEdEKHjJZ2TBcbk2wFQGlNHGTjGI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"81a1c24efaa9fc04d643a24e73815e8647131675","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mahdavipanah","email":"h.mahdavipanah@gmail.com"},"repository":{"url":"git+https://github.com/mahdavipanah/2972.ir.git","type":"git"},"_npmVersion":"5.3.0","description":"2972.ir SMS service Node.js API library","_nodeVersion":"8.1.4","dependencies":{"request":"^2.81.0"},"_npmOperationalInternal":{"tmp":"tmp/2972.ir-1.0.1.tgz_1500134243504_0.1076818061992526","host":"s3://npm-registry-packages"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2017-07-15T15:12:37.606Z","modified":"2024-11-30T11:46:06.940Z","1.0.0":"2017-07-15T15:12:37.606Z","1.0.1":"2017-07-15T15:57:24.850Z"},"bugs":{"url":"https://github.com/mahdavipanah/2972.ir/issues"},"author":{"name":"Hamidreza Mahdavipanah"},"license":"MIT","homepage":"https://github.com/mahdavipanah/2972.ir#readme","keywords":["sms","sms-service","api","sms-api"],"repository":{"url":"git+https://github.com/mahdavipanah/2972.ir.git","type":"git"},"description":"2972.ir SMS service Node.js API library","maintainers":[{"name":"mahdavipanah","email":"h.mahdavipanah@gmail.com"}],"readme":"# [2972.ir](http://2972.ir/)\n2972.ir SMS service Node.js API library\n\n# Usage\nInstall from [npm](https://www.npmjs.com/package/2972.ir)\n```sh\nnpm install 2972.ir\n```\nand then\n```javascript\nvar sendSMS = require('2972.ir');\n\nsendSMS ({\n    username: \"account's username\",\n    password: \"account's password\",\n    number: \"account's number\",\n    recipient: [\"09131234567\", \"09361234567\"] // Or just \"09131234567\"\n    message: \"SMS's content\",\n    port: 10, // If you don't know what you're doing leave it out for it's default 0 value\n    flash: false\n}, function (err, res) {\n    if (err)\n        console.log(\"Error happened in sending SMS.\");\n    else\n        console.log(\"SMS sent successfully\");\n});\n```\n\n#### If you want to use this package synchronously get help from packages like [deasync](https://www.npmjs.com/package/deasync).  \n\n## What is _flash_ option?  \nA flash SMS message is an SMS message that, instead of being stored in the SIM or memory of the receiving phone, pops-up on the receiving phone’s screen, without the user taking any action. When dismissed the message is usually gone.\n\n## What are callback function's parameters\n### err\nThe first parameter (_err_) indicates whether any error happened or not.  \n**If _err_ is _0_ then everything is OK** and your request for sending SMS has successfully sent and service API\nhas sent successful response.  \n**If it's lower than zero then it's SMS service's error** and codes are defined in _[2972.ir_API_Manual.pdf](./2972.ir_API_Manual.pdf)_ (PDF document is in Persian language).  \n**If it's not number then it's [request](https://www.npmjs.com/package/request) package's error. (See it's documentation for more details)**\n### res\nThe second parameter (__res__) is [request](https://www.npmjs.com/package/request) package's response. (See it's documentation for more details)**\n\n## Why this documentation is in English, why not in Persian?\nWhile the 2972.ir service is an Iranian service and therefore it's website and all of it's documentations\nare in English (At the time of writing), I decided to write this README file in english because github does not support Persian language\nin markdown READMEs very well and also I think nowadays almost all Iranian developers know (and if not, should know) English.  \n*But feel free to translate this README to Persian or _[2972.ir_API_Manual.pdf](./2972.ir_API_Manual.pdf)_ to English or\nor to edit this README. You're just a pull request away from this to happen!*\n","readmeFilename":"README.md"}