spacetraders_api

Types

pub type AgentRegistered {
  AgentRegistered(
    token: agent_token.AgentToken,
    agent: agent.Agent,
    faction: faction.Faction,
    contract: contract.Contract,
    ships: List(ship.Ship),
  )
}

Constructors

pub type Announcement {
  Announcement(title: String, body: String)
}

Constructors

  • Announcement(title: String, body: String)
pub type ApiError {
  JsonDecodeError(json.DecodeError)
  ServerError(spacetraders_error.SpacetradersError)
}

Constructors

pub type ApiResponse(data) =
  Result(data, ApiError)
pub type CargoPurchased {
  CargoPurchased(
    cargo: ship_cargo.ShipCargo,
    transaction: market_transaction.MarketTransaction,
    agent: agent.Agent,
  )
}

Constructors

pub type CargoSold {
  CargoSold(
    cargo: ship_cargo.ShipCargo,
    transaction: market_transaction.MarketTransaction,
    agent: agent.Agent,
  )
}

Constructors

pub type CargoTransferred {
  CargoTransferred(
    cargo: ship_cargo.ShipCargo,
    target_cargo: ship_cargo.ShipCargo,
  )
}

Constructors

pub type ChartCreated {
  ChartCreated(
    chart: chart.Chart,
    waypoint: waypoint.Waypoint,
    transaction: chart_transaction.ChartTransaction,
    agent: agent.Agent,
  )
}

Constructors

pub type ChartLeaderboardEntry {
  ChartLeaderboardEntry(
    agent_symbol: agent_symbol.AgentSymbol,
    chart_count: Int,
  )
}

Constructors

pub type ConstructionSiteSupplied {
  ConstructionSiteSupplied(
    construction: construction.Construction,
    cargo: ship_cargo.ShipCargo,
  )
}

Constructors

pub type ContractAccepted {
  ContractAccepted(
    contract: contract.Contract,
    agent: agent.Agent,
  )
}

Constructors

pub type ContractCargoDelivered {
  ContractCargoDelivered(
    contract: contract.Contract,
    cargo: ship_cargo.ShipCargo,
  )
}

Constructors

pub type ContractFulfilled {
  ContractFulfilled(
    contract: contract.Contract,
    agent: agent.Agent,
  )
}

Constructors

pub type CreditLeaderboardEntry {
  CreditLeaderboardEntry(
    agent_symbol: agent_symbol.AgentSymbol,
    credits: Int,
  )
}

Constructors

pub type ErrorCode {
  ErrorCode(code: Int, name: String)
}

Constructors

  • ErrorCode(code: Int, name: String)
pub type FactionReputation {
  FactionReputation(
    symbol: faction_symbol.FactionSymbol,
    reputation: Int,
  )
}

Constructors

pub type Health {
  Health(last_market_update: option.Option(timestamp.Timestamp))
}

Constructors

pub type Leaderboards {
  Leaderboards(
    most_credits: List(CreditLeaderboardEntry),
    most_submitted_charts: List(ChartLeaderboardEntry),
  )
}

Constructors

pub type Link {
  Link(name: String, url: uri.Uri)
}

Constructors

pub type ResourcesExtracted {
  ResourcesExtracted(
    extraction: extraction.Extraction,
    cooldown: cooldown.Cooldown,
    cargo: ship_cargo.ShipCargo,
    modifiers: List(waypoint_modifier.WaypointModifier),
    events: List(ship_condition_event.ShipConditionEvent),
  )
}

Constructors

pub type ResourcesSiphoned {
  ResourcesSiphoned(
    siphon: siphon.Siphon,
    cooldown: cooldown.Cooldown,
    cargo: ship_cargo.ShipCargo,
    events: List(ship_condition_event.ShipConditionEvent),
  )
}

Constructors

pub type Scan(data) {
  Scan(cooldown: cooldown.Cooldown, data: List(data))
}

Constructors

pub type ServerResets {
  ServerResets(next: timestamp.Timestamp, frequency: String)
}

Constructors

pub type ServerStatus {
  ServerStatus(
    status: String,
    version: String,
    reset_date: calendar.Date,
    description: String,
    stats: Stats,
    health: Health,
    leaderboards: Leaderboards,
    server_resets: ServerResets,
    announcements: List(Announcement),
    links: List(Link),
  )
}

Constructors

pub type ShipJumped {
  ShipJumped(
    nav: ship_nav.ShipNav,
    cooldown: cooldown.Cooldown,
    transaction: market_transaction.MarketTransaction,
    agent: agent.Agent,
  )
}

Constructors

pub type ShipModuleInstalled {
  ShipModuleInstalled(
    agent: agent.Agent,
    modules: List(ship_module.ShipModule),
    cargo: ship_cargo.ShipCargo,
    transaction: ship_modification_transaction.ShipModificationTransaction,
  )
}

Constructors

pub type ShipModuleRemoved {
  ShipModuleRemoved(
    agent: agent.Agent,
    modules: List(ship_module.ShipModule),
    cargo: ship_cargo.ShipCargo,
    transaction: ship_modification_transaction.ShipModificationTransaction,
  )
}

Constructors

pub type ShipMountInstalled {
  ShipMountInstalled(
    agent: agent.Agent,
    mounts: List(ship_mount.ShipMount),
    cargo: ship_cargo.ShipCargo,
    transaction: ship_modification_transaction.ShipModificationTransaction,
  )
}

Constructors

pub type ShipMountRemoved {
  ShipMountRemoved(
    agent: agent.Agent,
    mounts: List(ship_mount.ShipMount),
    cargo: ship_cargo.ShipCargo,
    transaction: ship_modification_transaction.ShipModificationTransaction,
  )
}

Constructors

pub type ShipNavPatched {
  ShipNavPatched(
    nav: ship_nav.ShipNav,
    fuel: ship_fuel.ShipFuel,
    events: List(ship_condition_event.ShipConditionEvent),
  )
}

Constructors

pub type ShipNavigated {
  ShipNavigated(
    nav: ship_nav.ShipNav,
    fuel: ship_fuel.ShipFuel,
    events: List(ship_condition_event.ShipConditionEvent),
  )
}

Constructors

pub type ShipPurchased {
  ShipPurchased(
    ship: ship.Ship,
    agent: agent.Agent,
    transaction: shipyard_transaction.ShipyardTransaction,
  )
}

Constructors

pub type ShipRefined {
  ShipRefined(
    cargo: ship_cargo.ShipCargo,
    cooldown: cooldown.Cooldown,
    produced: List(refinement_yield.RefinementYield),
    consumed: List(refinement_yield.RefinementYield),
  )
}

Constructors

pub type ShipRefueled {
  ShipRefueled(
    agent: agent.Agent,
    fuel: ship_fuel.ShipFuel,
    cargo: ship_cargo.ShipCargo,
    transaction: market_transaction.MarketTransaction,
  )
}

Constructors

pub type ShipRepaired {
  ShipRepaired(
    agent: agent.Agent,
    ship: ship.Ship,
    transaction: repair_transaction.RepairTransaction,
  )
}

Constructors

pub type ShipScrapped {
  ShipScrapped(
    agent: agent.Agent,
    transaction: scrap_transaction.ScrapTransaction,
  )
}

Constructors

pub type ShipWarped {
  ShipWarped(
    nav: ship_nav.ShipNav,
    fuel: ship_fuel.ShipFuel,
    events: List(ship_condition_event.ShipConditionEvent),
  )
}

Constructors

pub type Stats {
  Stats(
    accounts: option.Option(Int),
    agents: Int,
    ships: Int,
    systems: Int,
    waypoints: Int,
  )
}

Constructors

  • Stats(
      accounts: option.Option(Int),
      agents: Int,
      ships: Int,
      systems: Int,
      waypoints: Int,
    )
pub type SurveyCreated {
  SurveyCreated(
    cooldown: cooldown.Cooldown,
    surveys: List(survey.Survey),
  )
}

Constructors

Values

pub fn accept_contract_request(
  token: agent_token.AgentToken,
  contract_id: contract_id.ContractId,
) -> request.Request(BitArray)
pub fn accept_contract_response(
  response: response.Response(BitArray),
) -> Result(ContractAccepted, ApiError)
pub fn create_chart_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn create_chart_response(
  response: response.Response(BitArray),
) -> Result(ChartCreated, ApiError)
pub fn create_survey_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn create_survey_response(
  response: response.Response(BitArray),
) -> Result(SurveyCreated, ApiError)
pub fn deliver_contract_cargo_request(
  token: agent_token.AgentToken,
  contract_id: contract_id.ContractId,
  ship_symbol: ship_symbol.ShipSymbol,
  trade_symbol: trade_symbol.TradeSymbol,
  units: Int,
) -> request.Request(BitArray)
pub fn deliver_contract_cargo_response(
  response: response.Response(BitArray),
) -> Result(ContractCargoDelivered, ApiError)
pub fn dock_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn dock_ship_response(
  response: response.Response(BitArray),
) -> Result(ship_nav.ShipNav, ApiError)
pub fn extract_resources_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn extract_resources_response(
  response: response.Response(BitArray),
) -> Result(ResourcesExtracted, ApiError)
pub fn extract_resources_with_survey_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  survey: survey.Survey,
) -> request.Request(BitArray)
pub fn extract_resources_with_survey_response(
  response: response.Response(BitArray),
) -> Result(ResourcesExtracted, ApiError)
pub fn fulfill_contract_request(
  token: agent_token.AgentToken,
  contract_id: contract_id.ContractId,
) -> request.Request(BitArray)
pub fn fulfill_contract_response(
  response: response.Response(BitArray),
) -> Result(ContractFulfilled, ApiError)
pub fn get_account_request(
  token: agent_token.AgentToken,
) -> request.Request(BitArray)
pub fn get_account_response(
  response: response.Response(BitArray),
) -> Result(account.Account, ApiError)
pub fn get_agent_events_request(
  token: agent_token.AgentToken,
) -> request.Request(BitArray)
pub fn get_agent_events_response(
  response: response.Response(BitArray),
) -> Result(List(agent_event.AgentEvent), ApiError)
pub fn get_agent_request(
  token: agent_token.AgentToken,
) -> request.Request(BitArray)
pub fn get_agent_response(
  response: response.Response(BitArray),
) -> Result(agent.Agent, ApiError)
pub fn get_construction_site_request(
  system_symbol: system_symbol.SystemSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn get_construction_site_response(
  response: response.Response(BitArray),
) -> Result(construction.Construction, ApiError)
pub fn get_contract_request(
  token: agent_token.AgentToken,
  contract_id: contract_id.ContractId,
) -> request.Request(BitArray)
pub fn get_contract_response(
  response: response.Response(BitArray),
) -> Result(contract.Contract, ApiError)
pub fn get_faction_request(
  symbol: faction_symbol.FactionSymbol,
) -> request.Request(BitArray)
pub fn get_faction_response(
  response: response.Response(BitArray),
) -> Result(faction.Faction, ApiError)
pub fn get_jump_gate_request(
  system_symbol: system_symbol.SystemSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn get_jump_gate_response(
  response: response.Response(BitArray),
) -> Result(jump_gate.JumpGate, ApiError)
pub fn get_market_request(
  system_symbol: system_symbol.SystemSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn get_market_response(
  response: response.Response(BitArray),
) -> Result(market.Market, ApiError)
pub fn get_my_factions_request(
  token: agent_token.AgentToken,
  page: option.Option(Int),
  limit: option.Option(Int),
) -> request.Request(BitArray)
pub fn get_my_factions_response(
  response: response.Response(BitArray),
) -> Result(
  paged_data.PagedData(List(FactionReputation)),
  ApiError,
)
pub fn get_public_agent_request(
  agent_symbol: agent_symbol.AgentSymbol,
) -> request.Request(BitArray)
pub fn get_public_agent_response(
  response: response.Response(BitArray),
) -> Result(public_agent.PublicAgent, ApiError)
pub fn get_repair_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_repair_ship_response(
  response: response.Response(BitArray),
) -> Result(repair_transaction.RepairTransaction, ApiError)
pub fn get_scrap_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_scrap_ship_response(
  response: response.Response(BitArray),
) -> Result(scrap_transaction.ScrapTransaction, ApiError)
pub fn get_server_status_request() -> request.Request(BitArray)
pub fn get_server_status_response(
  response: response.Response(BitArray),
) -> Result(ServerStatus, ApiError)
pub fn get_ship_cargo_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_ship_cargo_response(
  response: response.Response(BitArray),
) -> Result(ship_cargo.ShipCargo, ApiError)
pub fn get_ship_cooldown_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_ship_cooldown_response(
  response: response.Response(BitArray),
) -> Result(option.Option(cooldown.Cooldown), ApiError)
pub fn get_ship_modules_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_ship_modules_response(
  response: response.Response(BitArray),
) -> Result(List(ship_module.ShipModule), ApiError)
pub fn get_ship_mounts_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_ship_mounts_response(
  response: response.Response(BitArray),
) -> Result(List(ship_mount.ShipMount), ApiError)
pub fn get_ship_nav_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_ship_nav_response(
  response: response.Response(BitArray),
) -> Result(ship_nav.ShipNav, ApiError)
pub fn get_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn get_ship_response(
  response: response.Response(BitArray),
) -> Result(ship.Ship, ApiError)
pub fn get_shipyard_request(
  system_symbol: system_symbol.SystemSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn get_shipyard_response(
  response: response.Response(BitArray),
) -> Result(shipyard.Shipyard, ApiError)
pub fn get_supply_chain_request() -> request.Request(BitArray)
pub fn get_supply_chain_response(
  response: response.Response(BitArray),
) -> Result(
  dict.Dict(
    trade_symbol.TradeSymbol,
    List(trade_symbol.TradeSymbol),
  ),
  ApiError,
)
pub fn get_system_request(
  system_symbol: system_symbol.SystemSymbol,
) -> request.Request(BitArray)
pub fn get_system_response(
  response: response.Response(BitArray),
) -> Result(system.System, ApiError)
pub fn get_waypoint_request(
  system_symbol: system_symbol.SystemSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn get_waypoint_response(
  response: response.Response(BitArray),
) -> Result(waypoint.Waypoint, ApiError)
pub fn install_ship_module_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  module_symbol: module_symbol.ModuleSymbol,
) -> request.Request(BitArray)
pub fn install_ship_module_response(
  response: response.Response(BitArray),
) -> Result(ShipModuleInstalled, ApiError)
pub fn install_ship_mount_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  mount_symbol: mount_symbol.MountSymbol,
) -> request.Request(BitArray)
pub fn install_ship_mount_response(
  response: response.Response(BitArray),
) -> Result(ShipMountInstalled, ApiError)
pub fn jettison_cargo_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  trade_symbol: trade_symbol.TradeSymbol,
  units: Int,
) -> request.Request(BitArray)
pub fn jettison_cargo_response(
  response: response.Response(BitArray),
) -> Result(ship_cargo.ShipCargo, ApiError)
pub fn jump_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn jump_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipJumped, ApiError)
pub fn list_contracts_request(
  token: agent_token.AgentToken,
  page: option.Option(Int),
  limit: option.Option(Int),
) -> request.Request(BitArray)
pub fn list_contracts_response(
  response: response.Response(BitArray),
) -> Result(
  paged_data.PagedData(List(contract.Contract)),
  ApiError,
)
pub fn list_error_codes_request() -> request.Request(BitArray)
pub fn list_error_codes_response(
  response: response.Response(BitArray),
) -> Result(List(ErrorCode), ApiError)
pub fn list_factions_request(
  page: option.Option(Int),
  limit: option.Option(Int),
) -> request.Request(BitArray)
pub fn list_factions_response(
  response: response.Response(BitArray),
) -> Result(paged_data.PagedData(List(faction.Faction)), ApiError)
pub fn list_public_agents_request(
  page: option.Option(Int),
  limit: option.Option(Int),
) -> request.Request(BitArray)
pub fn list_public_agents_response(
  response: response.Response(BitArray),
) -> Result(
  paged_data.PagedData(List(public_agent.PublicAgent)),
  ApiError,
)
pub fn list_ships_request(
  token: agent_token.AgentToken,
  page: option.Option(Int),
  limit: option.Option(Int),
) -> request.Request(BitArray)
pub fn list_ships_response(
  response: response.Response(BitArray),
) -> Result(paged_data.PagedData(List(ship.Ship)), ApiError)
pub fn list_system_waypoints_request(
  system_symbol: system_symbol.SystemSymbol,
  page: option.Option(Int),
  limit: option.Option(Int),
  type_: option.Option(waypoint_type.WaypointType),
  traits: List(waypoint_trait_symbol.WaypointTraitSymbol),
) -> request.Request(BitArray)
pub fn list_system_waypoints_response(
  response: response.Response(BitArray),
) -> Result(
  paged_data.PagedData(List(waypoint.Waypoint)),
  ApiError,
)
pub fn list_systems_request(
  page: option.Option(Int),
  limit: option.Option(Int),
) -> request.Request(BitArray)
pub fn list_systems_response(
  response: response.Response(BitArray),
) -> Result(paged_data.PagedData(List(system.System)), ApiError)
pub fn navigate_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn navigate_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipNavigated, ApiError)
pub fn negotiate_contract_request(
  token: agent_token.AgentToken,
  ship_symbol: String,
) -> request.Request(BitArray)
pub fn negotiate_contract_response(
  response: response.Response(BitArray),
) -> Result(contract.Contract, ApiError)
pub fn orbit_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn orbit_ship_response(
  response: response.Response(BitArray),
) -> Result(ship_nav.ShipNav, ApiError)
pub fn patch_ship_nav_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  flight_mode: ship_nav_flight_mode.ShipNavFlightMode,
) -> request.Request(BitArray)
pub fn patch_ship_nav_response(
  response: response.Response(BitArray),
) -> Result(ShipNavPatched, ApiError)
pub fn purchase_cargo_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  trade_symbol: trade_symbol.TradeSymbol,
) -> request.Request(BitArray)
pub fn purchase_cargo_response(
  response: response.Response(BitArray),
) -> Result(CargoPurchased, ApiError)
pub fn purchase_ship_request(
  token: agent_token.AgentToken,
  ship_type: ship_type.ShipType,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn purchase_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipPurchased, ApiError)
pub fn refine_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipRefined, ApiError)
pub fn refuel_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  units: option.Option(Int),
  from_cargo: option.Option(Bool),
) -> request.Request(BitArray)
pub fn refuel_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipRefueled, ApiError)
pub fn register_new_agent_request(
  token: account_token.AccountToken,
  agent_symbol: agent_symbol.AgentSymbol,
  faction_symbol: faction_symbol.FactionSymbol,
) -> request.Request(BitArray)
pub fn register_new_agent_response(
  response: response.Response(BitArray),
) -> Result(AgentRegistered, ApiError)
pub fn remove_ship_module_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  module_symbol: module_symbol.ModuleSymbol,
) -> request.Request(BitArray)
pub fn remove_ship_module_response(
  response: response.Response(BitArray),
) -> Result(ShipModuleRemoved, ApiError)
pub fn remove_ship_mount_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  mount_symbol: mount_symbol.MountSymbol,
) -> request.Request(BitArray)
pub fn remove_ship_mount_response(
  response: response.Response(BitArray),
) -> Result(ShipMountRemoved, ApiError)
pub fn repair_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn repair_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipRepaired, ApiError)
pub fn scan_ships_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn scan_ships_response(
  response: response.Response(BitArray),
) -> Result(Scan(scanned_ship.ScannedShip), ApiError)
pub fn scan_systems_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn scan_systems_response(
  response: response.Response(BitArray),
) -> Result(Scan(scanned_system.ScannedSystem), ApiError)
pub fn scan_waypoints_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn scan_waypoints_response(
  response: response.Response(BitArray),
) -> Result(Scan(scanned_waypoint.ScannedWaypoint), ApiError)
pub fn scrap_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn scrap_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipScrapped, ApiError)
pub fn sell_cargo_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  trade_symbol: trade_symbol.TradeSymbol,
  units: Int,
) -> request.Request(BitArray)
pub fn sell_cargo_response(
  response: response.Response(BitArray),
) -> Result(CargoSold, ApiError)
pub fn siphon_resources_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn siphon_resources_response(
  response: response.Response(BitArray),
) -> Result(ResourcesSiphoned, ApiError)
pub fn supply_construction_site_request(
  token: agent_token.AgentToken,
  system_symbol: system_symbol.SystemSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
  ship_symbol: ship_symbol.ShipSymbol,
  trade_symbol: trade_symbol.TradeSymbol,
  units: Int,
) -> request.Request(BitArray)
pub fn supply_construction_site_response(
  response: response.Response(BitArray),
) -> Result(ConstructionSiteSupplied, ApiError)
pub fn transfer_cargo_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  trade_symbol: trade_symbol.TradeSymbol,
  units: Int,
  target_ship_symbol: ship_symbol.ShipSymbol,
) -> request.Request(BitArray)
pub fn transfer_cargo_response(
  response: response.Response(BitArray),
) -> Result(CargoTransferred, ApiError)
pub fn warp_ship_request(
  token: agent_token.AgentToken,
  ship_symbol: ship_symbol.ShipSymbol,
  waypoint_symbol: waypoint_symbol.WaypointSymbol,
) -> request.Request(BitArray)
pub fn warp_ship_response(
  response: response.Response(BitArray),
) -> Result(ShipWarped, ApiError)
Search Document