Skip to content

Commit

Permalink
change to captureScreenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
MilapNaik committed Mar 6, 2024
1 parent 4344666 commit 7d9e56e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/RokuDeploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ describe('index', () => {
});
});

describe('takeScreenshot', () => {
describe('captureScreenshot', () => {
let onHandler: any;
let screenshotAddress: any;

Expand Down
4 changes: 2 additions & 2 deletions src/RokuDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ export class RokuDeploy {
/**
* Gets a screenshot from the device. A side-loaded channel must be running or an error will be thrown.
*/
public async captureScreenshot(options: TakeScreenshotOptions) {
public async captureScreenshot(options: CaptureScreenshotOptions) {
options = this.getOptions(options);
options.screenshotFile = options.screenshotFile ?? `screenshot-${dayjs().format('YYYY-MM-DD-HH.mm.ss.SSS')}`;
let saveFilePath: string;
Expand Down Expand Up @@ -916,7 +916,7 @@ export interface HttpResponse {
body: any;
}

export interface TakeScreenshotOptions {
export interface CaptureScreenshotOptions {
/**
* The IP address or hostname of the target Roku device.
* @example '192.168.1.21'
Expand Down
4 changes: 2 additions & 2 deletions src/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand';
import { RekeyDeviceCommand } from './commands/RekeyDeviceCommand';
import { CreateSignedPackageCommand } from './commands/CreateSignedPackageCommand';
import { DeleteDevChannelCommand } from './commands/DeleteDevChannelCommand';
import { TakeScreenshotCommand } from './commands/TakeScreenshotCommand';
import { CaptureScreenshotCommand } from './commands/CaptureScreenshotCommand';
import { GetDeviceInfoCommand } from './commands/GetDeviceInfoCommand';
import { GetDevIdCommand } from './commands/GetDevIdCommand';

Expand Down Expand Up @@ -185,7 +185,7 @@ describe('cli', () => {
return Promise.resolve('');
});

const command = new TakeScreenshotCommand();
const command = new CaptureScreenshotCommand();
await command.run({
host: '1.2.3.4',
password: '5536'
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand';
import { RekeyDeviceCommand } from './commands/RekeyDeviceCommand';
import { CreateSignedPackageCommand } from './commands/CreateSignedPackageCommand';
import { DeleteDevChannelCommand } from './commands/DeleteDevChannelCommand';
import { TakeScreenshotCommand } from './commands/TakeScreenshotCommand';
import { CaptureScreenshotCommand } from './commands/CaptureScreenshotCommand';
import { GetDeviceInfoCommand } from './commands/GetDeviceInfoCommand';
import { GetDevIdCommand } from './commands/GetDevIdCommand';
import { ZipCommand } from './commands/ZipCommand';
Expand Down Expand Up @@ -167,7 +167,7 @@ void yargs
.option('host', { type: 'string', description: 'The IP Address of the host Roku', demandOption: false })
.option('password', { type: 'string', description: 'The password of the host Roku', demandOption: false });
}, (args: any) => {
return new TakeScreenshotCommand().run(args);
return new CaptureScreenshotCommand().run(args);
})

.command(['getDeviceInfo', 'deviceinfo'], 'Get the `device-info` response from a Roku device', (builder) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { rokuDeploy, util } from '../index';

export class TakeScreenshotCommand {
export class CaptureScreenshotCommand {
async run(args) {
let options = {
...util.getOptionsFromJson(args),
Expand Down

0 comments on commit 7d9e56e

Please sign in to comment.