ballerinax/optirtc.public Ballerina library

1.5.1

Overview

This is a generated connector for Optirtc Public API v1.0 OpenAPI specification. The Opti Public API provides a simple, read-only interface to access metadata and the last 3 days of real-time data points of all metrics in an Opti Platform Account:

  • Web developers can use the Public API to display real-time metrics from Opti facilities on their own websites - no backend database required.
  • Systems integrators can use the Public API to pull data into their own GIS or ETL systems, for example, to connect real-time stormwater conditions to their existing asset management software.
  • Analysts can use the Public API to pull data into their analysis scripts for repeated analysis. To learn about how Opti's data-driven products are enhancing community resilience to heavy rainfall across North America, see the Opti Home Page. OptiRTC provides simple examples of using open-source technologies to interact with the OptiRTC Public API. Find out more on our Github page.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the Optirtc connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/optirtc.public module into the Ballerina project.

Copy
import ballerinax/optirtc.public;

Step 2: Create a new connector instance

Create a public:ApiKeysConfig with the API key obtained, and initialize the connector with it.

Copy
public:ApiKeysConfig config = {
    key: "<API_KEY>"
}
public:Client baseClient = check new Client(config);

Step 3: Invoke connector operation

  1. Now you can use the operations available within the connector. Note that they are in the form of remote operations.

    Following is an example on how to get all DataStreams associated with the passed in key using the connector.

    Get all DataStreams associated with the passed in key

    Copy
    public function main() {
        public:DataStreamPageResult response = check baseClient->datastream();
        log:printInfo(response.toString());
    }
  2. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/optirtc.public;Copy

Metadata

Released date: 12 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 3

Current verison: 0


Weekly downloads


Source repository


Keywords

Business Intelligence/Analytics

Cost/Free


Contributors

Other versions

See more...