Skip to content

Commit

Permalink
Merge pull request #5 from Kaevan89/patch-1
Browse files Browse the repository at this point in the history
Add v8 examples to README.md
  • Loading branch information
manycoding authored Jun 22, 2023
2 parents c1b5662 + a99955c commit a45b814
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,46 @@ using Veryfi;
using var client = new HttpClient();
var api = new VeryfiApi("username", "apiKey", "clientId", client);

// Get Documents
var documentsResponse = await api.DocumentsAsync();

// Process Document URL.
var documentResponse = await api.Documents2Async(
new DocumentPOSTJSONRequest
{
File_url = url
});

// Process Document Base64
var documentResponse = await api.Documents2Async(
new DocumentPOSTJSONRequest
{
File_name = file.FileName,
File_data = Convert.ToBase64String(file.AsBytes())
});
```

## Usage V7

```cs

// Process Base64
var document = await api.ProcessDocumentAsync(
var document = await api.ProcessDocumentAsyncV7(
new DocumentUploadOptions
{
File_name = "fileName.jpg",
File_data = Convert.ToBase64String(bytes),
});

// Process url
var document = await api.ProcessDocumentAsync(
var document = await api.ProcessDocumentAsyncV7(
new DocumentUploadOptions
{
File_url = "https://raw.githubusercontent.com/veryfi/veryfi-csharp/master/src/tests/Veryfi.IntegrationTests/Assets/receipt_public.jpg",
});

// Process urls
var document = await api.ProcessDocumentAsync(
var document = await api.ProcessDocumentAsyncV7(
new DocumentUploadOptions
{
File_urls = new [] {
Expand All @@ -59,23 +82,23 @@ var document = await api.ProcessDocumentAsync(
});

// Process stream
var document = await api.ProcessDocumentFileAsync(
var document = await api.ProcessDocumentFileAsyncV7(
new Stream(),
new DocumentUploadOptions
{
File_name = "fileName.jpg",
});

// Process bytes
var document = await api.ProcessDocumentFileAsync(
var document = await api.ProcessDocumentFileAsyncV7(
new byte[0],
new DocumentUploadOptions
{
File_name = "fileName.jpg",
});

// Process path
var document = await api.ProcessDocumentFileAsync(
var document = await api.ProcessDocumentFileAsyncV7(
"C:/invoice.png",
new DocumentUploadOptions
{
Expand Down

0 comments on commit a45b814

Please sign in to comment.