deleteDoc

Overview

Parameters:

  • String - doc token

Return:

To delete this document we need:

  • set your api token.

  • set your doc 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";

Set your doc token.

String docToken = "DOC TOKEN"

Call the method deleteDoc and receive the DocResponse class or an error message as a response:

try {
    DocResponse docResponse = new DocRequests(apiToken).deleteDoc(docToken);

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

Example:

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

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

        try {
            DocResponse docResponse = new DocRequests(apiToken).deleteDoc(docToken);

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

Last updated