UNPKG

anchorbrowser

Version:

The official TypeScript library for the Anchorbrowser API

33 lines 1.05 kB
// 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 Clipboard extends APIResource { /** * Retrieves the current content of the clipboard * * @example * ```ts * const clipboard = await client.sessions.clipboard.get( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * ); * ``` */ get(sessionID, options) { return this._client.get(path `/v1/sessions/${sessionID}/clipboard`, options); } /** * Sets the content of the clipboard * * @example * ```ts * const response = await client.sessions.clipboard.set( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { text: 'Text from clipboard API' }, * ); * ``` */ set(sessionID, body, options) { return this._client.post(path `/v1/sessions/${sessionID}/clipboard`, { body, ...options }); } } //# sourceMappingURL=clipboard.mjs.map