getDocs

Listar documentos

Overview

Return:

To get your documents we need:

  • set your api token.

  • call the method.

Usage:

Import the relevant components:

import docs.DocRequests;
import response.DocsResponse;

import services.JsonConverter;

Set your Api Token:

String apiToken = "YOUR TOKEN";

Call the method getDocs and receive the DocsResponse class or an error message as a response:

try {
    DocsResponse docsResponse = new DocRequests(apiToken).getDocs();

    String jsonDocResponse = new JsonConverter().docsResponseToJson(docsResponse);
    System.out.println(jsonDocResponse);
}
catch(Exception exceptionError) {
    System.out.println(exceptionError.getMessage());
}

Example:

import docs.DocRequests;
import response.DocsResponse;
import services.JsonConverter;

public class GetDocs {
    public static void main(String[] args) throws Exception {
    String apiToken = "YOUR TOKEN";

        try {
            DocsResponse docsResponse = new DocRequests(apiToken).getDocs();

            String jsonDocResponse = new JsonConverter().docsResponseToJson(docsResponse);
            System.out.println(jsonDocResponse);
        }
        catch(Exception exceptionError) {
            System.out.println(exceptionError.getMessage());
        }
    }
}