(Translated by https://www.hiragana.jp/)
GitHub - valery1707/smsc-java: Java library for SMSC
Skip to content

valery1707/smsc-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central Javadoc License

Stories to work on DevOps By Rultor.com

smsc-java

Java library for SMSC.

Features

How to use

First, connect the libraries smsc, smsc-http-ok-http and smsc-json-jackson to the project and then:

SmsCenter center = new SmsCenterImpl(
    new HttpClientOkHttp(),
    new JsonMapperJackson(),
    "demo", "demo1".toCharArray()
);
MessageSend send = center
    .messages()
    .send(new Message()
        .withContact(Contact.phone("79051234567"))
        .withText("SMS text")
);
System.out.println(String.format(
    "Sent %d messages with total cost %.2f, current balance is %.2f",
    send.getCnt(), send.getCost(), send.getBalance()
));