AddGateway static method

Future<OperationResponse> AddGateway(
  1. GatewayInfo gatewayInfo
)

Implementation

static Future<OperationResponse> AddGateway(GatewayInfo gatewayInfo) async {
  String jwt = await getJWT();
  final channel = await Channel.getDefaultIoTManagerChannel();
  final stub = GatewayManagerClient(channel,
      options: CallOptions(metadata: {'jwt': jwt}));
  OperationResponse operationResponse = await stub.addGateway(gatewayInfo);
  print('RegisterUserWithUserInfo: ${operationResponse}');
  channel.shutdown();
  return operationResponse;
}