1.4 KiB

mycore_api.api.MQTTApi

Load the API package

import 'package:mycore_api/api.dart';

All URIs are relative to http://localhost:25049

Method HTTP request Description
mQTTPublishMessage POST /api/mqtt Publish mqtt test

mQTTPublishMessage

bool mQTTPublishMessage(mqttMessageDTO)

Publish mqtt test

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = MQTTApi();
final mqttMessageDTO = MqttMessageDTO(); // MqttMessageDTO | Message to send

try {
    final result = api_instance.mQTTPublishMessage(mqttMessageDTO);
    print(result);
} catch (e) {
    print('Exception when calling MQTTApi->mQTTPublishMessage: $e\n');
}

Parameters

Name Type Description Notes
mqttMessageDTO MqttMessageDTO Message to send

Return type

bool

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]