WiseTime Java Connector Library
Branch: master
Clone or download
alvinllobrera Merge pull request #24 from wisetime-io/add-first-observed-in-hour-in…

Take into account the `firstObservedInHour` when calculating start time
Latest commit 715f623 Feb 18, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Small tweak to return stronger type Feb 18, 2019
LICENSE Open sourcing WiseTime Connector Java library Nov 27, 2018


WiseTime Java Connector


WiseTime Java Connector is an open source library that enables you to write a WiseTime connector with a few lines of Java code. It calls the WiseTime Connect API to communicate with WiseTime.

WiseTime is a passive, privacy-first timekeeping system that summarises your tasks while you work. With WiseTime Connect, you can connect your systems to WiseTime, so that you can automatically:

  • Create tags and tag keywords in WiseTime when records are added to your system
  • Receive posted time when users post their time sheets to WiseTime

Getting Started

Set Up the Dependency

The WiseTime Connector Library is available on Maven Central. You can include it in your Java projects like so:


compile 'io.wisetime:wisetime-connector:1.1.3'



Implement the WiseTimeConnector Interface

To create a connector, simply implement the WiseTimeConnector interface. Here's an example of a minimal implementation.

public class HelloConnector implements WiseTimeConnector {

  private ConnectorModule cm;

   * Called by the WiseTime Connector library on connector initialization.
  public void init(final ConnectorModule connectorModule) {
    cm = connectorModule;

   * Called by the WiseTime Connector library on a regular schedule.
  public void performTagUpdate() {
    // This is where you would query the connected system and send new tags to WiseTime.
        new UpsertTagRequest()
            .name("Hello, World!")

   * Called by the WiseTime Connector library whenever a user posts time to the team.
  public PostResult postTime(final Request request, final TimeGroup userPostedTime) {
    // This is where you would process the userPostedTime and create relevant
    // records in the connected system.
    return PostResult.SUCCESS;

Start the Connector

Then, use your connector implementation when starting the server.

public class ConnectorLauncher {

   * Application entry point
  public static void main(final String... args) throws Exception {
        .withWiseTimeConnector(new HelloConnector())

The connector will launch a web server at port 8080. The server implements the Posted Time Webhook that WiseTime will call whenever a user posts time to the team.

Sample Project

Take a look at our open source Jira Connector for an example of a fully implemented, production-ready connector project. The connector is implemented in just 3 classes and comes with great test coverage.


The latest javadoc for the WiseTime Connector Library can be accessed here.