An open API service indexing awesome lists of open source software.

https://github.com/sypht-team/sypht-kotlin-client

A Kotlin client for the Sypht API
https://github.com/sypht-team/sypht-kotlin-client

api-client data-extraction document-capture extract extract-data-from-pdf extract-fields information-extraction invoice invoice-parser kotlin kotlin-android kotlin-library pdf-parser receipt-capture receipt-reader receipt-scanner receipt-scanning sypht sypht-api sypht-kotlin-client

Last synced: 2 months ago
JSON representation

A Kotlin client for the Sypht API

Awesome Lists containing this project

README

          

# Sypht Kotlin Client
This repository is a Kotlin reference client implementation for working with the Sypht API. [![Docs](https://img.shields.io/badge/API%20Docs-site-lightgrey.svg?style=flat-square)](https://docs.sypht.com)

## About Sypht
[Sypht](https://sypht.com) is a SaaS [API]((https://docs.sypht.com/)) which extracts key fields from documents. For
example, you can upload an image or pdf of a bill or invoice and extract the amount due, due date, invoice number
and biller information.

## Getting started
To get started you'll need API credentials, i.e. a `` and ``, which can be obtained by registering
for an [account](https://www.sypht.com/signup/developer)

## Prerequisites
- Install Java 8 JDK or upward

```Bash
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
```
- Install [Kotlin](https://kotlinlang.org)

```Bash
brew install kotlin
```

## Installation
Sypht Kotlin Client is available on maven central

### Maven
```Xml

com.sypht
sypht-kotlin-client
1.0

```

### Gradle
```Gradle
// https://mvnrepository.com/artifact/com.sypht/sypht-kotlin-client
compile group: 'com.sypht', name: 'sypht-kotlin-client', version: '1.0'
```

## Usage
Populate these system environment variables with the credentials generated above:

```Bash
SYPHT_API_KEY=":"
```

or

```Bash
OAUTH_CLIENT_ID=""
OAUTH_CLIENT_SECRET=""
```
You can also set the Http Request Timeout using the optional property:
```Bash
REQUEST_TIMEOUT=""
```

then invoke the client with a file of your choice:
```Kotlin
val client = SyphtClient()
println(
client.result(
client.upload(
File("receipt.pdf"))))
```
## Testing
Open pom.xml and add the below line inside ` ` with the credentials generated above:
```xml
client_id
client_secret
client_id:client_secret
```
then run
```Bash
mvn test
```

## License
The software in this repository is available as open source under the terms of the [Apache License](https://github.com/sypht-team/sypht-kotlin-client/blob/master/LICENSE).

## Code of Conduct
Everyone interacting in the project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/sypht-team/sypht-kotlin-client/blob/master/CODE_OF_CONDUCT.md).