enterprises.orbital.impl.evexmlapi.chr.CharacterAPIAdapter 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 java.util.Collection;
import enterprises.orbital.evexmlapi.chr.ICalendarEventAttendee;
import enterprises.orbital.evexmlapi.chr.ICharacterAPI;
import enterprises.orbital.evexmlapi.chr.ICharacterMedal;
import enterprises.orbital.evexmlapi.chr.ICharacterSheet;
import enterprises.orbital.evexmlapi.chr.IChatChannel;
import enterprises.orbital.evexmlapi.chr.IContactNotification;
import enterprises.orbital.evexmlapi.chr.IMailBody;
import enterprises.orbital.evexmlapi.chr.IMailList;
import enterprises.orbital.evexmlapi.chr.IMailMessage;
import enterprises.orbital.evexmlapi.chr.INotification;
import enterprises.orbital.evexmlapi.chr.INotificationText;
import enterprises.orbital.evexmlapi.chr.IPartialCharacterSheet;
import enterprises.orbital.evexmlapi.chr.IPlanetaryColony;
import enterprises.orbital.evexmlapi.chr.IPlanetaryLink;
import enterprises.orbital.evexmlapi.chr.IPlanetaryPin;
import enterprises.orbital.evexmlapi.chr.IPlanetaryRoute;
import enterprises.orbital.evexmlapi.chr.IResearchAgent;
import enterprises.orbital.evexmlapi.chr.ISkillInQueue;
import enterprises.orbital.evexmlapi.chr.ISkillInTraining;
import enterprises.orbital.evexmlapi.chr.ISkillInfo;
import enterprises.orbital.evexmlapi.chr.IUpcomingCalendarEvent;
import enterprises.orbital.evexmlapi.shared.IAccountBalance;
import enterprises.orbital.evexmlapi.shared.IAsset;
import enterprises.orbital.evexmlapi.shared.IBlueprint;
import enterprises.orbital.evexmlapi.shared.IBookmarkFolder;
import enterprises.orbital.evexmlapi.shared.IContactSet;
import enterprises.orbital.evexmlapi.shared.IContract;
import enterprises.orbital.evexmlapi.shared.IContractBid;
import enterprises.orbital.evexmlapi.shared.IContractItem;
import enterprises.orbital.evexmlapi.shared.IFacWarStats;
import enterprises.orbital.evexmlapi.shared.IIndustryJob;
import enterprises.orbital.evexmlapi.shared.IKill;
import enterprises.orbital.evexmlapi.shared.ILocation;
import enterprises.orbital.evexmlapi.shared.IMarketOrder;
import enterprises.orbital.evexmlapi.shared.IStandingSet;
import enterprises.orbital.evexmlapi.shared.IWalletJournalEntry;
import enterprises.orbital.evexmlapi.shared.IWalletTransaction;
import enterprises.orbital.impl.evexmlapi.AbstractAPIRequestAdapter;
import enterprises.orbital.impl.evexmlapi.ApiAuth;
import enterprises.orbital.impl.evexmlapi.ApiConnector;
public class CharacterAPIAdapter extends AbstractAPIRequestAdapter implements ICharacterAPI {
public CharacterAPIAdapter(ApiConnector connector, int keyID, long characterID, String vCode) {
super(connector);
setAuth(new ApiAuth(keyID, characterID, vCode));
}
@Override
public IAccountBalance requestAccountBalance() throws IOException {
return new AccountBalanceParser(connector).retrieveResponse(this);
}
@Override
public Collection requestAssets() throws IOException {
return requestAssets(false);
}
@Override
public Collection requestAssets(
boolean flat)
throws IOException {
return new AssetListParser(connector, flat).retrieveResponse(this);
}
@Override
public Collection requestBlueprints() throws IOException {
return new BlueprintsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestBookmarks() throws IOException {
return new BookmarksParser(connector).retrieveResponse(this);
}
@Override
public Collection requestCalendarEventAttendees(
long... eventID)
throws IOException {
return new CalendarEventAttendeeParser(connector, eventID).retrieveResponse(this);
}
@Override
public ICharacterSheet requestCharacterSheet() throws IOException {
return new CharacterSheetParser(connector).retrieveResponse(this);
}
@Override
public Collection requestChatChannels() throws IOException {
return new ChatChannelsParser(connector).retrieveResponse(this);
}
@Override
public IPartialCharacterSheet requestClones() throws IOException {
return new PartialCharacterSheetParser(connector).retrieveResponse(this);
}
@Override
public Collection requestContactNotifications() throws IOException {
return new ContactNotificationsParser(connector).retrieveResponse(this);
}
@Override
public IContactSet requestContacts() throws IOException {
return new ContactListParser(connector).retrieveResponse(this);
}
@Override
public Collection requestContractBids() throws IOException {
return new ContractBidsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestContractItems(
long contractID)
throws IOException {
return new ContractItemsParser(connector, contractID).retrieveResponse(this);
}
@Override
public Collection requestContracts() throws IOException {
return new ContractsParser(connector).retrieveResponse(this);
}
@Override
public IFacWarStats requestFacWarStats() throws IOException {
return new FacWarStatsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestIndustryJobs() throws IOException {
return new IndustryJobsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestIndustryJobsHistory() throws IOException {
return new IndustryJobsHistoryParser(connector).retrieveResponse(this);
}
@Override
public Collection requestKillMails() throws IOException {
return new KillMailsParser(connector, null).retrieveResponse(this);
}
@Override
public Collection requestKillMails(
long beforeKillId)
throws IOException {
return new KillMailsParser(connector, beforeKillId).retrieveResponse(this);
}
@Override
public Collection requestMailBodies(
long... messageID)
throws IOException {
return new MailBodiesParser(connector, messageID).retrieveResponse(this);
}
@Override
public Collection requestMailingLists() throws IOException {
return new MailingListsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestMailMessages() throws IOException {
return new MailMessagesParser(connector).retrieveResponse(this);
}
@Override
public IMarketOrder requestMarketOrder(
long orderID)
throws IOException {
Collection result = new MarketOrdersParser(connector, orderID).retrieveResponse(this);
if (result == null) return null;
return result.isEmpty() ? null : result.iterator().next();
}
@Override
public Collection requestMarketOrders() throws IOException {
return new MarketOrdersParser(connector, null).retrieveResponse(this);
}
@Override
public Collection requestMedals() throws IOException {
return new MedalsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestNotifications() throws IOException {
return new NotificationsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestNotificationTexts(
long... notificationID)
throws IOException {
return new NotificationTextsParser(connector, notificationID).retrieveResponse(this);
}
@Override
public Collection requestPlanetaryColonies() throws IOException {
return new PlanetaryColonyParser(connector).retrieveResponse(this);
}
@Override
public Collection requestPlanetaryLinks(
long planetID)
throws IOException {
return new PlanetaryLinkParser(connector, planetID).retrieveResponse(this);
}
@Override
public Collection requestPlanetaryPins(
long planetID)
throws IOException {
return new PlanetaryPinParser(connector, planetID).retrieveResponse(this);
}
@Override
public Collection requestPlanetaryRoutes(
long planetID)
throws IOException {
return new PlanetaryRouteParser(connector, planetID).retrieveResponse(this);
}
@Override
public Collection requestResearchAgents() throws IOException {
return new ResearchParser(connector).retrieveResponse(this);
}
@Override
public ISkillInTraining requestSkillInTraining() throws IOException {
return new SkillInTrainingParser(connector).retrieveResponse(this);
}
@Override
public Collection requestSkillQueue() throws IOException {
return new SkillQueueParser(connector).retrieveResponse(this);
}
@Override
public ISkillInfo requestSkills() throws IOException {
return new SkillInfoParser(connector).retrieveResponse(this);
}
@Override
public IStandingSet requestStandings() throws IOException {
return new StandingsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestUpcomingCalendarEvents() throws IOException {
return new UpcomingCalendarEventsParser(connector).retrieveResponse(this);
}
@Override
public Collection requestWalletJournalEntries() throws IOException {
return new WalletJournalParser(connector, null).retrieveResponse(this);
}
@Override
public Collection requestWalletJournalEntries(
long beforeRefID)
throws IOException {
return new WalletJournalParser(connector, beforeRefID).retrieveResponse(this);
}
@Override
public Collection requestWalletTransactions() throws IOException {
return new WalletTransactionsParser(connector, null).retrieveResponse(this);
}
@Override
public Collection requestWalletTransactions(
long beforeTransID)
throws IOException {
return new WalletTransactionsParser(connector, beforeTransID).retrieveResponse(this);
}
@Override
public Collection requestLocations(
long... itemID)
throws IOException {
return new LocationsParser(connector, itemID).retrieveResponse(this);
}
}