Skip to main content

EsiClient

Struct EsiClient 

Source
pub struct EsiClient { /* private fields */ }

Implementations§

Source§

impl EsiClient

Source

pub fn authorize_url( &self, redirect_uri: &str, scopes: &[&str], ) -> Result<PkceChallenge>

Build the EVE SSO authorization URL with PKCE.

Returns a PkceChallenge containing the URL to redirect the user to, the code verifier (needed for exchange_code), and the state parameter (should be verified on callback).

Source

pub async fn exchange_code( &self, code: &str, code_verifier: &SecretString, redirect_uri: &str, ) -> Result<EsiTokens>

Exchange an authorization code for tokens.

Source

pub async fn refresh_token(&self) -> Result<EsiTokens>

Refresh the access token using the stored refresh token.

Uses a dedicated mutex to serialize refresh operations, preventing concurrent callers from racing on the same refresh token.

Source

pub async fn set_tokens(&self, tokens: EsiTokens)

Store tokens (e.g. restored from a database).

Source

pub async fn get_tokens(&self) -> Option<EsiTokens>

Read the current tokens.

Source

pub async fn clear_tokens(&self)

Clear stored tokens (logout).

Source§

impl EsiClient

Source

pub async fn get_alliance(&self, alliance_id: i64) -> Result<EsiAllianceInfo>

Fetch alliance info from ESI.

Source

pub async fn list_alliance_ids(&self) -> Result<Vec<i32>>

List all alliance IDs.

Source

pub async fn alliance_corporations(&self, alliance_id: i64) -> Result<Vec<i32>>

Fetch corporation IDs in an alliance.

Source

pub async fn alliance_icons(&self, alliance_id: i64) -> Result<EsiAllianceIcons>

Fetch alliance icon URLs.

Source

pub async fn alliance_contacts( &self, alliance_id: i64, ) -> Result<Vec<EsiContact>>

Fetch alliance contacts (authenticated, paginated).

Source

pub async fn alliance_contact_labels( &self, alliance_id: i64, ) -> Result<Vec<EsiContactLabel>>

Fetch alliance contact labels (authenticated).

Source§

impl EsiClient

Source

pub async fn get_character(&self, character_id: i64) -> Result<EsiCharacterInfo>

Fetch character info from ESI.

Source

pub async fn character_affiliation( &self, character_ids: &[i64], ) -> Result<Vec<EsiCharacterAffiliation>>

Bulk character affiliation lookup. Auto-chunks at 1000.

Source

pub async fn character_portrait( &self, character_id: i64, ) -> Result<EsiCharacterPortrait>

Fetch character portrait URLs.

Source

pub async fn character_roles( &self, character_id: i64, ) -> Result<EsiCharacterRoles>

Fetch character roles (authenticated).

Source

pub async fn character_titles( &self, character_id: i64, ) -> Result<Vec<EsiCharacterTitle>>

Fetch character titles (authenticated).

Source

pub async fn character_standings( &self, character_id: i64, ) -> Result<Vec<EsiStanding>>

Fetch character standings (authenticated).

Source

pub async fn character_medals( &self, character_id: i64, ) -> Result<Vec<EsiCharacterMedal>>

Fetch character medals (authenticated).

Source

pub async fn character_agents_research( &self, character_id: i64, ) -> Result<Vec<EsiAgentResearch>>

Fetch character agent research info (authenticated).

Source

pub async fn character_fatigue(&self, character_id: i64) -> Result<EsiFatigue>

Fetch character jump fatigue (authenticated).

Source

pub async fn character_fw_stats( &self, character_id: i64, ) -> Result<EsiCharacterFwStats>

Fetch character FW stats (authenticated).

Source

pub async fn character_cspa_charge( &self, character_id: i64, character_ids: &[i64], ) -> Result<f64>

Calculate CSPA charge cost for contacting characters.

Source

pub async fn character_corporation_history( &self, character_id: i64, ) -> Result<Vec<EsiCorporationHistoryEntry>>

Fetch a character’s corporation history.

Source

pub async fn character_assets( &self, character_id: i64, ) -> Result<Vec<EsiAssetItem>>

Fetch all assets for a character, handling pagination.

Source

pub async fn character_asset_locations( &self, character_id: i64, item_ids: &[i64], ) -> Result<Vec<EsiAssetLocation>>

Resolve character asset item IDs to locations.

Source

pub async fn character_asset_names( &self, character_id: i64, item_ids: &[i64], ) -> Result<Vec<EsiAssetName>>

