Logbot Compiler SDK for Flutter

This is a package that optimized read and write operations to Logbot IoTs.

Requirements

Dart 2.17 or later

Installation & Usage

Add the dependencies from pub.dev:

dependencies:
  lb_auth:
  lb_compiler:

lb_auth is always required to make authorized calls to the APIs. To use the SDK on you application see the example below:

import 'package:lb_auth/lb_auth.dart';
import 'package:lb_compiler/lb_compiler.dart';

class Example {
  
  Future<void> run() async {
    /// Initialize Logbot SDK by logging in with Logbot Credentials
    await LogbotAuth.init(LogbotCredentials(
      username: username,
      password: password,
      clientId: clientId,
      clientSecret: clientSecret,
    ));
    /// Now you can use every API included on the SDK
    /// for example:
    Map response = await LogbotCompiler.operations.readAll();
  }
}

Tests

To run all tests:

flutter test

Documentation for API Endpoints

Class Method HTTP request Description
ConnectionsApi addConnection PUT /connections Add a connection
ConnectionsApi listConnections GET /connections List all connections
ConnectionsApi removeConnection DELETE /connections/{connection} Removes a connection
MetricsApi addMetric PUT /metrics/{connection} Add a metric
MetricsApi listConnectionMetrics GET /metrics/{connection} List all metrics from a connection
MetricsApi listMetrics GET /metrics List all metrics
MetricsApi removeMetric DELETE /metrics/{connection}/{metric} Removes a metric
OperationsApi readAll GET /read Reads all metrics
OperationsApi readConnection GET /read/{connection} Reads metrics of a connection

Documentation For Models

Author

Logbot SRL info@logbot.cloud

Libraries

api
lb_compiler