Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Commit 47adf41

Browse files
authored
add content tree method (#21)
1 parent 6322317 commit 47adf41

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "getindexify",
3-
"version": "0.0.27",
3+
"version": "0.0.28",
44
"description": "This is the TypeScript client for interacting with the Indexify service.",
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",

src/client.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,16 @@ class IndexifyClient {
288288
return this.baseContentToContentMetadata(resp.data.content_metadata);
289289
}
290290

291-
async getExtractedMetadata(id: string): Promise<IExtractedMetadata[]> {
291+
async getExtractedMetadata(id: string): Promise<IContentMetadata> {
292292
const resp = await this.client.get(`content/${id}/metadata`);
293293
return resp.data.metadata;
294294
}
295295

296+
async getContentTree(id: string): Promise<IContentMetadata[]> {
297+
const resp = await this.client.get(`content/${id}/content-tree`);
298+
return resp.data.content_tree_metadata;
299+
}
300+
296301
async downloadContent<T>(id: string): Promise<T> {
297302
try {
298303
const response = await this.client.get(`content/${id}/download`);

0 commit comments

Comments
 (0)