org.knowm.xchange.coinbasepro.dto.CoinbasePagedResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-coinbasepro Show documentation
Show all versions of xchange-coinbasepro Show documentation
XChange implementation for CoinbasePro
The newest version!
package org.knowm.xchange.coinbasepro.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import si.mazi.rescu.HttpResponseAware;
public class CoinbasePagedResponse extends ArrayList implements HttpResponseAware {
@JsonIgnore private Map> headers;
@Override
public void setResponseHeaders(Map> headers) {
this.headers = headers;
}
@Override
public Map> getResponseHeaders() {
return headers;
}
public String getBefore() {
return headers.getOrDefault("Cb-Before", Collections.emptyList()).stream()
.findFirst()
.orElse(null);
}
public String getAfter() {
return headers.getOrDefault("Cb-After", Collections.emptyList()).stream()
.findFirst()
.orElse(null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy