-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathcontent.ts
More file actions
29 lines (25 loc) · 1021 Bytes
/
content.ts
File metadata and controls
29 lines (25 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../../core/resource';
import { APIPromise } from '../../../core/api-promise';
import { buildHeaders } from '../../../internal/headers';
import { RequestOptions } from '../../../internal/request-options';
import { path } from '../../../internal/utils/path';
export class Content extends APIResource {
/**
* Retrieve Container File Content
*/
retrieve(fileID: string, params: ContentRetrieveParams, options?: RequestOptions): APIPromise<Response> {
const { container_id } = params;
return this._client.get(path`/containers/${container_id}/files/${fileID}/content`, {
...options,
headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]),
__binaryResponse: true,
});
}
}
export interface ContentRetrieveParams {
container_id: string;
}
export declare namespace Content {
export { type ContentRetrieveParams as ContentRetrieveParams };
}