Resolve character asset item IDs to names. Auto-chunks at 1000.

Source

pub async fn wallet_balance(&self, character_id: i64) -> Result<Isk>

Fetch a character’s ISK balance.

Source

pub async fn wallet_journal( &self, character_id: i64, ) -> Result<Vec<EsiWalletJournalEntry>>

Fetch a character’s wallet journal (paginated).

Source

pub async fn wallet_transactions( &self, character_id: i64, from_id: Option<i64>, ) -> Result<Vec<EsiWalletTransaction>>

Fetch a character’s wallet transactions.

Pass from_id to page backwards through older transactions.

Source

pub async fn character_skills(&self, character_id: i64) -> Result<EsiSkills>

Fetch a character’s trained skills.

Source

pub async fn character_skillqueue( &self, character_id: i64, ) -> Result<Vec<EsiSkillqueueEntry>>

Fetch a character’s skill queue.

Source

pub async fn character_attributes( &self, character_id: i64, ) -> Result<EsiAttributes>

Fetch a character’s attributes.

Source

pub async fn character_industry_jobs( &self, character_id: i64, include_completed: bool, ) -> Result<Vec<EsiIndustryJob>>

Fetch a character’s industry jobs.

Pass include_completed = true to include completed jobs.

Source

pub async fn character_blueprints( &self, character_id: i64, ) -> Result<Vec<EsiBlueprint>>

Fetch a character’s blueprints (paginated).

Source

pub async fn character_location(&self, character_id: i64) -> Result<EsiLocation>

Fetch a character’s current location.

Source

pub async fn character_ship(&self, character_id: i64) -> Result<EsiShip>

Fetch a character’s current ship.

Source

pub async fn character_online( &self, character_id: i64, ) -> Result<EsiOnlineStatus>

Fetch a character’s online status.

Source

pub async fn character_clones(&self, character_id: i64) -> Result<EsiClones>

Fetch a character’s clones.

Source

pub async fn character_implants(&self, character_id: i64) -> Result<Vec<i32>>

Fetch a character’s active implants.

Source

pub async fn character_loyalty_points( &self, character_id: i64, ) -> Result<Vec<EsiLoyaltyPoints>>

Fetch a character’s LP balances.

Source

pub async fn character_planets( &self, character_id: i64, ) -> Result<Vec<EsiPlanetSummary>>

Fetch a character’s planetary colonies.

Source

pub async fn character_planet_detail( &self, character_id: i64, planet_id: i32, ) -> Result<EsiPlanetDetail>

Fetch detailed layout of a planetary colony.

Source

pub async fn character_mining_ledger( &self, character_id: i64, ) -> Result<Vec<EsiMiningEntry>>

Fetch a character’s personal mining ledger (paginated).

Source

pub async fn character_contact_notifications( &self, character_id: i64, ) -> Result<Vec<EsiContactNotification>>

Fetch a character’s contact notifications.

Source

pub async fn character_opportunities( &self, character_id: i64, ) -> Result<Vec<EsiCompletedOpportunity>>

Fetch completed opportunities for a character (authenticated).

Source§

impl EsiClient

Source

pub async fn character_contracts( &self, character_id: i64, ) -> Result<Vec<EsiContract>>

Fetch a character’s contracts (paginated).

Source

pub async fn character_contract_items( &self, character_id: i64, contract_id: i64, ) -> Result<Vec<EsiContractItem>>

Fetch items in a specific contract.

Source

pub async fn character_contract_bids( &self, character_id: i64, contract_id: i64, ) -> Result<Vec<EsiContractBid>>

Fetch bids on a specific auction contract.

Source

pub async fn character_orders( &self, character_id: i64, ) -> Result<Vec<EsiCharacterOrder>>

Fetch a character’s active market orders.

Source

pub async fn character_order_history( &self, character_id: i64, ) -> Result<Vec<EsiCharacterOrder>>

Fetch a character’s order history (paginated).

Source

pub async fn character_fittings( &self, character_id: i64, ) -> Result<Vec<EsiFitting>>

Fetch a character’s saved fittings.

Source

pub async fn create_fitting( &self, character_id: i64, fitting: &EsiNewFitting, ) -> Result<i64>

Create a new fitting for a character. Returns the new fitting ID.

Source

pub async fn delete_fitting( &self, character_id: i64, fitting_id: i64, ) -> Result<()>

Delete a fitting. Returns () on success (204).

Source

pub async fn character_mail( &self, character_id: i64, labels: Option<&[i32]>, ) -> Result<Vec<EsiMailHeader>>

