lb_setup 1.3.2

Logbot Setup client to be used for API requests to Logbot Setup APIs to: * Setup and gather informations about the device * Retrieves and personalize configurations about the device and its network system * Setup and gather informations about associated services like vpn, firewall and supervisor * Exposing a web interface in order to visualize and interact with all the previous points

Logbot Setup SDK for Flutter

Service used inside Logbot's devices to:

  • Setup and gather informations about the device
  • Retrieves and personalize configurations about the device and its network system
  • Setup and gather informations about associated services like vpn, firewall and supervisor
  • Exposing a web interface in order to visualize and interact with all the previous points

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Build package: org.openapitools.codegen.languages.DartClientCodegen For more information, please visit https://logbot.cloud/

Requirements

Dart 2.17 or later

Installation & Usage

Add the dependencies from pub.dev:

dependencies:
  lb_auth:
  lb_setup:

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

/// Remember to call LogbotSetup.init() after ensureInitialized()
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await LogbotSetup.init();
  runApp(const MyApp());
}

import 'package:lb_auth/lb_auth.dart';
import 'package:lb_setup/lb_setup.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,
    ));
    /// Starts the Logbot Discovery to search for local devices
    await LogbotDiscovery.startDiscovery();
    /// Starts the background service to retrieve device status every minute
    /// (needed to read device status from cache)
    LogbotStateManager.start();
    /// Now you can use every API included on the SDK
    /// for example:
    WifiConfig? response = await LogbotSetup.network.getWifiConfig();
  }
}

Tests

To run all tests:

flutter test

Documentation for API Endpoints

All URIs are relative to https://devices.logbotiot.cloud

