![JAR search and dependency download from the Maven repository](/logo.png)
enterprises.orbital.impl.evexmlapi.chr.AccountBalanceParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eve-xml-api Show documentation
Show all versions of eve-xml-api Show documentation
Library to interact with EVE XML API servers
package enterprises.orbital.impl.evexmlapi.chr;
import java.io.IOException;
import enterprises.orbital.evexmlapi.shared.IAccountBalance;
import enterprises.orbital.impl.evexmlapi.AbstractAPIRequestAdapter;
import enterprises.orbital.impl.evexmlapi.ApiConnector;
import enterprises.orbital.impl.evexmlapi.ApiEndpoint;
import enterprises.orbital.impl.evexmlapi.shared.AbstractAccountBalanceParser;
import enterprises.orbital.impl.evexmlapi.shared.AccountBalanceResponse;
public class AccountBalanceParser extends AbstractAccountBalanceParser {
public AccountBalanceParser(ApiConnector connector) {
super(connector, ApiEndpoint.CHR_ACCOUNT_BALANCE_V2);
}
@Override
public IAccountBalance retrieveResponse(AbstractAPIRequestAdapter adapter) throws IOException {
AccountBalanceResponse response = getResponse(adapter.getAuth());
adapter.setFromLastResponse(response);
if (adapter.isError()) return null;
assert !response.getAccountBalances().isEmpty();
return response.getAccountBalances().iterator().next();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy