This client is written Kotlin but can be used in all JVM Languages. Currently it is publish on jitpack.io and can be used by simply adding the dependency to your project.
Use it at own Risk
If you see something that you don't like get in touch
and most of all have fun
gradle
kotlin
RxKotlin
retrofit
Retrofit RxJava2 Adapter
Retrofit Gson Converter
OkHttp
Add the jitpack.io repo to the project repos
repositories {
...
maven { url 'https://jitpack.io' }
}
and then adding add the implementation dependency
dependencies {
...
implementation 'com.github.AOEpeople:hrworks-api-client:1.0.2'
...
}
Add the jitpack.io repo to the project repos
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
and then adding add the implementation dependency
<dependency>
<groupId>com.github.AOEpeople</groupId>
<artifactId>hrworks-api-client</artifactId>
<version>1.0.2</version>
</dependency>
import com.aoe.hrworks.HrWorksClientBuilder
fun main(args: Array<String>) {
HrWorksClientBuilder.buildClient(
apiKey = "key",
apiSecret = "secret")
.getAllActivePersons()
.blockingGet().apply {
println(this)
}
}
import com.aoe.hrworks.HrWorksClientBuilder
class Sample {
static void main(String[] args){
def client = HrWorksClientBuilder.INSTANCE.
buildClient("key","secret")
client.allActivePersons.blockingGet().each {
println(it)
}
}
}
import com.aoe.hrworks.HrWorksClient;
import com.aoe.hrworks.HrWorksClientBuilder;
public class Sample {
public static void main(String[] args){
HrWorksClient client = HrWorksClientBuilder.INSTANCE
.buildClient("key", "secret");
client.getAllActivePersons()
.blockingGet()
.forEach((k,v) ->
System.out.print(String.format("Key:%s Value:%s",k,v)));
}
}
import com.aoe.hrworks.HrWorksClientBuilder
object Sample {
def main(args: Array[String]): Unit = {
val client = HrWorksClientBuilder.INSTANCE.buildClient("key","secret")
client.getAllActivePersons
.blockingGet()
.forEach((k, v) =>
System.out.println(s"key: $k, value: $v")
)
}
}