ClassMethodHTTP requestDescription
DeviceApideleteLicenseDELETE /device/licenseDeletes license key
DeviceApigetDeviceConfigGET /device/configGet device configuration
DeviceApigetDeviceInfoGET /device/infoGet infos about the device
DeviceApigetDeviceStatusGET /deviceBriefing about the device status
DeviceApigetLicenseGET /device/licenseGet active license
DeviceApigetResourcesUsageGET /device/resourcesGet device resource usage
DeviceApilistDeviceLedsGET /device/ledList device's leds
DeviceApiresetDeviceDELETE /deviceReset device to factory settings
DeviceApirestartDeviceGET /device/restartRestart the device
DeviceApisetLicensePOST /device/licenseSet license key
DeviceApitestLedPOST /device/led/testLed test
InfoApigetHealthGET /healthCheck Logbot Setup status
InfoApigetVersionGET /versionGet Logbot Setup version
NetworkApiconnectWifiPOST /network/wifi/connect/{id}Connect to a WiFi network
NetworkApideleteAccessPointConfigDELETE /network/accesspoint/configReset the Access Point to factory settings
NetworkApideleteBluetoothConfigDELETE /network/bluetooth/configReset the Bluetooth to factory settings
NetworkApideleteGeolocatorConfigDELETE /network/geolocator/configDelete the Geolocator configuration
NetworkApideleteLanConfigDELETE /network/lan/configReset the LAN to factory settings
NetworkApideleteModemConfigDELETE /network/modem/configReset the modem to factory settings
NetworkApideleteWanConfigDELETE /network/wan/configReset the WAN to factory settings
NetworkApideleteWifiConfigDELETE /network/wifi/configReset the WiFi to factory settings
NetworkApidisableAccessPointPOST /network/accesspoint/disableDisable the Access Point
NetworkApidisableBluetoothPOST /network/bluetooth/disableDisable bluetooth
NetworkApidisableGeolocatorPOST /network/geolocator/disableDisable all Geolocator modules
NetworkApidisableLanPOST /network/lan/disableDisable LAN connection
NetworkApidisableModemPOST /network/modem/disableDisable all Modem modules
NetworkApidisableWanPOST /network/wan/disableDisable WAN connection
NetworkApidisableWifiPOST /network/wifi/disableDisable WiFi connection
NetworkApidisconnectWifiPOST /network/wifi/disconnectDisconnect from a WiFi network
NetworkApienableAccessPointPOST /network/accesspoint/enableEnable the Access Point
NetworkApienableBluetoothPOST /network/bluetooth/enableEnable bluetooth
NetworkApienableGeolocatorPOST /network/geolocator/enableEnable Geolocator modules
NetworkApienableLanPOST /network/lan/enableEnable LAN connection
NetworkApienableModemPOST /network/modem/enableEnable Modem modules
NetworkApienableWanPOST /network/wan/enableEnable WAN connection
NetworkApienableWifiPOST /network/wifi/enableEnable WiFi connection
NetworkApigetAccessPointConfigGET /network/accesspoint/configRetrieves the Access Point configuration
NetworkApigetAccessPointStatusGET /network/accesspointRetrieves the Access Point status
NetworkApigetBluetoothConfigGET /network/bluetooth/configRetrieves the Bluetooth configuration
NetworkApigetBluetoothStatusGET /network/bluetoothRetrieves the Bluetooth status
NetworkApigetDevicePositionGET /network/geolocator/positionGet device position
NetworkApigetGeolocatorConfigGET /network/geolocator/configRetrieves the Geolocator configuration
NetworkApigetGeolocatorStatusGET /network/geolocatorRetrieves the Geolocator status
NetworkApigetLanConfigGET /network/lan/configRetrieves the LAN configuration
NetworkApigetLanStatusGET /network/lanRetrieves the LAN status
NetworkApigetModemConfigGET /network/modem/configRetrieves the modem configuration
NetworkApigetModemStatusGET /network/modemRetrieves the modem status
NetworkApigetNetworkConfigGET /network/configGet all the current network modules configuration
NetworkApigetNetworkStatusGET /networkGet the status of every device's network module
NetworkApigetWanConfigGET /network/wan/configRetrieves the WAN configuration
NetworkApigetWanStatusGET /network/wanRetrieves the WAN status
NetworkApigetWifiConfigGET /network/wifi/configRetrieves the WiFi configuration
NetworkApigetWifiStatusGET /network/wifiRetrieves the WiFi status
NetworkApirestartAccessPointPOST /network/accesspoint/restartRestart the Access Point
NetworkApirestartBluetoothPOST /network/bluetooth/restartRestart bluetooth
NetworkApirestartGeolocatorPOST /network/geolocator/restartRestart Geolocator modules
NetworkApirestartLanPOST /network/lan/restartRestart LAN connection
NetworkApirestartModemPOST /network/modem/restartRestart Modem modules
NetworkApirestartWanPOST /network/wan/restartRestart WAN connection
NetworkApirestartWifiPOST /network/wifi/restartRestart WiFi connection
NetworkApisetAccessPointConfigPOST /network/accesspoint/configEdit the Access Point configuration
NetworkApisetBluetoothConfigPOST /network/bluetooth/configEdit the Bluetooth configuration
NetworkApisetGeolocatorConfigPOST /network/geolocator/configEdit the Geolocator configuration
NetworkApisetLanConfigPOST /network/lan/configEdit the LAN configuration
NetworkApisetModemConfigPOST /network/modem/configEdit the modem configuration
NetworkApisetWanConfigPOST /network/wan/configEdit the WAN configuration
NetworkApisetWifiConfigPOST /network/wifi/configEdit the WiFi configuration
NetworkApiwifiScanGET /network/wifi/scanScan nearbies WiFi networks
ServiceApidisableHpsPOST /service/hps/disableDisable HPS server
ServiceApidisableVpnPOST /service/vpn/disableDisable VPN service
ServiceApidownloadVpnClientConfigGET /service/vpn/downloadDownload VPN client configuration
ServiceApienableHpsPOST /service/hps/enableEnable HPS server
ServiceApienableVpnPOST /service/vpn/enableEnable VPN service
ServiceApigenerateVpnConfigPOST /service/vpn/configGenerate VPN configuration
ServiceApigetHpsStatusGET /service/hpsRetrieves HPS server status
ServiceApigetSupervisorHealthGET /service/supervisor/healthGet Supervisor health
ServiceApigetSupervisorStatusGET /service/supervisorGet Supervisor status
ServiceApigetVpnConfigGET /service/vpn/configGet VPN configuration
ServiceApigetVpnStatusGET /service/vpnGet VPN status
ServiceApirestartVpnPOST /service/vpn/restartRestart VPN service

Documentation For Models

Author

Logbot SRL info@logbot.cloud