ChatWork4j for using the ChatWork API in Java

ChatWork4j is a wrapper library for using ChatWorkAPI in Java. ChatWork4j itself is written in Kotlin.

To use ChatWork4j, download it directly and pass it through the project, Or add it to your Gradle or Maven project dependency.

</ i> Current version

ChatWork4j ChatWork API
1.2 v1
2.0 v2

Javadoc: https://masahirosaito.github.io/ChatWork4j/

</ i> Added ChatWork4j to dependencies

repository url
https://github.com/MasahiroSaito/ChatWork4j/raw/master/repo
dependency
groupId com.MasahiroSaito
artifactId ChatWork4j
version 2.0

Gradle

repositories

build.gradle


    maven {
        name = 'chatwork4j-repo'
        url = 'https://github.com/MasahiroSaito/ChatWork4j/raw/master/repo'
    }

dependencies

build.gradle


    compile 'com.MasahiroSaito:ChatWork4j:2.0'

Maven

repositories

  <repository>
    <id>chatwork4j-repo</id>
    <url>https://github.com/MasahiroSaito/ChatWork4j/raw/master/repo</url>
  </repository>

dependencies

  <dependency>
    <groupId>com.MasahiroSaito</groupId>
    <artifactId>ChatWork4j</artifactId>
    <version>2.0</version>
  </dependency>

</ i> Java usage example

  1. Create a ChatWork4j object with your own Token as an argument
  2. Call each API method from the created object
  3. The result is returned as each object
public static void main(String...args) {
    ChatWork4j chatWork4j = new ChatWork4j("xxxxxxxxxxxxxxxxxxxxxx");

    System.out.println(chatWork4j.getMe());
    System.out.println(chatWork4j.getMyStatus());

    for (Task task : chatWork4j.getMyTasks()) {
        System.out.println(task);
    }

    for (Contact contact : chatWork4j.getContacts()) {
        System.out.println(contact);
    }

    for (Room room : chatWork4j.getRooms()) {
       System.out.println(room);
    }
}

</ i> Updated January 27, 2017

2017/01/26 --Notice of ChatWork API version upgrade

ChatWork4j has also been upgraded to 2.0 as the Chatwork API is now v2.

Recommended Posts