Fetch a character’s mail headers (first batch).

Pass labels to filter by label IDs.

Source

pub async fn character_mail_before( &self, character_id: i64, last_mail_id: i64, ) -> Result<Vec<EsiMailHeader>>

Fetch mail headers before a given mail ID (cursor pagination).

Source

pub async fn character_mail_body( &self, character_id: i64, mail_id: i64, ) -> Result<EsiMailBody>

Fetch a single mail body.

Source

pub async fn send_mail( &self, character_id: i64, mail: &EsiNewMail, ) -> Result<i32>

Send a mail. Returns the new mail ID.

Source

pub async fn character_mail_labels( &self, character_id: i64, ) -> Result<EsiMailLabels>

Fetch a character’s mail labels.

Source

pub async fn create_mail_label( &self, character_id: i64, label: &EsiNewMailLabel, ) -> Result<i32>

Create a new mail label. Returns the label ID.

Source

pub async fn delete_mail_label( &self, character_id: i64, label_id: i32, ) -> Result<()>

Delete a mail label.

Source

pub async fn character_mailing_lists( &self, character_id: i64, ) -> Result<Vec<EsiMailingList>>

Fetch a character’s mailing lists (authenticated).

Source

pub async fn delete_mail(&self, character_id: i64, mail_id: i64) -> Result<()>

Delete a mail.

Source

pub async fn update_mail( &self, character_id: i64, mail_id: i64, update: &EsiMailUpdate, ) -> Result<()>

Update mail metadata (read status, labels).

Source

pub async fn character_notifications( &self, character_id: i64, ) -> Result<Vec<EsiNotification>>

Fetch a character’s notifications.

Source

pub async fn character_contacts( &self, character_id: i64, ) -> Result<Vec<EsiContact>>

Fetch a character’s contacts (paginated).

Source

pub async fn character_contact_labels( &self, character_id: i64, ) -> Result<Vec<EsiContactLabel>>

Fetch a character’s contact labels.

Source

pub async fn add_contacts( &self, character_id: i64, standing: f64, contact_ids: &[i64], label_ids: Option<&[i64]>, watched: Option<bool>, ) -> Result<Vec<i32>>

Add contacts to a character. Returns added contact IDs.

Source

pub async fn edit_contacts( &self, character_id: i64, standing: f64, contact_ids: &[i64], label_ids: Option<&[i64]>, watched: Option<bool>, ) -> Result<()>

Edit contacts for a character.

Source

pub async fn delete_contacts( &self, character_id: i64, contact_ids: &[i64], ) -> Result<()>

Delete contacts from a character.

Source

pub async fn character_calendar( &self, character_id: i64, from_event: Option<i32>, ) -> Result<Vec<EsiCalendarEvent>>

Fetch a character’s upcoming calendar events.

Pass from_event to page backwards through older events.

Source

pub async fn character_calendar_event( &self, character_id: i64, event_id: i64, ) -> Result<EsiCalendarEventDetail>

Fetch details of a specific calendar event.

Source

pub async fn set_event_response( &self, character_id: i64, event_id: i64, response: &str, ) -> Result<()>

Set a character’s response to a calendar event.

Source

pub async fn event_attendees( &self, character_id: i64, event_id: i64, ) -> Result<Vec<EsiEventAttendee>>

Fetch attendees for a calendar event (authenticated).

Source

pub async fn search( &self, search: &str, categories: &str, strict: bool, ) -> Result<EsiSearchResult>

Search for entities by name (public, unauthenticated).

categories is a comma-separated list of categories to search (e.g. "solar_system,station").

Authenticated search for entities by name.

Source§

impl EsiClient

Source

pub async fn get_corporation( &self, corporation_id: i64, ) -> Result<EsiCorporationInfo>

Fetch corporation info from ESI.

Source

pub async fn corp_alliance_history( &self, corporation_id: i64, ) -> Result<Vec<EsiAllianceHistoryEntry>>

Fetch a corporation’s alliance history.

Source

pub async fn list_npc_corp_ids(&self) -> Result<Vec<i32>>

List NPC corporation IDs.

Source

