Skip to content

Commit a213232

Browse files
committed
📝 document parsing URLs in the guide
1 parent 9adcaaa commit a213232

File tree

2 files changed

+16
-28
lines changed

2 files changed

+16
-28
lines changed

README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ Document<InvoiceV4Inference> invoiceDocument = mindeeClient.parse(
4141
documentToParse
4242
);
4343
```
44-
Alternatively, documents can be parsed by providing a HTTPS URL
45-
```java
46-
import com.mindee.parsing;
47-
import com.mindee.parsing.invoice;
48-
49-
MindeeClient mindeeClient = MindeeClientInit.create("my-api-key");
50-
51-
URL documentUrl = new URL("https://path/to/document");
52-
53-
Document<InvoiceV4Inference> invoiceDocument = mindeeClient.parse(
54-
InvoiceV4Inference.class,
55-
documentUrl
56-
);
57-
```
5844

5945
### Region-Specific Documents
6046
Each region will have its own package within the general `com.mindee.parsing` package.
@@ -92,21 +78,7 @@ Document<CustomV1Inference> customDocument = mindeeClient.parse(
9278
customEndpoint
9379
);
9480
```
95-
Alternatively, documents can be parsed by providing a HTTPS URL
9681

97-
```java
98-
import com.mindee.parsing;
99-
import com.mindee.parsing.custom;
100-
101-
MindeeClient mindeeClient = MindeeClientInit.create("my-api-key");
102-
CustomEndpoint customEndpoint = new CustomEndpoint("my-endpoint", "my-account");
103-
104-
URL documentUrl = new URL("https://path/to/document");
105-
Document<CustomV1Inference> customDocument = mindeeClient.parse(
106-
documentUrl,
107-
customEndpoint
108-
);
109-
```
11082
## Further Reading
11183
Complete details on the working of the library are available in the following guides:
11284

docs/java-getting-started.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,22 @@ byte[] fileAsBytes = ....;
186186
DocumentToParse documentToParse = mindeeClient.loadDocument(fileAsBytes,"document.pdf");
187187
```
188188

189+
### Loading an URL
190+
Alternatively, an HTTPS URL can be loaded:
191+
```java
192+
import com.mindee.parsing;
193+
import com.mindee.parsing.invoice;
194+
195+
MindeeClient mindeeClient = MindeeClientInit.create("my-api-key");
196+
197+
URL documentUrl = new URL("https://path/to/document");
198+
199+
Document<InvoiceV4Inference> invoiceDocument = mindeeClient.parse(
200+
InvoiceV4Inference.class,
201+
documentUrl
202+
);
203+
```
204+
189205
### Parsing a Document
190206
The `MindeeClient` has multiple overloaded `parse` methods available for parsing the documents
191207
and you will get `DocumentToParse`.

0 commit comments

Comments
 (0)