Skip to content

posquit0/node-apistore-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

API Store SMS for Node

API Store SMS for Node

πŸ“§ A transporter for SMS/LMS/MMS via API Store SMS Service


APISTORE SMSλŠ” API Storeμ—μ„œ μ œκ³΅ν•˜λŠ” SMS APIλ₯Ό Node.jsμ—μ„œ μ‰½κ²Œ ν™œμš©ν•˜κΈ° μœ„ν•˜μ—¬ μž‘μ„±λœ ν΄λΌμ΄μ–ΈνŠΈ λͺ¨λ“ˆμž…λ‹ˆλ‹€.

  • 이용 쀑 λ°œμƒν•œ λ¬Έμ œμ— λŒ€ν•˜μ—¬ μ±…μž„μ§€μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
  • 졜초 μž‘μ„±μ€ μžλ™μ°¨ 렌트 ν”Œλž«νΌ CARPLATμ—μ„œ μ‚¬μš©ν•˜κΈ° μœ„ν•˜μ—¬ μž‘μ„±λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Installation

# NPM
$ npm install --save apistore-sms
# Yarn
$ yarn add apistore-sms

Usage

  • λͺ¨λ“  λ©”μ†Œλ“œλŠ” Promiseλ₯Ό λ°˜ν™˜
var apistore = require('apistore-sms').createClient({
  apiKey: 'YOUR_API_KEY',
  apiId: 'YOUR_ID'
});

// SMS 전솑 (단일 μˆ˜μ‹ μž)
apistore.sendSMS({
  from: '15885588', // λ°œμ‹ μž 번호
  to: '01012345678', // μˆ˜μ‹ μž 번호
  text: 'Hot! Hot!', // λ‚΄μš©
  subject: 'λ„˜λ‚˜λ§›μžˆλŠ”', // 제λͺ©(optional)
  at: '20160801235959', // μ˜ˆμ•½μ‹œκ°„(optional)
  author: 'Pizza Huuut' // λ°œμ‹ μž 이름(optional)
}).then(function (cmid) {
  console.log(cmid); // λ©”μ‹œμ§€ 아이디
}).catch(function (error) {
  console.log(error);
});

// SMS 전솑 (볡수 μˆ˜μ‹ μž)
apistore.sendSMS({
  from: '15885588', // λ°œμ‹ μž 번호
  to: ['01012345678', '010-2345-6789'], // μˆ˜μ‹ μž 번호
  text: 'Hot! Hot!', // λ‚΄μš©
  subject: 'λ„˜λ‚˜λ§›μžˆλŠ”', // 제λͺ©(optional)
  at: '20160801235959', // μ˜ˆμ•½μ‹œκ°„(optional)
  author: 'Pizza Huuut' // λ°œμ‹ μž 이름(optional)
}).then(function (cmid) {
  console.log(cmid); // λ©”μ‹œμ§€ 아이디
}).catch(function (error) {
  console.log(error);
});

// LMS 전솑
apistore.sendLMS({
  from: '15885588', // λ°œμ‹ μž 번호
  to: '01012345678', // μˆ˜μ‹ μž 번호
  text: 'Hot! Hot!', // λ‚΄μš©
  subject: 'λ„˜λ‚˜λ§›μžˆλŠ”', // 제λͺ©(optional)
  at: '20160801235959', // μ˜ˆμ•½μ‹œκ°„(optional)
  author: 'Pizza Huuut' // λ°œμ‹ μž 이름(optional)
}).then(function (cmid) {
  console.log(cmid); // λ©”μ‹œμ§€ 아이디
}).catch(function (error) {
  console.log(error);
});

// MMS 전솑
apistore.sendLMS({
  from: '15885588', // λ°œμ‹ μž 번호
  to: '01012345678', // μˆ˜μ‹ μž 번호
  text: 'Hot! Hot!', // λ‚΄μš©
  subject: 'λ„˜λ‚˜λ§›μžˆλŠ”', // 제λͺ©(optional)
  file: path.join(__dirname, 'test.jpg'), // or fs.createReadStream(filepath)
  at: '20160801235959', // μ˜ˆμ•½μ‹œκ°„(optional)
  author: 'Pizza Huuut' // λ°œμ‹ μž 이름(optional)
}).then(function (cmid) {
  console.log(cmid); // λ©”μ‹œμ§€ 아이디
}).catch(function (error) {
  console.log(error);
});

// Report 보기
apistore.getReport('your_cmid')
  .then(function (result) {
    console.log(result);
  }).catch(function (error) {
    console.log(error);
  });

Contributing

This project follows the Contributor Covenant Code of Conduct.

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or ask feature requests.

Contact

If you have any questions, feel free to join me at #posquit0 on Freenode and ask away. Click here to connect.

License

Provided under the terms of the MIT License.

Copyright Β© 2017, Byungjin Park.

About

Client for SMS/LMS/MMS API in Korea

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •