anchorbrowser
Version:
The official TypeScript library for the Anchorbrowser API
76 lines • 2.36 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Mouse extends APIResource {
/**
* Performs a mouse click at the specified coordinates
*
* @example
* ```ts
* const response = await client.sessions.mouse.click(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { x: 0, y: 0 },
* );
* ```
*/
click(sessionID, body, options) {
return this._client.post(path `/v1/sessions/${sessionID}/mouse/click`, { body, ...options });
}
/**
* Performs a double click at the specified coordinates
*
* @example
* ```ts
* const response = await client.sessions.mouse.doubleClick(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { x: 0, y: 0 },
* );
* ```
*/
doubleClick(sessionID, body, options) {
return this._client.post(path `/v1/sessions/${sessionID}/mouse/doubleClick`, { body, ...options });
}
/**
* Performs a mouse button down action at the specified coordinates
*
* @example
* ```ts
* const response = await client.sessions.mouse.down(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { x: 0, y: 0 },
* );
* ```
*/
down(sessionID, body, options) {
return this._client.post(path `/v1/sessions/${sessionID}/mouse/down`, { body, ...options });
}
/**
* Moves the mouse cursor to the specified coordinates
*
* @example
* ```ts
* const response = await client.sessions.mouse.move(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { x: 0, y: 0 },
* );
* ```
*/
move(sessionID, body, options) {
return this._client.post(path `/v1/sessions/${sessionID}/mouse/move`, { body, ...options });
}
/**
* Performs a mouse button up action at the specified coordinates
*
* @example
* ```ts
* const response = await client.sessions.mouse.up(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { x: 0, y: 0 },
* );
* ```
*/
up(sessionID, body, options) {
return this._client.post(path `/v1/sessions/${sessionID}/mouse/up`, { body, ...options });
}
}
//# sourceMappingURL=mouse.mjs.map