Skip to content

Commit 3e3f7b6

Browse files
♻️ add async invoice test file
1 parent a3936ff commit 3e3f7b6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Mindee;
2+
using Mindee.Input;
3+
using Mindee.Product.Invoice;
4+
5+
string apiKey = "my-api-key";
6+
string filePath = "/path/to/the/file.ext";
7+
8+
// Construct a new client
9+
MindeeClient mindeeClient = new MindeeClient(apiKey);
10+
11+
// Load an input source as a path string
12+
// Other input types can be used, as mentioned in the docs
13+
var inputSource = new LocalInputSource(filePath);
14+
15+
// Call the product asynchronously with auto-polling
16+
var response = await mindeeClient
17+
.EnqueueAndParseAsync<InvoiceV4>(inputSource);
18+
19+
// Print a summary of all the predictions
20+
System.Console.WriteLine(response.Document.ToString());
21+
22+
// Print only the document-level predictions
23+
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString());

0 commit comments

Comments
 (0)