getTranslationForInstance method

Future<InstanceTranslations> getTranslationForInstance(
  1. MIoTSpecType type
)

Get translation for specific instance.

Implementation

Future<InstanceTranslations> getTranslationForInstance(
  MIoTSpecType type,
) async {
  final resp = await _dio.get<Map<String, dynamic>>(
    'https://miot-spec.org/instance/v2/multiLanguage',
    queryParameters: <String, dynamic>{
      'urn': type,
    },
  );

  return InstanceTranslations.fromJson(resp.data!);
}