Wrapper for automatic reception of SMS-messages by onlinesim.ru
Require this package:
<dependency>
<groupId>ru.onlinesim</groupId>
<artifactId>onlinesim-api</artifactId>
<version>1.0.4</version>
</dependency>
Using the plugins DSL:
plugins {
id "ru.onlinesim.OnlineSimApi" version "1.0.4"
}
Using legacy plugin application:
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "ru.onlinesim:onlinesim-api:1.0.4"
}
}
apply plugin: "ru.onlinesim.OnlineSimApi"
Require this package in your APP:
import ru.onlinesim.OnlineSimApi;
All documentation is in the wiki of this project - Documentation
All responses from the server are described in the folder Responses
If you have any problems, please create Issues here
`
import ru.onlinesim.OnlineSimApi;
import ru.onlinesim.error.base.OnlineSimApiBaseException;
public class Run {
public static void main(String[] args) {
try {
OnlineSimApi loader = new OnlineSimApi(APIKEY);
GetUser user = loader.user();
Balance balance = user.balance();
// print info about score
System.out.println(balance.toString());
} catch (BaseException e) {
System.out.println(e.getMessage());
}
}
}