anchorbrowser
Version:
The official TypeScript library for the Anchorbrowser API
33 lines • 1.17 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Primary = void 0;
const resource_1 = require("../../../core/resource.js");
const headers_1 = require("../../../internal/headers.js");
const path_1 = require("../../../internal/utils/path.js");
class Primary extends resource_1.APIResource {
/**
* Downloads the primary recording file for the specified browser session. Returns
* the recording as an MP4 file.
*
* @example
* ```ts
* const primary =
* await client.sessions.recordings.primary.get(
* 'session_id',
* );
*
* const content = await primary.blob();
* console.log(content);
* ```
*/
get(sessionID, options) {
return this._client.get((0, path_1.path) `/v1/sessions/${sessionID}/recordings/primary/fetch`, {
...options,
headers: (0, headers_1.buildHeaders)([{ Accept: 'video/mp4' }, options?.headers]),
__binaryResponse: true,
});
}
}
exports.Primary = Primary;
//# sourceMappingURL=primary.js.map