pub async fn corp_wallet_balances( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpWalletDivision>>

Fetch corporation wallet division balances.

Source

pub async fn corp_wallet_journal( &self, corporation_id: i64, division: i32, from_id: Option<i64>, ) -> Result<Vec<EsiWalletJournalEntry>>

Fetch corporation wallet journal for a division.

Pass from_id to page backwards through older journal entries.

Source

pub async fn corp_wallet_transactions( &self, corporation_id: i64, division: i32, from_id: Option<i64>, ) -> Result<Vec<EsiWalletTransaction>>

Fetch corporation wallet transactions for a division.

Pass from_id to page backwards through older transactions.

Source

pub async fn corp_assets( &self, corporation_id: i64, ) -> Result<Vec<EsiAssetItem>>

Fetch corporation assets (paginated).

Source

pub async fn corp_asset_names( &self, corporation_id: i64, item_ids: &[i64], ) -> Result<Vec<EsiAssetName>>

Resolve corporation asset item IDs to names.

Source

pub async fn corp_asset_locations( &self, corporation_id: i64, item_ids: &[i64], ) -> Result<Vec<EsiAssetLocation>>

Resolve corporation asset item IDs to locations.

Source

pub async fn corp_industry_jobs( &self, corporation_id: i64, include_completed: bool, ) -> Result<Vec<EsiIndustryJob>>

Fetch corporation industry jobs (paginated).

Pass include_completed = true to include completed jobs.

Source

pub async fn corp_blueprints( &self, corporation_id: i64, ) -> Result<Vec<EsiBlueprint>>

Fetch corporation blueprints (paginated).

Source

pub async fn corp_contracts( &self, corporation_id: i64, ) -> Result<Vec<EsiContract>>

Fetch corporation contracts (paginated).

Source

pub async fn corp_contract_bids( &self, corporation_id: i64, contract_id: i64, ) -> Result<Vec<EsiContractBid>>

Fetch bids on a corporation contract.

Source

pub async fn corp_contract_items( &self, corporation_id: i64, contract_id: i64, ) -> Result<Vec<EsiContractItem>>

Fetch items in a corporation contract.

Source

pub async fn corp_orders( &self, corporation_id: i64, ) -> Result<Vec<EsiCharacterOrder>>

Fetch corporation active market orders.

Source

pub async fn corp_order_history( &self, corporation_id: i64, ) -> Result<Vec<EsiCharacterOrder>>

Fetch corporation order history (paginated).

Source

pub async fn corp_members(&self, corporation_id: i64) -> Result<Vec<i64>>

Fetch corporation member IDs.

Source

pub async fn corp_member_titles( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpMemberTitle>>

Fetch corporation member titles.

Source

pub async fn corp_member_roles( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpMemberRole>>

Fetch corporation member roles.

Source

pub async fn corp_member_tracking( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpMemberTracking>>

Fetch corporation member tracking info.

Source

pub async fn corp_member_limit(&self, corporation_id: i64) -> Result<i32>

Fetch corporation member limit.

Source

pub async fn corp_structures( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpStructure>>

Fetch corporation structures (paginated).

Source

pub async fn corp_starbases( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpStarbase>>

Fetch corporation starbases (POSes).

Source

pub async fn corp_starbase_detail( &self, corporation_id: i64, starbase_id: i64, system_id: i32, ) -> Result<EsiCorpStarbaseDetail>

Fetch detailed configuration of a specific starbase.

Source

pub async fn corp_contacts( &self, corporation_id: i64, ) -> Result<Vec<EsiContact>>

Fetch corporation contacts (authenticated, paginated).

Source

pub async fn corp_contact_labels( &self, corporation_id: i64, ) -> Result<Vec<EsiContactLabel>>

Fetch corporation contact labels (authenticated).

Source

pub async fn corp_container_logs( &self, corporation_id: i64, ) -> Result<Vec<EsiContainerLog>>

Fetch corporation container audit logs (authenticated, paginated).

Source

pub async fn corp_customs_offices( &self, corporation_id: i64, ) -> Result<Vec<EsiCustomsOffice>>

Fetch corporation customs offices (authenticated, paginated).

Source

pub async fn corp_divisions( &self, corporation_id: i64, ) -> Result<EsiCorpDivisions>

Fetch corporation divisions.

Source

pub async fn corp_facilities( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpFacility>>

Fetch corporation facilities.

Source

pub async fn corp_fw_stats(&self, corporation_id: i64) -> Result<EsiCorpFwStats>

Fetch corporation FW stats.

Source

pub async fn corp_icons(&self, corporation_id: i64) -> Result<EsiCorpIcons>

Fetch corporation icon URLs.

Source

pub async fn corp_medals( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpMedal>>

Fetch corporation medals (paginated).

Source

pub async fn corp_medals_issued( &self, corporation_id: i64, ) -> Result<Vec<EsiIssuedMedal>>

Fetch issued medals (paginated).

Source

pub async fn corp_roles_history( &self, corporation_id: i64, ) -> Result<Vec<EsiRoleHistory>>

Fetch corporation role change history (paginated).

Source

pub async fn corp_shareholders( &self, corporation_id: i64, ) -> Result<Vec<EsiShareholder>>

Fetch corporation shareholders (paginated).

Source

pub async fn corp_standings( &self, corporation_id: i64, ) -> Result<Vec<EsiStanding>>

Fetch corporation standings (paginated).

Source

pub async fn corp_titles( &self, corporation_id: i64, ) -> Result<Vec<EsiCorpTitle>>

Fetch corporation titles.

Source

pub async fn corp_mining_extractions( &self, corporation_id: i64, ) -> Result<Vec<EsiMiningExtraction>>

Fetch moon mining extractions (paginated).

Source

pub async fn corp_mining_observers( &self, corporation_id: i64, ) -> Result<Vec<EsiMiningObserver>>

Fetch mining observers (paginated).

Source

pub async fn corp_mining_observer_details( &self, corporation_id: i64, observer_id: i64, ) -> Result<Vec<EsiMiningObserverEntry>>

Fetch mining observer details (paginated).

Source§

impl EsiClient

Source

pub async fn character_fleet( &self, character_id: i64, ) -> Result<EsiCharacterFleet>

Fetch a character’s current fleet (authenticated).

Source

pub async fn get_fleet(&self, fleet_id: i64) -> Result<EsiFleetInfo>

Fetch fleet information.

Source

pub async fn fleet_members(&self, fleet_id: i64) -> Result<Vec<EsiFleetMember>>

Fetch fleet members.

Source

pub async fn fleet_wings(&self, fleet_id: i64) -> Result<Vec<EsiFleetWing>>

Fetch fleet wings and squads.

Source

pub async fn update_fleet( &self, fleet_id: i64, settings: &EsiFleetUpdate, ) -> Result<()>

Update fleet settings.

Source

pub async fn invite_to_fleet( &self, fleet_id: i64, invitation: &EsiFleetInvitation, ) -> Result<()>

Invite a character to a fleet.

Source

pub async fn kick_fleet_member( &self, fleet_id: i64, member_id: i64, ) -> Result<()>

Kick a member from a fleet.

Source

pub async fn move_fleet_member( &self, fleet_id: i64, member_id: i64, movement: &EsiFleetMovement, ) -> Result<()>

Move a fleet member to a different wing/squad/role.

Source

pub async fn create_fleet_wing( &self, fleet_id: i64, ) -> Result<EsiFleetWingCreated>

Create a fleet wing. Returns the wing ID.

Source

pub async fn rename_fleet_wing( &self, fleet_id: i64, wing_id: i64, name: &str, ) -> Result<()>

Rename a fleet wing.

Source

pub async fn delete_fleet_wing(&self, fleet_id: i64, wing_id: i64) -> Result<()>

Delete a fleet wing.

Source

pub async fn create_fleet_squad( &self, fleet_id: i64, wing_id: i64, ) -> Result<EsiFleetSquadCreated>

Create a fleet squad. Returns the squad ID.

Source

pub async fn rename_fleet_squad( &self, fleet_id: i64, squad_id: i64, name: &str, ) -> Result<()>

Rename a fleet squad.

Source

pub async fn delete_fleet_squad( &self, fleet_id: i64, squad_id: i64, ) -> Result<()>

Delete a fleet squad.

Source§

impl EsiClient

Source

pub async fn get_killmail( &self, killmail_id: i64, killmail_hash: &str, ) -> Result<Value>

Fetch a single killmail by ID and hash, returning the raw JSON value.

Source

pub async fn get_killmail_typed( &self, killmail_id: i64, killmail_hash: &str, ) -> Result<EsiKillmail>

Fetch a single killmail by ID and hash, returning a typed struct.

Source

pub async fn character_killmails( &self, character_id: i64, ) -> Result<Vec<EsiKillmailRef>>

Fetch recent killmails for a character (authenticated, paginated).

Source

pub async fn corporation_killmails( &self, corporation_id: i64, ) -> Result<Vec<EsiKillmailRef>>

Fetch recent killmails for a corporation (authenticated, paginated).

Source§

impl EsiClient

Source

pub async fn market_history( &self, region_id: i32, type_id: i32, ) -> Result<Vec<EsiMarketHistoryEntry>>

Fetch market history for a type in a region.

Source

pub async fn market_orders( &self, region_id: i32, type_id: i32, order_type: Option<&str>, ) -> Result<Vec<EsiMarketOrder>>

Fetch all market orders for a type in a region, handling pagination.

order_type can be "all" (default), "buy", or "sell".

Source

pub async fn market_prices(&self) -> Result<Vec<EsiMarketPrice>>

Fetch global average and adjusted prices for all types.

Source

pub async fn market_type_ids(&self, region_id: i32) -> Result<Vec<i32>>

List all type IDs with active market orders in a region (paginated).

Source

pub async fn market_group_ids(&self) -> Result<Vec<i32>>

List all market group IDs.

Source

pub async fn get_market_group( &self, market_group_id: i32, ) -> Result<EsiMarketGroupInfo>

Fetch market group info.

Source

pub async fn structure_orders( &self, structure_id: i64, ) -> Result<Vec<EsiMarketOrder>>

Fetch market orders at a structure (authenticated, paginated).

Source§

impl EsiClient

Source

pub async fn get_dogma_attribute( &self, attribute_id: i32, ) -> Result<EsiDogmaAttribute>

Fetch a dogma attribute by ID.

Source

pub async fn get_dogma_effect(&self, effect_id: i32) -> Result<EsiDogmaEffect>

Fetch a dogma effect by ID.

Source

pub async fn get_dynamic_item( &self, type_id: i32, item_id: i64, ) -> Result<EsiDynamicItem>

Fetch a mutated (dynamic) item’s stats.

Source

pub async fn list_dogma_attribute_ids(&self) -> Result<Vec<i32>>

List all dogma attribute IDs.

Source

pub async fn list_dogma_effect_ids(&self) -> Result<Vec<i32>>

List all dogma effect IDs.

Source

pub async fn opportunity_group_ids(&self) -> Result<Vec<i32>>

Fetch all opportunity group IDs.

Source

pub async fn opportunity_task_ids(&self) -> Result<Vec<i32>>

Fetch all opportunity task IDs.

Source

pub async fn list_war_ids(&self, max_war_id: Option<i32>) -> Result<Vec<i32>>

List active war IDs (paginated).

Pass max_war_id to page backwards from a specific war ID.

Source

pub async fn get_war(&self, war_id: i32) -> Result<EsiWar>

Fetch war details.

Source

pub async fn war_killmails(&self, war_id: i32) -> Result<Vec<EsiKillmailRef>>

Fetch killmails for a war (paginated).

Source

pub async fn fw_stats(&self) -> Result<Vec<EsiFwFactionStats>>

Fetch faction warfare statistics.

Source

pub async fn fw_systems(&self) -> Result<Vec<EsiFwSystem>>

Fetch faction warfare contested systems.

Source

pub async fn fw_leaderboards(&self) -> Result<EsiFwLeaderboards>

Fetch faction warfare leaderboards.

Source

pub async fn fw_wars(&self) -> Result<Vec<EsiFwWar>>

Fetch faction warfare wars.

Source

pub async fn fw_character_leaderboards( &self, ) -> Result<EsiFwCharacterLeaderboards>

Fetch character FW leaderboards.

Source

pub async fn fw_corporation_leaderboards( &self, ) -> Result<EsiFwCorporationLeaderboards>

Fetch corporation FW leaderboards.

Source

pub async fn insurance_prices(&self) -> Result<Vec<EsiInsurancePrice>>

Fetch insurance prices for all ship types.

Source

pub async fn incursions(&self) -> Result<Vec<EsiIncursion>>

Fetch active incursions.

Source

pub async fn server_status(&self) -> Result<EsiServerStatus>

Fetch server status (player count, server version).

Source

pub async fn loyalty_store_offers( &self, corporation_id: i64, ) -> Result<Vec<EsiLoyaltyStoreOffer>>

Fetch LP store offers for a corporation (public, no auth).

Source

pub async fn industry_facilities(&self) -> Result<Vec<EsiIndustryFacility>>

Fetch public industry facilities.

Source

pub async fn industry_systems(&self) -> Result<Vec<EsiIndustrySystem>>

Fetch industry system cost indices.

Source

pub async fn public_contracts(&self, region_id: i32) -> Result<Vec<EsiContract>>

Fetch public contracts in a region (paginated).

Source

pub async fn public_contract_bids( &self, contract_id: i64, ) -> Result<Vec<EsiContractBid>>

Fetch bids on a public contract (paginated).

Source

pub async fn public_contract_items( &self, contract_id: i64, ) -> Result<Vec<EsiContractItem>>

Fetch items in a public contract (paginated).

Source

pub async fn ui_autopilot_waypoint( &self, destination_id: i64, add_to_beginning: bool, clear_other_waypoints: bool, ) -> Result<()>

Set an autopilot waypoint.

Source

pub async fn ui_open_contract_window(&self, contract_id: i64) -> Result<()>

Open the contract window in the client.

Source

pub async fn ui_open_info_window(&self, target_id: i64) -> Result<()>

Open the info window in the client.

Source

pub async fn ui_open_market_details(&self, type_id: i32) -> Result<()>

Open the market details window in the client.

Source

pub async fn ui_open_new_mail(&self, new_mail: &EsiNewMailWindow) -> Result<()>

Open the new mail window in the client.

Source§

impl EsiClient

Source

pub async fn resolve_names(&self, ids: &[i64]) -> Result<Vec<EsiResolvedName>>

Resolve a set of IDs to names and categories.

Automatically chunks requests into batches of 1000 (the ESI limit).

Source

pub async fn resolve_ids(&self, names: &[String]) -> Result<EsiResolvedIds>

Resolve names to IDs (reverse of resolve_names).

Automatically chunks requests into batches of 500 (the ESI limit).

Source

pub async fn get_structure(&self, structure_id: i64) -> Result<EsiStructureInfo>

Fetch info about a player-owned structure.

Source

pub async fn get_type(&self, type_id: i32) -> Result<EsiTypeInfo>

Fetch detailed information about an inventory type.

Source

pub async fn list_type_ids(&self) -> Result<Vec<i32>>

List all type IDs (paginated).

Source

pub async fn get_group(&self, group_id: i32) -> Result<EsiGroupInfo>

Fetch inventory group info.

Source

pub async fn get_category(&self, category_id: i32) -> Result<EsiCategoryInfo>

Fetch inventory category info.

Source

pub async fn get_system(&self, system_id: i32) -> Result<EsiSolarSystemInfo>

Fetch solar system info.

Source

pub async fn get_constellation( &self, constellation_id: i32, ) -> Result<EsiConstellationInfo>

Fetch constellation info.

Source

pub async fn get_region(&self, region_id: i32) -> Result<EsiRegionInfo>

Fetch region info.

Source

pub async fn get_station(&self, station_id: i32) -> Result<EsiStationInfo>

Fetch NPC station info.

Source

pub async fn get_stargate(&self, stargate_id: i32) -> Result<EsiStargateInfo>

Fetch stargate info.

Source

pub async fn sovereignty_map(&self) -> Result<Vec<EsiSovereigntyMap>>

Fetch the sovereignty map — who owns each system.

Source

pub async fn sovereignty_campaigns(&self) -> Result<Vec<EsiSovereigntyCampaign>>

Fetch active sovereignty campaigns.

Source

pub async fn sovereignty_structures( &self, ) -> Result<Vec<EsiSovereigntyStructure>>

Fetch sovereignty structures.

Source

pub async fn get_route( &self, origin: i32, destination: i32, flag: Option<&str>, avoid: &[i32], connections: Option<&[[i32; 2]]>, ) -> Result<Vec<i32>>

Calculate a route between two solar systems.

flag controls the pathfinding algorithm: "shortest" (default), "secure", or "insecure". avoid is a list of system IDs to avoid. connections is a list of [from, to] pairs for wormhole connections.

Source

pub async fn universe_ancestries(&self) -> Result<Vec<EsiAncestry>>

Fetch all ancestries.

Source

pub async fn universe_asteroid_belt( &self, asteroid_belt_id: i32, ) -> Result<EsiAsteroidBelt>

Fetch asteroid belt info.

Source

pub async fn universe_bloodlines(&self) -> Result<Vec<EsiBloodline>>

Fetch all bloodlines.

Source

pub async fn list_universe_category_ids(&self) -> Result<Vec<i32>>

List all category IDs.

Source

pub async fn list_universe_constellation_ids(&self) -> Result<Vec<i32>>

List all constellation IDs.

Source

pub async fn universe_factions(&self) -> Result<Vec<EsiFaction>>

Fetch all factions.

Source

pub async fn list_universe_graphic_ids(&self) -> Result<Vec<i32>>

List all graphic IDs.

Source

pub async fn universe_graphic(&self, graphic_id: i32) -> Result<EsiGraphic>

Fetch graphic info.

Source

pub async fn list_universe_group_ids(&self) -> Result<Vec<i32>>

List all group IDs (paginated).

Source

pub async fn universe_moon(&self, moon_id: i32) -> Result<EsiMoon>

Fetch moon info.

Source

pub async fn universe_planet(&self, planet_id: i32) -> Result<EsiPlanet>

Fetch planet info (universe data, not PI).

Source

pub async fn universe_races(&self) -> Result<Vec<EsiRace>>

Fetch all races.

Source

pub async fn list_universe_region_ids(&self) -> Result<Vec<i32>>

List all region IDs.

Source

pub async fn universe_schematic( &self, schematic_id: i32, ) -> Result<EsiSchematic>

Fetch PI schematic info.

Source

pub async fn universe_star(&self, star_id: i32) -> Result<EsiStar>

Fetch star info.

Source

pub async fn list_public_structure_ids(&self) -> Result<Vec<i64>>

List all public structure IDs.

Source

pub async fn system_jumps(&self) -> Result<Vec<EsiSystemJumps>>

Fetch system jump statistics.

Source

pub async fn system_kills(&self) -> Result<Vec<EsiSystemKills>>

Fetch system kill statistics.

Source

pub async fn list_universe_system_ids(&self) -> Result<Vec<i32>>

List all system IDs.

Source§

impl EsiClient

Source

pub fn new() -> Self

Create a new ESI client with the default User-Agent and 30-second timeout.

§Panics

Panics if the default user-agent string is invalid (this should never happen as it is a compile-time constant).

Source

pub fn with_user_agent(user_agent: &str) -> Result<Self>

Create a new ESI client with a custom User-Agent string and 30-second timeout.

Returns an error if the user-agent string contains invalid HTTP header characters.

ESI requires a descriptive User-Agent. Include your app name, contact info, and optionally your EVE character name. Example:

my-app (contact@example.com; +https://github.com/me/my-app; eve:MyCharacter)
§Panics

Panics if the reqwest::Client builder fails to build (should not happen with default settings).

Source

pub fn with_web_app( user_agent: &str, client_id: &str, client_secret: SecretString, ) -> Result<Self>

Create an ESI client configured for a web application (confidential client).

Source

pub fn with_native_app(user_agent: &str, client_id: &str) -> Result<Self>

Create an ESI client configured for a native/desktop application (public client).

Source

pub fn credentials(self, creds: EsiAppCredentials) -> Self

Set app credentials (builder pattern).

Source

pub fn with_base_url(self, url: impl Into<String>) -> Self

Override the base URL (builder pattern). Useful for testing with mock servers.

Source

pub fn with_sso_token_url(self, url: impl Into<String>) -> Self

Override the SSO token URL (builder pattern). Useful for testing with mock servers.

Source

pub fn error_budget(&self) -> i32

Return the current error budget value.

Source

pub fn with_cache(self) -> Self

Enable the ETag response cache (builder pattern).

Source

pub fn with_max_cache_entries(self, n: usize) -> Self

Set the maximum number of ETag cache entries (builder pattern). Default is 1000. When the cache is full, an arbitrary entry is evicted.

Source

pub async fn clear_cache(&self)

Clear all cached ETag responses.

Source

pub async fn get_paginated<T: DeserializeOwned + Send + 'static>( &self, base_url: &str, ) -> Result<Vec<T>>

Fetch all pages of a paginated GET endpoint and flatten into one Vec.

Source

pub async fn post_paginated<T, B>( &self, base_url: &str, body: &B, ) -> Result<Vec<T>>
where T: DeserializeOwned + Send + 'static, B: Serialize + Sync,

Fetch all pages of a paginated POST endpoint and flatten into one Vec.

Source

pub async fn request_cached(&self, url: &str) -> Result<Vec<u8>>

Make a GET request with ETag caching support.

Uses execute_request internally for retry/401 handling. On 304, returns the cached body. On 200, caches the response.

Source

pub async fn request(&self, url: &str) -> Result<Response>

Make a rate-limited GET request to the given URL.

Source

pub async fn request_post( &self, url: &str, body: &(impl Serialize + ?Sized), ) -> Result<Response>

Make a rate-limited POST request with a JSON body.

Source

pub async fn request_delete(&self, url: &str) -> Result<Response>

Make a rate-limited DELETE request.

Source

pub async fn request_put( &self, url: &str, body: &(impl Serialize + ?Sized), ) -> Result<Response>

Make a rate-limited PUT request with a JSON body.

Trait Implementations§

Source§

impl Default for EsiClient

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more