All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.arkecosystem.client.api.Node Maven / Gradle / Ivy

The newest version!
package org.arkecosystem.client.api;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.arkecosystem.client.http.Client;

public class Node {
    private final Client client;

    public Node(Client client) {
        this.client = client;
    }

    public Map status() throws IOException {
        return this.client.get("node/status");
    }

    public Map syncing() throws IOException {
        return this.client.get("node/syncing");
    }

    public Map configuration() throws IOException {
        return this.client.get("node/configuration");
    }

    public Map crypto() throws IOException {
        return this.client.get("node/configuration/crypto");
    }

    public Map fees(int days) throws IOException {
        HashMap parameters = new HashMap<>();
        parameters.put("days", days);
        return this.client.get("node/fees", parameters);
    }

    public Map fees() throws IOException {
        HashMap parameters = new HashMap<>();
        parameters.put("days", null);
        return this.client.get("node/fees", parameters);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy