feature: Final mining touches, with closing contracts and negotiating new ones

This commit is contained in:
Keith Solomon
2026-02-11 18:23:37 -06:00
parent 7dc7ce6e50
commit c935ac0dda
3 changed files with 222 additions and 20 deletions

View File

@@ -291,6 +291,34 @@ class SpacetradersApi {
);
}
/**
* Fulfill a contract for the current agent.
*
* @param string $contractId The contract ID to fulfill.
*
* @return array<string,mixed>
*/
public function fulfillContract( string $contractId ): array {
return $this->request(
'POST',
'/my/contracts/' . rawurlencode( $contractId ) . '/fulfill'
);
}
/**
* Negotiate a new contract using a ship.
*
* @param string $shipSymbol The ship symbol that will negotiate the contract.
*
* @return array<string,mixed>
*/
public function negotiateContract( string $shipSymbol ): array {
return $this->request(
'POST',
'/my/ships/' . rawurlencode( $shipSymbol ) . '/negotiate/contract'
);
}
/**
* Deliver cargo for a contract using a ship at the delivery destination.
*