Skip to content

Commit 983da6d

Browse files
stainless-botRobertCraigie
authored andcommitted
chore(api): delete deprecated method
chore: unknown commit message
1 parent a8343ef commit 983da6d

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ Methods:
9393
- <code title="get /files">client.files.<a href="./src/resources/files.ts">list</a>({ ...params }) -> FileObjectsPage</code>
9494
- <code title="delete /files/{file_id}">client.files.<a href="./src/resources/files.ts">delete</a>(fileID) -> FileDeleted</code>
9595
- <code title="get /files/{file_id}/content">client.files.<a href="./src/resources/files.ts">content</a>(fileID) -> Response</code>
96-
- <code title="get /files/{file_id}/content">client.files.<a href="./src/resources/files.ts">retrieveContent</a>(fileID) -> string</code>
9796
- <code>client.files.<a href="./src/resources/files.ts">waitForProcessing</a>(id, { pollInterval = 5000, maxWait = 30 _ 60 _ 1000 }) -> Promise&lt;FileObject&gt;</code>
9897

9998
# Images

src/resources/files.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ export class Files extends APIResource {
7373
});
7474
}
7575

76-
/**
77-
* Returns the contents of the specified file.
78-
*
79-
* @deprecated The `.content()` method should be used instead
80-
*/
81-
retrieveContent(fileID: string, options?: RequestOptions): APIPromise<string> {
82-
return this._client.get(`/files/${fileID}/content`, options);
83-
}
84-
8576
/**
8677
* Waits for the given file to be processed, default timeout is 30 mins.
8778
*/

tests/api-resources/files.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,4 @@ describe('resource files', () => {
7171
expect(dataAndResponse.data).toBe(response);
7272
expect(dataAndResponse.response).toBe(rawResponse);
7373
});
74-
75-
test('retrieveContent', async () => {
76-
const responsePromise = client.files.retrieveContent('file_id');
77-
const rawResponse = await responsePromise.asResponse();
78-
expect(rawResponse).toBeInstanceOf(Response);
79-
const response = await responsePromise;
80-
expect(response).not.toBeInstanceOf(Response);
81-
const dataAndResponse = await responsePromise.withResponse();
82-
expect(dataAndResponse.data).toBe(response);
83-
expect(dataAndResponse.response).toBe(rawResponse);
84-
});
8574
});

0 commit comments

Comments
 (0)