spacetraders_sdk
Values
pub const accept_contract: fn(
auth.AgentToken,
contract_id.ContractId,
) -> Result(contracts.ContractAccepted, api.ApiError)
pub const create_chart: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(fleet.ChartCreated, api.ApiError)
pub const create_survey: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(fleet.SurveyCreated, api.ApiError)
pub const deliver_contract_cargo: fn(
auth.AgentToken,
contract_id.ContractId,
ship_symbol.ShipSymbol,
trade_symbol.TradeSymbol,
Int,
) -> Result(contracts.ContractCargoDelivered, api.ApiError)
pub const dock_ship: fn(auth.AgentToken, ship_symbol.ShipSymbol) -> Result(
ship_nav.ShipNav,
api.ApiError,
)
pub const extract_resources: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(fleet.ResourcesExtracted, api.ApiError)
pub const extract_resources_with_survey: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
survey.Survey,
) -> Result(fleet.ResourcesExtracted, api.ApiError)
pub const fulfill_contract: fn(
auth.AgentToken,
contract_id.ContractId,
) -> Result(contracts.ContractFulfilled, api.ApiError)
pub const get_account: fn(auth.AgentToken) -> Result(
account.Account,
api.ApiError,
)
pub const get_agent: fn(auth.AgentToken) -> Result(
agent.Agent,
api.ApiError,
)
pub const get_agent_events: fn(auth.AgentToken) -> Result(
List(agent_event.AgentEvent),
api.ApiError,
)
pub const get_construction_site: fn(
system_symbol.SystemSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(construction.Construction, api.ApiError)
pub const get_contract: fn(
auth.AgentToken,
contract_id.ContractId,
) -> Result(contract.Contract, api.ApiError)
pub const get_faction: fn(faction_symbol.FactionSymbol) -> Result(
faction.Faction,
api.ApiError,
)
pub const get_jump_gate: fn(
system_symbol.SystemSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(jump_gate.JumpGate, api.ApiError)
pub const get_market: fn(
system_symbol.SystemSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(market.Market, api.ApiError)
pub const get_my_factions: fn(
auth.AgentToken,
option.Option(Int),
option.Option(Int),
) -> Result(
api.PagedData(List(factions.FactionReputation)),
api.ApiError,
)
pub const get_public_agent: fn(agent_symbol.AgentSymbol) -> Result(
public_agent.PublicAgent,
api.ApiError,
)
pub const get_repair_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(fleet.ShipRepaired, api.ApiError)
pub const get_scrap_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(scrap_transaction.ScrapTransaction, api.ApiError)
pub const get_server_status: fn() -> Result(
global.ServerStatus,
api.ApiError,
)
pub const get_ship: fn(auth.AgentToken, ship_symbol.ShipSymbol) -> Result(
ship.Ship,
api.ApiError,
)
pub const get_ship_cargo: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(ship_cargo.ShipCargo, api.ApiError)
pub const get_ship_cooldown: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(option.Option(cooldown.Cooldown), api.ApiError)
pub const get_ship_modules: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(List(ship_module.ShipModule), api.ApiError)
pub const get_ship_mounts: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(List(ship_mount.ShipMount), api.ApiError)
pub const get_ship_nav: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(ship_nav.ShipNav, api.ApiError)
pub const get_shipyard: fn(
system_symbol.SystemSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(shipyard.Shipyard, api.ApiError)
pub const get_supply_chain: fn() -> Result(
dict.Dict(
trade_symbol.TradeSymbol,
List(trade_symbol.TradeSymbol),
),
api.ApiError,
)
pub const get_system: fn(system_symbol.SystemSymbol) -> Result(
system.System,
api.ApiError,
)
pub const get_waypoint: fn(
system_symbol.SystemSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(waypoint.Waypoint, api.ApiError)
pub const install_ship_module: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
module_symbol.ModuleSymbol,
) -> Result(fleet.ShipModuleInstalled, api.ApiError)
pub const install_ship_mount: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
mount_symbol.MountSymbol,
) -> Result(fleet.ShipMountInstalled, api.ApiError)
pub const jettison_cargo: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
trade_symbol.TradeSymbol,
Int,
) -> Result(ship_cargo.ShipCargo, api.ApiError)
pub const jump_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(fleet.ShipJumped, api.ApiError)
pub const list_contracts: fn(
auth.AgentToken,
option.Option(Int),
option.Option(Int),
) -> Result(api.PagedData(List(contract.Contract)), api.ApiError)
pub const list_error_codes: fn() -> Result(
List(global.ErrorCode),
api.ApiError,
)
pub const list_factions: fn(
option.Option(Int),
option.Option(Int),
) -> Result(api.PagedData(List(faction.Faction)), api.ApiError)
pub const list_public_agents: fn(
option.Option(Int),
option.Option(Int),
) -> Result(
api.PagedData(List(public_agent.PublicAgent)),
api.ApiError,
)
pub const list_ships: fn(
auth.AgentToken,
option.Option(Int),
option.Option(Int),
) -> Result(api.PagedData(List(ship.Ship)), api.ApiError)
pub const list_system_waypoints: fn(
system_symbol.SystemSymbol,
option.Option(Int),
option.Option(Int),
option.Option(waypoint_type.WaypointType),
List(waypoint_trait_symbol.WaypointTraitSymbol),
) -> Result(api.PagedData(List(waypoint.Waypoint)), api.ApiError)
pub const list_systems: fn(option.Option(Int), option.Option(Int)) -> Result(
api.PagedData(List(system.System)),
api.ApiError,
)
pub const navigate_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(fleet.ShipNavigated, api.ApiError)
pub const negotiate_contract: fn(auth.AgentToken, String) -> Result(
contract.Contract,
api.ApiError,
)
pub const orbit_ship: fn(auth.AgentToken, ship_symbol.ShipSymbol) -> Result(
ship_nav.ShipNav,
api.ApiError,
)
pub const patch_ship_nav: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
ship_nav_flight_mode.ShipNavFlightMode,
) -> Result(fleet.ShipNavPatched, api.ApiError)
pub const purchase_cargo: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
trade_symbol.TradeSymbol,
) -> Result(fleet.CargoPurchased, api.ApiError)
pub const purchase_ship: fn(
auth.AgentToken,
ship_type.ShipType,
waypoint_symbol.WaypointSymbol,
) -> Result(fleet.ShipPurchased, api.ApiError)
pub const refine_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
refinement_produce.RefinementProduce,
) -> Result(fleet.ShipRefined, api.ApiError)
pub const refuel_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
option.Option(Int),
option.Option(Bool),
) -> Result(fleet.ShipRefueled, api.ApiError)
pub const register_new_agent: fn(
auth.AccountToken,
agent_symbol.AgentSymbol,
faction_symbol.FactionSymbol,
) -> Result(accounts.AgentRegistered, api.ApiError)
pub const remove_ship_module: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
module_symbol.ModuleSymbol,
) -> Result(fleet.ShipModuleRemoved, api.ApiError)
pub const remove_ship_mount: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
mount_symbol.MountSymbol,
) -> Result(fleet.ShipMountRemoved, api.ApiError)
pub const repair_ship: fn(auth.AgentToken, ship_symbol.ShipSymbol) -> Result(
fleet.ShipRepaired,
api.ApiError,
)
pub const scan_ships: fn(auth.AgentToken, ship_symbol.ShipSymbol) -> Result(
fleet.Scan(scanned_ship.ScannedShip),
api.ApiError,
)
pub const scan_systems: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(
fleet.Scan(scanned_system.ScannedSystem),
api.ApiError,
)
pub const scan_waypoints: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(
fleet.Scan(scanned_waypoint.ScannedWaypoint),
api.ApiError,
)
pub const scrap_ship: fn(auth.AgentToken, ship_symbol.ShipSymbol) -> Result(
fleet.ShipScrapped,
api.ApiError,
)
pub const sell_cargo: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
trade_symbol.TradeSymbol,
Int,
) -> Result(fleet.CargoSold, api.ApiError)
pub const siphon_resources: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
) -> Result(fleet.ResourcesSiphoned, api.ApiError)
pub const supply_construction_site: fn(
system_symbol.SystemSymbol,
waypoint_symbol.WaypointSymbol,
ship_symbol.ShipSymbol,
trade_symbol.TradeSymbol,
Int,
) -> Result(systems.ConstructionSiteSupplied, api.ApiError)
pub const transfer_cargo: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
trade_symbol.TradeSymbol,
Int,
ship_symbol.ShipSymbol,
) -> Result(fleet.CargoTransferred, api.ApiError)
pub const warp_ship: fn(
auth.AgentToken,
ship_symbol.ShipSymbol,
waypoint_symbol.WaypointSymbol,
) -> Result(fleet.ShipWarped, api.ApiError)