Skip to content
.NET 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.
AndonApp
AndonAppTests
.gitignore
AndonApp.sln
LICENSE
README.md

README.md

AndonApp .NET Client

.NET client library for reporting data to Andon

Install

Install-Package AndonApp

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:

var andonClient = new AndonAppClient(orgName, apiToken);

Additionally, you can pass the constructor a preconfigured HttpMessageHandler.

Reporting Data

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

andonClient.ReportDataAsync(new ReportDataRequest
    {
        LineName = "line 1",
        StationName = "station 1",
        PassResult = "PASS",
        ProcessTimeSeconds = 120
    });

And a failure:

andonClient.ReportDataAsync(new ReportDataRequest
    {
        LineName = "line 1",
        StationName = "station 1",
        PassResult = "FAIL",
        FailReason = "Test Failure",
        FailNotes = "notes",
        ProcessTimeSeconds = 120
    });

Updating a Station Status

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

andonClient.UpdateStationStatusAsync(new UpdateStationStatusRequest
    {
        LineName = "line 1",
        StationName = "station 1",
        StatusColor = "RED",
        StatusReason = "Missing parts",
        StatusNotes = "notes"
    });

And back to Green:

andonClient.UpdateStationStatusAsync(new UpdateStationStatusRequest
    {
        LineName = "line 1",
        StationName = "station 1",
        StatusColor = "GREEN",
		StatusNotes = "notes"
    });

License

Licensed under the MIT license.

You can’t perform that action at this time.