Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veryfi/veryfi-dart
Dart module for communicating with the Veryfi OCR API
https://github.com/veryfi/veryfi-dart
api cstyle dart dart-library dart-sdk dart-sdks dartlang sdk
Last synced: 7 days ago
JSON representation
Dart module for communicating with the Veryfi OCR API
- Host: GitHub
- URL: https://github.com/veryfi/veryfi-dart
- Owner: veryfi
- License: mit
- Created: 2022-03-29T22:26:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T15:14:16.000Z (over 1 year ago)
- Last Synced: 2024-08-01T12:23:12.694Z (3 months ago)
- Topics: api, cstyle, dart, dart-library, dart-sdk, dart-sdks, dartlang, sdk
- Language: Dart
- Homepage:
- Size: 2.46 MB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![Dart 2.16](https://img.shields.io/badge/Dart-2.16-orange.svg?style=flat)
[![code coverage](https://raw.githubusercontent.com/veryfi/veryfi-dart/main/.github/metrics/code_coverage.svg)](https://raw.githubusercontent.com/veryfi/veryfi-dart/main/.github/metrics/code_coverage.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)Dart module for communicating with the Veryfi OCR API
## Installation
Install from https://pub.dev/packages/veryfi_dart## Getting Started
### Obtaining Client ID and user keys
If you don't have an account with Veryfi, please go ahead and register here: [https://hub.veryfi.com/signup/api/](https://hub.veryfi.com/signup/api/)### Veryfi Dart Client Library
The **veryfi** library can be used to communicate with Veryfi API. All available functionality is described here: https://veryfi.github.io/veryfi-dart/Below is the sample Dart code using **veryfi** to OCR and extract data from a document:
#### Import package:
```dart
import 'package:veryfi_dart/veryfi_dart.dart';
```#### Process a document from file
```dart
Future processDocument() async {
String fileName = 'receipt.jpg';
File file = File(fileName);
Uint8List imageData = file.readAsBytesSync();
String fileData = base64Encode(imageData);
VeryfiDart client = VeryfiDart(
'yourClientId', 'yourClientSecret', 'yourUsername', 'yourApiKey');await client.processDocument(fileName, fileData).then(
(response) {
print('success');
},
).catchError((error) {
print('error');
});
}
```#### Update a document
```dart
Future updateDocument() async {
VeryfiDart client = VeryfiDart(
'yourClientId', 'yourClientSecret', 'yourUsername', 'yourApiKey');
final Map params = {'notes': 'Test'};
await client.updateDocument('123', params).then(
(response) {
print('success');
},
).catchError((error) {
print('error');
});
}
```## Release
1. Create new branch for your code
2. Change version in `constants.dart` and `pubspec.yaml` with the same version.
3. Commit changes and push to Github
4. Create PR pointing to master branch and add a Veryfi member as a reviewer
5. Tag your commit with the new version
6. The new version will be accesible through Pub Dev.## Need help?
If you run into any issue or need help installing or using the library, please contact [email protected].If you found a bug in this library or would like new features added, then open an issue or pull requests against this repo!
To learn more about Veryfi visit https://www.veryfi.com/