igbopie/spherov2.js

View on GitHub
lib/src/commands/api.ts

Summary

Maintainability
A
1 hr
Test Coverage
B
80%
import {
  APIProcessCommandIds,
  CommandGenerator,
  DeviceId,
  ICommandWithRaw,
} from './types';

export default (generator: CommandGenerator) => {
  const encode = generator(DeviceId.apiProcessor);
  return {
    echo: (): ICommandWithRaw =>
      encode({
        commandId: APIProcessCommandIds.echo,
      }),
  };
};