Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

AOEpeople/hrworks-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⛔ [DEPRECATED] HRWorks-Api-Client

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

Used Technologies

gradle
kotlin
RxKotlin
retrofit
Retrofit RxJava2 Adapter
Retrofit Gson Converter
OkHttp

Gradle

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'
    ...
}

Maven

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>

Usage in Kotlin

import com.aoe.hrworks.HrWorksClientBuilder

fun main(args: Array<String>) {
    HrWorksClientBuilder.buildClient(
        apiKey = "key",
        apiSecret = "secret")
        .getAllActivePersons()
        .blockingGet().apply {
            println(this)
        }
}

Usage in Groovy

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)
        }
    }
}

Usage in Java

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

Usage in Scala

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")
      )
  }

}

About

Access the (BETA-) API of hrworks.de

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages