run method

  1. @override
void run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
void run() async {
  if (argResults?['input-name'] == null &&
      argResults?['input-uuid'] == null) {
    throw UsageException(
      'Your request must contain at least one of the following fields: `inputName` or `inputUuid`.',
      '',
    );
  }

  await initializeObs();

  final mediaInputStatus = await obs.mediaInputs.getMediaInputStatus(
    inputName: argResults?['input-name'],
    inputUuid: argResults?['input-uuid'],
  );

  print(mediaInputStatus);

  obs.close();
}