|
1 | 1 | # gabia-sms |
2 | 2 |
|
3 | | -\*\* 주의 \*\* |
| 3 | +## \*\* caution \*\* |
4 | 4 |
|
5 | | -이 module은 가비아에서 공식지원하는 것이 아님을 알려드립니다 |
| 5 | +> This module is not officially supported by Gabia |
6 | 6 |
|
| 7 | +>this module is developing now. it can be unstable. |
| 8 | +
|
| 9 | +<br/> |
| 10 | + |
| 11 | +> this library is based on <a href="https://sms.gabia.com/admin/api/">official gabiaSMS api guide</a> |
| 12 | +
|
| 13 | +<br/> |
| 14 | + |
| 15 | +## before use this module <br /> |
| 16 | + |
| 17 | +1. Sign Up for <a href="http://sms.gabia.com">gabiaSMS</a> Service |
| 18 | + |
| 19 | +2. Register SendingIP |
| 20 | + |
| 21 | + -> <a href="http://sms.gabia.com/admin">gabiaSMS admin</a> -> default setting -> setting sending IP |
| 22 | + |
| 23 | +3. Register Outgoing Information |
| 24 | + |
| 25 | + -> <a href="http://sms.gabia.com/settings">gabiaSMS setting</a> -> register outgoing information |
| 26 | + |
| 27 | +## using module <br /><br /> |
| 28 | + |
| 29 | +### create module |
| 30 | + ```ts |
| 31 | + const gabiaId: string = 'id used in gabiaSMS'; |
| 32 | + const gabiaAPIKEY: string = 'APIKEY issued by gabiaSMS'; |
| 33 | + const gabiaRef: string = 'Any unique string to find your result of send after'; |
| 34 | + |
| 35 | + const gabiaSMSLib = gabiaSMS(gabiaId, gabiaAPIKEY, gabiaRef); |
| 36 | + ``` |
| 37 | + |
| 38 | +### using SMS Service |
| 39 | + ```ts |
| 40 | + const senderNum: string = '00011112222'; |
| 41 | + const receiverNum: string = '00011112222'; |
| 42 | + const message: string = 'test1234'; // Can't be an empty string. '' |
| 43 | + // Don't go over 90 byte. |
| 44 | + // if bigger than 90 byte, message will |
| 45 | + // send slice |
| 46 | + |
| 47 | + const res: Promise<IDefaultResData> = |
| 48 | + gabiaSMSLib.sendSMS(senderNum, receiverNum, message); |
| 49 | + ``` |
| 50 | + |
| 51 | +### using LMS Service |
| 52 | + ```ts |
| 53 | + const senderNum: string = '00011112222'; |
| 54 | + const receiverNum: string = '00011112222'; |
| 55 | + const message: string = 'test1234'; // Can't be an empty string. '' |
| 56 | + const subject: string = 'LMS test subject'; |
| 57 | + |
| 58 | + const res: Promise<IDefaultResData> = await gabiaSMSLib.sendLMS( |
| 59 | + senderNum, |
| 60 | + receiverNum, |
| 61 | + message, |
| 62 | + subject |
| 63 | + ); |
| 64 | + ``` |
0 commit comments