Comparing version 0.0.18 to 0.0.19
@@ -25,3 +25,3 @@ (function (root, factory) { | ||
var SOURCE = 'library'; | ||
var VERSION = '0.0.18'; | ||
var VERSION = '0.0.19'; | ||
@@ -119,3 +119,3 @@ function Optiic(options) { | ||
} else if (isInputElement) { | ||
formData.append('image', This.options.environment === 'node' ? fs.createReadStream(options.url.files[0].path) : options.url.files[0]); | ||
formData.append('image', This.options.environment === 'node' ? fs.createReadStream(options.url.files[0].path) : options.url.files[0]); | ||
} else if (isFileObject) { | ||
@@ -122,0 +122,0 @@ formData.append('image', This.options.environment === 'node' ? fs.createReadStream(options.url.path) : options.url); |
{ | ||
"name": "optiic", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "An advanced free OCR & image recognition API.", | ||
@@ -38,10 +38,10 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"form-data": "^3.0.0", | ||
"node-fetch": "^2.6.1" | ||
"form-data": "^3.0.1", | ||
"node-fetch": "^2.6.7" | ||
}, | ||
"devDependencies": { | ||
"fs-jetpack": "^4.1.0", | ||
"prepare-package": "^0.0.6" | ||
"prepare-package": "^0.0.11" | ||
}, | ||
"runkitExampleFilename": "examples/process.js" | ||
} | ||
} |
@@ -0,1 +1,2 @@ | ||
<p align="center"> | ||
@@ -10,4 +11,4 @@ <a href="https://cdn.itwcreativeworks.com/assets/optiic/images/logo/optiic-brandmark-black-x.svg"> | ||
<br> | ||
<img src="https://img.shields.io/david/optiic/optiic.svg"> | ||
<img src="https://img.shields.io/david/dev/optiic/optiic.svg"> | ||
<img src="https://img.shields.io/librariesio/release/npm/optiic.svg"> | ||
<!-- <img src="https://img.shields.io/david/dev/optiic/optiic.svg"> --> | ||
<img src="https://img.shields.io/bundlephobia/min/optiic.svg"> | ||
@@ -41,3 +42,3 @@ <img src="https://img.shields.io/codeclimate/maintainability-percentage/optiic/optiic.svg"> | ||
### Getting an API key | ||
You can use so much of `optiic` for free, but if you want to do some advanced stuff, you'll need an API key. You can get one by signing up for an account at [https://optiic.dev/signup](https://optiic.dev/signup). | ||
You can use so much of `optiic` for free, but if you want to do some advanced stuff, you'll need an API key. You can get one by [signing up for an account](https://optiic.dev/authentication/signup). | ||
@@ -73,3 +74,13 @@ ## Install Optiic | ||
## Example output | ||
If you want to see how `optiic` works, you can try a sample image such as `https://via.placeholder.com/468x60?text=We+love+Optiic!` which will result in an output like this: | ||
If you want to see how `optiic` works, you can try a sample such as [this image](https://optiic.dev/assets/images/samples/we-love-optiic.png): | ||
<p align="center"> | ||
<a href="https://optiic.dev/assets/images/samples/we-love-optiic.png"> | ||
<img src="https://optiic.dev/assets/images/samples/we-love-optiic.png" width="100%"> | ||
</a> | ||
</p> | ||
This will result in an output like this: | ||
```js | ||
@@ -99,3 +110,3 @@ { | ||
let options = { | ||
image: 'https://via.placeholder.com/468x60?text=We+love+Optiic!', // url of the image | ||
image: 'https://optiic.dev/assets/images/samples/we-love-optiic.png', // url of the image | ||
mode: 'ocr', // ocr | ||
@@ -151,10 +162,15 @@ }; | ||
### Use Optiic with `curl` | ||
#### OCR with URL | ||
```shell | ||
# OCR with URL | ||
curl -d '{"apiKey": "test_api_key", "mode": "ocr", "url": "https://via.placeholder.com/468x60?text=We+love+Optiic!"}' -H 'Content-Type: application/json' https://api.optiic.dev/process | ||
curl \ | ||
-d '{"apiKey": "test_api_key", "url": "https://optiic.dev/assets/images/samples/we-love-optiic.png"}' \ | ||
-H 'Content-Type: application/json' \ | ||
https://api.optiic.dev/process | ||
# OCR with image file | ||
``` | ||
#### OCR with image file | ||
```shell | ||
curl \ | ||
-F "apiKey=test_api_key" \ | ||
-F "mode=ocr" \ | ||
-F "image=@/Users/username/Desktop/my-image.png" \ | ||
@@ -161,0 +177,0 @@ https://api.optiic.dev/process |
15958
190
+ Addedform-data@3.0.2(transitive)
- Removedcall-bind-apply-helpers@1.0.2(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.1.1(transitive)
- Removedes-set-tostringtag@2.1.0(transitive)
- Removedform-data@3.0.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.7(transitive)
- Removedget-proto@1.0.1(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
Updatedform-data@^3.0.1
Updatednode-fetch@^2.6.7