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

org.arkecosystem.client.api.one.Blocks Maven / Gradle / Ivy

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

import com.google.gson.internal.LinkedTreeMap;
import org.arkecosystem.client.http.Client;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class Blocks {
    Client client;

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

    public LinkedTreeMap all(Map query) throws IOException {
        return this.client.get("blocks", query);
    }

    public LinkedTreeMap all() throws IOException {
        return this.all(new HashMap());
    }

    public LinkedTreeMap show(String id) throws IOException {
        HashMap map = new HashMap<>();
        map.put("id", id);
        return this.client.get("blocks/get", map);
    }

    public LinkedTreeMap epoch() throws IOException {
        return this.client.get("blocks/getEpoch");
    }

    public LinkedTreeMap fee() throws IOException {
        return this.client.get("blocks/getFee");
    }

    public LinkedTreeMap fees() throws IOException {
        return this.client.get("blocks/getFees");
    }

    public LinkedTreeMap height() throws IOException {
        return this.client.get("blocks/getHeight");
    }

    public LinkedTreeMap milestone() throws IOException {
        return this.client.get("blocks/getMilestone");
    }

    public LinkedTreeMap nethash() throws IOException {
        return this.client.get("blocks/getNethash");
    }

    public LinkedTreeMap reward() throws IOException {
        return this.client.get("blocks/getReward");
    }

    public LinkedTreeMap status() throws IOException {
        return this.client.get("blocks/getStatus");
    }

    public LinkedTreeMap supply() throws IOException {
        return this.client.get("blocks/getSupply");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy