ApiCommunicator

public class ApiCommunicator

The ApiCommunicator is responsible for communication with the Gini API. It only converts the server's responses to more convenient objects (e.g. a JSON response to a JSONObject) but does not interpret the results in any way. Therefore it is not recommended to use the ApiCommunicator directly, but to use the DocumentTaskManager instead which provides much more convenient methods to work with the Gini API and uses defined models.

Constructors

ApiCommunicator
Link copied to clipboard
void ApiCommunicator(String baseUriString, GiniApiType giniApiType, RequestQueue mRequestQueue, RetryPolicyFactory retryPolicyFactory)

Types

PreviewSize
Link copied to clipboard
public enum PreviewSize

Functions

deleteDocument
Link copied to clipboard
Task<StringdeleteDocument(Uri documentUri, Session session)
Task<StringdeleteDocument(String documentId, Session session)
errorReportForDocument
Link copied to clipboard
Task<JSONObjecterrorReportForDocument(String documentId, @Nullable() String summary, @Nullable() String description, Session session)
getDocument
Link copied to clipboard
Task<JSONObjectgetDocument(Uri documentUri, Session session)
Task<JSONObjectgetDocument(String documentId, Session session)
getDocumentList
Link copied to clipboard
Task<JSONObjectgetDocumentList(int offset, int limit, Session session)
getExtractions
Link copied to clipboard
Task<JSONObjectgetExtractions(String documentId, Session session)
getIncubatorExtractions
Link copied to clipboard
Task<JSONObjectgetIncubatorExtractions(String documentId, Session session)
getLayoutForDocument
Link copied to clipboard
Task<JSONObjectgetLayoutForDocument(String documentId, Session session)
getPageImage
Link copied to clipboard
Task<Array<byte>> getPageImage(@NonNull() String documentId, int pageCount, Session session)
getPayment
Link copied to clipboard
Task<JSONObjectgetPayment(String id, Session session)
getPaymentProvider
Link copied to clipboard
Task<JSONObjectgetPaymentProvider(String id, Session session)
getPaymentProviders
Link copied to clipboard
Task<JSONArraygetPaymentProviders(Session session)
getPaymentRequest
Link copied to clipboard
Task<JSONObjectgetPaymentRequest(String id, Session session)
getPaymentRequests
Link copied to clipboard
Task<JSONArraygetPaymentRequests(Session session)
getPreview
Link copied to clipboard
Task<BitmapgetPreview(String documentId, int pageNumber, ApiCommunicator.PreviewSize previewSize, Session session)
logErrorEvent
Link copied to clipboard
Task<JSONObjectlogErrorEvent(@NonNull() JSONObject errorEvent, @NonNull() Session session)
postPaymentRequests
Link copied to clipboard
Task<JSONObjectpostPaymentRequests(JSONObject body, Session session)
resolvePaymentRequests
Link copied to clipboard
Task<JSONObjectresolvePaymentRequests(String id, JSONObject body, Session session)
searchDocuments
Link copied to clipboard
Task<JSONObjectsearchDocuments(String searchTerm, @Nullable() String docType, int offset, int limit, Session session)
sendFeedback
Link copied to clipboard
Task<JSONObjectsendFeedback(String documentId, JSONObject extractions, Session session)
Task<JSONObjectsendFeedback(String documentId, JSONObject extractions, JSONObject compoundExtractions, Session session)
uploadDocument
Link copied to clipboard
Task<UriuploadDocument(Array<byte> documentData, String contentType, @Nullable() String documentName, @Nullable() String docTypeHint, Session session, @Nullable() DocumentMetadata documentMetadata)

Properties

mRequestQueue
Link copied to clipboard
public final RequestQueue mRequestQueue
mRetryPolicyFactory
Link copied to clipboard
public final RetryPolicyFactory mRetryPolicyFactory