Giter VIP home page Giter VIP logo

sypht-java-client's Introduction

Build Status codecov

Sypht Java Client

This repository is a Java reference client implementation for working with the Sypht API. Docs

About Sypht

Sypht is a SaaS API 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 <client_id> and <client_secret>, which can be obtained by registering for an account

Prerequisites

JDK8 and upwards are supported.

brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8

Installation

Sypht Java Client is available on maven central

Maven

<dependency>
  <groupId>com.sypht</groupId>
  <artifactId>sypht-java-client</artifactId>
  <version>1.4</version>
</dependency>

Gradle

// https://mvnrepository.com/artifact/com.sypht/sypht-java-client
compile group: 'com.sypht', name: 'sypht-java-client', version: '1.4'

SBT

// https://mvnrepository.com/artifact/com.sypht/sypht-java-client
libraryDependencies += "com.sypht" % "sypht-java-client" % "1.4"

Ivy

<!-- https://mvnrepository.com/artifact/com.sypht/sypht-java-client -->
<dependency org="com.sypht" name="sypht-java-client" rev="1.4"/>

Usage

Populate these system environment variables with the credentials generated above:

SYPHT_API_KEY="<client_id>:<client_secret>"

or

OAUTH_CLIENT_ID="<client_id>"
OAUTH_CLIENT_SECRET="<client_secret>"

then invoke the client with a file of your choice:

SyphtClient client = new SyphtClient();
System.out.println(
        client.result(
                client.upload(
                        new File("receipt.pdf"))));

License

The software in this repository is available as open source under the terms of the Apache 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.

sypht-java-client's People

Contributors

duaneallam avatar ryadav-bpay avatar simonmittag avatar simonsypht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ryadav-bpay

sypht-java-client's Issues

Question/ Edit

Hi, sorry this is not particularly relevant- I have a repo that all of the sudden received a flood of 'fake' stars, I am trying to work out where they came for and how and why this has happened.

I did some research and I found your repository, that has exactly the same activity:
80+ stars for ghost GitHub users, that happened all on the same day (in your case October 2019).

I'm now trying to figure out how they got there, for me and for you. Do you know anything about what this is or how it happened? I have heard that there are sketch buy-fake-star schemes online, if you don't mind me asking, was this how you got yours? Still doesn't explain my situation, since I didn't do that, and still I have no idea how they ended up on my repository.

client does not automatically re-authenticate when token expires

io.jsonwebtoken.ExpiredJwtException: JWT expired at 2019-07-24T01:41:46Z. Current time: 2019-07-24T03:58:47Z, a difference of 8221763 milliseconds. Allowed clock skew: 0 milliseconds.
at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:411)
at com.sypht.SyphtClient.decodeTokenClaims(SyphtClient.java:204)
at com.sypht.SyphtClient.getBearerToken(SyphtClient.java:181)
at com.sypht.SyphtClient.createAuthorizedPost(SyphtClient.java:168)
at com.sypht.SyphtClient.performUpload(SyphtClient.java:124)
at com.sypht.SyphtClient.upload(SyphtClient.java:86)

in order to re-authenticate a new SyphtClient() object has to be assigned

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.