lb_moonlogs_writer

Moonlogs Writer API

Moonlogs Writer API for Flutter SDK - Moonlogs Writer SDK for Flutter that handles Aknowledgement of Alarms, Create Alarm Log, Create Audit Log (etc... ).

Requirements

Dart 2.17 or later

Installation & Usage

Add the dependencies from pub.flutter-io.cn:

dependencies:
  lb_moonlogs_writer:
  lb_auth:

Getting Started

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

import 'package:lb_moonlogs_writer/api.dart';
import 'package:lb_auth/lb_auth.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:
    String? result = await LogbotMoonlogsWriter.alarmApi.acknowledgeAlarm(
        deviceId,
        alarmId,
    );
    print(result);
  }
}

Documentation for API Endpoints

All URIs are relative to https://platform.logbotiot.cloud/lb-moonlogger-writer

Class Method HTTP request Description
AlarmApi acknowledgeAlarm POST /api/alarm/acknowledge/{device_id}/{alarm_id}
AlarmApi createAlarmLog POST /api/alarm
AlarmApi createAlarmLogAsync POST /api/alarm/async
AlarmApi createAlarmLogMqtt POST /api/alarm/mqtt
AuditApi createAuditLog POST /api/audit
AuditApi createAuditLogAsync POST /api/audit/async
BasicApi getHealth GET /health
BasicApi getVersion GET /version

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author