SyphtClient v0.1.0 SyphtClient.Result View Source

Gets OCR results from Sypht.

Configuration

Override these defaults in the :sypht_client section of your config.exs files.

  • result_url: "https://api.sypht.com/result/final" - URL of result end point
  • result_retry_on: [202, 500] - Retry result requests on server HTTP status
  • result_initial_backoff: 200 - Initial backoff milliseconds
  • result_retry_until: 300_000 - Continue backing off and retrying until this many milliseconds have elapsed
  • result_http_options: [timeout: 20_000, recv_timeout: 150_000, ssl: [{:versions, [:"tlsv1.2"]}]] - Hackney HTTP options for results
  • result_error_prefix: "SyphtResult failed:" - Prefix result error messages with this

Link to this section Summary

Functions

Gets an OCR result from Sypht for file_id using access_token. Returns {:ok, decoded_json_response} if successful, {:error, reason_string} otherwise.

Link to this section Functions

Link to this function

get(access_token, file_id)

View Source

Gets an OCR result from Sypht for file_id using access_token. Returns {:ok, decoded_json_response} if successful, {:error, reason_string} otherwise.