Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 1.31 KB

README.md

File metadata and controls

34 lines (27 loc) · 1.31 KB

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()
));