# [C] Recording #### `constructor` Creates a recording instance to interact with this recording. You normally wouldn't need to instantiate this class manually. When creating or fetching recordings via the [SkribbyClient](/ts-sdk/api-reference/skribbyclient), an instance of this class will be returned. | Parameter | Default | Description | | --- | --- | --- | | `client` | *required* | A [SkribbyClient](/ts-sdk/api-reference/skribbyclient) instance | | `api_data` | *required* | Object containing API Data of a recording (Refer to [Get Recording Endpoint](/rest-api/openapi/recording-operations/getrecording#recording-operations/getrecording/response&c=200)) | ```ts import { Recording } from "@skribby/sdk"; const recording = new Recording(client, { id: "3c09b2aa-6708-42c1-8145-aa55ee223613", status: "completed", recording_url: "http://example.com", recording_available_until: "2019-08-24T14:15:22Z", events: [ { event: "status_update", data: { old_status: "processing", new_status: "completed", }, created_at: "2019-08-24T14:15:22Z", }, ], created_at: "2019-08-24T14:15:22Z", }); ``` ## Properties ### `id` Simply returns the recording ID. #### Returns `string` #### Example ```ts console.log(recording.id); ``` ### `data` Returns the data available on this recording. Returned data is identical to returned data from [Get Recording Endpoint](/rest-api/openapi/recording-operations/getrecording#recording-operations/getrecording/response&c=200) with the only exception that dates have been parsed to Date objects already. #### Returns `RecordingData` (object) #### Example ```ts console.log(recording.data.status); console.log(recording.data.recording_url); console.log(recording.data.recording_available_until); // ... ``` ## Methods Error Handling All methods interact with Skribby's server. Refer to the [SkribbyClient API Requests Throws section](/ts-sdk/api-reference/skribbyclient#throws) for more information on error handling. ### `refresh` Fetch the latest data from the server. #### Returns `void` #### Example ```ts await recording.refresh(); console.log(recording.data.status); // Contains latest data from server now ``` ### `delete` Delete all data related to the recording. Be aware, this action is not reversible! #### Returns `void` #### Example ```ts await recording.delete(); ```