Skip to content
Java client library for AndonApp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
LICENSE
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

AndonApp Java Client

Java client library for reporting data to Andon

Download

Get the client via Maven:

<dependency>
  <groupId>com.andonapp</groupId>
  <artifactId>andonapp</artifactId>
  <version>1.0.1</version>
</dependency>

or Gradle:

compile 'com.andonapp:andonapp:1.0.1'

Usage

In order to programmatically connect to Andon's APIs you must first generate an API token. This is done by logging into your Andon account, navigating to the API settings page, and generating a new token. Make sure to record the token, and keep it secret.

Reference Andon's getting started guide and API guide for complete details on these prerequisites

Setting up the Client

Now that you have a token, create a client as follows:

AndonAppClient andonClient = new DefaultAndonAppClient(orgName, apiToken);

If you need custom HTTP client settings you can use the alternate constructor, and supply a pre-configured HTTP client.

Reporting Data

Here's an example of using the client to report a success:

andonClient.reportData(ReportDataRequest.builder()
		.lineName("line 1")
		.stationName("station 1")
		.passResult("PASS")
		.processTimeSeconds(100L)
		.build());

And a failure:

andonClient.reportData(ReportDataRequest.builder()
		.lineName("line 1")
		.stationName("station 1")
		.passResult("FAIL")
		.failReason("Test Failure")
		.failNotes("notes")
		.processTimeSeconds(100L)
		.build());

Updating a Station Status

Here's an example of flipping a station to Red:

andonClient.updateStationStatus(UpdateStationStatusRequest.builder()
		.lineName("line 1")
		.stationName("station 1")
		.statusColor("RED")
		.statusReason("Missing parts")
		.statusNotes("notes")
		.build());

And back to Green:

andonClient.updateStationStatus(UpdateStationStatusRequest.builder()
		.lineName("line 1")
		.stationName("station 1")
		.statusColor("GREEN")
		.statusNotes("notes")
		.build());

License

Licensed under the MIT license.

You can’t perform that action at this time.